Changes in src/molecule_graph.cpp [d103d3:59fff1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/molecule_graph.cpp ¶
rd103d3 r59fff1 52 52 bool molecule::FillBondStructureFromReference(const molecule * const reference, atom **&ListOfLocalAtoms, bool FreeList) 53 53 { 54 atom *OtherWalker = NULL; 55 atom *Father = NULL; 56 bool status = true; 57 int AtomNo; 54 bool status = true; 58 55 59 56 LOG(1, "Begin of FillBondStructureFromReference."); … … 71 68 72 69 73 for(molecule:: const_iterator iter = begin(); iter != end(); ++iter) {74 Father = (*iter)->GetTrueFather();75 AtomNo = Father->getNr(); // global id of the current walker70 for(molecule::iterator iter = begin(); iter != end(); ++iter) { 71 const atom * const Father = (*iter)->GetTrueFather(); 72 const int AtomNo = Father->getNr(); // global id of the current walker 76 73 const BondList& ListOfBonds = Father->getListOfBonds(); 77 74 for (BondList::const_iterator Runner = ListOfBonds.begin(); 78 75 Runner != ListOfBonds.end(); 79 76 ++Runner) { 80 OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->getNr()]; // local copy of current bond partner of walker 77 atom * const OtherAtom = (*Runner)->GetOtherAtom((*iter)->GetTrueFather()); 78 atom * const OtherWalker = ListOfLocalAtoms[OtherAtom->getNr()]; // local copy of current bond partner of walker 81 79 if (OtherWalker != NULL) { 82 80 if (OtherWalker->getNr() > (*iter)->getNr()) 83 81 AddBond((*iter), OtherWalker, (*Runner)->BondDegree); 84 82 } else { 85 LOG(1, "OtherWalker = ListOfLocalAtoms[" << (*Runner)->GetOtherAtom((*iter)->GetTrueFather())->getNr() << "] is NULL!");83 LOG(1, "OtherWalker = ListOfLocalAtoms[" << OtherAtom->getNr() << "] is NULL!"); 86 84 status = false; 87 85 } … … 154 152 if (AdjacencyFile.good()) { 155 153 AdjacencyFile << "m\tn" << endl; 156 for_each( atoms.begin(),atoms.end(),bind2nd(mem_fun(&atom::OutputAdjacency),&AdjacencyFile));154 for_each(begin(),end(),bind2nd(mem_fun(&atom::OutputAdjacency),&AdjacencyFile)); 157 155 AdjacencyFile.close(); 158 156 LOG(1, "\t... done."); … … 186 184 if (BondFile.good()) { 187 185 BondFile << "m\tn" << endl; 188 for_each( atoms.begin(),atoms.end(),bind2nd(mem_fun(&atom::OutputBonds),&BondFile));186 for_each(begin(),end(),bind2nd(mem_fun(&atom::OutputBonds),&BondFile)); 189 187 BondFile.close(); 190 188 LOG(1, "\t... done.");
Note:
See TracChangeset
for help on using the changeset viewer.