Ignore:
Timestamp:
Aug 20, 2014, 1:04:08 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Children:
1ae9aa
Parents:
0710bf
git-author:
Frederik Heber <heber@…> (06/29/14 18:02:32)
git-committer:
Frederik Heber <heber@…> (08/20/14 13:04:08)
Message:

Extended SphericalPointDistribution::Polygon_t to WeightedPolygon_t.

  • contains additionally the weights from the already present points.
  • in order to deal sensibly with present bonds of higher degree (>1) that shift neighboring occupied orbitals even further away, we additionally pass on the bond degree. This indicates how many points of the N points have to be accumulated for this on present bond.
  • TESTS: Regression test FragmentMolecule-cylces failing for the moment.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/SaturatedFragment.cpp

    r0710bf r260540  
    194194//  }
    195195
    196   SphericalPointDistribution::Polygon_t Polygon;
     196  SphericalPointDistribution::WeightedPolygon_t Polygon;
    197197  {
    198198    // prepare a list of "uncut" bonds via set_difference. For this both lists
     
    220220      // always use unit distances
    221221      DistanceVector.Normalize();
    222       Polygon.push_back( DistanceVector );
     222      Polygon.push_back( std::make_pair(DistanceVector, (*bonditer)->getDegree()) );
    223223    }
    224224    LOG(3, "DEBUG: Polygon of atom " << *_atom << " to saturate is " << Polygon);
    225225  }
    226226
    227   unsigned int NumberOfPoints = 0;
    228   {
    229     // get the new number of bonds
    230     const BondList & ListOfBonds = _atom->getListOfBonds();
    231     NumberOfPoints = ListOfBonds.size() - _cutbonds.size(); // number remaining bonds
    232     NumberOfPoints += _atom->getElement().getNoValenceOrbitals(); // plus valence
    233     // minus remaining bonds weighted by its degree
    234     for (BondList::const_iterator BondRunner = ListOfBonds.begin();
    235         BondRunner != ListOfBonds.end();
    236         ++BondRunner) {
    237       // if not one of the cut bonds, reduce by its bond degree -1 (for the one bond itself)
    238       const BondList::const_iterator finditer =
    239           std::find(_cutbonds.begin(), _cutbonds.end(), *BondRunner);
    240       if (finditer == _cutbonds.end())
    241         NumberOfPoints -= (*BondRunner)->getDegree();
    242     }
    243     LOG(3, "DEBUG: There are " << NumberOfPoints
    244         << " places to fill in in total for this atom " << *_atom << ".");
    245   }
     227  unsigned int NumberOfPoints = _atom->getElement().getNoValenceOrbitals();
     228  LOG(3, "DEBUG: There are " << NumberOfPoints
     229      << " places to fill in in total for this atom " << *_atom << ".");
    246230
    247231  // get perfect node distribution for the given remaining atoms with respect
Note: See TracChangeset for help on using the changeset viewer.