Changeset 735b1c for src/moleculelist.cpp
- Timestamp:
- Mar 1, 2011, 10:16:39 AM (15 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, Candidate_v1.7.0, 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)
- File:
-
- 1 edited
-
src/moleculelist.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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();
Note:
See TracChangeset
for help on using the changeset viewer.
