Changeset a479fa for src/moleculelist.cpp
- Timestamp:
- Mar 1, 2011, 10:16:38 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:
- 735b1c
- Parents:
- 5702cdb
- git-author:
- Frederik Heber <heber@…> (02/21/11 23:50:41)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/moleculelist.cpp
r5702cdb ra479fa 140 140 aList[Counter] = Count + (aCounter++); 141 141 else 142 aList[Counter] = (*aiter)->GetTrueFather()-> nr;142 aList[Counter] = (*aiter)->GetTrueFather()->ParticleInfo_nr; 143 143 if ((*biter)->GetTrueFather() == NULL) 144 144 bList[Counter] = Count + (bCounter++); 145 145 else 146 bList[Counter] = (*biter)->GetTrueFather()-> nr;146 bList[Counter] = (*biter)->GetTrueFather()->ParticleInfo_nr; 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)-> nr > (*iter)->nr) && (Binder->GetOtherAtom((*runner)) != Binder->GetOtherAtom((*iter)))) { // (hydrogens have only one bonding partner!)369 if (((*runner)->getType()->getAtomicNumber() == 1) && ((*runner)->ParticleInfo_nr > (*iter)->ParticleInfo_nr) && (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()-> nr] << "\t";464 ForcesFile << SortIndex[(*atomIter)->GetTrueFather()->ParticleInfo_nr] << "\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-> nr; // global id of the current walker810 AtomNo = Father->ParticleInfo_nr; // 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())-> nr]; // local copy of current bond partner of walker815 OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->ParticleInfo_nr]; // local copy of current bond partner of walker 816 816 if (OtherWalker != NULL) { 817 if (OtherWalker-> nr > (*iter)->nr)817 if (OtherWalker->ParticleInfo_nr > (*iter)->ParticleInfo_nr) 818 818 Leaf->AddBond((*iter), OtherWalker, (*Runner)->BondDegree); 819 819 } else { 820 DoLog(1) && (Log() << Verbose(1) << "OtherWalker = ListOfLocalAtoms[" << (*Runner)->GetOtherAtom((*iter)->GetTrueFather())-> nr << "] is NULL!" << endl);820 DoLog(1) && (Log() << Verbose(1) << "OtherWalker = ListOfLocalAtoms[" << (*Runner)->GetOtherAtom((*iter)->GetTrueFather())->ParticleInfo_nr << "] is NULL!" << endl); 821 821 status = false; 822 822 } … … 837 837 * \param *out output stream for debugging 838 838 * \param *&RootStack stack to be filled 839 * \param *AtomMask defines true/false per global Atom:: nr to mask in/out each nuclear site839 * \param *AtomMask defines true/false per global Atom::ParticleInfo_nr to mask in/out each nuclear site 840 840 * \param &FragmentCounter counts through the fragments in this MoleculeLeafClass 841 841 * \return true - stack is non-empty, fragmentation necessary, false - stack is empty, no more sites to update … … 851 851 for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) { 852 852 Father = (*iter)->GetTrueFather(); 853 if (AtomMask[Father-> nr]) // apply mask853 if (AtomMask[Father->ParticleInfo_nr]) // apply mask 854 854 #ifdef ADDHYDROGEN 855 855 if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen 856 856 #endif 857 RootStack[FragmentCounter].push_front((*iter)-> nr);857 RootStack[FragmentCounter].push_front((*iter)->ParticleInfo_nr); 858 858 } 859 859 if (next != NULL) … … 871 871 }; 872 872 873 /** Fills a lookup list of father's Atom:: nr -> atom for each subgraph.873 /** Fills a lookup list of father's Atom::ParticleInfo_nr -> atom for each subgraph. 874 874 * \param *out output stream from debugging 875 875 * \param **&ListOfLocalAtoms Lookup table for each subgraph and index of each atom in global molecule, may be NULL on start, then it is filled … … 891 891 }; 892 892 893 /** The indices per keyset are compared to the respective father's Atom:: nr in each subgraph and thus put into \a **&FragmentList.893 /** The indices per keyset are compared to the respective father's Atom::ParticleInfo_nr in each subgraph and thus put into \a **&FragmentList. 894 894 * \param *out output stream fro debugging 895 895 * \param *reference reference molecule with the bond structure to be copied … … 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()))-> 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()))->ParticleInfo_nr] != 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)-> nr]->nr);933 TempSet->insert(ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*sprinter)->ParticleInfo_nr]->ParticleInfo_nr); 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()-> nr);974 TempSet->insert((Leaf->FindAtom(*sprinter))->GetTrueFather()->ParticleInfo_nr); 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.