Changeset 1024cb for src/molecule.cpp


Ignore:
Timestamp:
May 31, 2010, 5:32:27 PM (15 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:
e08c46
Parents:
42af9e (diff), a7b761b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Frederik Heber <heber@…> (05/31/10 17:29:30)
git-committer:
Frederik Heber <heber@…> (05/31/10 17:32:27)
Message:

Merge commit 'jupiter/MoleculeStartEndSwitch' into CommandLineActionMapping

Conflicts:

molecuilder/src/Makefile.am
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/helpers.hpp
molecuilder/src/molecule.cpp
molecuilder/src/molecule_dynamics.cpp
molecuilder/src/molecule_fragmentation.cpp
molecuilder/src/molecule_geometry.cpp
molecuilder/src/molecule_graph.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/unittests/AnalysisCorrelationToPointUnitTest.cpp
molecuilder/src/unittests/listofbondsunittest.cpp

Integration of MoleculeStartEndSwitch had the following consequences:

  • no more AtomCount -> getAtomCount()
  • no more start/end -> begin(), end() and iterator
  • no more decent ordering in atomic ids (hence, Simple_configuration/8 and Domain/5, Domain/6 now check by comparing sorted xyz, not confs)

There is still a huge problem with bonds. One test runs into an endless loop.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.cpp

    r42af9e r1024cb  
    3535 * Initialises molecule list with correctly referenced start and end, and sets molecule::last_atom to zero.
    3636 */
    37 molecule::molecule(const periodentafel * const teil) : elemente(teil), start(World::getInstance().createAtom()), end(World::getInstance().createAtom()),
    38   first(new bond(start, end, 1, -1)), last(new bond(start, end, 1, -1)), MDSteps(0), AtomCount(0),
     37molecule::molecule(const periodentafel * const teil) : elemente(teil),
     38  first(new bond(0, 0, 1, -1)), last(new bond(0, 0, 1, -1)), MDSteps(0),
    3939  BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.),
    4040  ActiveFlag(false), IndexNr(-1),
    4141  formula(this,boost::bind(&molecule::calcFormula,this)),
    42   last_atom(0),
    43   InternalPointer(start)
    44 {
    45   // init atom chain list
    46   start->father = NULL;
    47   end->father = NULL;
    48   link(start,end);
    49 
     42  AtomCount(this,boost::bind(&molecule::doCountAtoms,this)), last_atom(0),  InternalPointer(begin())
     43{
    5044  // init bond chain list
    5145  link(first,last);
     
    6963  delete(first);
    7064  delete(last);
    71   end->getWorld()->destroyAtom(end);
    72   start->getWorld()->destroyAtom(start);
    7365};
    7466
     
    8173const std::string molecule::getName(){
    8274  return std::string(name);
     75}
     76
     77int molecule::getAtomCount() const{
     78  return *AtomCount;
    8379}
    8480
     
    104100  stringstream sstr;
    105101  periodentafel *periode = World::getInstance().getPeriode();
    106   for(atom *Walker = start; Walker != end; Walker = Walker->next) {
    107     counts[Walker->type->getNumber()]++;
     102  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
     103    counts[(*iter)->type->getNumber()]++;
    108104  }
    109105  std::map<atomicNumber_t,unsigned int>::reverse_iterator iter;
     
    115111}
    116112
     113/************************** Access to the List of Atoms ****************/
     114
     115
     116molecule::iterator molecule::begin(){
     117  return molecule::iterator(atoms.begin(),this);
     118}
     119
     120molecule::const_iterator molecule::begin() const{
     121  return atoms.begin();
     122}
     123
     124molecule::iterator molecule::end(){
     125  return molecule::iterator(atoms.end(),this);
     126}
     127
     128molecule::const_iterator molecule::end() const{
     129  return atoms.end();
     130}
     131
     132bool molecule::empty() const
     133{
     134  return (begin() == end());
     135}
     136
     137size_t molecule::size() const
     138{
     139  size_t counter = 0;
     140  for (molecule::const_iterator iter = begin(); iter != end (); ++iter)
     141    counter++;
     142  return counter;
     143}
     144
     145molecule::const_iterator molecule::erase( const_iterator loc )
     146{
     147  molecule::const_iterator iter = loc;
     148  iter--;
     149  atoms.erase( loc );
     150  return iter;
     151}
     152
     153molecule::const_iterator molecule::erase( atom *& key )
     154{
     155  cout << "trying to erase atom" << endl;
     156  molecule::const_iterator iter = find(key);
     157  if (iter != end()){
     158    // remove this position and step forward (post-increment)
     159    atoms.erase( iter++ );
     160  }
     161  return iter;
     162}
     163
     164molecule::const_iterator molecule::find ( atom *& key ) const
     165{
     166  return atoms.find( key );
     167}
     168
     169pair<molecule::iterator,bool> molecule::insert ( atom * const key )
     170{
     171  pair<atomSet::iterator,bool> res = atoms.insert(key);
     172  return pair<iterator,bool>(iterator(res.first,this),res.second);
     173}
    117174
    118175/** Adds given atom \a *pointer from molecule list.
     
    123180bool molecule::AddAtom(atom *pointer)
    124181{
    125   bool retval = false;
    126182  OBSERVE;
    127183  if (pointer != NULL) {
    128184    pointer->sort = &pointer->nr;
    129     pointer->nr = last_atom++;  // increase number within molecule
    130     AtomCount++;
    131185    if (pointer->type != NULL) {
    132186      if (ElementsInMolecule[pointer->type->Z] == 0)
     
    141195      }
    142196    }
    143     retval = add(pointer, end);
    144   }
    145   return retval;
     197    insert(pointer);
     198  }
     199  return true;
    146200};
    147201
     
    157211  if (pointer != NULL) {
    158212    atom *walker = pointer->clone();
    159     stringstream sstr;
    160     sstr << pointer->getName();
    161     walker->setName(sstr.str());
     213    walker->setName(pointer->getName());
    162214    walker->nr = last_atom++;  // increase number within molecule
    163     add(walker, end);
     215    insert(walker);
    164216    if ((pointer->type != NULL) && (pointer->type->Z != 1))
    165217      NoNonHydrogen++;
    166     AtomCount++;
    167218    retval=walker;
    168219  }
     
    575626
    576627  // copy values
    577   copy->CountAtoms();
    578628  copy->CountElements();
    579629  if (first->next != last) {  // if adjaceny list is present
     
    610660{
    611661  bond *Binder = NULL;
    612   if ((atom1 != NULL) && (FindAtom(atom1->nr) != NULL) && (atom2 != NULL) && (FindAtom(atom2->nr) != NULL)) {
    613     Binder = new bond(atom1, atom2, degree, BondCount++);
    614     atom1->RegisterBond(Binder);
    615     atom2->RegisterBond(Binder);
    616     if ((atom1->type != NULL) && (atom1->type->Z != 1) && (atom2->type != NULL) && (atom2->type->Z != 1))
    617       NoNonBonds++;
    618     add(Binder, last);
    619   } else {
    620     DoeLog(1) && (eLog()<< Verbose(1) << "Could not add bond between " << atom1->getName() << " and " << atom2->getName() << " as one or both are not present in the molecule." << endl);
    621   }
     662
     663  // some checks to make sure we are able to create the bond
     664  ASSERT(atom1, "First atom in bond-creation was an invalid pointer");
     665  ASSERT(atom2, "Second atom in bond-creation was an invalid pointer");
     666  ASSERT(FindAtom(atom1->nr),"First atom in bond-creation was not part of molecule");
     667  ASSERT(FindAtom(atom2->nr),"Second atom in bond-creation was not parto of molecule");
     668
     669  Binder = new bond(atom1, atom2, degree, BondCount++);
     670  atom1->RegisterBond(Binder);
     671  atom2->RegisterBond(Binder);
     672  if ((atom1->type != NULL) && (atom1->type->Z != 1) && (atom2->type != NULL) && (atom2->type->Z != 1))
     673    NoNonBonds++;
     674  add(Binder, last);
     675
    622676  return Binder;
    623677};
     
    693747bool molecule::RemoveAtom(atom *pointer)
    694748{
     749  ASSERT(pointer, "Null pointer passed to molecule::RemoveAtom().");
     750  OBSERVE;
    695751  if (ElementsInMolecule[pointer->type->Z] != 0)  { // this would indicate an error
    696752    ElementsInMolecule[pointer->type->Z]--;  // decrease number of atom of this element
    697     AtomCount--;
    698753  } else
    699754    DoeLog(1) && (eLog()<< Verbose(1) << "Atom " << pointer->getName() << " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl);
     
    701756    ElementCount--;
    702757  RemoveBonds(pointer);
    703   return remove(pointer, start, end);
     758  erase(pointer);
     759  return true;
    704760};
    705761
     
    718774  if (ElementsInMolecule[pointer->type->Z] == 0)  // was last atom of this element?
    719775    ElementCount--;
    720   unlink(pointer);
     776  erase(pointer);
    721777  return true;
    722778};
     
    727783bool molecule::CleanupMolecule()
    728784{
    729   return (cleanup(first,last) && cleanup(start,end));
     785  for (molecule::iterator iter = begin(); !empty(); iter = begin())
     786      erase(iter);
     787  return (cleanup(first,last));
    730788};
    731789
     
    734792 * \return pointer to atom or NULL
    735793 */
    736 atom * molecule::FindAtom(int Nr)  const{
    737   atom * walker = find(&Nr, start,end);
    738   if (walker != NULL) {
     794atom * molecule::FindAtom(int Nr)  const
     795{
     796  molecule::const_iterator iter = begin();
     797  for (; iter != end(); ++iter)
     798    if ((*iter)->nr == Nr)
     799      break;
     800  if (iter != end()) {
    739801    //Log() << Verbose(0) << "Found Atom Nr. " << walker->nr << endl;
    740     return walker;
     802    return (*iter);
    741803  } else {
    742804    DoLog(0) && (Log() << Verbose(0) << "Atom not found in list." << endl);
     
    868930    now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
    869931    for (int step=0;step<MDSteps;step++) {
    870       *output << AtomCount << "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now);
     932      *output << getAtomCount() << "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now);
    871933      ActOnAllAtoms( &atom::OutputTrajectoryXYZ, output, step );
    872934    }
     
    885947  if (output != NULL) {
    886948    now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
    887     *output << AtomCount << "\n\tCreated by molecuilder on " << ctime(&now);
     949    *output << getAtomCount() << "\n\tCreated by molecuilder on " << ctime(&now);
    888950    ActOnAllAtoms( &atom::OutputXYZLine, output );
    889951    return true;
     
    895957 * \param *out output stream for debugging
    896958 */
    897 void molecule::CountAtoms()
    898 {
     959int molecule::doCountAtoms()
     960{
     961  int res = size();
    899962  int i = 0;
    900   atom *Walker = start;
    901   while (Walker->next != end) {
    902     Walker = Walker->next;
     963  NoNonHydrogen = 0;
     964  for (molecule::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     965    (*iter)->nr = i;   // update number in molecule (for easier referencing in FragmentMolecule lateron)
     966    if ((*iter)->type->Z != 1) // count non-hydrogen atoms whilst at it
     967      NoNonHydrogen++;
     968    stringstream sstr;
     969    sstr << (*iter)->type->symbol << (*iter)->nr+1;
     970    (*iter)->setName(sstr.str());
     971    Log() << Verbose(3) << "Naming atom nr. " << (*iter)->nr << " " << (*iter)->getName() << "." << endl;
    903972    i++;
    904973  }
    905   if ((AtomCount == 0) || (i != AtomCount)) {
    906     DoLog(3) && (Log() << Verbose(3) << "Mismatch in AtomCount " << AtomCount << " and recounted number " << i << ", renaming all." << endl);
    907     AtomCount = i;
    908 
    909     // count NonHydrogen atoms and give each atom a unique name
    910     if (AtomCount != 0) {
    911       i=0;
    912       NoNonHydrogen = 0;
    913       Walker = start;
    914       while (Walker->next != end) {
    915         Walker = Walker->next;
    916         Walker->nr = i;   // update number in molecule (for easier referencing in FragmentMolecule lateron)
    917         if (Walker->type->Z != 1) // count non-hydrogen atoms whilst at it
    918           NoNonHydrogen++;
    919         stringstream sstr;
    920         sstr << Walker->type->symbol << Walker->nr+1;
    921         Walker->setName(sstr.str());
    922         DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << Walker->nr << " " << Walker->getName() << "." << endl);
    923         i++;
    924       }
    925     } else
    926       DoLog(3) && (Log() << Verbose(3) << "AtomCount is still " << AtomCount << ", thus counting nothing." << endl);
    927   }
     974  return res;
    928975};
    929976
     
    9871034  /// first count both their atoms and elements and update lists thereby ...
    9881035  //Log() << Verbose(0) << "Counting atoms, updating list" << endl;
    989   CountAtoms();
    990   OtherMolecule->CountAtoms();
    9911036  CountElements();
    9921037  OtherMolecule->CountElements();
     
    9951040  /// -# AtomCount
    9961041  if (result) {
    997     if (AtomCount != OtherMolecule->AtomCount) {
    998       DoLog(4) && (Log() << Verbose(4) << "AtomCounts don't match: " << AtomCount << " == " << OtherMolecule->AtomCount << endl);
     1042    if (getAtomCount() != OtherMolecule->getAtomCount()) {
     1043      DoLog(4) && (Log() << Verbose(4) << "AtomCounts don't match: " << getAtomCount() << " == " << OtherMolecule->getAtomCount() << endl);
    9991044      result = false;
    1000     } else Log() << Verbose(4) << "AtomCounts match: " << AtomCount << " == " << OtherMolecule->AtomCount << endl;
     1045    } else Log() << Verbose(4) << "AtomCounts match: " << getAtomCount() << " == " << OtherMolecule->getAtomCount() << endl;
    10011046  }
    10021047  /// -# ElementCount
     
    10351080  if (result) {
    10361081    DoLog(5) && (Log() << Verbose(5) << "Calculating distances" << endl);
    1037     Distances = new double[AtomCount];
    1038     OtherDistances = new double[AtomCount];
     1082    Distances = new double[getAtomCount()];
     1083    OtherDistances = new double[getAtomCount()];
    10391084    SetIndexedArrayForEachAtomTo ( Distances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity);
    10401085    SetIndexedArrayForEachAtomTo ( OtherDistances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity);
    1041     for(int i=0;i<AtomCount;i++) {
     1086    for(int i=0;i<getAtomCount();i++) {
    10421087      Distances[i] = 0.;
    10431088      OtherDistances[i] = 0.;
     
    10461091    /// ... sort each list (using heapsort (o(N log N)) from GSL)
    10471092    DoLog(5) && (Log() << Verbose(5) << "Sorting distances" << endl);
    1048     PermMap = new size_t[AtomCount];
    1049     OtherPermMap = new size_t[AtomCount];
    1050     for(int i=0;i<AtomCount;i++) {
     1093    PermMap = new size_t[getAtomCount()];
     1094    OtherPermMap = new size_t[getAtomCount()];
     1095    for(int i=0;i<getAtomCount();i++) {
    10511096      PermMap[i] = 0;
    10521097      OtherPermMap[i] = 0;
    10531098    }
    1054     gsl_heapsort_index (PermMap, Distances, AtomCount, sizeof(double), CompareDoubles);
    1055     gsl_heapsort_index (OtherPermMap, OtherDistances, AtomCount, sizeof(double), CompareDoubles);
    1056     PermutationMap = new int[AtomCount];
    1057     for(int i=0;i<AtomCount;i++)
     1099    gsl_heapsort_index (PermMap, Distances, getAtomCount(), sizeof(double), CompareDoubles);
     1100    gsl_heapsort_index (OtherPermMap, OtherDistances, getAtomCount(), sizeof(double), CompareDoubles);
     1101    PermutationMap = new int[getAtomCount()];
     1102    for(int i=0;i<getAtomCount();i++)
    10581103      PermutationMap[i] = 0;
    10591104    DoLog(5) && (Log() << Verbose(5) << "Combining Permutation Maps" << endl);
    1060     for(int i=AtomCount;i--;)
     1105    for(int i=getAtomCount();i--;)
    10611106      PermutationMap[PermMap[i]] = (int) OtherPermMap[i];
    10621107
     
    10641109    DoLog(4) && (Log() << Verbose(4) << "Comparing distances" << endl);
    10651110    flag = 0;
    1066     for (int i=0;i<AtomCount;i++) {
     1111    for (int i=0;i<getAtomCount();i++) {
    10671112      DoLog(5) && (Log() << Verbose(5) << "Distances squared: |" << Distances[PermMap[i]] << " - " << OtherDistances[OtherPermMap[i]] << "| = " << fabs(Distances[PermMap[i]] - OtherDistances[OtherPermMap[i]]) << " ?<? " <<  threshold << endl);
    10681113      if (fabs(Distances[PermMap[i]] - OtherDistances[OtherPermMap[i]]) > threshold*threshold)
     
    11001145int * molecule::GetFatherSonAtomicMap(molecule *OtherMolecule)
    11011146{
    1102   atom *Walker = NULL, *OtherWalker = NULL;
    11031147  DoLog(3) && (Log() << Verbose(3) << "Begin of GetFatherAtomicMap." << endl);
    1104   int *AtomicMap = new int[AtomCount];
    1105   for (int i=AtomCount;i--;)
     1148  int *AtomicMap = new int[getAtomCount()];
     1149  for (int i=getAtomCount();i--;)
    11061150    AtomicMap[i] = -1;
    11071151  if (OtherMolecule == this) {  // same molecule
    1108     for (int i=AtomCount;i--;) // no need as -1 means already that there is trivial correspondence
     1152    for (int i=getAtomCount();i--;) // no need as -1 means already that there is trivial correspondence
    11091153      AtomicMap[i] = i;
    11101154    DoLog(4) && (Log() << Verbose(4) << "Map is trivial." << endl);
    11111155  } else {
    11121156    DoLog(4) && (Log() << Verbose(4) << "Map is ");
    1113     Walker = start;
    1114     while (Walker->next != end) {
    1115       Walker = Walker->next;
    1116       if (Walker->father == NULL) {
    1117         AtomicMap[Walker->nr] = -2;
     1157    for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
     1158      if ((*iter)->father == NULL) {
     1159        AtomicMap[(*iter)->nr] = -2;
    11181160      } else {
    1119         OtherWalker = OtherMolecule->start;
    1120         while (OtherWalker->next != OtherMolecule->end) {
    1121           OtherWalker = OtherWalker->next;
     1161        for (molecule::const_iterator runner = OtherMolecule->begin(); runner != OtherMolecule->end(); ++runner) {
    11221162      //for (int i=0;i<AtomCount;i++) { // search atom
    1123         //for (int j=0;j<OtherMolecule->AtomCount;j++) {
    1124           //Log() << Verbose(4) << "Comparing father " << Walker->father << " with the other one " << OtherWalker->father << "." << endl;
    1125           if (Walker->father == OtherWalker)
    1126             AtomicMap[Walker->nr] = OtherWalker->nr;
     1163        //for (int j=0;j<OtherMolecule->getAtomCount();j++) {
     1164          //Log() << Verbose(4) << "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << "." << endl;
     1165          if ((*iter)->father == (*runner))
     1166            AtomicMap[(*iter)->nr] = (*runner)->nr;
    11271167        }
    11281168      }
    1129       DoLog(0) && (Log() << Verbose(0) << AtomicMap[Walker->nr] << "\t");
     1169      DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)->nr] << "\t");
    11301170    }
    11311171    DoLog(0) && (Log() << Verbose(0) << endl);
     
    11611201void molecule::SetIndexedArrayForEachAtomTo ( atom **array, int ParticleInfo::*index) const
    11621202{
    1163   atom *Walker = start;
    1164   while (Walker->next != end) {
    1165     Walker = Walker->next;
    1166     array[(Walker->*index)] = Walker;
     1203  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
     1204    array[((*iter)->*index)] = (*iter);
    11671205  }
    11681206};
Note: See TracChangeset for help on using the changeset viewer.