Changeset 260540 for src/Fragmentation/Exporters/SaturatedFragment.cpp
- Timestamp:
- Aug 20, 2014, 1:04:08 PM (11 years ago)
- 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)
- File:
-
- 1 edited
-
src/Fragmentation/Exporters/SaturatedFragment.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Exporters/SaturatedFragment.cpp
r0710bf r260540 194 194 // } 195 195 196 SphericalPointDistribution:: Polygon_t Polygon;196 SphericalPointDistribution::WeightedPolygon_t Polygon; 197 197 { 198 198 // prepare a list of "uncut" bonds via set_difference. For this both lists … … 220 220 // always use unit distances 221 221 DistanceVector.Normalize(); 222 Polygon.push_back( DistanceVector);222 Polygon.push_back( std::make_pair(DistanceVector, (*bonditer)->getDegree()) ); 223 223 } 224 224 LOG(3, "DEBUG: Polygon of atom " << *_atom << " to saturate is " << Polygon); 225 225 } 226 226 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 << "."); 246 230 247 231 // get perfect node distribution for the given remaining atoms with respect
Note:
See TracChangeset
for help on using the changeset viewer.
