Changeset 735b1c
- Timestamp:
- Mar 1, 2011, 10:16:39 AM (14 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 5309ba
- Parents:
- a479fa
- git-author:
- Frederik Heber <heber@…> (02/22/11 00:15:33)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:39)
- Location:
- src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
src/BoundaryPointSet.cpp
ra479fa r735b1c 57 57 node(Walker), 58 58 value(0.), 59 Nr(Walker-> ParticleInfo_nr)59 Nr(Walker->getNr()) 60 60 { 61 61 Info FunctionInfo(__func__); … … 108 108 { 109 109 ASSERT(node != NULL, "BoundaryPointSet::getPosition() - internal node is NULL."); 110 return node-> ParticleInfo_nr;110 return node->getNr(); 111 111 } 112 112 -
src/BoundaryPointSet.hpp
ra479fa r735b1c 52 52 /** Getter for \a node's ParticleInfo_nr. 53 53 * 54 * @return ParticleInfo_nrof \a node54 * @return getNr() of \a node 55 55 */ 56 56 const int& getNr() const; -
src/analysis_bonds.cpp
ra479fa r735b1c 239 239 BondRunner++) { 240 240 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(theAtom); 241 if (((OtherAtom->getType() == first) || (OtherAtom->getType() == second)) && (theAtom-> ParticleInfo_nr < OtherAtom->ParticleInfo_nr)) {241 if (((OtherAtom->getType() == first) || (OtherAtom->getType() == second)) && (theAtom->getNr() < OtherAtom->getNr())) { 242 242 count++; 243 243 DoLog(1) && (Log() << Verbose(1) << *first << "-" << *second << " bond found between " << *Walker << " and " << *OtherAtom << "." << endl); -
src/atom.cpp
ra479fa r735b1c 152 152 *out << " # " << comment << endl; 153 153 else 154 *out << " # molecule nr " << ParticleInfo_nr<< endl;154 *out << " # molecule nr " << getNr() << endl; 155 155 return true; 156 156 } else … … 179 179 *out << " # " << comment << endl; 180 180 else 181 *out << " # molecule nr " << ParticleInfo_nr<< endl;181 *out << " # molecule nr " << getNr() << endl; 182 182 return true; 183 183 } else … … 218 218 if (getAtomicForceAtStep(step).Norm() > MYEPSILON) 219 219 *out << "\t" << scientific << setprecision(6) << getAtomicForceAtStep(step)[0] << "\t" << getAtomicForceAtStep(step)[1] << "\t" << getAtomicForceAtStep(step)[2] << "\t"; 220 *out << "\t# Number in molecule " << ParticleInfo_nr<< endl;220 *out << "\t# Number in molecule " << getNr() << endl; 221 221 return true; 222 222 } else … … 259 259 bool atom::Compare(const atom &ptr) const 260 260 { 261 if ( ParticleInfo_nr < ptr.ParticleInfo_nr)261 if (getNr() < ptr.getNr()) 262 262 return true; 263 263 else … … 379 379 380 380 int atom::getNr() const{ 381 return ParticleInfo _nr;381 return ParticleInfo::getNr(); 382 382 } 383 383 -
src/atom_bondedparticle.cpp
ra479fa r735b1c 50 50 void BondedParticle::OutputOrder(ofstream *file) const 51 51 { 52 *file << ParticleInfo_nr<< "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << endl;53 //Log() << Verbose(2) << "Storing: " << ParticleInfo_nr<< "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << "." << endl;52 *file << getNr() << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << endl; 53 //Log() << Verbose(2) << "Storing: " << getNr() << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << "." << endl; 54 54 }; 55 55 … … 59 59 { 60 60 const BondList& ListOfBonds = getListOfBonds(); 61 DoLog(4) && (Log() << Verbose(4) << "Atom " << getName() << "/" << ParticleInfo_nr<< " with " << ListOfBonds.size() << " bonds: " << endl);61 DoLog(4) && (Log() << Verbose(4) << "Atom " << getName() << "/" << getNr() << " with " << ListOfBonds.size() << " bonds: " << endl); 62 62 int TotalDegree = 0; 63 63 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) { … … 74 74 { 75 75 const BondList& ListOfBonds = getListOfBonds(); 76 *AdjacencyFile << ParticleInfo_nr<< "\t";76 *AdjacencyFile << getNr() << "\t"; 77 77 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner)) 78 *AdjacencyFile << (*Runner)->GetOtherAtom(this)-> ParticleInfo_nr<< "\t";78 *AdjacencyFile << (*Runner)->GetOtherAtom(this)->getNr() << "\t"; 79 79 *AdjacencyFile << endl; 80 80 }; … … 88 88 const BondList& ListOfBonds = getListOfBonds(); 89 89 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner)) 90 if ( ParticleInfo_nr < (*Runner)->GetOtherAtom(this)->ParticleInfo_nr)91 *BondFile << ParticleInfo_nr << "\t" << (*Runner)->GetOtherAtom(this)->ParticleInfo_nr<< "\n";90 if (getNr() < (*Runner)->GetOtherAtom(this)->getNr()) 91 *BondFile << getNr() << "\t" << (*Runner)->GetOtherAtom(this)->getNr() << "\n"; 92 92 }; 93 93 -
src/atom_particleinfo.hpp
ra479fa r735b1c 28 28 class ParticleInfo { 29 29 public: 30 int ParticleInfo_nr; // index to easierly identify31 32 30 ParticleInfo(); 33 31 ParticleInfo(ParticleInfo*); … … 57 55 ostream & operator << (ostream &ost) const; 58 56 57 protected: 58 int ParticleInfo_nr; // index to easierly identify, only protected as used in atom::sort 59 59 60 private: 60 61 std::string name; // some name to reference to on output -
src/bond.cpp
ra479fa r735b1c 120 120 bool bond::Contains(const int number) 121 121 { 122 return ((leftatom-> ParticleInfo_nr == number) || (rightatom->ParticleInfo_nr== number));122 return ((leftatom->getNr() == number) || (rightatom->getNr() == number)); 123 123 }; 124 124 -
src/boundary.cpp
ra479fa r735b1c 909 909 DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is outer point." << endl); 910 910 // copy atom ... 911 CopyAtoms[(*iter)-> ParticleInfo_nr] = (*iter)->clone();912 (*CopyAtoms[(*iter)-> ParticleInfo_nr]).setPosition(Inserter);913 Filling->AddAtom(CopyAtoms[(*iter)-> ParticleInfo_nr]);914 DoLog(1) && (Log() << Verbose(1) << "Filling atom " << **iter << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[(*iter)-> ParticleInfo_nr]->getPosition()) << "." << endl);911 CopyAtoms[(*iter)->getNr()] = (*iter)->clone(); 912 (*CopyAtoms[(*iter)->getNr()]).setPosition(Inserter); 913 Filling->AddAtom(CopyAtoms[(*iter)->getNr()]); 914 DoLog(1) && (Log() << Verbose(1) << "Filling atom " << **iter << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[(*iter)->getNr()]->getPosition()) << "." << endl); 915 915 } else { 916 916 DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance." << endl); 917 CopyAtoms[(*iter)-> ParticleInfo_nr] = NULL;917 CopyAtoms[(*iter)->getNr()] = NULL; 918 918 continue; 919 919 } … … 927 927 if ((*BondRunner)->leftatom == *AtomRunner) { 928 928 Binder = (*BondRunner); 929 if ((CopyAtoms[Binder->leftatom-> ParticleInfo_nr] != NULL) && (CopyAtoms[Binder->rightatom->ParticleInfo_nr] != NULL)) {930 Log() << Verbose(3) << "Adding Bond between " << *CopyAtoms[Binder->leftatom-> ParticleInfo_nr] << " and " << *CopyAtoms[Binder->rightatom->ParticleInfo_nr]<< "." << endl;931 Filling->AddBond(CopyAtoms[Binder->leftatom-> ParticleInfo_nr], CopyAtoms[Binder->rightatom->ParticleInfo_nr], Binder->BondDegree);929 if ((CopyAtoms[Binder->leftatom->getNr()] != NULL) && (CopyAtoms[Binder->rightatom->getNr()] != NULL)) { 930 Log() << Verbose(3) << "Adding Bond between " << *CopyAtoms[Binder->leftatom->getNr()] << " and " << *CopyAtoms[Binder->rightatom->getNr()]<< "." << endl; 931 Filling->AddBond(CopyAtoms[Binder->leftatom->getNr()], CopyAtoms[Binder->rightatom->getNr()], Binder->BondDegree); 932 932 } 933 933 } -
src/config.cpp
ra479fa r735b1c 845 845 fprintf(f, 846 846 "ATOM %6u %-4s %4s%c%4u %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%2s\n", 847 (*iter)-> ParticleInfo_nr, /* atom serial number */847 (*iter)->getNr(), /* atom serial number */ 848 848 name, /* atom name */ 849 849 (*MolRunner)->name, /* residue name */ … … 898 898 fprintf(f, 899 899 "ATOM %6u %-4s %4s%c%4u %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%2s\n", 900 (*iter)-> ParticleInfo_nr, /* atom serial number */900 (*iter)->getNr(), /* atom serial number */ 901 901 name, /* atom name */ 902 902 mol->name, /* residue name */ … … 948 948 949 949 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 950 *output << (*iter)-> ParticleInfo_nr<< "\t";950 *output << (*iter)->getNr() << "\t"; 951 951 *output << (*iter)->getName() << "\t"; 952 952 *output << mol->name << "\t"; … … 959 959 runner != ListOfBonds.end(); 960 960 runner++) { 961 *output << (*runner)->GetOtherAtom(*iter)-> ParticleInfo_nr<< "\t";961 *output << (*runner)->GetOtherAtom(*iter)->getNr() << "\t"; 962 962 } 963 963 for(int i = ListOfBonds.size(); i < MaxNeighbours; i++) -
src/molecule.cpp
ra479fa r735b1c 230 230 OBSERVE; 231 231 if (pointer != NULL) { 232 pointer->sort = &pointer->ParticleInfo_nr;233 232 if (pointer->getType() != NULL) { 234 233 if (pointer->getType()->getAtomicNumber() != 1) … … 236 235 if(pointer->getName() == "Unknown"){ 237 236 stringstream sstr; 238 sstr << pointer->getType()->getSymbol() << pointer-> ParticleInfo_nr+1;237 sstr << pointer->getType()->getSymbol() << pointer->getNr()+1; 239 238 pointer->setName(sstr.str()); 240 239 } … … 723 722 ASSERT(atom1, "First atom in bond-creation was an invalid pointer"); 724 723 ASSERT(atom2, "Second atom in bond-creation was an invalid pointer"); 725 ASSERT(FindAtom(atom1-> ParticleInfo_nr),"First atom in bond-creation was not part of molecule");726 ASSERT(FindAtom(atom2-> ParticleInfo_nr),"Second atom in bond-creation was not part of molecule");724 ASSERT(FindAtom(atom1->getNr()),"First atom in bond-creation was not part of molecule"); 725 ASSERT(FindAtom(atom2->getNr()),"Second atom in bond-creation was not part of molecule"); 727 726 728 727 Binder = new bond(atom1, atom2, degree, BondCount++); … … 839 838 molecule::const_iterator iter = begin(); 840 839 for (; iter != end(); ++iter) 841 if ((*iter)-> ParticleInfo_nr== Nr)840 if ((*iter)->getNr() == Nr) 842 841 break; 843 842 if (iter != end()) { 844 //Log() << Verbose(0) << "Found Atom Nr. " << walker-> ParticleInfo_nr<< endl;843 //Log() << Verbose(0) << "Found Atom Nr. " << walker->getNr() << endl; 845 844 return (*iter); 846 845 } else { … … 988 987 NoNonHydrogen++; 989 988 stringstream sstr; 990 sstr << (*iter)->getType()->getSymbol() << (*iter)-> ParticleInfo_nr+1;989 sstr << (*iter)->getType()->getSymbol() << (*iter)->getNr()+1; 991 990 (*iter)->setName(sstr.str()); 992 DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << (*iter)-> ParticleInfo_nr<< " " << (*iter)->getName() << "." << endl);991 DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << (*iter)->getNr() << " " << (*iter)->getName() << "." << endl); 993 992 i++; 994 993 } … … 1017 1016 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 1018 1017 if ((*iter)->father == NULL) { 1019 AtomicMap[(*iter)-> ParticleInfo_nr] = -2;1018 AtomicMap[(*iter)->getNr()] = -2; 1020 1019 } else { 1021 1020 for (molecule::const_iterator runner = OtherMolecule->begin(); runner != OtherMolecule->end(); ++runner) { … … 1024 1023 //Log() << Verbose(4) << "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << "." << endl; 1025 1024 if ((*iter)->father == (*runner)) 1026 AtomicMap[(*iter)-> ParticleInfo_nr] = (*runner)->ParticleInfo_nr;1025 AtomicMap[(*iter)->getNr()] = (*runner)->getNr(); 1027 1026 } 1028 1027 } 1029 DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)-> ParticleInfo_nr] << "\t");1028 DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)->getNr()] << "\t"); 1030 1029 } 1031 1030 DoLog(0) && (Log() << Verbose(0) << endl); -
src/molecule_dynamics.cpp
ra479fa r735b1c 59 59 break; 60 60 // determine normalized trajectories direction vector (n1, n2) 61 Sprinter = Params.PermutationMap[Walker-> ParticleInfo_nr]; // find first target point61 Sprinter = Params.PermutationMap[Walker->getNr()]; // find first target point 62 62 trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep); 63 63 trajectory1.Normalize(); 64 64 Norm1 = trajectory1.Norm(); 65 Sprinter = Params.PermutationMap[(*iter)-> ParticleInfo_nr]; // find second target point65 Sprinter = Params.PermutationMap[(*iter)->getNr()]; // find second target point 66 66 trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep); 67 67 trajectory2.Normalize(); … … 71 71 tmp = Walker->getPositionAtStep(Params.startstep).distance((*iter)->getPositionAtStep(Params.startstep)); 72 72 } else if (Norm1 < MYEPSILON) { 73 Sprinter = Params.PermutationMap[Walker-> ParticleInfo_nr]; // find first target point73 Sprinter = Params.PermutationMap[Walker->getNr()]; // find first target point 74 74 trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep); 75 75 trajectory2 *= trajectory1.ScalarProduct(trajectory2); // trajectory2 is scaled to unity, hence we don't need to divide by anything … … 77 77 tmp = trajectory1.Norm(); // remaining norm is distance 78 78 } else if (Norm2 < MYEPSILON) { 79 Sprinter = Params.PermutationMap[(*iter)-> ParticleInfo_nr]; // find second target point79 Sprinter = Params.PermutationMap[(*iter)->getNr()]; // find second target point 80 80 trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep); // copy second offset 81 81 trajectory1 *= trajectory2.ScalarProduct(trajectory1); // trajectory1 is scaled to unity, hence we don't need to divide by anything … … 147 147 double result = 0.; 148 148 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 149 if ((Params.PermutationMap[Walker-> ParticleInfo_nr] == Params.PermutationMap[(*iter)->ParticleInfo_nr]) && (Walker->ParticleInfo_nr < (*iter)->ParticleInfo_nr)) {150 // atom *Sprinter = PermutationMap[Walker-> ParticleInfo_nr];149 if ((Params.PermutationMap[Walker->getNr()] == Params.PermutationMap[(*iter)->getNr()]) && (Walker->getNr() < (*iter)->getNr())) { 150 // atom *Sprinter = PermutationMap[Walker->getNr()]; 151 151 // Log() << Verbose(0) << *Walker << " and " << *(*iter) << " are heading to the same target at "; 152 152 // Log() << Verbose(0) << Sprinter->getPosition(endstep); … … 182 182 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 183 183 // first term: distance to target 184 Runner = Params.PermutationMap[(*iter)-> ParticleInfo_nr]; // find target point184 Runner = Params.PermutationMap[(*iter)->getNr()]; // find target point 185 185 tmp = ((*iter)->getPositionAtStep(Params.startstep).distance(Runner->getPositionAtStep(Params.endstep))); 186 186 tmp *= Params.IsAngstroem ? 1. : 1./AtomicLengthToAngstroem; … … 213 213 zeile2 << " "; 214 214 for (int i=0;i<AtomCount;i++) { 215 Params.DoubleList[Params.PermutationMap[i]-> ParticleInfo_nr]++;215 Params.DoubleList[Params.PermutationMap[i]->getNr()]++; 216 216 zeile1 << i << " "; 217 zeile2 << Params.PermutationMap[i]-> ParticleInfo_nr<< " ";217 zeile2 << Params.PermutationMap[i]->getNr() << " "; 218 218 } 219 219 for (int i=0;i<AtomCount;i++) … … 239 239 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 240 240 for (molecule::const_iterator runner = mol->begin(); runner != mol->end(); ++runner) { 241 Params.DistanceList[(*iter)-> ParticleInfo_nr]->insert( DistancePair((*iter)->getPositionAtStep(Params.startstep).distance((*runner)->getPositionAtStep(Params.endstep)), (*runner)) );241 Params.DistanceList[(*iter)->getNr()]->insert( DistancePair((*iter)->getPositionAtStep(Params.startstep).distance((*runner)->getPositionAtStep(Params.endstep)), (*runner)) ); 242 242 } 243 243 } … … 252 252 { 253 253 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 254 Params.StepList[(*iter)-> ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin(); // stores the step to the next iterator that could be a possible next target255 Params.PermutationMap[(*iter)-> ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin()->second; // always pick target with the smallest distance256 Params.DoubleList[Params.DistanceList[(*iter)-> ParticleInfo_nr]->begin()->second->ParticleInfo_nr]++; // increase this target's source count (>1? not injective)257 Params.DistanceIterators[(*iter)-> ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin(); // and remember which one we picked258 DoLog(2) && (Log() << Verbose(2) << **iter << " starts with distance " << Params.DistanceList[(*iter)-> ParticleInfo_nr]->begin()->first << "." << endl);254 Params.StepList[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin(); // stores the step to the next iterator that could be a possible next target 255 Params.PermutationMap[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin()->second; // always pick target with the smallest distance 256 Params.DoubleList[Params.DistanceList[(*iter)->getNr()]->begin()->second->getNr()]++; // increase this target's source count (>1? not injective) 257 Params.DistanceIterators[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin(); // and remember which one we picked 258 DoLog(2) && (Log() << Verbose(2) << **iter << " starts with distance " << Params.DistanceList[(*iter)->getNr()]->begin()->first << "." << endl); 259 259 } 260 260 }; … … 270 270 { 271 271 double Potential = 0; 272 DistanceMap::iterator NewBase = Params.DistanceIterators[Walker-> ParticleInfo_nr]; // store old base272 DistanceMap::iterator NewBase = Params.DistanceIterators[Walker->getNr()]; // store old base 273 273 do { 274 274 NewBase++; // take next further distance in distance to targets list that's a target of no one 275 } while ((Params.DoubleList[NewBase->second-> ParticleInfo_nr] != 0) && (NewBase != Params.DistanceList[Walker->ParticleInfo_nr]->end()));276 if (NewBase != Params.DistanceList[Walker-> ParticleInfo_nr]->end()) {277 Params.PermutationMap[Walker-> ParticleInfo_nr] = NewBase->second;275 } while ((Params.DoubleList[NewBase->second->getNr()] != 0) && (NewBase != Params.DistanceList[Walker->getNr()]->end())); 276 if (NewBase != Params.DistanceList[Walker->getNr()]->end()) { 277 Params.PermutationMap[Walker->getNr()] = NewBase->second; 278 278 Potential = fabs(mol->ConstrainedPotential(Params)); 279 279 if (Potential > OldPotential) { // undo 280 Params.PermutationMap[Walker-> ParticleInfo_nr] = Params.DistanceIterators[Walker->ParticleInfo_nr]->second;280 Params.PermutationMap[Walker->getNr()] = Params.DistanceIterators[Walker->getNr()]->second; 281 281 } else { // do 282 Params.DoubleList[Params.DistanceIterators[Walker-> ParticleInfo_nr]->second->ParticleInfo_nr]--; // decrease the old entry in the doubles list283 Params.DoubleList[NewBase->second-> ParticleInfo_nr]++; // increase the old entry in the doubles list284 Params.DistanceIterators[Walker-> ParticleInfo_nr] = NewBase;282 Params.DoubleList[Params.DistanceIterators[Walker->getNr()]->second->getNr()]--; // decrease the old entry in the doubles list 283 Params.DoubleList[NewBase->second->getNr()]++; // increase the old entry in the doubles list 284 Params.DistanceIterators[Walker->getNr()] = NewBase; 285 285 OldPotential = Potential; 286 286 DoLog(3) && (Log() << Verbose(3) << "Found a new permutation, new potential is " << OldPotential << "." << endl); … … 310 310 if (iter == mol->end()) // round-robin at the end 311 311 iter = mol->begin(); 312 if (Params.DoubleList[Params.DistanceIterators[(*iter)-> ParticleInfo_nr]->second->ParticleInfo_nr] <= 1) // no need to make those injective that aren't312 if (Params.DoubleList[Params.DistanceIterators[(*iter)->getNr()]->second->getNr()] <= 1) // no need to make those injective that aren't 313 313 continue; 314 314 // now, try finding a new one … … 398 398 for (; iter != end(); ++iter) { 399 399 PrintPermutationMap(getAtomCount(), Params); 400 Sprinter = Params.DistanceIterators[(*iter)-> ParticleInfo_nr]->second; // store initial partner401 Strider = Params.DistanceIterators[(*iter)-> ParticleInfo_nr]; //remember old iterator402 Params.DistanceIterators[(*iter)-> ParticleInfo_nr] = Params.StepList[(*iter)->ParticleInfo_nr];403 if (Params.DistanceIterators[(*iter)-> ParticleInfo_nr] == Params.DistanceList[(*iter)->ParticleInfo_nr]->end()) {// stop, before we run through the list and still on404 Params.DistanceIterators[(*iter)-> ParticleInfo_nr] == Params.DistanceList[(*iter)->ParticleInfo_nr]->begin();400 Sprinter = Params.DistanceIterators[(*iter)->getNr()]->second; // store initial partner 401 Strider = Params.DistanceIterators[(*iter)->getNr()]; //remember old iterator 402 Params.DistanceIterators[(*iter)->getNr()] = Params.StepList[(*iter)->getNr()]; 403 if (Params.DistanceIterators[(*iter)->getNr()] == Params.DistanceList[(*iter)->getNr()]->end()) {// stop, before we run through the list and still on 404 Params.DistanceIterators[(*iter)->getNr()] == Params.DistanceList[(*iter)->getNr()]->begin(); 405 405 break; 406 406 } 407 //Log() << Verbose(2) << "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)-> ParticleInfo_nr]->second << "." << endl;407 //Log() << Verbose(2) << "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)->getNr()]->second << "." << endl; 408 408 // find source of the new target 409 409 molecule::const_iterator runner = begin(); 410 410 for (; runner != end(); ++runner) { // find the source whose toes we might be stepping on (Walker's new target should be in use by another already) 411 if (Params.PermutationMap[(*runner)-> ParticleInfo_nr] == Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second) {412 //Log() << Verbose(2) << "Found the corresponding owner " << *(*runner) << " to " << *PermutationMap[(*runner)-> ParticleInfo_nr] << "." << endl;411 if (Params.PermutationMap[(*runner)->getNr()] == Params.DistanceIterators[(*iter)->getNr()]->second) { 412 //Log() << Verbose(2) << "Found the corresponding owner " << *(*runner) << " to " << *PermutationMap[(*runner)->getNr()] << "." << endl; 413 413 break; 414 414 } … … 416 416 if (runner != end()) { // we found the other source 417 417 // then look in its distance list for Sprinter 418 Rider = Params.DistanceList[(*runner)-> ParticleInfo_nr]->begin();419 for (; Rider != Params.DistanceList[(*runner)-> ParticleInfo_nr]->end(); Rider++)418 Rider = Params.DistanceList[(*runner)->getNr()]->begin(); 419 for (; Rider != Params.DistanceList[(*runner)->getNr()]->end(); Rider++) 420 420 if (Rider->second == Sprinter) 421 421 break; 422 if (Rider != Params.DistanceList[(*runner)-> ParticleInfo_nr]->end()) { // if we have found one423 //Log() << Verbose(2) << "Current Other: " << *(*runner) << " with old/next candidate " << *PermutationMap[(*runner)-> ParticleInfo_nr] << "/" << *Rider->second << "." << endl;422 if (Rider != Params.DistanceList[(*runner)->getNr()]->end()) { // if we have found one 423 //Log() << Verbose(2) << "Current Other: " << *(*runner) << " with old/next candidate " << *PermutationMap[(*runner)->getNr()] << "/" << *Rider->second << "." << endl; 424 424 // exchange both 425 Params.PermutationMap[(*iter)-> ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second; // put next farther distance into PermutationMap426 Params.PermutationMap[(*runner)-> ParticleInfo_nr] = Sprinter; // and hand the old target to its respective owner425 Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second; // put next farther distance into PermutationMap 426 Params.PermutationMap[(*runner)->getNr()] = Sprinter; // and hand the old target to its respective owner 427 427 PrintPermutationMap(getAtomCount(), Params); 428 428 // calculate the new potential … … 431 431 if (Potential > OldPotential) { // we made everything worse! Undo ... 432 432 //Log() << Verbose(3) << "Nay, made the potential worse: " << Potential << " vs. " << OldPotential << "!" << endl; 433 //Log() << Verbose(3) << "Setting " << *(*runner) << "'s source to " << *Params.DistanceIterators[(*runner)-> ParticleInfo_nr]->second << "." << endl;433 //Log() << Verbose(3) << "Setting " << *(*runner) << "'s source to " << *Params.DistanceIterators[(*runner)->getNr()]->second << "." << endl; 434 434 // Undo for Runner (note, we haven't moved the iteration yet, we may use this) 435 Params.PermutationMap[(*runner)-> ParticleInfo_nr] = Params.DistanceIterators[(*runner)->ParticleInfo_nr]->second;435 Params.PermutationMap[(*runner)->getNr()] = Params.DistanceIterators[(*runner)->getNr()]->second; 436 436 // Undo for Walker 437 Params.DistanceIterators[(*iter)-> ParticleInfo_nr] = Strider; // take next farther distance target438 //Log() << Verbose(3) << "Setting " << *(*iter) << "'s source to " << *Params.DistanceIterators[(*iter)-> ParticleInfo_nr]->second << "." << endl;439 Params.PermutationMap[(*iter)-> ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second;437 Params.DistanceIterators[(*iter)->getNr()] = Strider; // take next farther distance target 438 //Log() << Verbose(3) << "Setting " << *(*iter) << "'s source to " << *Params.DistanceIterators[(*iter)->getNr()]->second << "." << endl; 439 Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second; 440 440 } else { 441 Params.DistanceIterators[(*runner)-> ParticleInfo_nr] = Rider; // if successful also move the pointer in the iterator list441 Params.DistanceIterators[(*runner)->getNr()] = Rider; // if successful also move the pointer in the iterator list 442 442 DoLog(3) && (Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl); 443 443 OldPotential = Potential; … … 453 453 } 454 454 } else { 455 Params.PermutationMap[(*iter)-> ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second; // new target has no source!455 Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second; // new target has no source! 456 456 } 457 Params.StepList[(*iter)-> ParticleInfo_nr]++; // take next farther distance target457 Params.StepList[(*iter)->getNr()]++; // take next farther distance target 458 458 } 459 459 } while (++iter != end()); … … 486 486 DoLog(1) && (Log() << Verbose(1) << "Calculating forces and adding onto ForceMatrix ... " << endl); 487 487 BOOST_FOREACH(atom *_atom, atoms) { 488 atom *Sprinter = PermutationMap[_atom-> ParticleInfo_nr];488 atom *Sprinter = PermutationMap[_atom->getNr()]; 489 489 // set forces 490 490 for (int i=NDIM;i++;) 491 Force->Matrix[0][_atom-> ParticleInfo_nr][5+i] += 2.*constant*sqrt(_atom->getPositionAtStep(startstep).distance(Sprinter->getPositionAtStep(endstep)));491 Force->Matrix[0][_atom->getNr()][5+i] += 2.*constant*sqrt(_atom->getPositionAtStep(startstep).distance(Sprinter->getPositionAtStep(endstep))); 492 492 } 493 493 DoLog(1) && (Log() << Verbose(1) << "done." << endl); … … 520 520 PermutationMap = new atom *[getAtomCount()]; 521 521 for(internal_iterator iter = atoms.begin(); iter != atoms.end();++iter){ 522 PermutationMap[(*iter)-> ParticleInfo_nr] = (*iter);522 PermutationMap[(*iter)->getNr()] = (*iter); 523 523 } 524 524 } … … 540 540 Sprinter = mol->AddCopyAtom((*iter)); 541 541 // add to Trajectories 542 Vector temp = (*iter)->getPositionAtStep(startstep) + (PermutationMap[(*iter)-> ParticleInfo_nr]->getPositionAtStep(endstep) - (*iter)->getPositionAtStep(startstep))*((double)step/(double)MaxSteps);542 Vector temp = (*iter)->getPositionAtStep(startstep) + (PermutationMap[(*iter)->getNr()]->getPositionAtStep(endstep) - (*iter)->getPositionAtStep(startstep))*((double)step/(double)MaxSteps); 543 543 Sprinter->setPosition(temp); 544 544 (*iter)->setAtomicVelocityAtStep(step, zeroVec); … … 618 618 // check size of vectors 619 619 BOOST_FOREACH(atom *_atom, atoms) { 620 _atom->VelocityVerletUpdate(_atom-> ParticleInfo_nr, MDSteps+1, &configuration, &Force, (const size_t) 0);620 _atom->VelocityVerletUpdate(_atom->getNr(), MDSteps+1, &configuration, &Force, (const size_t) 0); 621 621 } 622 622 -
src/molecule_fragmentation.cpp
ra479fa r735b1c 425 425 No = (*runner).second.first; 426 426 Walker = mol->FindAtom(No); 427 //if (Walker->AdaptiveOrder < MinimumRingSize[Walker-> ParticleInfo_nr]) {427 //if (Walker->AdaptiveOrder < MinimumRingSize[Walker->getNr()]) { 428 428 DoLog(2) && (Log() << Verbose(2) << "Root " << No << " is still above threshold (10^{" << Order <<"}: " << runner->first << ", setting entry " << No << " of Atom mask to true." << endl); 429 429 AtomMask[No] = true; 430 430 status = true; 431 431 //} else 432 //Log() << Verbose(2) << "Root " << No << " is still above threshold (10^{" << Order <<"}: " << runner->first << ", however MinimumRingSize of " << MinimumRingSize[Walker-> ParticleInfo_nr] << " does not allow further adaptive increase." << endl;432 //Log() << Verbose(2) << "Root " << No << " is still above threshold (10^{" << Order <<"}: " << runner->first << ", however MinimumRingSize of " << MinimumRingSize[Walker->getNr()] << " does not allow further adaptive increase." << endl; 433 433 } 434 434 return status; … … 488 488 #endif 489 489 { 490 AtomMask[(*iter)-> ParticleInfo_nr] = true; // include all (non-hydrogen) atoms490 AtomMask[(*iter)->getNr()] = true; // include all (non-hydrogen) atoms 491 491 status = true; 492 492 } … … 508 508 #endif 509 509 { 510 AtomMask[(*iter)-> ParticleInfo_nr] = true; // include all (non-hydrogen) atoms511 if ((Order != 0) && ((*iter)->AdaptiveOrder < Order)) // && ((*iter)->AdaptiveOrder < MinimumRingSize[(*iter)-> ParticleInfo_nr]))510 AtomMask[(*iter)->getNr()] = true; // include all (non-hydrogen) atoms 511 if ((Order != 0) && ((*iter)->AdaptiveOrder < Order)) // && ((*iter)->AdaptiveOrder < MinimumRingSize[(*iter)->getNr()])) 512 512 status = true; 513 513 } … … 546 546 int AtomNo = 0; 547 547 for(internal_iterator iter=atoms.begin();iter!=atoms.end();++iter){ 548 ASSERT(SortIndex[(*iter)-> ParticleInfo_nr]==-1,"Same SortIndex set twice");549 SortIndex[(*iter)-> ParticleInfo_nr] = AtomNo++;548 ASSERT(SortIndex[(*iter)->getNr()]==-1,"Same SortIndex set twice"); 549 SortIndex[(*iter)->getNr()] = AtomNo++; 550 550 } 551 551 … … 575 575 if (count == 0) { 576 576 for (molecule::iterator iter = begin(); iter != end(); ++iter) { // create a lookup table (Atom::ParticleInfo_nr -> atom) used as a marker table lateron 577 count = (count < (*iter)->GetTrueFather()-> ParticleInfo_nr) ? (*iter)->GetTrueFather()->ParticleInfo_nr: count;577 count = (count < (*iter)->GetTrueFather()->getNr()) ? (*iter)->GetTrueFather()->getNr() : count; 578 578 } 579 579 } … … 593 593 LookupTable[i] = NULL; 594 594 for (molecule::iterator iter = begin(); iter != end(); ++iter) { 595 AtomNo = (*iter)->GetTrueFather()-> ParticleInfo_nr;595 AtomNo = (*iter)->GetTrueFather()->getNr(); 596 596 if ((AtomNo >= 0) && (AtomNo < count)) { 597 597 //*out << "Setting LookupTable[" << AtomNo << "] to " << *(*iter) << endl; … … 917 917 // set atom values 918 918 for(internal_iterator iter=atoms.begin();iter!=atoms.end();++iter){ 919 (*iter)->AdaptiveOrder = OrderArray[(*iter)-> ParticleInfo_nr];920 (*iter)->MaxOrder = MaxArray[(*iter)-> ParticleInfo_nr];921 } 922 //SetAtomValueToIndexedArray( OrderArray, &atom:: ParticleInfo_nr, &atom::AdaptiveOrder );923 //SetAtomValueToIndexedArray( MaxArray, &atom:: ParticleInfo_nr, &atom::MaxOrder );919 (*iter)->AdaptiveOrder = OrderArray[(*iter)->getNr()]; 920 (*iter)->MaxOrder = MaxArray[(*iter)->getNr()]; 921 } 922 //SetAtomValueToIndexedArray( OrderArray, &atom::getNr(), &atom::AdaptiveOrder ); 923 //SetAtomValueToIndexedArray( MaxArray, &atom::getNr(), &atom::MaxOrder ); 924 924 925 925 DoLog(1) && (Log() << Verbose(1) << "\t ... done." << endl); … … 981 981 for(KeySet::iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) { 982 982 FatherOfRunner = mol->FindAtom((*runner)); // find the id 983 SonList[FatherOfRunner-> ParticleInfo_nr] = Leaf->AddCopyAtom(FatherOfRunner);983 SonList[FatherOfRunner->getNr()] = Leaf->AddCopyAtom(FatherOfRunner); 984 984 size++; 985 985 } … … 1008 1008 FatherOfRunner = (*iter)->father; 1009 1009 ASSERT(FatherOfRunner,"Atom without father found"); 1010 if (SonList[FatherOfRunner-> ParticleInfo_nr] != NULL) { // check if this, our father, is present in list1010 if (SonList[FatherOfRunner->getNr()] != NULL) { // check if this, our father, is present in list 1011 1011 // create all bonds 1012 1012 const BondList& ListOfBonds = FatherOfRunner->getListOfBonds(); … … 1015 1015 ++BondRunner) { 1016 1016 OtherFather = (*BondRunner)->GetOtherAtom(FatherOfRunner); 1017 // Log() << Verbose(2) << "Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner-> ParticleInfo_nr] << " is bound to " << *OtherFather;1018 if (SonList[OtherFather-> ParticleInfo_nr] != NULL) {1019 // Log() << Verbose(0) << ", whose son is " << *SonList[OtherFather-> ParticleInfo_nr] << "." << endl;1020 if (OtherFather-> ParticleInfo_nr > FatherOfRunner->ParticleInfo_nr) { // add bond (ParticleInfo_nr check is for adding only one of both variants: ab, ba)1017 // Log() << Verbose(2) << "Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->getNr()] << " is bound to " << *OtherFather; 1018 if (SonList[OtherFather->getNr()] != NULL) { 1019 // Log() << Verbose(0) << ", whose son is " << *SonList[OtherFather->getNr()] << "." << endl; 1020 if (OtherFather->getNr() > FatherOfRunner->getNr()) { // add bond (ParticleInfo_nr check is for adding only one of both variants: ab, ba) 1021 1021 // Log() << Verbose(3) << "Adding Bond: "; 1022 1022 // Log() << Verbose(0) << 1023 Leaf->AddBond((*iter), SonList[OtherFather-> ParticleInfo_nr], (*BondRunner)->BondDegree);1023 Leaf->AddBond((*iter), SonList[OtherFather->getNr()], (*BondRunner)->BondDegree); 1024 1024 // Log() << Verbose(0) << "." << endl; 1025 //NumBonds[(*iter)-> ParticleInfo_nr]++;1025 //NumBonds[(*iter)->getNr()]++; 1026 1026 } else { 1027 1027 // Log() << Verbose(3) << "Not adding bond, labels in wrong order." << endl; … … 1035 1035 exit(1); 1036 1036 #endif 1037 //NumBonds[(*iter)-> ParticleInfo_nr] += Binder->BondDegree;1037 //NumBonds[(*iter)->getNr()] += Binder->BondDegree; 1038 1038 } 1039 1039 } 1040 1040 } else { 1041 DoeLog(1) && (eLog()<< Verbose(1) << "Son " << (*iter)->getName() << " has father " << FatherOfRunner->getName() << " but its entry in SonList is " << SonList[FatherOfRunner-> ParticleInfo_nr] << "!" << endl);1041 DoeLog(1) && (eLog()<< Verbose(1) << "Son " << (*iter)->getName() << " has father " << FatherOfRunner->getName() << " but its entry in SonList is " << SonList[FatherOfRunner->getNr()] << "!" << endl); 1042 1042 } 1043 1043 if ((LonelyFlag) && (Leaf->getAtomCount() > 1)) { … … 1121 1121 OtherWalker = BondsSet[j]->rightatom; // rightatom is always the one more distant, i.e. the one to add 1122 1122 //Log() << Verbose(1+verbosity) << "Current Bond is " << BondsSet[j] << ", checking on " << *OtherWalker << "." << endl; 1123 Log() << Verbose(2+verbosity) << "Adding " << *OtherWalker << " with nr " << OtherWalker-> ParticleInfo_nr<< "." << endl;1124 TestKeySetInsert = FragmentSet->insert(OtherWalker-> ParticleInfo_nr);1123 Log() << Verbose(2+verbosity) << "Adding " << *OtherWalker << " with nr " << OtherWalker->getNr() << "." << endl; 1124 TestKeySetInsert = FragmentSet->insert(OtherWalker->getNr()); 1125 1125 if (TestKeySetInsert.second) { 1126 TouchedList[TouchedIndex++] = OtherWalker-> ParticleInfo_nr; // note as added1126 TouchedList[TouchedIndex++] = OtherWalker->getNr(); // note as added 1127 1127 Added++; 1128 1128 } else { … … 1172 1172 ++Binder) { 1173 1173 for (int k=0;k<TouchedIndex;k++) { 1174 if ((*Binder)->leftatom-> ParticleInfo_nr== TouchedList[k]) // leftatom is always the closer one1174 if ((*Binder)->leftatom->getNr() == TouchedList[k]) // leftatom is always the closer one 1175 1175 BondsList[SetDimension++] = (*Binder); 1176 1176 } … … 1330 1330 { 1331 1331 // prepare Label and SP arrays of the BFS search 1332 FragmentSearch.ShortestPathList[FragmentSearch.Root-> ParticleInfo_nr] = 0;1332 FragmentSearch.ShortestPathList[FragmentSearch.Root->getNr()] = 0; 1333 1333 1334 1334 // prepare root level (SP = 0) and a loop bond denoting Root … … 1354 1354 iter != FragmentSearch.BondsPerSPList[i].end(); 1355 1355 ++iter) { 1356 // Log() << Verbose(0) << "Removing atom " << Binder->leftatom-> ParticleInfo_nr << " and " << Binder->rightatom->ParticleInfo_nr<< "." << endl; // make sure numbers are local1357 FragmentSearch.ShortestPathList[(*iter)->leftatom-> ParticleInfo_nr] = -1;1358 FragmentSearch.ShortestPathList[(*iter)->rightatom-> ParticleInfo_nr] = -1;1356 // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->getNr() << " and " << Binder->rightatom->getNr() << "." << endl; // make sure numbers are local 1357 FragmentSearch.ShortestPathList[(*iter)->leftatom->getNr()] = -1; 1358 FragmentSearch.ShortestPathList[(*iter)->rightatom->getNr()] = -1; 1359 1359 } 1360 1360 // delete added bonds … … 1391 1391 atom *Predecessor = NULL; 1392 1392 bond *Binder = NULL; 1393 int RootKeyNr = FragmentSearch.Root->GetTrueFather()-> ParticleInfo_nr;1393 int RootKeyNr = FragmentSearch.Root->GetTrueFather()->getNr(); 1394 1394 int RemainingWalkers = -1; 1395 1395 int SP = -1; … … 1411 1411 Walker = (*CurrentEdge)->rightatom; // rightatom is always the one more distant 1412 1412 Predecessor = (*CurrentEdge)->leftatom; // ... and leftatom is predecessor 1413 AtomKeyNr = Walker-> ParticleInfo_nr;1414 DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker-> ParticleInfo_nr<< " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl);1413 AtomKeyNr = Walker->getNr(); 1414 DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl); 1415 1415 // check for new sp level 1416 1416 // go through all its bonds … … 1421 1421 ++Runner) { 1422 1422 OtherWalker = (*Runner)->GetOtherAtom(Walker); 1423 if ((RestrictedKeySet.find(OtherWalker-> ParticleInfo_nr) != RestrictedKeySet.end())1423 if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end()) 1424 1424 #ifdef ADDHYDROGEN 1425 1425 && (OtherWalker->getType()->getAtomicNumber() != 1) 1426 1426 #endif 1427 1427 ) { // skip hydrogens and restrict to fragment 1428 DoLog(2) && (Log() << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker-> ParticleInfo_nr<< " in bond " << *(*Runner) << "." << endl);1428 DoLog(2) && (Log() << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker->getNr() << " in bond " << *(*Runner) << "." << endl); 1429 1429 // set the label if not set (and push on root stack as well) 1430 if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()-> ParticleInfo_nr> RootKeyNr)) { // only pass through those with label bigger than Root's1431 FragmentSearch.ShortestPathList[OtherWalker-> ParticleInfo_nr] = SP+1;1432 DoLog(3) && (Log() << Verbose(3) << "Set Shortest Path to " << FragmentSearch.ShortestPathList[OtherWalker-> ParticleInfo_nr] << "." << endl);1430 if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()->getNr() > RootKeyNr)) { // only pass through those with label bigger than Root's 1431 FragmentSearch.ShortestPathList[OtherWalker->getNr()] = SP+1; 1432 DoLog(3) && (Log() << Verbose(3) << "Set Shortest Path to " << FragmentSearch.ShortestPathList[OtherWalker->getNr()] << "." << endl); 1433 1433 // add the bond in between to the SP list 1434 1434 Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant … … 1438 1438 } else { 1439 1439 if (OtherWalker != Predecessor) 1440 DoLog(3) && (Log() << Verbose(3) << "Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()-> ParticleInfo_nr<< " is smaller than that of Root " << RootKeyNr << "." << endl);1440 DoLog(3) && (Log() << Verbose(3) << "Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << "." << endl); 1441 1441 else 1442 1442 DoLog(3) && (Log() << Verbose(3) << "This is my predecessor " << *Predecessor << "." << endl); … … 1519 1519 if (SP >= (Order-1)) { 1520 1520 // start with root (push on fragment stack) 1521 DoLog(0) && (Log() << Verbose(0) << "Starting fragment generation with " << *FragmentSearch.Root << ", local nr is " << FragmentSearch.Root-> ParticleInfo_nr<< "." << endl);1521 DoLog(0) && (Log() << Verbose(0) << "Starting fragment generation with " << *FragmentSearch.Root << ", local nr is " << FragmentSearch.Root->getNr() << "." << endl); 1522 1522 FragmentSearch.FragmentSet->clear(); 1523 1523 DoLog(0) && (Log() << Verbose(0) << "Preparing subset for this root and calling generator." << endl); … … 1538 1538 // remove root from stack 1539 1539 DoLog(0) && (Log() << Verbose(0) << "Removing root again from stack." << endl); 1540 FragmentSearch.FragmentSet->erase(FragmentSearch.Root-> ParticleInfo_nr);1540 FragmentSearch.FragmentSet->erase(FragmentSearch.Root->getNr()); 1541 1541 1542 1542 // free'ing the bonds lists … … 1609 1609 } 1610 1610 } 1611 RootStack.push_back(Walker-> ParticleInfo_nr);1611 RootStack.push_back(Walker->getNr()); 1612 1612 RootNr++; 1613 1613 } while (RootKeyNr != StartNr); … … 1700 1700 KeySet CompleteMolecule; 1701 1701 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 1702 CompleteMolecule.insert((*iter)->GetTrueFather()-> ParticleInfo_nr);1702 CompleteMolecule.insert((*iter)->GetTrueFather()->getNr()); 1703 1703 } 1704 1704 … … 1713 1713 atom *Walker = FindAtom(RootKeyNr); 1714 1714 // check cyclic lengths 1715 //if ((MinimumRingSize[Walker->GetTrueFather()-> ParticleInfo_nr] != -1) && (Walker->GetTrueFather()->AdaptiveOrder+1 > MinimumRingSize[Walker->GetTrueFather()->ParticleInfo_nr])) {1715 //if ((MinimumRingSize[Walker->GetTrueFather()->getNr()] != -1) && (Walker->GetTrueFather()->AdaptiveOrder+1 > MinimumRingSize[Walker->GetTrueFather()->getNr()])) { 1716 1716 // Log() << Verbose(0) << "Bond order " << Walker->GetTrueFather()->AdaptiveOrder << " of Root " << *Walker << " greater than or equal to Minimum Ring size of " << MinimumRingSize << " found is not allowed." << endl; 1717 1717 //} else … … 1849 1849 AtomStack->pop_front(); 1850 1850 //Log() << Verbose (3) << "Current Walker is: " << *Walker << "." << endl; 1851 ColorList[Walker-> ParticleInfo_nr] = black; // mark as explored1851 ColorList[Walker->getNr()] = black; // mark as explored 1852 1852 *Walker += Translationvector; // translate 1853 1853 const BondList& ListOfBonds = Walker->getListOfBonds(); … … 1857 1857 if ((*Runner) != Binder) { 1858 1858 OtherWalker = (*Runner)->GetOtherAtom(Walker); 1859 if (ColorList[OtherWalker-> ParticleInfo_nr] == white) {1859 if (ColorList[OtherWalker->getNr()] == white) { 1860 1860 AtomStack->push_front(OtherWalker); // push if yet unexplored 1861 1861 } -
src/molecule_geometry.cpp
ra479fa r735b1c 388 388 Runner != ListOfBonds.end(); 389 389 ++Runner) { 390 if ((*iter)-> ParticleInfo_nr < (*Runner)->GetOtherAtom((*iter))->ParticleInfo_nr) // otherwise we shift one to, the other fro and gain nothing390 if ((*iter)->getNr() < (*Runner)->GetOtherAtom((*iter))->getNr()) // otherwise we shift one to, the other fro and gain nothing 391 391 for (int j=0;j<NDIM;j++) { 392 392 tmp = (*iter)->at(j) - (*Runner)->GetOtherAtom(*iter)->at(j); -
src/molecule_graph.cpp
ra479fa r735b1c 194 194 Log() << Verbose(2) << "Current relative cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl; 195 195 for (TesselPointSTLList::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) { 196 if ((*OtherRunner)-> ParticleInfo_nr > Walker->ParticleInfo_nr) {196 if ((*OtherRunner)->getNr() > Walker->getNr()) { 197 197 OtherWalker = dynamic_cast<atom*>(*OtherRunner); 198 198 ASSERT(OtherWalker,"TesselPoint that was not an atom retrieved from LinkedNode"); … … 202 202 const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance); 203 203 Log() << Verbose(1) << "MinDistance is " << MinDistance << " and MaxDistance is " << MaxDistance << "." << endl; 204 if (OtherWalker->father-> ParticleInfo_nr > Walker->father->ParticleInfo_nr) {204 if (OtherWalker->father->getNr() > Walker->father->getNr()) { 205 205 if (status) { // create bond if distance is smaller 206 206 Log() << Verbose(1) << "Adding Bond between " << *Walker << " and " << *OtherWalker << " in distance " << sqrt(distance) << "." << endl; … … 740 740 Walker = BFS.TouchedStack->front(); 741 741 BFS.TouchedStack->pop_front(); 742 BFS.PredecessorList[Walker-> ParticleInfo_nr] = NULL;743 BFS.ShortestPathList[Walker-> ParticleInfo_nr] = -1;744 BFS.ColorList[Walker-> ParticleInfo_nr] = white;742 BFS.PredecessorList[Walker->getNr()] = NULL; 743 BFS.ShortestPathList[Walker->getNr()] = -1; 744 BFS.ColorList[Walker->getNr()] = white; 745 745 } 746 746 }; … … 752 752 void ResetBFSAccounting(atom *&Walker, struct BFSAccounting &BFS) 753 753 { 754 BFS.ShortestPathList[Walker-> ParticleInfo_nr] = 0;754 BFS.ShortestPathList[Walker->getNr()] = 0; 755 755 BFS.BFSStack->clear(); // start with empty BFS stack 756 756 BFS.BFSStack->push_front(Walker); … … 781 781 #endif 782 782 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->getName() << " for bond " << *(*Runner) << "." << endl); 783 if (BFS.ColorList[OtherAtom-> ParticleInfo_nr] == white) {783 if (BFS.ColorList[OtherAtom->getNr()] == white) { 784 784 BFS.TouchedStack->push_front(OtherAtom); 785 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = lightgray;786 BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] = Walker; // Walker is the predecessor787 BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] = BFS.ShortestPathList[Walker->ParticleInfo_nr] + 1;788 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->getName() << " lightgray, its predecessor is " << Walker->getName() << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] << " egde(s) long." << endl);789 //if (BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] < MinimumRingSize[Walker->GetTrueFather()->nr]) { // Check for maximum distance785 BFS.ColorList[OtherAtom->getNr()] = lightgray; 786 BFS.PredecessorList[OtherAtom->getNr()] = Walker; // Walker is the predecessor 787 BFS.ShortestPathList[OtherAtom->getNr()] = BFS.ShortestPathList[Walker->getNr()] + 1; 788 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->getName() << " lightgray, its predecessor is " << Walker->getName() << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->getNr()] << " egde(s) long." << endl); 789 //if (BFS.ShortestPathList[OtherAtom->getNr()] < MinimumRingSize[Walker->GetTrueFather()->nr]) { // Check for maximum distance 790 790 DoLog(3) && (Log() << Verbose(3) << "Putting OtherAtom into queue." << endl); 791 791 BFS.BFSStack->push_front(OtherAtom); … … 799 799 } else { 800 800 DoLog(2) && (Log() << Verbose(2) << "Skipping hydrogen atom " << *OtherAtom << "." << endl); 801 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = black;801 BFS.ColorList[OtherAtom->getNr()] = black; 802 802 } 803 803 #endif … … 806 806 } 807 807 } 808 BFS.ColorList[Walker-> ParticleInfo_nr] = black;808 BFS.ColorList[Walker->getNr()] = black; 809 809 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->getName() << " black." << endl); 810 810 if (OtherAtom == BFS.Root) { // if we have found the root, check whether this cycle wasn't already found beforehand … … 814 814 break; 815 815 else 816 OtherAtom = BFS.PredecessorList[OtherAtom-> ParticleInfo_nr];816 OtherAtom = BFS.PredecessorList[OtherAtom->getNr()]; 817 817 } 818 818 if (OtherAtom == BackEdge->rightatom) { // if each atom in found cycle is cyclic, loop's been found before already … … 822 822 OtherAtom = BFS.TouchedStack->front(); 823 823 BFS.TouchedStack->pop_front(); 824 if (BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] == Walker) {824 if (BFS.PredecessorList[OtherAtom->getNr()] == Walker) { 825 825 DoLog(4) && (Log() << Verbose(4) << "Removing " << *OtherAtom << " from lists and stacks." << endl); 826 BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] = NULL;827 BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] = -1;828 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = white;826 BFS.PredecessorList[OtherAtom->getNr()] = NULL; 827 BFS.ShortestPathList[OtherAtom->getNr()] = -1; 828 BFS.ColorList[OtherAtom->getNr()] = white; 829 829 // rats ... deque has no find() 830 830 std::deque<atom *>::iterator iter = find( … … 836 836 BFS.BFSStack->erase(iter); 837 837 } 838 } while ((!BFS.TouchedStack->empty()) && (BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] == NULL));838 } while ((!BFS.TouchedStack->empty()) && (BFS.PredecessorList[OtherAtom->getNr()] == NULL)); 839 839 BFS.TouchedStack->push_front(OtherAtom); // last was wrongly popped 840 840 OtherAtom = BackEdge->rightatom; // set to not Root … … 842 842 OtherAtom = BFS.Root; 843 843 } 844 } while ((!BFS.BFSStack->empty()) && (OtherAtom != BFS.Root) && (OtherAtom != NULL)); // || (ShortestPathList[OtherAtom-> ParticleInfo_nr] < MinimumRingSize[Walker->GetTrueFather()->ParticleInfo_nr])));844 } while ((!BFS.BFSStack->empty()) && (OtherAtom != BFS.Root) && (OtherAtom != NULL)); // || (ShortestPathList[OtherAtom->getNr()] < MinimumRingSize[Walker->GetTrueFather()->getNr()]))); 845 845 }; 846 846 … … 867 867 while (Walker != BackEdge->rightatom) { 868 868 DoLog(0) && (Log() << Verbose(0) << Walker->getName() << " <-> "); 869 Walker = BFS.PredecessorList[Walker-> ParticleInfo_nr];869 Walker = BFS.PredecessorList[Walker->getNr()]; 870 870 Walker->GetTrueFather()->IsCyclic = true; 871 871 RingSize++; … … 874 874 // walk through all and set MinimumRingSize 875 875 Walker = BFS.Root; 876 MinimumRingSize[Walker->GetTrueFather()-> ParticleInfo_nr] = RingSize;876 MinimumRingSize[Walker->GetTrueFather()->getNr()] = RingSize; 877 877 while (Walker != BackEdge->rightatom) { 878 Walker = BFS.PredecessorList[Walker-> ParticleInfo_nr];879 if (RingSize < MinimumRingSize[Walker->GetTrueFather()-> ParticleInfo_nr])880 MinimumRingSize[Walker->GetTrueFather()-> ParticleInfo_nr] = RingSize;878 Walker = BFS.PredecessorList[Walker->getNr()]; 879 if (RingSize < MinimumRingSize[Walker->GetTrueFather()->getNr()]) 880 MinimumRingSize[Walker->GetTrueFather()->getNr()] = RingSize; 881 881 } 882 882 if ((RingSize < MinRingSize) || (MinRingSize == -1)) 883 883 MinRingSize = RingSize; 884 884 } else { 885 DoLog(1) && (Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[BFS.Root->GetTrueFather()-> ParticleInfo_nr] << " found." << endl);885 DoLog(1) && (Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[BFS.Root->GetTrueFather()->getNr()] << " found." << endl); 886 886 } 887 887 }; … … 913 913 OtherAtom = (*Runner)->GetOtherAtom(Walker); 914 914 //Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *Binder << "." << endl; 915 if (BFS.ColorList[OtherAtom-> ParticleInfo_nr] == white) {915 if (BFS.ColorList[OtherAtom->getNr()] == white) { 916 916 BFS.TouchedStack->push_front(OtherAtom); 917 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = lightgray;918 BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] = Walker; // Walker is the predecessor919 BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] = BFS.ShortestPathList[Walker->ParticleInfo_nr] + 1;920 //Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " lightgray, its predecessor is " << Walker->Name << " and its Shortest Path is " << ShortestPathList[OtherAtom-> ParticleInfo_nr] << " egde(s) long." << endl;917 BFS.ColorList[OtherAtom->getNr()] = lightgray; 918 BFS.PredecessorList[OtherAtom->getNr()] = Walker; // Walker is the predecessor 919 BFS.ShortestPathList[OtherAtom->getNr()] = BFS.ShortestPathList[Walker->getNr()] + 1; 920 //Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " lightgray, its predecessor is " << Walker->Name << " and its Shortest Path is " << ShortestPathList[OtherAtom->getNr()] << " egde(s) long." << endl; 921 921 if (OtherAtom->GetTrueFather()->IsCyclic) { // if the other atom is connected to a ring 922 MinimumRingSize[Root->GetTrueFather()-> ParticleInfo_nr] = BFS.ShortestPathList[OtherAtom->ParticleInfo_nr] + MinimumRingSize[OtherAtom->GetTrueFather()->ParticleInfo_nr];922 MinimumRingSize[Root->GetTrueFather()->getNr()] = BFS.ShortestPathList[OtherAtom->getNr()] + MinimumRingSize[OtherAtom->GetTrueFather()->getNr()]; 923 923 OtherAtom = NULL; //break; 924 924 break; … … 932 932 } 933 933 } 934 BFS.ColorList[Walker-> ParticleInfo_nr] = black;934 BFS.ColorList[Walker->getNr()] = black; 935 935 //Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl; 936 936 } … … 956 956 Root = *iter; 957 957 958 if (MinimumRingSize[Root->GetTrueFather()-> ParticleInfo_nr] == mol->getAtomCount()) { // check whether MinimumRingSize is set, if not BFS to next where it is958 if (MinimumRingSize[Root->GetTrueFather()->getNr()] == mol->getAtomCount()) { // check whether MinimumRingSize is set, if not BFS to next where it is 959 959 Walker = Root; 960 960 … … 963 963 964 964 } 965 DoLog(1) && (Log() << Verbose(1) << "Minimum ring size of " << *Root << " is " << MinimumRingSize[Root->GetTrueFather()-> ParticleInfo_nr] << "." << endl);965 DoLog(1) && (Log() << Verbose(1) << "Minimum ring size of " << *Root << " is " << MinimumRingSize[Root->GetTrueFather()->getNr()] << "." << endl); 966 966 } 967 967 DoLog(1) && (Log() << Verbose(1) << "Minimum ring size is " << MinRingSize << ", over " << NumCycles << " cycles total." << endl); … … 1194 1194 Runner != ListOfBonds.end(); 1195 1195 ++Runner) { 1196 id = (*Runner)->GetOtherAtom(Walker)-> ParticleInfo_nr;1196 id = (*Runner)->GetOtherAtom(Walker)->getNr(); 1197 1197 j = 0; 1198 1198 for (; (j < CurrentBondsOfAtom) && (CurrentBonds[j++] != id);) … … 1292 1292 1293 1293 do { // go through all bonds and push local ones 1294 Walker = ListOfLocalAtoms[Binder->leftatom-> ParticleInfo_nr]; // get one atom in the reference molecule1294 Walker = ListOfLocalAtoms[Binder->leftatom->getNr()]; // get one atom in the reference molecule 1295 1295 if (Walker != NULL) { // if this Walker exists in the subgraph ... 1296 1296 const BondList& ListOfBonds = Walker->getListOfBonds(); … … 1299 1299 ++Runner) { 1300 1300 OtherAtom = (*Runner)->GetOtherAtom(Walker); 1301 if (OtherAtom == ListOfLocalAtoms[(*Runner)->rightatom-> ParticleInfo_nr]) { // found the bond1301 if (OtherAtom == ListOfLocalAtoms[(*Runner)->rightatom->getNr()]) { // found the bond 1302 1302 LocalStack->push_front((*Runner)); 1303 1303 DoLog(3) && (Log() << Verbose(3) << "Found local edge " << *(*Runner) << "." << endl); … … 1339 1339 BFS.ColorList[i] = white; 1340 1340 } 1341 //BFS.ShortestPathList[Root-> ParticleInfo_nr] = 0; // done by Calloc1341 //BFS.ShortestPathList[Root->getNr()] = 0; // done by Calloc 1342 1342 } 1343 1343 ; … … 1356 1356 { 1357 1357 if (Binder != Bond) // let other atom white if it's via Root bond. In case it's cyclic it has to be reached again (yet Root is from OtherAtom already black, thus no problem) 1358 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = lightgray;1359 BFS.PredecessorList[OtherAtom-> ParticleInfo_nr] = Walker; // Walker is the predecessor1360 BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] = BFS.ShortestPathList[Walker->ParticleInfo_nr] + 1;1361 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->getName() << " " << ((BFS.ColorList[OtherAtom-> ParticleInfo_nr] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->getName() << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->ParticleInfo_nr] << " egde(s) long." << endl);1362 if ((((BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] < BFS.BondOrder) && (Binder != Bond)))) { // Check for maximum distance1358 BFS.ColorList[OtherAtom->getNr()] = lightgray; 1359 BFS.PredecessorList[OtherAtom->getNr()] = Walker; // Walker is the predecessor 1360 BFS.ShortestPathList[OtherAtom->getNr()] = BFS.ShortestPathList[Walker->getNr()] + 1; 1361 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->getName() << " " << ((BFS.ColorList[OtherAtom->getNr()] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->getName() << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->getNr()] << " egde(s) long." << endl); 1362 if ((((BFS.ShortestPathList[OtherAtom->getNr()] < BFS.BondOrder) && (Binder != Bond)))) { // Check for maximum distance 1363 1363 DoLog(3) && (Log() << Verbose(3)); 1364 if (AddedAtomList[OtherAtom-> ParticleInfo_nr] == NULL) { // add if it's not been so far1365 AddedAtomList[OtherAtom-> ParticleInfo_nr] = Mol->AddCopyAtom(OtherAtom);1364 if (AddedAtomList[OtherAtom->getNr()] == NULL) { // add if it's not been so far 1365 AddedAtomList[OtherAtom->getNr()] = Mol->AddCopyAtom(OtherAtom); 1366 1366 DoLog(0) && (Log() << Verbose(0) << "Added OtherAtom " << OtherAtom->getName()); 1367 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker-> ParticleInfo_nr], AddedAtomList[OtherAtom->ParticleInfo_nr], Binder);1367 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder); 1368 1368 DoLog(0) && (Log() << Verbose(0) << " and bond " << *(AddedBondList[Binder->nr]) << ", "); 1369 1369 } else { // this code should actually never come into play (all white atoms are not yet present in BondMolecule, that's why they are white in the first place) 1370 1370 DoLog(0) && (Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom->getName()); 1371 1371 if (AddedBondList[Binder->nr] == NULL) { 1372 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker-> ParticleInfo_nr], AddedAtomList[OtherAtom->ParticleInfo_nr], Binder);1372 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder); 1373 1373 DoLog(0) && (Log() << Verbose(0) << ", added Bond " << *(AddedBondList[Binder->nr])); 1374 1374 } else … … 1378 1378 BFS.BFSStack->push_front(OtherAtom); 1379 1379 } else { // out of bond order, then replace 1380 if ((AddedAtomList[OtherAtom-> ParticleInfo_nr] == NULL) && (Binder->Cyclic))1381 BFS.ColorList[OtherAtom-> ParticleInfo_nr] = white; // unmark if it has not been queued/added, to make it available via its other bonds (cyclic)1380 if ((AddedAtomList[OtherAtom->getNr()] == NULL) && (Binder->Cyclic)) 1381 BFS.ColorList[OtherAtom->getNr()] = white; // unmark if it has not been queued/added, to make it available via its other bonds (cyclic) 1382 1382 if (Binder == Bond) 1383 1383 DoLog(3) && (Log() << Verbose(3) << "Not Queueing, is the Root bond"); 1384 else if (BFS.ShortestPathList[OtherAtom-> ParticleInfo_nr] >= BFS.BondOrder)1384 else if (BFS.ShortestPathList[OtherAtom->getNr()] >= BFS.BondOrder) 1385 1385 DoLog(3) && (Log() << Verbose(3) << "Not Queueing, is out of Bond Count of " << BFS.BondOrder); 1386 1386 if (!Binder->Cyclic) 1387 1387 DoLog(0) && (Log() << Verbose(0) << ", is not part of a cyclic bond, saturating bond with Hydrogen." << endl); 1388 1388 if (AddedBondList[Binder->nr] == NULL) { 1389 if ((AddedAtomList[OtherAtom-> ParticleInfo_nr] != NULL)) { // .. whether we add or saturate1390 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker-> ParticleInfo_nr], AddedAtomList[OtherAtom->ParticleInfo_nr], Binder);1389 if ((AddedAtomList[OtherAtom->getNr()] != NULL)) { // .. whether we add or saturate 1390 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder); 1391 1391 } else { 1392 1392 #ifdef ADDHYDROGEN 1393 if (!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker-> ParticleInfo_nr], Walker, OtherAtom, IsAngstroem))1393 if (!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem)) 1394 1394 exit(1); 1395 1395 #endif … … 1405 1405 // This has to be a cyclic bond, check whether it's present ... 1406 1406 if (AddedBondList[Binder->nr] == NULL) { 1407 if ((Binder != Bond) && (Binder->Cyclic) && (((BFS.ShortestPathList[Walker-> ParticleInfo_nr] + 1) < BFS.BondOrder))) {1408 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker-> ParticleInfo_nr], AddedAtomList[OtherAtom->ParticleInfo_nr], Binder);1407 if ((Binder != Bond) && (Binder->Cyclic) && (((BFS.ShortestPathList[Walker->getNr()] + 1) < BFS.BondOrder))) { 1408 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder); 1409 1409 } else { // if it's root bond it has to broken (otherwise we would not create the fragments) 1410 1410 #ifdef ADDHYDROGEN 1411 if(!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker-> ParticleInfo_nr], Walker, OtherAtom, IsAngstroem))1411 if(!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem)) 1412 1412 exit(1); 1413 1413 #endif … … 1435 1435 1436 1436 // add Root if not done yet 1437 if (AddedAtomList[Root-> ParticleInfo_nr] == NULL) // add Root if not yet present1438 AddedAtomList[Root-> ParticleInfo_nr] = Mol->AddCopyAtom(Root);1437 if (AddedAtomList[Root->getNr()] == NULL) // add Root if not yet present 1438 AddedAtomList[Root->getNr()] = Mol->AddCopyAtom(Root); 1439 1439 1440 1440 BreadthFirstSearchAdd_Init(BFS, Root, BondOrder, getAtomCount(), AddedAtomList); … … 1457 1457 OtherAtom = (*Runner)->GetOtherAtom(Walker); 1458 1458 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->getName() << " for bond " << *(*Runner) << "." << endl); 1459 if (BFS.ColorList[OtherAtom-> ParticleInfo_nr] == white) {1459 if (BFS.ColorList[OtherAtom->getNr()] == white) { 1460 1460 BreadthFirstSearchAdd_UnvisitedNode(Mol, BFS, Walker, OtherAtom, Binder, Bond, AddedAtomList, AddedBondList, IsAngstroem); 1461 1461 } else { … … 1464 1464 } 1465 1465 } 1466 BFS.ColorList[Walker-> ParticleInfo_nr] = black;1466 BFS.ColorList[Walker->getNr()] = black; 1467 1467 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->getName() << " black." << endl); 1468 1468 } … … 1501 1501 DoLog(3) && (Log() << Verbose(3) << "Filling Parent List." << endl); 1502 1502 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 1503 ParentList[(*iter)->father-> ParticleInfo_nr] = (*iter);1503 ParentList[(*iter)->father->getNr()] = (*iter); 1504 1504 // Outputting List for debugging 1505 DoLog(4) && (Log() << Verbose(4) << "Son[" << (*iter)->father-> ParticleInfo_nr << "] of " << (*iter)->father << " is " << ParentList[(*iter)->father->ParticleInfo_nr] << "." << endl);1505 DoLog(4) && (Log() << Verbose(4) << "Son[" << (*iter)->father->getNr() << "] of " << (*iter)->father << " is " << ParentList[(*iter)->father->getNr()] << "." << endl); 1506 1506 } 1507 1507 }; … … 1520 1520 DoLog(3) && (Log() << Verbose(3) << "Creating bonds." << endl); 1521 1521 for (molecule::const_iterator iter = Father->begin(); iter != Father->end(); ++iter) { 1522 if (ParentList[(*iter)-> ParticleInfo_nr] != NULL) {1523 if (ParentList[(*iter)-> ParticleInfo_nr]->father != (*iter)) {1522 if (ParentList[(*iter)->getNr()] != NULL) { 1523 if (ParentList[(*iter)->getNr()]->father != (*iter)) { 1524 1524 status = false; 1525 1525 } else { … … 1529 1529 ++Runner) { 1530 1530 OtherAtom = (*Runner)->GetOtherAtom((*iter)); 1531 if (ParentList[OtherAtom-> ParticleInfo_nr] != NULL) { // if otheratom is also a father of an atom on this molecule, create the bond1532 DoLog(4) && (Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[(*iter)-> ParticleInfo_nr]->getName() << " and " << ParentList[OtherAtom->ParticleInfo_nr]->getName() << "." << endl);1533 mol->AddBond(ParentList[(*iter)-> ParticleInfo_nr], ParentList[OtherAtom->ParticleInfo_nr], (*Runner)->BondDegree);1531 if (ParentList[OtherAtom->getNr()] != NULL) { // if otheratom is also a father of an atom on this molecule, create the bond 1532 DoLog(4) && (Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[(*iter)->getNr()]->getName() << " and " << ParentList[OtherAtom->getNr()]->getName() << "." << endl); 1533 mol->AddBond(ParentList[(*iter)->getNr()], ParentList[OtherAtom->getNr()], (*Runner)->BondDegree); 1534 1534 } 1535 1535 } -
src/moleculelist.cpp
ra479fa r735b1c 140 140 aList[Counter] = Count + (aCounter++); 141 141 else 142 aList[Counter] = (*aiter)->GetTrueFather()-> ParticleInfo_nr;142 aList[Counter] = (*aiter)->GetTrueFather()->getNr(); 143 143 if ((*biter)->GetTrueFather() == NULL) 144 144 bList[Counter] = Count + (bCounter++); 145 145 else 146 bList[Counter] = (*biter)->GetTrueFather()-> ParticleInfo_nr;146 bList[Counter] = (*biter)->GetTrueFather()->getNr(); 147 147 Counter++; 148 148 } … … 367 367 // 3. take every other hydrogen that is the not the first and not bound to same bonding partner 368 368 Binder = *((*runner)->getListOfBonds().begin()); 369 if (((*runner)->getType()->getAtomicNumber() == 1) && ((*runner)-> ParticleInfo_nr > (*iter)->ParticleInfo_nr) && (Binder->GetOtherAtom((*runner)) != Binder->GetOtherAtom((*iter)))) { // (hydrogens have only one bonding partner!)369 if (((*runner)->getType()->getAtomicNumber() == 1) && ((*runner)->getNr() > (*iter)->getNr()) && (Binder->GetOtherAtom((*runner)) != Binder->GetOtherAtom((*iter)))) { // (hydrogens have only one bonding partner!) 370 370 // 4. evaluate the morse potential for each matrix component and add up 371 371 distance = (*runner)->distance(*(*iter)); … … 462 462 if (((*atomIter)->GetTrueFather() != NULL) && ((*atomIter)->GetTrueFather() != (*atomIter))) {// if there is a rea 463 463 //Log() << Verbose(0) << "Walker is " << *Walker << " with true father " << *( Walker->GetTrueFather()) << ", it 464 ForcesFile << SortIndex[(*atomIter)->GetTrueFather()-> ParticleInfo_nr] << "\t";464 ForcesFile << SortIndex[(*atomIter)->GetTrueFather()->getNr()] << "\t"; 465 465 } else 466 466 // otherwise a -1 to indicate an added saturation hydrogen … … 808 808 for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) { 809 809 Father = (*iter)->GetTrueFather(); 810 AtomNo = Father-> ParticleInfo_nr; // global id of the current walker810 AtomNo = Father->getNr(); // global id of the current walker 811 811 const BondList& ListOfBonds = Father->getListOfBonds(); 812 812 for (BondList::const_iterator Runner = ListOfBonds.begin(); 813 813 Runner != ListOfBonds.end(); 814 814 ++Runner) { 815 OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())-> ParticleInfo_nr]; // local copy of current bond partner of walker815 OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->getNr()]; // local copy of current bond partner of walker 816 816 if (OtherWalker != NULL) { 817 if (OtherWalker-> ParticleInfo_nr > (*iter)->ParticleInfo_nr)817 if (OtherWalker->getNr() > (*iter)->getNr()) 818 818 Leaf->AddBond((*iter), OtherWalker, (*Runner)->BondDegree); 819 819 } else { 820 DoLog(1) && (Log() << Verbose(1) << "OtherWalker = ListOfLocalAtoms[" << (*Runner)->GetOtherAtom((*iter)->GetTrueFather())-> ParticleInfo_nr<< "] is NULL!" << endl);820 DoLog(1) && (Log() << Verbose(1) << "OtherWalker = ListOfLocalAtoms[" << (*Runner)->GetOtherAtom((*iter)->GetTrueFather())->getNr() << "] is NULL!" << endl); 821 821 status = false; 822 822 } … … 851 851 for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) { 852 852 Father = (*iter)->GetTrueFather(); 853 if (AtomMask[Father-> ParticleInfo_nr]) // apply mask853 if (AtomMask[Father->getNr()]) // apply mask 854 854 #ifdef ADDHYDROGEN 855 855 if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen 856 856 #endif 857 RootStack[FragmentCounter].push_front((*iter)-> ParticleInfo_nr);857 RootStack[FragmentCounter].push_front((*iter)->getNr()); 858 858 } 859 859 if (next != NULL) … … 928 928 KeySet *TempSet = new KeySet; 929 929 for (Graph::iterator runner = KeySetList->begin(); runner != KeySetList->end(); runner++) { // key sets contain global numbers! 930 if (ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*((*runner).first.begin()))-> ParticleInfo_nr] != NULL) {// as we may assume that that bond structure is unchanged, we only test the first key in each set930 if (ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*((*runner).first.begin()))->getNr()] != NULL) {// as we may assume that that bond structure is unchanged, we only test the first key in each set 931 931 // translate keyset to local numbers 932 932 for (KeySet::iterator sprinter = (*runner).first.begin(); sprinter != (*runner).first.end(); sprinter++) 933 TempSet->insert(ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*sprinter)-> ParticleInfo_nr]->ParticleInfo_nr);933 TempSet->insert(ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*sprinter)->getNr()]->getNr()); 934 934 // insert into FragmentList 935 935 FragmentList[FragmentCounter]->insert(GraphPair(*TempSet, pair<int, double> (KeySetCounter++, (*runner).second.second))); … … 972 972 for (Graph::iterator runner = FragmentList[FragmentCounter]->begin(); runner != FragmentList[FragmentCounter]->end(); runner++) { 973 973 for (KeySet::iterator sprinter = (*runner).first.begin(); sprinter != (*runner).first.end(); sprinter++) 974 TempSet->insert((Leaf->FindAtom(*sprinter))->GetTrueFather()-> ParticleInfo_nr);974 TempSet->insert((Leaf->FindAtom(*sprinter))->GetTrueFather()->getNr()); 975 975 TotalGraph.insert(GraphPair(*TempSet, pair<int, double> (TotalNumberOfKeySets++, (*runner).second.second))); 976 976 TempSet->clear(); -
src/parser.cpp
ra479fa r735b1c 760 760 while (!zeile.eof()) { 761 761 zeile >> nr; 762 //Log() << Verbose(0) << "Current index: " << ParticleInfo_nr<< "." << endl;762 //Log() << Verbose(0) << "Current index: " << getNr() << "." << endl; 763 763 if (nr > RowCounter[MatrixCounter]) 764 764 RowCounter[MatrixCounter] = nr; … … 993 993 while (!zeile.eof()) { 994 994 zeile >> nr; 995 //Log() << Verbose(0) << "Current index: " << ParticleInfo_nr<< "." << endl;995 //Log() << Verbose(0) << "Current index: " << getNr() << "." << endl; 996 996 if (nr > RowCounter[MatrixCounter]) { 997 997 RowCounter[MatrixCounter] = nr; -
src/tesselation.cpp
ra479fa r735b1c 536 536 PointTestPair InsertUnique; 537 537 BPS[n] = new class BoundaryPointSet(Walker); 538 InsertUnique = PointsOnBoundary.insert(PointPair(Walker-> ParticleInfo_nr, BPS[n]));538 InsertUnique = PointsOnBoundary.insert(PointPair(Walker->getNr(), BPS[n])); 539 539 if (InsertUnique.second) { // if new point was not present before, increase counter 540 540 PointsOnBoundaryCount++; … … 558 558 PointTestPair InsertUnique; 559 559 TPS[n] = new class BoundaryPointSet(Candidate); 560 InsertUnique = PointsOnBoundary.insert(PointPair(Candidate-> ParticleInfo_nr, TPS[n]));560 InsertUnique = PointsOnBoundary.insert(PointPair(Candidate->getNr(), TPS[n])); 561 561 if (InsertUnique.second) { // if new point was not present before, increase counter 562 562 PointsOnBoundaryCount++; … … 577 577 { 578 578 Info FunctionInfo(__func__); 579 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate-> ParticleInfo_nr);579 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate->getNr()); 580 580 if (FindPoint != PointsOnBoundary.end()) 581 581 TPS[n] = FindPoint->second; … … 597 597 { 598 598 bool insertNewLine = true; 599 LineMap::iterator FindLine = a->lines.find(b->node-> ParticleInfo_nr);599 LineMap::iterator FindLine = a->lines.find(b->node->getNr()); 600 600 BoundaryLineSet *WinningLine = NULL; 601 601 if (FindLine != a->lines.end()) { … … 603 603 604 604 pair<LineMap::iterator, LineMap::iterator> FindPair; 605 FindPair = a->lines.equal_range(b->node-> ParticleInfo_nr);605 FindPair = a->lines.equal_range(b->node->getNr()); 606 606 607 607 for (FindLine = FindPair.first; (FindLine != FindPair.second) && (insertNewLine); FindLine++) { … … 709 709 /** Function adds triangle to global list. 710 710 * Furthermore, the triangle number is set to \a ParticleInfo_nr. 711 * \param ParticleInfo_nrtriangle number711 * \param getNr() triangle number 712 712 */ 713 713 void Tesselation::AddTesselationTriangle(const int nr) … … 902 902 // builds a triangle point set (Points) of the end points 903 903 for (int i = 0; i < 3; i++) { 904 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidates[i]-> ParticleInfo_nr);904 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidates[i]->getNr()); 905 905 if (FindPoint != PointsOnBoundary.end()) { 906 906 Points[i] = FindPoint->second; … … 915 915 for (int j = i; j < 3; j++) { 916 916 if (Points[j] != NULL) { 917 LineMap::const_iterator FindLine = Points[i]->lines.find(Points[j]->node-> ParticleInfo_nr);918 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node-> ParticleInfo_nr); FindLine++) {917 LineMap::const_iterator FindLine = Points[i]->lines.find(Points[j]->node->getNr()); 918 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) { 919 919 TriangleMap *triangles = &FindLine->second->triangles; 920 920 DoLog(1) && (Log() << Verbose(1) << "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << "." << endl); … … 955 955 // builds a triangle point set (Points) of the end points 956 956 for (int i = 0; i < 3; i++) { 957 PointMap::iterator FindPoint = PointsOnBoundary.find(Candidates[i]-> ParticleInfo_nr);957 PointMap::iterator FindPoint = PointsOnBoundary.find(Candidates[i]->getNr()); 958 958 if (FindPoint != PointsOnBoundary.end()) { 959 959 Points[i] = FindPoint->second; … … 968 968 for (int j = i; j < 3; j++) { 969 969 if (Points[j] != NULL) { 970 LineMap::iterator FindLine = Points[i]->lines.find(Points[j]->node-> ParticleInfo_nr);971 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node-> ParticleInfo_nr); FindLine++) {970 LineMap::iterator FindLine = Points[i]->lines.find(Points[j]->node->getNr()); 971 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) { 972 972 TriangleMap *triangles = &FindLine->second->triangles; 973 973 for (TriangleMap::iterator FindTriangle = triangles->begin(); FindTriangle != triangles->end(); FindTriangle++) { … … 1145 1145 // 1146 1146 // // check both other lines 1147 // PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode-> ParticleInfo_nr);1147 // PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode->getNr()); 1148 1148 // if (FindPoint != PointsOnBoundary.end()) { 1149 1149 // for (int i=0;i<2;i++) { 1150 // LineMap::const_iterator FindLine = (FindPoint->second)->lines.find(BaseRay->endpoints[0]->node-> ParticleInfo_nr);1150 // LineMap::const_iterator FindLine = (FindPoint->second)->lines.find(BaseRay->endpoints[0]->node->getNr()); 1151 1151 // if (FindLine != (FindPoint->second)->lines.end()) { 1152 1152 // Line = FindLine->second; … … 1440 1440 Info FunctionInfo(__func__); 1441 1441 1442 pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node-> ParticleInfo_nr);1442 pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node->getNr()); 1443 1443 for (LineMap::const_iterator FindLine = FindPair.first; FindLine != FindPair.second; FindLine++) { 1444 1444 DoLog(1) && (Log() << Verbose(1) << "INFO: Checking line " << *(FindLine->second) << " ..." << endl); … … 2223 2223 if (List != NULL) { 2224 2224 for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 2225 FindPoint = PointsOnBoundary.find((*Runner)-> ParticleInfo_nr);2225 FindPoint = PointsOnBoundary.find((*Runner)->getNr()); 2226 2226 if (FindPoint != PointsOnBoundary.end()) { 2227 2227 points->insert(DistanceToPointPair(FindPoint->second->node->DistanceSquared(x), FindPoint->second)); … … 2557 2557 bool takePoint = false; 2558 2558 // find the respective boundary point 2559 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point-> ParticleInfo_nr);2559 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr()); 2560 2560 if (PointRunner != PointsOnBoundary.end()) { 2561 2561 ReferencePoint = PointRunner->second; … … 2577 2577 takePoint = false; 2578 2578 2579 if (findLines->second->endpoints[0]->Nr == Point-> ParticleInfo_nr) {2579 if (findLines->second->endpoints[0]->Nr == Point->getNr()) { 2580 2580 takePoint = true; 2581 2581 current = findLines->second->endpoints[1]->node; 2582 } else if (findLines->second->endpoints[1]->Nr == Point-> ParticleInfo_nr) {2582 } else if (findLines->second->endpoints[1]->Nr == Point->getNr()) { 2583 2583 takePoint = true; 2584 2584 current = findLines->second->endpoints[0]->node; … … 2813 2813 class BoundaryLineSet *StartLine = NULL; 2814 2814 // find the respective boundary point 2815 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point-> ParticleInfo_nr);2815 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr()); 2816 2816 if (PointRunner != PointsOnBoundary.end()) { 2817 2817 ReferencePoint = PointRunner->second; … … 3233 3233 TrianglePoints[i] = NULL; 3234 3234 } else { 3235 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]-> ParticleInfo_nr);3235 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]->getNr()); 3236 3236 if (FindPoint != PointsOnBoundary.end()) { 3237 3237 TrianglePoints[i] = FindPoint->second; … … 3248 3248 for (int j = i + 1; j < 3; j++) { 3249 3249 if (TrianglePoints[j] != NULL) { 3250 for (FindLine = TrianglePoints[i]->lines.find(TrianglePoints[j]->node-> ParticleInfo_nr); // is a multimap!3251 (FindLine != TrianglePoints[i]->lines.end()) && (FindLine->first == TrianglePoints[j]->node-> ParticleInfo_nr); FindLine++) {3250 for (FindLine = TrianglePoints[i]->lines.find(TrianglePoints[j]->node->getNr()); // is a multimap! 3251 (FindLine != TrianglePoints[i]->lines.end()) && (FindLine->first == TrianglePoints[j]->node->getNr()); FindLine++) { 3252 3252 for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) { 3253 3253 if (FindTriangle->second->IsPresentTupel(TrianglePoints)) { … … 3269 3269 if (TrianglePoints[i] == NULL) 3270 3270 break; 3271 for (FindLine = TrianglePoints[(i + 1) % 3]->lines.find(TrianglePoints[(i + 2) % 3]->node-> ParticleInfo_nr); // is a multimap!3272 (FindLine != TrianglePoints[(i + 1) % 3]->lines.end()) && (FindLine->first == TrianglePoints[(i + 2) % 3]->node-> ParticleInfo_nr); FindLine++) {3271 for (FindLine = TrianglePoints[(i + 1) % 3]->lines.find(TrianglePoints[(i + 2) % 3]->node->getNr()); // is a multimap! 3272 (FindLine != TrianglePoints[(i + 1) % 3]->lines.end()) && (FindLine->first == TrianglePoints[(i + 2) % 3]->node->getNr()); FindLine++) { 3273 3273 for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) { 3274 3274 if (FindTriangle->second->IsPresentTupel(TrianglePoints)) { … … 3531 3531 if (NearestPoint == point) 3532 3532 NearestPoint = BackupPoint; 3533 PointRunner = PointsOnBoundary.find(NearestPoint-> ParticleInfo_nr);3533 PointRunner = PointsOnBoundary.find(NearestPoint->getNr()); 3534 3534 if (PointRunner != PointsOnBoundary.end()) { 3535 3535 NearestBoundaryPoint = PointRunner->second; -
src/tesselationhelpers.cpp
ra479fa r735b1c 331 331 DoLog(1) && (Log() << Verbose(1) << "Node nr. " << i << " is not yet present." << endl); 332 332 result = true; 333 } else if (nodes[i]->lines.find(nodes[j]->node-> ParticleInfo_nr) != nodes[i]->lines.end()) { // there already is a line333 } else if (nodes[i]->lines.find(nodes[j]->node->getNr()) != nodes[i]->lines.end()) { // there already is a line 334 334 LineMap::const_iterator FindLine; 335 335 pair<LineMap::const_iterator,LineMap::const_iterator> FindPair; 336 FindPair = nodes[i]->lines.equal_range(nodes[j]->node-> ParticleInfo_nr);336 FindPair = nodes[i]->lines.equal_range(nodes[j]->node->getNr()); 337 337 for (FindLine = FindPair.first; FindLine != FindPair.second; ++FindLine) { 338 338 // If there is a line with less than two attached triangles, we don't need a new line. … … 724 724 for (PointMap::const_iterator target = TesselStruct->PointsOnBoundary.begin(); target != TesselStruct->PointsOnBoundary.end(); ++target) { 725 725 Walker = target->second->node; 726 ASSERT(Walker-> ParticleInfo_nr<= MaxId, "WriteTecplotFile() - Id of particle greater than MaxId.");727 LookupList[Walker-> ParticleInfo_nr] = Counter++;726 ASSERT(Walker->getNr() <= MaxId, "WriteTecplotFile() - Id of particle greater than MaxId."); 727 LookupList[Walker->getNr()] = Counter++; 728 728 for (int i=0;i<NDIM;i++) { 729 729 const double tmp = Walker->at(i); … … 737 737 for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) { 738 738 DoLog(1) && (Log() << Verbose(1) << " " << runner->second->endpoints[0]->node->getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName() << endl); 739 *tecplot << LookupList[runner->second->endpoints[0]->node-> ParticleInfo_nr] << " " << LookupList[runner->second->endpoints[1]->node->ParticleInfo_nr] << " " << LookupList[runner->second->endpoints[2]->node->ParticleInfo_nr] << endl;739 *tecplot << LookupList[runner->second->endpoints[0]->node->getNr()] << " " << LookupList[runner->second->endpoints[1]->node->getNr()] << " " << LookupList[runner->second->endpoints[2]->node->getNr()] << endl; 740 740 } 741 741 delete[] (LookupList);
Note:
See TracChangeset
for help on using the changeset viewer.