Ignore:
Timestamp:
Mar 1, 2011, 10:16:38 AM (14 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

Renamed ParticleInfo::nr to ParticleInfo::ParticleInfo_nr for easier privatization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/moleculelist.cpp

    r5702cdb ra479fa  
    140140          aList[Counter] = Count + (aCounter++);
    141141        else
    142           aList[Counter] = (*aiter)->GetTrueFather()->nr;
     142          aList[Counter] = (*aiter)->GetTrueFather()->ParticleInfo_nr;
    143143        if ((*biter)->GetTrueFather() == NULL)
    144144          bList[Counter] = Count + (bCounter++);
    145145        else
    146           bList[Counter] = (*biter)->GetTrueFather()->nr;
     146          bList[Counter] = (*biter)->GetTrueFather()->ParticleInfo_nr;
    147147        Counter++;
    148148      }
     
    367367          // 3. take every other hydrogen that is the not the first and not bound to same bonding partner
    368368          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!)
    370370            // 4. evaluate the morse potential for each matrix component and add up
    371371            distance = (*runner)->distance(*(*iter));
     
    462462              if (((*atomIter)->GetTrueFather() != NULL) && ((*atomIter)->GetTrueFather() != (*atomIter))) {// if there is a rea
    463463                //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";
    465465              } else
    466466                // otherwise a -1 to indicate an added saturation hydrogen
     
    808808    for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) {
    809809      Father = (*iter)->GetTrueFather();
    810       AtomNo = Father->nr; // global id of the current walker
     810      AtomNo = Father->ParticleInfo_nr; // global id of the current walker
    811811      const BondList& ListOfBonds = Father->getListOfBonds();
    812812      for (BondList::const_iterator Runner = ListOfBonds.begin();
    813813          Runner != ListOfBonds.end();
    814814          ++Runner) {
    815         OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->nr]; // local copy of current bond partner of walker
     815        OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->ParticleInfo_nr]; // local copy of current bond partner of walker
    816816        if (OtherWalker != NULL) {
    817           if (OtherWalker->nr > (*iter)->nr)
     817          if (OtherWalker->ParticleInfo_nr > (*iter)->ParticleInfo_nr)
    818818            Leaf->AddBond((*iter), OtherWalker, (*Runner)->BondDegree);
    819819        } 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);
    821821          status = false;
    822822        }
     
    837837 * \param *out output stream for debugging
    838838 * \param *&RootStack stack to be filled
    839  * \param *AtomMask defines true/false per global Atom::nr to mask in/out each nuclear site
     839 * \param *AtomMask defines true/false per global Atom::ParticleInfo_nr to mask in/out each nuclear site
    840840 * \param &FragmentCounter counts through the fragments in this MoleculeLeafClass
    841841 * \return true - stack is non-empty, fragmentation necessary, false - stack is empty, no more sites to update
     
    851851      for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) {
    852852        Father = (*iter)->GetTrueFather();
    853         if (AtomMask[Father->nr]) // apply mask
     853        if (AtomMask[Father->ParticleInfo_nr]) // apply mask
    854854#ifdef ADDHYDROGEN
    855855          if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen
    856856#endif
    857           RootStack[FragmentCounter].push_front((*iter)->nr);
     857          RootStack[FragmentCounter].push_front((*iter)->ParticleInfo_nr);
    858858      }
    859859      if (next != NULL)
     
    871871};
    872872
    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.
    874874 * \param *out output stream from debugging
    875875 * \param **&ListOfLocalAtoms Lookup table for each subgraph and index of each atom in global molecule, may be NULL on start, then it is filled
     
    891891};
    892892
    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.
    894894 * \param *out output stream fro debugging
    895895 * \param *reference reference molecule with the bond structure to be copied
     
    928928    KeySet *TempSet = new KeySet;
    929929    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 set
     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 set
    931931        // translate keyset to local numbers
    932932        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);
    934934        // insert into FragmentList
    935935        FragmentList[FragmentCounter]->insert(GraphPair(*TempSet, pair<int, double> (KeySetCounter++, (*runner).second.second)));
     
    972972    for (Graph::iterator runner = FragmentList[FragmentCounter]->begin(); runner != FragmentList[FragmentCounter]->end(); runner++) {
    973973      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);
    975975      TotalGraph.insert(GraphPair(*TempSet, pair<int, double> (TotalNumberOfKeySets++, (*runner).second.second)));
    976976      TempSet->clear();
Note: See TracChangeset for help on using the changeset viewer.