Changeset 735b1c


Ignore:
Timestamp:
Mar 1, 2011, 10:16:39 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:
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)
Message:

ParticleInfo::ParticleInfo_nr is protected and accessed via getter/setter.

  • many changes (~400) in molecule- and tesselation-related functions.
Location:
src
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • src/BoundaryPointSet.cpp

    ra479fa r735b1c  
    5757  node(Walker),
    5858  value(0.),
    59   Nr(Walker->ParticleInfo_nr)
     59  Nr(Walker->getNr())
    6060{
    6161  Info FunctionInfo(__func__);
     
    108108{
    109109  ASSERT(node != NULL, "BoundaryPointSet::getPosition() - internal node is NULL.");
    110   return node->ParticleInfo_nr;
     110  return node->getNr();
    111111}
    112112
  • src/BoundaryPointSet.hpp

    ra479fa r735b1c  
    5252    /** Getter for \a node's ParticleInfo_nr.
    5353     *
    54      * @return ParticleInfo_nr of \a node
     54     * @return getNr() of \a node
    5555     */
    5656    const int& getNr() const;
  • src/analysis_bonds.cpp

    ra479fa r735b1c  
    239239            BondRunner++) {
    240240          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())) {
    242242            count++;
    243243            DoLog(1) && (Log() << Verbose(1) << *first << "-" << *second << " bond found between " << *Walker << " and " << *OtherAtom << "." << endl);
  • src/atom.cpp

    ra479fa r735b1c  
    152152      *out << " # " << comment << endl;
    153153    else
    154       *out << " # molecule nr " << ParticleInfo_nr << endl;
     154      *out << " # molecule nr " << getNr() << endl;
    155155    return true;
    156156  } else
     
    179179      *out << " # " << comment << endl;
    180180    else
    181       *out << " # molecule nr " << ParticleInfo_nr << endl;
     181      *out << " # molecule nr " << getNr() << endl;
    182182    return true;
    183183  } else
     
    218218    if (getAtomicForceAtStep(step).Norm() > MYEPSILON)
    219219      *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;
    221221    return true;
    222222  } else
     
    259259bool atom::Compare(const atom &ptr) const
    260260{
    261   if (ParticleInfo_nr < ptr.ParticleInfo_nr)
     261  if (getNr() < ptr.getNr())
    262262    return true;
    263263  else
     
    379379
    380380int atom::getNr() const{
    381   return ParticleInfo_nr;
     381  return ParticleInfo::getNr();
    382382}
    383383
  • src/atom_bondedparticle.cpp

    ra479fa r735b1c  
    5050void BondedParticle::OutputOrder(ofstream *file) const
    5151{
    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;
    5454};
    5555
     
    5959{
    6060  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);
    6262  int TotalDegree = 0;
    6363  for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) {
     
    7474{
    7575  const BondList& ListOfBonds = getListOfBonds();
    76   *AdjacencyFile << ParticleInfo_nr << "\t";
     76  *AdjacencyFile << getNr() << "\t";
    7777  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";
    7979  *AdjacencyFile << endl;
    8080};
     
    8888  const BondList& ListOfBonds = getListOfBonds();
    8989  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";
    9292};
    9393
  • src/atom_particleinfo.hpp

    ra479fa r735b1c  
    2828class ParticleInfo {
    2929public:
    30   int ParticleInfo_nr;       // index to easierly identify
    31 
    3230  ParticleInfo();
    3331  ParticleInfo(ParticleInfo*);
     
    5755  ostream & operator << (ostream &ost) const;
    5856
     57protected:
     58  int ParticleInfo_nr;       // index to easierly identify, only protected as used in atom::sort
     59
    5960private:
    6061  std::string name;   // some name to reference to on output
  • src/bond.cpp

    ra479fa r735b1c  
    120120bool bond::Contains(const int number)
    121121{
    122   return ((leftatom->ParticleInfo_nr == number) || (rightatom->ParticleInfo_nr == number));
     122  return ((leftatom->getNr() == number) || (rightatom->getNr() == number));
    123123};
    124124
  • src/boundary.cpp

    ra479fa r735b1c  
    909909            DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is outer point." << endl);
    910910            // 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);
    915915          } else {
    916916            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;
    918918            continue;
    919919          }
     
    927927            if ((*BondRunner)->leftatom == *AtomRunner) {
    928928              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);
    932932              }
    933933            }
  • src/config.cpp

    ra479fa r735b1c  
    845845      fprintf(f,
    846846             "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 */
    848848             name,         /* atom name */
    849849             (*MolRunner)->name,      /* residue name */
     
    898898    fprintf(f,
    899899           "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 */
    901901           name,         /* atom name */
    902902           mol->name,      /* residue name */
     
    948948
    949949  for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    950     *output << (*iter)->ParticleInfo_nr << "\t";
     950    *output << (*iter)->getNr() << "\t";
    951951    *output << (*iter)->getName() << "\t";
    952952    *output << mol->name << "\t";
     
    959959        runner != ListOfBonds.end();
    960960        runner++) {
    961       *output << (*runner)->GetOtherAtom(*iter)->ParticleInfo_nr << "\t";
     961      *output << (*runner)->GetOtherAtom(*iter)->getNr() << "\t";
    962962    }
    963963    for(int i = ListOfBonds.size(); i < MaxNeighbours; i++)
  • src/molecule.cpp

    ra479fa r735b1c  
    230230  OBSERVE;
    231231  if (pointer != NULL) {
    232     pointer->sort = &pointer->ParticleInfo_nr;
    233232    if (pointer->getType() != NULL) {
    234233      if (pointer->getType()->getAtomicNumber() != 1)
     
    236235      if(pointer->getName() == "Unknown"){
    237236        stringstream sstr;
    238         sstr << pointer->getType()->getSymbol() << pointer->ParticleInfo_nr+1;
     237        sstr << pointer->getType()->getSymbol() << pointer->getNr()+1;
    239238        pointer->setName(sstr.str());
    240239      }
     
    723722  ASSERT(atom1, "First atom in bond-creation was an invalid pointer");
    724723  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");
    727726
    728727  Binder = new bond(atom1, atom2, degree, BondCount++);
     
    839838  molecule::const_iterator iter = begin();
    840839  for (; iter != end(); ++iter)
    841     if ((*iter)->ParticleInfo_nr == Nr)
     840    if ((*iter)->getNr() == Nr)
    842841      break;
    843842  if (iter != end()) {
    844     //Log() << Verbose(0) << "Found Atom Nr. " << walker->ParticleInfo_nr << endl;
     843    //Log() << Verbose(0) << "Found Atom Nr. " << walker->getNr() << endl;
    845844    return (*iter);
    846845  } else {
     
    988987      NoNonHydrogen++;
    989988    stringstream sstr;
    990     sstr << (*iter)->getType()->getSymbol() << (*iter)->ParticleInfo_nr+1;
     989    sstr << (*iter)->getType()->getSymbol() << (*iter)->getNr()+1;
    991990    (*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);
    993992    i++;
    994993  }
     
    10171016    for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    10181017      if ((*iter)->father == NULL) {
    1019         AtomicMap[(*iter)->ParticleInfo_nr] = -2;
     1018        AtomicMap[(*iter)->getNr()] = -2;
    10201019      } else {
    10211020        for (molecule::const_iterator runner = OtherMolecule->begin(); runner != OtherMolecule->end(); ++runner) {
     
    10241023          //Log() << Verbose(4) << "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << "." << endl;
    10251024          if ((*iter)->father == (*runner))
    1026             AtomicMap[(*iter)->ParticleInfo_nr] = (*runner)->ParticleInfo_nr;
     1025            AtomicMap[(*iter)->getNr()] = (*runner)->getNr();
    10271026        }
    10281027      }
    1029       DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)->ParticleInfo_nr] << "\t");
     1028      DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)->getNr()] << "\t");
    10301029    }
    10311030    DoLog(0) && (Log() << Verbose(0) << endl);
  • src/molecule_dynamics.cpp

    ra479fa r735b1c  
    5959      break;
    6060    // determine normalized trajectories direction vector (n1, n2)
    61     Sprinter = Params.PermutationMap[Walker->ParticleInfo_nr];   // find first target point
     61    Sprinter = Params.PermutationMap[Walker->getNr()];   // find first target point
    6262    trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep);
    6363    trajectory1.Normalize();
    6464    Norm1 = trajectory1.Norm();
    65     Sprinter = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find second target point
     65    Sprinter = Params.PermutationMap[(*iter)->getNr()];   // find second target point
    6666    trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep);
    6767    trajectory2.Normalize();
     
    7171      tmp = Walker->getPositionAtStep(Params.startstep).distance((*iter)->getPositionAtStep(Params.startstep));
    7272    } else if (Norm1 < MYEPSILON) {
    73       Sprinter = Params.PermutationMap[Walker->ParticleInfo_nr];   // find first target point
     73      Sprinter = Params.PermutationMap[Walker->getNr()];   // find first target point
    7474      trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep);
    7575      trajectory2 *= trajectory1.ScalarProduct(trajectory2); // trajectory2 is scaled to unity, hence we don't need to divide by anything
     
    7777      tmp = trajectory1.Norm();  // remaining norm is distance
    7878    } else if (Norm2 < MYEPSILON) {
    79       Sprinter = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find second target point
     79      Sprinter = Params.PermutationMap[(*iter)->getNr()];   // find second target point
    8080      trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep);  // copy second offset
    8181      trajectory1 *= trajectory2.ScalarProduct(trajectory1); // trajectory1 is scaled to unity, hence we don't need to divide by anything
     
    147147  double result = 0.;
    148148  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()];
    151151  //        Log() << Verbose(0) << *Walker << " and " << *(*iter) << " are heading to the same target at ";
    152152  //        Log() << Verbose(0) << Sprinter->getPosition(endstep);
     
    182182  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    183183    // first term: distance to target
    184     Runner = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find target point
     184    Runner = Params.PermutationMap[(*iter)->getNr()];   // find target point
    185185    tmp = ((*iter)->getPositionAtStep(Params.startstep).distance(Runner->getPositionAtStep(Params.endstep)));
    186186    tmp *= Params.IsAngstroem ? 1. : 1./AtomicLengthToAngstroem;
     
    213213  zeile2 << "                ";
    214214  for (int i=0;i<AtomCount;i++) {
    215     Params.DoubleList[Params.PermutationMap[i]->ParticleInfo_nr]++;
     215    Params.DoubleList[Params.PermutationMap[i]->getNr()]++;
    216216    zeile1 << i << " ";
    217     zeile2 << Params.PermutationMap[i]->ParticleInfo_nr << " ";
     217    zeile2 << Params.PermutationMap[i]->getNr() << " ";
    218218  }
    219219  for (int i=0;i<AtomCount;i++)
     
    239239  for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    240240    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)) );
    242242    }
    243243  }
     
    252252{
    253253  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 target
    255     Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin()->second;   // always pick target with the smallest distance
    256     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 picked
    258     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);
    259259  }
    260260};
     
    270270{
    271271  double Potential = 0;
    272   DistanceMap::iterator NewBase = Params.DistanceIterators[Walker->ParticleInfo_nr];  // store old base
     272  DistanceMap::iterator NewBase = Params.DistanceIterators[Walker->getNr()];  // store old base
    273273  do {
    274274    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;
    278278    Potential = fabs(mol->ConstrainedPotential(Params));
    279279    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;
    281281    } else {  // do
    282       Params.DoubleList[Params.DistanceIterators[Walker->ParticleInfo_nr]->second->ParticleInfo_nr]--;  // decrease the old entry in the doubles list
    283       Params.DoubleList[NewBase->second->ParticleInfo_nr]++;    // increase the old entry in the doubles list
    284       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;
    285285      OldPotential = Potential;
    286286      DoLog(3) && (Log() << Verbose(3) << "Found a new permutation, new potential is " << OldPotential << "." << endl);
     
    310310    if (iter == mol->end()) // round-robin at the end
    311311      iter = mol->begin();
    312     if (Params.DoubleList[Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second->ParticleInfo_nr] <= 1)  // no need to make those injective that aren't
     312    if (Params.DoubleList[Params.DistanceIterators[(*iter)->getNr()]->second->getNr()] <= 1)  // no need to make those injective that aren't
    313313      continue;
    314314    // now, try finding a new one
     
    398398      for (; iter != end(); ++iter) {
    399399        PrintPermutationMap(getAtomCount(), Params);
    400         Sprinter = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second;   // store initial partner
    401         Strider = Params.DistanceIterators[(*iter)->ParticleInfo_nr];  //remember old iterator
    402         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 on
    404           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();
    405405          break;
    406406        }
    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;
    408408        // find source of the new target
    409409        molecule::const_iterator runner = begin();
    410410        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;
    413413            break;
    414414          }
     
    416416        if (runner != end()) { // we found the other source
    417417          // 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++)
    420420            if (Rider->second == Sprinter)
    421421              break;
    422           if (Rider != Params.DistanceList[(*runner)->ParticleInfo_nr]->end()) { // if we have found one
    423             //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;
    424424            // exchange both
    425             Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second; // put next farther distance into PermutationMap
    426             Params.PermutationMap[(*runner)->ParticleInfo_nr] = Sprinter;  // and hand the old target to its respective owner
     425            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
    427427            PrintPermutationMap(getAtomCount(), Params);
    428428            // calculate the new potential
     
    431431            if (Potential > OldPotential) { // we made everything worse! Undo ...
    432432              //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;
    434434              // 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;
    436436              // Undo for Walker
    437               Params.DistanceIterators[(*iter)->ParticleInfo_nr] = Strider;  // take next farther distance target
    438               //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;
    440440            } else {
    441               Params.DistanceIterators[(*runner)->ParticleInfo_nr] = Rider;  // if successful also move the pointer in the iterator list
     441              Params.DistanceIterators[(*runner)->getNr()] = Rider;  // if successful also move the pointer in the iterator list
    442442              DoLog(3) && (Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl);
    443443              OldPotential = Potential;
     
    453453          }
    454454        } 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!
    456456        }
    457         Params.StepList[(*iter)->ParticleInfo_nr]++; // take next farther distance target
     457        Params.StepList[(*iter)->getNr()]++; // take next farther distance target
    458458      }
    459459    } while (++iter != end());
     
    486486  DoLog(1) && (Log() << Verbose(1) << "Calculating forces and adding onto ForceMatrix ... " << endl);
    487487  BOOST_FOREACH(atom *_atom, atoms) {
    488     atom *Sprinter = PermutationMap[_atom->ParticleInfo_nr];
     488    atom *Sprinter = PermutationMap[_atom->getNr()];
    489489    // set forces
    490490    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)));
    492492  }
    493493  DoLog(1) && (Log() << Verbose(1) << "done." << endl);
     
    520520    PermutationMap = new atom *[getAtomCount()];
    521521    for(internal_iterator iter = atoms.begin(); iter != atoms.end();++iter){
    522       PermutationMap[(*iter)->ParticleInfo_nr] = (*iter);
     522      PermutationMap[(*iter)->getNr()] = (*iter);
    523523    }
    524524  }
     
    540540      Sprinter = mol->AddCopyAtom((*iter));
    541541      // 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);
    543543      Sprinter->setPosition(temp);
    544544      (*iter)->setAtomicVelocityAtStep(step, zeroVec);
     
    618618  // check size of vectors
    619619  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);
    621621  }
    622622
  • src/molecule_fragmentation.cpp

    ra479fa r735b1c  
    425425    No = (*runner).second.first;
    426426    Walker = mol->FindAtom(No);
    427     //if (Walker->AdaptiveOrder < MinimumRingSize[Walker->ParticleInfo_nr]) {
     427    //if (Walker->AdaptiveOrder < MinimumRingSize[Walker->getNr()]) {
    428428      DoLog(2) && (Log() << Verbose(2) << "Root " << No << " is still above threshold (10^{" << Order <<"}: " << runner->first << ", setting entry " << No << " of Atom mask to true." << endl);
    429429      AtomMask[No] = true;
    430430      status = true;
    431431    //} 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;
    433433  }
    434434  return status;
     
    488488    #endif
    489489        {
    490           AtomMask[(*iter)->ParticleInfo_nr] = true;  // include all (non-hydrogen) atoms
     490          AtomMask[(*iter)->getNr()] = true;  // include all (non-hydrogen) atoms
    491491          status = true;
    492492        }
     
    508508  #endif
    509509      {
    510         AtomMask[(*iter)->ParticleInfo_nr] = true;  // include all (non-hydrogen) atoms
    511         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()]))
    512512          status = true;
    513513      }
     
    546546  int AtomNo = 0;
    547547  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++;
    550550  }
    551551
     
    575575  if (count == 0) {
    576576    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;
    578578    }
    579579  }
     
    593593      LookupTable[i] = NULL;
    594594    for (molecule::iterator iter = begin(); iter != end(); ++iter) {
    595       AtomNo = (*iter)->GetTrueFather()->ParticleInfo_nr;
     595      AtomNo = (*iter)->GetTrueFather()->getNr();
    596596      if ((AtomNo >= 0) && (AtomNo < count)) {
    597597        //*out << "Setting LookupTable[" << AtomNo << "] to " << *(*iter) << endl;
     
    917917    // set atom values
    918918    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 );
    924924
    925925    DoLog(1) && (Log() << Verbose(1) << "\t ... done." << endl);
     
    981981  for(KeySet::iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) {
    982982    FatherOfRunner = mol->FindAtom((*runner));  // find the id
    983     SonList[FatherOfRunner->ParticleInfo_nr] = Leaf->AddCopyAtom(FatherOfRunner);
     983    SonList[FatherOfRunner->getNr()] = Leaf->AddCopyAtom(FatherOfRunner);
    984984    size++;
    985985  }
     
    10081008    FatherOfRunner = (*iter)->father;
    10091009    ASSERT(FatherOfRunner,"Atom without father found");
    1010     if (SonList[FatherOfRunner->ParticleInfo_nr] != NULL)  {  // check if this, our father, is present in list
     1010    if (SonList[FatherOfRunner->getNr()] != NULL)  {  // check if this, our father, is present in list
    10111011      // create all bonds
    10121012      const BondList& ListOfBonds = FatherOfRunner->getListOfBonds();
     
    10151015          ++BondRunner) {
    10161016        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)
    10211021//            Log() << Verbose(3) << "Adding Bond: ";
    10221022//            Log() << Verbose(0) <<
    1023             Leaf->AddBond((*iter), SonList[OtherFather->ParticleInfo_nr], (*BondRunner)->BondDegree);
     1023            Leaf->AddBond((*iter), SonList[OtherFather->getNr()], (*BondRunner)->BondDegree);
    10241024//            Log() << Verbose(0) << "." << endl;
    1025             //NumBonds[(*iter)->ParticleInfo_nr]++;
     1025            //NumBonds[(*iter)->getNr()]++;
    10261026          } else {
    10271027//            Log() << Verbose(3) << "Not adding bond, labels in wrong order." << endl;
     
    10351035            exit(1);
    10361036#endif
    1037           //NumBonds[(*iter)->ParticleInfo_nr] += Binder->BondDegree;
     1037          //NumBonds[(*iter)->getNr()] += Binder->BondDegree;
    10381038        }
    10391039      }
    10401040    } 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);
    10421042    }
    10431043    if ((LonelyFlag) && (Leaf->getAtomCount() > 1)) {
     
    11211121      OtherWalker = BondsSet[j]->rightatom;  // rightatom is always the one more distant, i.e. the one to add
    11221122      //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());
    11251125      if (TestKeySetInsert.second) {
    1126         TouchedList[TouchedIndex++] = OtherWalker->ParticleInfo_nr;  // note as added
     1126        TouchedList[TouchedIndex++] = OtherWalker->getNr();  // note as added
    11271127        Added++;
    11281128      } else {
     
    11721172      ++Binder) {
    11731173    for (int k=0;k<TouchedIndex;k++) {
    1174       if ((*Binder)->leftatom->ParticleInfo_nr == TouchedList[k])   // leftatom is always the closer one
     1174      if ((*Binder)->leftatom->getNr() == TouchedList[k])   // leftatom is always the closer one
    11751175        BondsList[SetDimension++] = (*Binder);
    11761176    }
     
    13301330{
    13311331  // prepare Label and SP arrays of the BFS search
    1332   FragmentSearch.ShortestPathList[FragmentSearch.Root->ParticleInfo_nr] = 0;
     1332  FragmentSearch.ShortestPathList[FragmentSearch.Root->getNr()] = 0;
    13331333
    13341334  // prepare root level (SP = 0) and a loop bond denoting Root
     
    13541354        iter != FragmentSearch.BondsPerSPList[i].end();
    13551355        ++iter) {
    1356       // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->ParticleInfo_nr << " and " << Binder->rightatom->ParticleInfo_nr << "." << endl; // make sure numbers are local
    1357       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;
    13591359    }
    13601360    // delete added bonds
     
    13911391  atom *Predecessor = NULL;
    13921392  bond *Binder = NULL;
    1393   int RootKeyNr = FragmentSearch.Root->GetTrueFather()->ParticleInfo_nr;
     1393  int RootKeyNr = FragmentSearch.Root->GetTrueFather()->getNr();
    13941394  int RemainingWalkers = -1;
    13951395  int SP = -1;
     
    14111411      Walker = (*CurrentEdge)->rightatom;    // rightatom is always the one more distant
    14121412      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);
    14151415      // check for new sp level
    14161416      // go through all its bonds
     
    14211421          ++Runner) {
    14221422        OtherWalker = (*Runner)->GetOtherAtom(Walker);
    1423         if ((RestrictedKeySet.find(OtherWalker->ParticleInfo_nr) != RestrictedKeySet.end())
     1423        if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end())
    14241424  #ifdef ADDHYDROGEN
    14251425         && (OtherWalker->getType()->getAtomicNumber() != 1)
    14261426  #endif
    14271427                                                              ) {  // 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);
    14291429          // 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's
    1431             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);
    14331433            // add the bond in between to the SP list
    14341434            Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
     
    14381438          } else {
    14391439            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);
    14411441            else
    14421442              DoLog(3) && (Log() << Verbose(3) << "This is my predecessor " << *Predecessor << "." << endl);
     
    15191519  if (SP >= (Order-1)) {
    15201520    // 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);
    15221522    FragmentSearch.FragmentSet->clear();
    15231523    DoLog(0) && (Log() << Verbose(0) << "Preparing subset for this root and calling generator." << endl);
     
    15381538  // remove root from stack
    15391539  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());
    15411541
    15421542  // free'ing the bonds lists
     
    16091609      }
    16101610    }
    1611     RootStack.push_back(Walker->ParticleInfo_nr);
     1611    RootStack.push_back(Walker->getNr());
    16121612    RootNr++;
    16131613  } while (RootKeyNr != StartNr);
     
    17001700  KeySet CompleteMolecule;
    17011701  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    1702     CompleteMolecule.insert((*iter)->GetTrueFather()->ParticleInfo_nr);
     1702    CompleteMolecule.insert((*iter)->GetTrueFather()->getNr());
    17031703  }
    17041704
     
    17131713    atom *Walker = FindAtom(RootKeyNr);
    17141714    // 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()])) {
    17161716    //  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;
    17171717    //} else
     
    18491849        AtomStack->pop_front();
    18501850        //Log() << Verbose (3) << "Current Walker is: " << *Walker << "." << endl;
    1851         ColorList[Walker->ParticleInfo_nr] = black;    // mark as explored
     1851        ColorList[Walker->getNr()] = black;    // mark as explored
    18521852        *Walker += Translationvector; // translate
    18531853        const BondList& ListOfBonds = Walker->getListOfBonds();
     
    18571857          if ((*Runner) != Binder) {
    18581858            OtherWalker = (*Runner)->GetOtherAtom(Walker);
    1859             if (ColorList[OtherWalker->ParticleInfo_nr] == white) {
     1859            if (ColorList[OtherWalker->getNr()] == white) {
    18601860              AtomStack->push_front(OtherWalker); // push if yet unexplored
    18611861            }
  • src/molecule_geometry.cpp

    ra479fa r735b1c  
    388388            Runner != ListOfBonds.end();
    389389            ++Runner) {
    390          if ((*iter)->ParticleInfo_nr < (*Runner)->GetOtherAtom((*iter))->ParticleInfo_nr) // otherwise we shift one to, the other fro and gain nothing
     390         if ((*iter)->getNr() < (*Runner)->GetOtherAtom((*iter))->getNr()) // otherwise we shift one to, the other fro and gain nothing
    391391            for (int j=0;j<NDIM;j++) {
    392392              tmp = (*iter)->at(j) - (*Runner)->GetOtherAtom(*iter)->at(j);
  • src/molecule_graph.cpp

    ra479fa r735b1c  
    194194                      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;
    195195                      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()) {
    197197                          OtherWalker = dynamic_cast<atom*>(*OtherRunner);
    198198                          ASSERT(OtherWalker,"TesselPoint that was not an atom retrieved from LinkedNode");
     
    202202                          const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance);
    203203                          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()) {
    205205                            if (status) { // create bond if distance is smaller
    206206                              Log() << Verbose(1) << "Adding Bond between " << *Walker << " and " << *OtherWalker << " in distance " << sqrt(distance) << "." << endl;
     
    740740    Walker = BFS.TouchedStack->front();
    741741    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;
    745745  }
    746746};
     
    752752void ResetBFSAccounting(atom *&Walker, struct BFSAccounting &BFS)
    753753{
    754   BFS.ShortestPathList[Walker->ParticleInfo_nr] = 0;
     754  BFS.ShortestPathList[Walker->getNr()] = 0;
    755755  BFS.BFSStack->clear(); // start with empty BFS stack
    756756  BFS.BFSStack->push_front(Walker);
     
    781781#endif
    782782        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) {
    784784          BFS.TouchedStack->push_front(OtherAtom);
    785           BFS.ColorList[OtherAtom->ParticleInfo_nr] = lightgray;
    786           BFS.PredecessorList[OtherAtom->ParticleInfo_nr] = Walker; // Walker is the predecessor
    787           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 distance
     785          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
    790790          DoLog(3) && (Log() << Verbose(3) << "Putting OtherAtom into queue." << endl);
    791791          BFS.BFSStack->push_front(OtherAtom);
     
    799799      } else {
    800800        DoLog(2) && (Log() << Verbose(2) << "Skipping hydrogen atom " << *OtherAtom << "." << endl);
    801         BFS.ColorList[OtherAtom->ParticleInfo_nr] = black;
     801        BFS.ColorList[OtherAtom->getNr()] = black;
    802802      }
    803803#endif
     
    806806      }
    807807    }
    808     BFS.ColorList[Walker->ParticleInfo_nr] = black;
     808    BFS.ColorList[Walker->getNr()] = black;
    809809    DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->getName() << " black." << endl);
    810810    if (OtherAtom == BFS.Root) { // if we have found the root, check whether this cycle wasn't already found beforehand
     
    814814          break;
    815815        else
    816           OtherAtom = BFS.PredecessorList[OtherAtom->ParticleInfo_nr];
     816          OtherAtom = BFS.PredecessorList[OtherAtom->getNr()];
    817817      }
    818818      if (OtherAtom == BackEdge->rightatom) { // if each atom in found cycle is cyclic, loop's been found before already
     
    822822          OtherAtom = BFS.TouchedStack->front();
    823823          BFS.TouchedStack->pop_front();
    824           if (BFS.PredecessorList[OtherAtom->ParticleInfo_nr] == Walker) {
     824          if (BFS.PredecessorList[OtherAtom->getNr()] == Walker) {
    825825            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;
    829829            // rats ... deque has no find()
    830830            std::deque<atom *>::iterator iter = find(
     
    836836            BFS.BFSStack->erase(iter);
    837837          }
    838         } while ((!BFS.TouchedStack->empty()) && (BFS.PredecessorList[OtherAtom->ParticleInfo_nr] == NULL));
     838        } while ((!BFS.TouchedStack->empty()) && (BFS.PredecessorList[OtherAtom->getNr()] == NULL));
    839839        BFS.TouchedStack->push_front(OtherAtom); // last was wrongly popped
    840840        OtherAtom = BackEdge->rightatom; // set to not Root
     
    842842        OtherAtom = BFS.Root;
    843843    }
    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()])));
    845845};
    846846
     
    867867    while (Walker != BackEdge->rightatom) {
    868868      DoLog(0) && (Log() << Verbose(0) << Walker->getName() << " <-> ");
    869       Walker = BFS.PredecessorList[Walker->ParticleInfo_nr];
     869      Walker = BFS.PredecessorList[Walker->getNr()];
    870870      Walker->GetTrueFather()->IsCyclic = true;
    871871      RingSize++;
     
    874874    // walk through all and set MinimumRingSize
    875875    Walker = BFS.Root;
    876     MinimumRingSize[Walker->GetTrueFather()->ParticleInfo_nr] = RingSize;
     876    MinimumRingSize[Walker->GetTrueFather()->getNr()] = RingSize;
    877877    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;
    881881    }
    882882    if ((RingSize < MinRingSize) || (MinRingSize == -1))
    883883      MinRingSize = RingSize;
    884884  } 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);
    886886  }
    887887};
     
    913913        OtherAtom = (*Runner)->GetOtherAtom(Walker);
    914914        //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) {
    916916          BFS.TouchedStack->push_front(OtherAtom);
    917           BFS.ColorList[OtherAtom->ParticleInfo_nr] = lightgray;
    918           BFS.PredecessorList[OtherAtom->ParticleInfo_nr] = Walker; // Walker is the predecessor
    919           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;
    921921          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()];
    923923            OtherAtom = NULL; //break;
    924924            break;
     
    932932      }
    933933    }
    934     BFS.ColorList[Walker->ParticleInfo_nr] = black;
     934    BFS.ColorList[Walker->getNr()] = black;
    935935    //Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl;
    936936  }
     
    956956      Root = *iter;
    957957
    958       if (MinimumRingSize[Root->GetTrueFather()->ParticleInfo_nr] == mol->getAtomCount()) { // check whether MinimumRingSize is set, if not BFS to next where it is
     958      if (MinimumRingSize[Root->GetTrueFather()->getNr()] == mol->getAtomCount()) { // check whether MinimumRingSize is set, if not BFS to next where it is
    959959        Walker = Root;
    960960
     
    963963
    964964      }
    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);
    966966    }
    967967    DoLog(1) && (Log() << Verbose(1) << "Minimum ring size is " << MinRingSize << ", over " << NumCycles << " cycles total." << endl);
     
    11941194        Runner != ListOfBonds.end();
    11951195        ++Runner) {
    1196       id = (*Runner)->GetOtherAtom(Walker)->ParticleInfo_nr;
     1196      id = (*Runner)->GetOtherAtom(Walker)->getNr();
    11971197      j = 0;
    11981198      for (; (j < CurrentBondsOfAtom) && (CurrentBonds[j++] != id);)
     
    12921292
    12931293  do { // go through all bonds and push local ones
    1294     Walker = ListOfLocalAtoms[Binder->leftatom->ParticleInfo_nr]; // get one atom in the reference molecule
     1294    Walker = ListOfLocalAtoms[Binder->leftatom->getNr()]; // get one atom in the reference molecule
    12951295    if (Walker != NULL) { // if this Walker exists in the subgraph ...
    12961296      const BondList& ListOfBonds = Walker->getListOfBonds();
     
    12991299          ++Runner) {
    13001300        OtherAtom = (*Runner)->GetOtherAtom(Walker);
    1301         if (OtherAtom == ListOfLocalAtoms[(*Runner)->rightatom->ParticleInfo_nr]) { // found the bond
     1301        if (OtherAtom == ListOfLocalAtoms[(*Runner)->rightatom->getNr()]) { // found the bond
    13021302          LocalStack->push_front((*Runner));
    13031303          DoLog(3) && (Log() << Verbose(3) << "Found local edge " << *(*Runner) << "." << endl);
     
    13391339      BFS.ColorList[i] = white;
    13401340  }
    1341   //BFS.ShortestPathList[Root->ParticleInfo_nr] = 0; // done by Calloc
     1341  //BFS.ShortestPathList[Root->getNr()] = 0; // done by Calloc
    13421342}
    13431343;
     
    13561356{
    13571357  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 predecessor
    1360   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 distance
     1358    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
    13631363    DoLog(3) && (Log() << Verbose(3));
    1364     if (AddedAtomList[OtherAtom->ParticleInfo_nr] == NULL) { // add if it's not been so far
    1365       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);
    13661366      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);
    13681368      DoLog(0) && (Log() << Verbose(0) << " and bond " << *(AddedBondList[Binder->nr]) << ", ");
    13691369    } 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)
    13701370      DoLog(0) && (Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom->getName());
    13711371      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);
    13731373        DoLog(0) && (Log() << Verbose(0) << ", added Bond " << *(AddedBondList[Binder->nr]));
    13741374      } else
     
    13781378    BFS.BFSStack->push_front(OtherAtom);
    13791379  } 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)
    13821382    if (Binder == Bond)
    13831383      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)
    13851385      DoLog(3) && (Log() << Verbose(3) << "Not Queueing, is out of Bond Count of " << BFS.BondOrder);
    13861386    if (!Binder->Cyclic)
    13871387      DoLog(0) && (Log() << Verbose(0) << ", is not part of a cyclic bond, saturating bond with Hydrogen." << endl);
    13881388    if (AddedBondList[Binder->nr] == NULL) {
    1389       if ((AddedAtomList[OtherAtom->ParticleInfo_nr] != NULL)) { // .. whether we add or saturate
    1390         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);
    13911391      } else {
    13921392#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))
    13941394        exit(1);
    13951395#endif
     
    14051405  // This has to be a cyclic bond, check whether it's present ...
    14061406  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);
    14091409    } else { // if it's root bond it has to broken (otherwise we would not create the fragments)
    14101410#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))
    14121412      exit(1);
    14131413#endif
     
    14351435
    14361436  // add Root if not done yet
    1437   if (AddedAtomList[Root->ParticleInfo_nr] == NULL) // add Root if not yet present
    1438     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);
    14391439
    14401440  BreadthFirstSearchAdd_Init(BFS, Root, BondOrder, getAtomCount(), AddedAtomList);
     
    14571457        OtherAtom = (*Runner)->GetOtherAtom(Walker);
    14581458        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) {
    14601460          BreadthFirstSearchAdd_UnvisitedNode(Mol, BFS, Walker, OtherAtom, Binder, Bond, AddedAtomList, AddedBondList, IsAngstroem);
    14611461        } else {
     
    14641464      }
    14651465    }
    1466     BFS.ColorList[Walker->ParticleInfo_nr] = black;
     1466    BFS.ColorList[Walker->getNr()] = black;
    14671467    DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->getName() << " black." << endl);
    14681468  }
     
    15011501  DoLog(3) && (Log() << Verbose(3) << "Filling Parent List." << endl);
    15021502  for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    1503     ParentList[(*iter)->father->ParticleInfo_nr] = (*iter);
     1503    ParentList[(*iter)->father->getNr()] = (*iter);
    15041504    // 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);
    15061506  }
    15071507};
     
    15201520  DoLog(3) && (Log() << Verbose(3) << "Creating bonds." << endl);
    15211521  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)) {
    15241524        status = false;
    15251525      } else {
     
    15291529            ++Runner) {
    15301530          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 bond
    1532             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);
    15341534          }
    15351535        }
  • src/moleculelist.cpp

    ra479fa r735b1c  
    140140          aList[Counter] = Count + (aCounter++);
    141141        else
    142           aList[Counter] = (*aiter)->GetTrueFather()->ParticleInfo_nr;
     142          aList[Counter] = (*aiter)->GetTrueFather()->getNr();
    143143        if ((*biter)->GetTrueFather() == NULL)
    144144          bList[Counter] = Count + (bCounter++);
    145145        else
    146           bList[Counter] = (*biter)->GetTrueFather()->ParticleInfo_nr;
     146          bList[Counter] = (*biter)->GetTrueFather()->getNr();
    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)->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!)
    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()->ParticleInfo_nr] << "\t";
     464                ForcesFile << SortIndex[(*atomIter)->GetTrueFather()->getNr()] << "\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->ParticleInfo_nr; // global id of the current walker
     810      AtomNo = Father->getNr(); // 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())->ParticleInfo_nr]; // local copy of current bond partner of walker
     815        OtherWalker = ListOfLocalAtoms[(*Runner)->GetOtherAtom((*iter)->GetTrueFather())->getNr()]; // local copy of current bond partner of walker
    816816        if (OtherWalker != NULL) {
    817           if (OtherWalker->ParticleInfo_nr > (*iter)->ParticleInfo_nr)
     817          if (OtherWalker->getNr() > (*iter)->getNr())
    818818            Leaf->AddBond((*iter), OtherWalker, (*Runner)->BondDegree);
    819819        } 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);
    821821          status = false;
    822822        }
     
    851851      for(molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end(); ++iter) {
    852852        Father = (*iter)->GetTrueFather();
    853         if (AtomMask[Father->ParticleInfo_nr]) // apply mask
     853        if (AtomMask[Father->getNr()]) // apply mask
    854854#ifdef ADDHYDROGEN
    855855          if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen
    856856#endif
    857           RootStack[FragmentCounter].push_front((*iter)->ParticleInfo_nr);
     857          RootStack[FragmentCounter].push_front((*iter)->getNr());
    858858      }
    859859      if (next != NULL)
     
    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()))->ParticleInfo_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()))->getNr()] != 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)->ParticleInfo_nr]->ParticleInfo_nr);
     933          TempSet->insert(ListOfLocalAtoms[FragmentCounter][reference->FindAtom(*sprinter)->getNr()]->getNr());
    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()->ParticleInfo_nr);
     974        TempSet->insert((Leaf->FindAtom(*sprinter))->GetTrueFather()->getNr());
    975975      TotalGraph.insert(GraphPair(*TempSet, pair<int, double> (TotalNumberOfKeySets++, (*runner).second.second)));
    976976      TempSet->clear();
  • src/parser.cpp

    ra479fa r735b1c  
    760760      while (!zeile.eof()) {
    761761        zeile >> nr;
    762         //Log() << Verbose(0) << "Current index: " << ParticleInfo_nr << "." << endl;
     762        //Log() << Verbose(0) << "Current index: " << getNr() << "." << endl;
    763763        if (nr > RowCounter[MatrixCounter])
    764764          RowCounter[MatrixCounter] = nr;
     
    993993      while (!zeile.eof()) {
    994994        zeile >> nr;
    995         //Log() << Verbose(0) << "Current index: " << ParticleInfo_nr << "." << endl;
     995        //Log() << Verbose(0) << "Current index: " << getNr() << "." << endl;
    996996        if (nr > RowCounter[MatrixCounter]) {
    997997          RowCounter[MatrixCounter] = nr;
  • src/tesselation.cpp

    ra479fa r735b1c  
    536536  PointTestPair InsertUnique;
    537537  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]));
    539539  if (InsertUnique.second) { // if new point was not present before, increase counter
    540540    PointsOnBoundaryCount++;
     
    558558  PointTestPair InsertUnique;
    559559  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]));
    561561  if (InsertUnique.second) { // if new point was not present before, increase counter
    562562    PointsOnBoundaryCount++;
     
    577577{
    578578  Info FunctionInfo(__func__);
    579   PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate->ParticleInfo_nr);
     579  PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate->getNr());
    580580  if (FindPoint != PointsOnBoundary.end())
    581581    TPS[n] = FindPoint->second;
     
    597597{
    598598  bool insertNewLine = true;
    599   LineMap::iterator FindLine = a->lines.find(b->node->ParticleInfo_nr);
     599  LineMap::iterator FindLine = a->lines.find(b->node->getNr());
    600600  BoundaryLineSet *WinningLine = NULL;
    601601  if (FindLine != a->lines.end()) {
     
    603603
    604604    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());
    606606
    607607    for (FindLine = FindPair.first; (FindLine != FindPair.second) && (insertNewLine); FindLine++) {
     
    709709/** Function adds triangle to global list.
    710710 * Furthermore, the triangle number is set to \a ParticleInfo_nr.
    711  * \param ParticleInfo_nr triangle number
     711 * \param getNr() triangle number
    712712 */
    713713void Tesselation::AddTesselationTriangle(const int nr)
     
    902902  // builds a triangle point set (Points) of the end points
    903903  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());
    905905    if (FindPoint != PointsOnBoundary.end()) {
    906906      Points[i] = FindPoint->second;
     
    915915      for (int j = i; j < 3; j++) {
    916916        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++) {
    919919            TriangleMap *triangles = &FindLine->second->triangles;
    920920            DoLog(1) && (Log() << Verbose(1) << "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << "." << endl);
     
    955955  // builds a triangle point set (Points) of the end points
    956956  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());
    958958    if (FindPoint != PointsOnBoundary.end()) {
    959959      Points[i] = FindPoint->second;
     
    968968      for (int j = i; j < 3; j++) {
    969969        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++) {
    972972            TriangleMap *triangles = &FindLine->second->triangles;
    973973            for (TriangleMap::iterator FindTriangle = triangles->begin(); FindTriangle != triangles->end(); FindTriangle++) {
     
    11451145//
    11461146//  // check both other lines
    1147 //  PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode->ParticleInfo_nr);
     1147//  PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode->getNr());
    11481148//  if (FindPoint != PointsOnBoundary.end()) {
    11491149//    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());
    11511151//      if (FindLine != (FindPoint->second)->lines.end()) {
    11521152//        Line = FindLine->second;
     
    14401440  Info FunctionInfo(__func__);
    14411441
    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());
    14431443  for (LineMap::const_iterator FindLine = FindPair.first; FindLine != FindPair.second; FindLine++) {
    14441444    DoLog(1) && (Log() << Verbose(1) << "INFO: Checking line " << *(FindLine->second) << " ..." << endl);
     
    22232223        if (List != NULL) {
    22242224          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
    2225             FindPoint = PointsOnBoundary.find((*Runner)->ParticleInfo_nr);
     2225            FindPoint = PointsOnBoundary.find((*Runner)->getNr());
    22262226            if (FindPoint != PointsOnBoundary.end()) {
    22272227              points->insert(DistanceToPointPair(FindPoint->second->node->DistanceSquared(x), FindPoint->second));
     
    25572557  bool takePoint = false;
    25582558  // find the respective boundary point
    2559   PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->ParticleInfo_nr);
     2559  PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr());
    25602560  if (PointRunner != PointsOnBoundary.end()) {
    25612561    ReferencePoint = PointRunner->second;
     
    25772577    takePoint = false;
    25782578
    2579     if (findLines->second->endpoints[0]->Nr == Point->ParticleInfo_nr) {
     2579    if (findLines->second->endpoints[0]->Nr == Point->getNr()) {
    25802580      takePoint = true;
    25812581      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()) {
    25832583      takePoint = true;
    25842584      current = findLines->second->endpoints[0]->node;
     
    28132813  class BoundaryLineSet *StartLine = NULL;
    28142814  // find the respective boundary point
    2815   PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->ParticleInfo_nr);
     2815  PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr());
    28162816  if (PointRunner != PointsOnBoundary.end()) {
    28172817    ReferencePoint = PointRunner->second;
     
    32333233      TrianglePoints[i] = NULL;
    32343234    } else {
    3235       PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]->ParticleInfo_nr);
     3235      PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]->getNr());
    32363236      if (FindPoint != PointsOnBoundary.end()) {
    32373237        TrianglePoints[i] = FindPoint->second;
     
    32483248          for (int j = i + 1; j < 3; j++) {
    32493249            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++) {
    32523252                for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) {
    32533253                  if (FindTriangle->second->IsPresentTupel(TrianglePoints)) {
     
    32693269        if (TrianglePoints[i] == NULL)
    32703270          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++) {
    32733273        for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) {
    32743274          if (FindTriangle->second->IsPresentTupel(TrianglePoints)) {
     
    35313531  if (NearestPoint == point)
    35323532    NearestPoint = BackupPoint;
    3533   PointRunner = PointsOnBoundary.find(NearestPoint->ParticleInfo_nr);
     3533  PointRunner = PointsOnBoundary.find(NearestPoint->getNr());
    35343534  if (PointRunner != PointsOnBoundary.end()) {
    35353535    NearestBoundaryPoint = PointRunner->second;
  • src/tesselationhelpers.cpp

    ra479fa r735b1c  
    331331        DoLog(1) && (Log() << Verbose(1) << "Node nr. " << i << " is not yet present." << endl);
    332332        result = true;
    333       } else if (nodes[i]->lines.find(nodes[j]->node->ParticleInfo_nr) != nodes[i]->lines.end()) {  // there already is a line
     333      } else if (nodes[i]->lines.find(nodes[j]->node->getNr()) != nodes[i]->lines.end()) {  // there already is a line
    334334        LineMap::const_iterator FindLine;
    335335        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());
    337337        for (FindLine = FindPair.first; FindLine != FindPair.second; ++FindLine) {
    338338          // If there is a line with less than two attached triangles, we don't need a new line.
     
    724724    for (PointMap::const_iterator target = TesselStruct->PointsOnBoundary.begin(); target != TesselStruct->PointsOnBoundary.end(); ++target) {
    725725      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++;
    728728      for (int i=0;i<NDIM;i++) {
    729729        const double tmp = Walker->at(i);
     
    737737    for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) {
    738738      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;
    740740    }
    741741    delete[] (LookupList);
Note: See TracChangeset for help on using the changeset viewer.