Changeset 03c77c


Ignore:
Timestamp:
Feb 24, 2011, 7:43:03 PM (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:
6a465e
Parents:
8aba3c
git-author:
Frederik Heber <heber@…> (02/16/11 14:02:14)
git-committer:
Frederik Heber <heber@…> (02/24/11 19:43:03)
Message:

bonds::previous and ::next removed, lists.hpp deleted.

  • the last of the concatenated lists has fallen to STL lists and vectors.
  • greatest impact is on fragmentation functions.
  • rewritten UniqueFragments::BondsPerSPList to vector<list<bond*> >.
  • removed include of lists.hpp.
  • removed lists.hpp from Makefile.am.
Location:
src
Files:
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • src/ConfigFileBuffer.cpp

    r8aba3c r03c77c  
    2222#include "ConfigFileBuffer.hpp"
    2323#include "Helpers/helpers.hpp"
    24 #include "lists.hpp"
    2524#include "CodePatterns/Verbose.hpp"
    2625#include "CodePatterns/Log.hpp"
  • src/Makefile.am

    r8aba3c r03c77c  
    220220  graph.hpp \
    221221  linkedcell.hpp \
    222   lists.hpp \
    223222  molecule.hpp \
    224223  parser.hpp \
  • src/atom.cpp

    r8aba3c r03c77c  
    2424#include "config.hpp"
    2525#include "element.hpp"
    26 #include "lists.hpp"
    2726#include "parser.hpp"
    2827#include "LinearAlgebra/Vector.hpp"
  • src/atom_bondedparticle.cpp

    r8aba3c r03c77c  
    2727#include "CodePatterns/Verbose.hpp"
    2828#include "element.hpp"
    29 #include "lists.hpp"
    3029
    3130/** Constructor of class BondedParticle.
     
    4039BondedParticle::~BondedParticle()
    4140{
    42   BondList::iterator Runner;
    43   for (std::vector<BondList>::iterator iter = ListOfBonds.begin();
    44       !ListOfBonds.empty();
    45       iter = ListOfBonds.begin()) {
    46     while (!(*iter).empty()) {
    47       Runner = (*iter).begin();
    48       removewithoutcheck(*Runner);
    49     }
    50     ListOfBonds.erase(iter);
     41  const size_t max = ListOfBonds.size();
     42  for (size_t i = 0; i < max; ++i) {
     43    ClearBondsAtStep(i);
    5144  }
    5245};
  • src/bond.cpp

    r8aba3c r03c77c  
    2424#include "bond.hpp"
    2525#include "element.hpp"
    26 #include "lists.hpp"
    2726
    2827
     
    3433  leftatom(NULL),
    3534  rightatom(NULL),
    36   previous(NULL),
    37   next(NULL),
    3835  HydrogenBond(0),
    3936  BondDegree(0),
     
    5350  leftatom(left),
    5451  rightatom(right),
    55   previous(NULL),
    56   next(NULL),
    5752  HydrogenBond(0),
    5853  BondDegree(degree),
     
    7974  if (rightatom != NULL)
    8075    rightatom->UnregisterBond(this);
    81   unlink(this);
    8276};
    8377
  • src/bond.hpp

    r8aba3c r03c77c  
    3636    atom *leftatom;    //!< first bond partner
    3737    atom *rightatom;  //!< second bond partner
    38     bond *previous; //!< previous atom in molecule list
    39     bond *next;     //!< next atom in molecule list
    4038    int HydrogenBond;  //!< Number of hydrogen atoms in the bond
    4139    int BondDegree;    //!< single, double, triple, ... bond
  • src/config.cpp

    r8aba3c r03c77c  
    3131#include "Helpers/helpers.hpp"
    3232#include "CodePatterns/Info.hpp"
    33 #include "lists.hpp"
     33#include "CodePatterns/Log.hpp"
     34#include "CodePatterns/toString.hpp"
    3435#include "CodePatterns/Verbose.hpp"
    35 #include "CodePatterns/Log.hpp"
    3636#include "molecule.hpp"
    3737#include "molecule.hpp"
  • src/graph.hpp

    r8aba3c r03c77c  
    1919#include <map>
    2020#include <set>
     21#include <list>
    2122
    2223/****************************************** forward declarations *****************************/
     
    6162 */
    6263struct UniqueFragments {
     64  typedef std::list<bond*> BondsPerSP;
     65  typedef std::vector< BondsPerSP > AllSPBonds;
     66
    6367  config *configuration;
    6468  atom *Root;
     
    7175  int *ShortestPathList;
    7276  bool **UsedList;
    73   bond **BondsPerSPList;
     77  AllSPBonds BondsPerSPList;
    7478  int *BondsPerSPCount;
    7579};
  • src/molecule.cpp

    r8aba3c r03c77c  
    4141#include "LinearAlgebra/Vector.hpp"
    4242#include "linkedcell.hpp"
    43 #include "lists.hpp"
    4443#include "molecule.hpp"
    4544#include "periodentafel.hpp"
  • src/molecule.hpp

    r8aba3c r03c77c  
    261261  bool BuildInducedSubgraph(const molecule *Father);
    262262  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
    263   void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
     263  void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder);
    264264  int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList);
    265265  int GuesstimateFragmentCount(int order);
  • src/molecule_fragmentation.cpp

    r8aba3c r03c77c  
    2828#include "element.hpp"
    2929#include "Helpers/helpers.hpp"
    30 #include "lists.hpp"
    3130#include "CodePatterns/Verbose.hpp"
    3231#include "CodePatterns/Log.hpp"
     
    11051104 * \param SetDimension maximum number of bits in power set
    11061105 * \param *FragmentSet snake stack to remove from
     1106 * \param &BondsSet set of bonds
    11071107 * \param *&TouchedList touched list
    11081108 * \param TouchedIndex currently touched
    11091109 * \return number of set bits
    11101110 */
    1111 int AddPowersetToSnakeStack(int verbosity, int CurrentCombination, int SetDimension, KeySet *FragmentSet, bond **BondsSet, int *&TouchedList, int &TouchedIndex)
     1111int AddPowersetToSnakeStack(int verbosity, int CurrentCombination, int SetDimension, KeySet *FragmentSet, std::vector<bond *> &BondsSet, int *&TouchedList, int &TouchedIndex)
    11121112{
    11131113  atom *OtherWalker = NULL;
     
    11371137
    11381138/** Counts the number of elements in a power set.
    1139  * \param *SetFirst
    1140  * \param *SetLast
     1139 * \param SetFirst begin iterator first bond
     1140 * \param SetLast end iterator
    11411141 * \param *&TouchedList touched list
    11421142 * \param TouchedIndex currently touched
    11431143 * \return number of elements
    11441144 */
    1145 int CountSetMembers(bond *SetFirst, bond *SetLast, int *&TouchedList, int TouchedIndex)
     1145int CountSetMembers(std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex)
    11461146{
    11471147  int SetDimension = 0;
    1148   bond *Binder = SetFirst;    // start node for this level
    1149   while (Binder->next != SetLast) {    // compare to end node of this level
    1150     Binder = Binder->next;
     1148  for( std::list<bond *>::const_iterator Binder = SetFirst;
     1149      Binder != SetLast;
     1150      ++Binder) {
    11511151    for (int k=TouchedIndex;k--;) {
    1152       if (Binder->Contains(TouchedList[k]))   // if we added this very endpiece
     1152      if ((*Binder)->Contains(TouchedList[k]))   // if we added this very endpiece
    11531153        SetDimension++;
    11541154    }
     
    11571157};
    11581158
    1159 /** Counts the number of elements in a power set.
    1160  * \param *BondsList bonds list to fill
    1161  * \param *SetFirst
    1162  * \param *SetLast
     1159/** Fills a list of bonds from another
     1160 * \param *BondsList bonds array/vector to fill
     1161 * \param SetFirst begin iterator first bond
     1162 * \param SetLast end iterator
    11631163 * \param *&TouchedList touched list
    11641164 * \param TouchedIndex currently touched
    11651165 * \return number of elements
    11661166 */
    1167 int FillBondsList(bond **BondsList, bond *SetFirst, bond *SetLast, int *&TouchedList, int TouchedIndex)
     1167int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex)
    11681168{
    11691169  int SetDimension = 0;
    1170   bond *Binder = SetFirst;    // start node for this level
    1171   while (Binder->next != SetLast) {    // compare to end node of this level
    1172     Binder = Binder->next;
     1170  for( std::list<bond *>::const_iterator Binder = SetFirst;
     1171      Binder != SetLast;
     1172      ++Binder) {
    11731173    for (int k=0;k<TouchedIndex;k++) {
    1174       if (Binder->leftatom->nr == TouchedList[k])   // leftatom is always the close one
    1175         BondsList[SetDimension++] = Binder;
     1174      if ((*Binder)->leftatom->nr == TouchedList[k])   // leftatom is always the closer one
     1175        BondsList[SetDimension++] = (*Binder);
    11761176    }
    11771177  }
     
    12101210 *  -# removes all items added into the snake stack (in UniqueFragments structure) added during level (root
    12111211distance) and current set
    1212  * \param *out output stream for debugging
    12131212 * \param FragmentSearch UniqueFragments structure with all values needed
    12141213 * \param RootDistance current shortest path level, whose set of edges is represented by **BondsSet
     1214 * \param BondsSet array of bonds to check
    12151215 * \param SetDimension Number of possible bonds on this level (i.e. size of the array BondsSet[])
    12161216 * \param SubOrder remaining number of allowed vertices to add
    12171217 */
    1218 void molecule::SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder)
     1218void molecule::SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder)
    12191219{
    12201220  int verbosity = 0; //FragmentSearch->ANOVAOrder-SubOrder;
     
    12581258
    12591259          // first count the members in the subset
    1260           SubSetDimension = CountSetMembers(FragmentSearch->BondsPerSPList[2*SP], FragmentSearch->BondsPerSPList[2*SP+1], TouchedList, TouchedIndex);
     1260          SubSetDimension = CountSetMembers(FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
    12611261
    12621262          // then allocate and fill the list
    1263           bond *BondsList[SubSetDimension];
    1264           SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[2*SP], FragmentSearch->BondsPerSPList[2*SP+1], TouchedList, TouchedIndex);
     1263          std::vector<bond *> BondsList;
     1264          BondsList.resize(SubSetDimension);
     1265          SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
    12651266
    12661267          // then iterate
     
    13001301void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch)
    13011302{
    1302   FragmentSearch.BondsPerSPList = new bond* [Order * 2];
     1303  FragmentSearch.BondsPerSPList.resize(Order);
    13031304  FragmentSearch.BondsPerSPCount = new int[Order];
    13041305  for (int i=Order;i--;) {
    1305     FragmentSearch.BondsPerSPList[2*i] = new bond();    // start node
    1306     FragmentSearch.BondsPerSPList[2*i+1] = new bond();  // end node
    1307     FragmentSearch.BondsPerSPList[2*i]->next = FragmentSearch.BondsPerSPList[2*i+1];     // intertwine these two
    1308     FragmentSearch.BondsPerSPList[2*i+1]->previous = FragmentSearch.BondsPerSPList[2*i];
    13091306    FragmentSearch.BondsPerSPCount[i] = 0;
    13101307  }
     
    13201317{
    13211318  delete[](FragmentSearch.BondsPerSPCount);
    1322   for (int i=Order;i--;) {
    1323     delete(FragmentSearch.BondsPerSPList[2*i]);
    1324     delete(FragmentSearch.BondsPerSPList[2*i+1]);
    1325   }
    1326   delete[](FragmentSearch.BondsPerSPList);
    13271319};
    13281320
     
    13451337  FragmentSearch.BondsPerSPCount[0] = 1;
    13461338  bond *Binder = new bond(FragmentSearch.Root, FragmentSearch.Root);
    1347   add(Binder, FragmentSearch.BondsPerSPList[1]);
     1339  FragmentSearch.BondsPerSPList[0].push_back(Binder);
    13481340};
    13491341
     
    13561348void ResetSPList(int Order, struct UniqueFragments &FragmentSearch)
    13571349{
    1358   bond *Binder = NULL;
    13591350  DoLog(0) && (Log() << Verbose(0) << "Free'ing all found lists. and resetting index lists" << endl);
    13601351  for(int i=Order;i--;) {
    13611352    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": ");
    1362     Binder = FragmentSearch.BondsPerSPList[2*i];
    1363     while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) {
    1364       Binder = Binder->next;
     1353    for (UniqueFragments::BondsPerSP::const_iterator iter = FragmentSearch.BondsPerSPList[i].begin();
     1354        iter != FragmentSearch.BondsPerSPList[i].end();
     1355        ++iter) {
    13651356      // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->nr << " and " << Binder->rightatom->nr << "." << endl; // make sure numbers are local
    1366       FragmentSearch.ShortestPathList[Binder->leftatom->nr] = -1;
    1367       FragmentSearch.ShortestPathList[Binder->rightatom->nr] = -1;
     1357      FragmentSearch.ShortestPathList[(*iter)->leftatom->nr] = -1;
     1358      FragmentSearch.ShortestPathList[(*iter)->rightatom->nr] = -1;
    13681359    }
    13691360    // delete added bonds
    1370     cleanup(FragmentSearch.BondsPerSPList[2*i], FragmentSearch.BondsPerSPList[2*i+1]);
     1361    for (UniqueFragments::BondsPerSP::iterator iter = FragmentSearch.BondsPerSPList[i].begin();
     1362        iter != FragmentSearch.BondsPerSPList[i].end();
     1363        ++iter) {
     1364      delete(*iter);
     1365    }
     1366    FragmentSearch.BondsPerSPList[i].clear();
    13711367    // also start and end node
    13721368    DoLog(0) && (Log() << Verbose(0) << "cleaned." << endl);
     
    13941390  atom *OtherWalker = NULL;
    13951391  atom *Predecessor = NULL;
    1396   bond *CurrentEdge = NULL;
    13971392  bond *Binder = NULL;
    13981393  int RootKeyNr = FragmentSearch.Root->GetTrueFather()->nr;
     
    14101405
    14111406    RemainingWalkers = FragmentSearch.BondsPerSPCount[SP];
    1412     CurrentEdge = FragmentSearch.BondsPerSPList[2*SP];    /// start of this SP level's list
    1413     while (CurrentEdge->next != FragmentSearch.BondsPerSPList[2*SP+1]) {    /// end of this SP level's list
    1414       CurrentEdge = CurrentEdge->next;
     1407    for (UniqueFragments::BondsPerSP::const_iterator CurrentEdge = FragmentSearch.BondsPerSPList[SP].begin();
     1408        CurrentEdge != FragmentSearch.BondsPerSPList[SP].end();
     1409        ++CurrentEdge) { /// start till end of this SP level's list
    14151410      RemainingWalkers--;
    1416       Walker = CurrentEdge->rightatom;    // rightatom is always the one more distant
    1417       Predecessor = CurrentEdge->leftatom;    // ... and leftatom is predecessor
     1411      Walker = (*CurrentEdge)->rightatom;    // rightatom is always the one more distant
     1412      Predecessor = (*CurrentEdge)->leftatom;    // ... and leftatom is predecessor
    14181413      AtomKeyNr = Walker->nr;
    14191414      DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->nr << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl);
     
    14381433            // add the bond in between to the SP list
    14391434            Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
    1440             add(Binder, FragmentSearch.BondsPerSPList[2*(SP+1)+1]);
     1435            FragmentSearch.BondsPerSPList[SP+1].push_back(Binder);
    14411436            FragmentSearch.BondsPerSPCount[SP+1]++;
    14421437            DoLog(3) && (Log() << Verbose(3) << "Added its bond to SP list, having now " << FragmentSearch.BondsPerSPCount[SP+1] << " item(s)." << endl);
     
    14601455void OutputSPList(int Order, struct UniqueFragments &FragmentSearch)
    14611456{
    1462   bond *Binder = NULL;
    14631457  DoLog(0) && (Log() << Verbose(0) << "Printing all found lists." << endl);
    14641458  for(int i=1;i<Order;i++) {    // skip the root edge in the printing
    1465     Binder = FragmentSearch.BondsPerSPList[2*i];
    14661459    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << "." << endl);
    1467     while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) {
    1468       Binder = Binder->next;
     1460    for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin();
     1461        Binder != FragmentSearch.BondsPerSPList[i].end();
     1462        ++Binder) {
    14691463      DoLog(2) && (Log() << Verbose(2) << *Binder << endl);
    14701464    }
     
    14791473int CountNumbersInBondsList(int Order, struct UniqueFragments &FragmentSearch)
    14801474{
    1481   bond *Binder = NULL;
    14821475  int SP = -1;  // the Root <-> Root edge must be subtracted!
    14831476  for(int i=Order;i--;) { // sum up all found edges
    1484     Binder = FragmentSearch.BondsPerSPList[2*i];
    1485     while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) {
    1486       Binder = Binder->next;
     1477    for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin();
     1478        Binder != FragmentSearch.BondsPerSPList[i].end();
     1479        ++Binder) {
    14871480      SP++;
    14881481    }
     
    15311524
    15321525    // prepare the subset and call the generator
    1533     bond* BondsList[FragmentSearch.BondsPerSPCount[0]];
    1534     for(int i=0;i<FragmentSearch.BondsPerSPCount[0];i++)
    1535       BondsList[i] = NULL;
    1536     BondsList[0] = FragmentSearch.BondsPerSPList[0]->next;  // on SP level 0 there's only the root bond
     1526    std::vector<bond*> BondsList;
     1527    BondsList.resize(FragmentSearch.BondsPerSPCount[0]);
     1528    ASSERT(FragmentSearch.BondsPerSPList[0].size() != 0,
     1529        "molecule::PowerSetGenerator() - FragmentSearch.BondsPerSPList[0] contains no root bond.");
     1530    BondsList[0] = (*FragmentSearch.BondsPerSPList[0].begin());  // on SP level 0 there's only the root bond
    15371531
    15381532    SPFragmentGenerator(&FragmentSearch, 0, BondsList, FragmentSearch.BondsPerSPCount[0], Order);
     
    17971791{
    17981792  bond *Binder = NULL;
    1799   bond *OtherBinder = NULL;
     1793  //bond *OtherBinder = NULL;
    18001794  atom *Walker = NULL;
    18011795  atom *OtherWalker = NULL;
     
    18031797  enum Shading *ColorList = NULL;
    18041798  double tmp;
    1805   bool LastBond = true; // only needed to due list construct
     1799  //bool LastBond = true; // only needed to due list construct
    18061800  Vector Translationvector;
    18071801  //std::deque<atom *> *CompStack = NULL;
     
    18291823          //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl;
    18301824          if (tmp > BondDistance) {
    1831 //            OtherBinder = Binder->next; // note down binding partner for later re-insertion
    1832 //            if (OtherBinder != NULL) {
    1833 //              LastBond = false;
    1834 //            } else {
    1835 //              OtherBinder = Binder->previous;
    1836 //              LastBond = true;
    1837 //            }
    1838 //            unlink(Binder);   // unlink bond
    18391825            DoLog(2) && (Log() << Verbose(2) << "Correcting at bond " << *Binder << "." << endl);
    18401826            flag = true;
     
    18771863        }
    18781864      }
    1879       // re-add bond
    1880       if (OtherBinder == NULL) { // is the only bond?
    1881         //Do nothing
    1882       } else {
    1883         if (!LastBond) {
    1884           link(Binder, OtherBinder);
    1885         } else {
    1886           link(OtherBinder, Binder);
    1887         }
    1888       }
     1865//      // re-add bond
     1866//      if (OtherBinder == NULL) { // is the only bond?
     1867//        //Do nothing
     1868//      } else {
     1869//        if (!LastBond) {
     1870//          link(Binder, OtherBinder); // no more implemented bond::previous ...
     1871//        } else {
     1872//          link(OtherBinder, Binder); // no more implemented bond::previous ...
     1873//        }
     1874//      }
    18891875    } else {
    18901876      DoLog(3) && (Log() << Verbose(3) << "No corrections for this fragment." << endl);
  • src/molecule_graph.cpp

    r8aba3c r03c77c  
    3232#include "LinearAlgebra/RealSpaceMatrix.hpp"
    3333#include "linkedcell.hpp"
    34 #include "lists.hpp"
    3534#include "molecule.hpp"
    3635#include "World.hpp"
  • src/moleculelist.cpp

    r8aba3c r03c77c  
    3838#include "LinearAlgebra/RealSpaceMatrix.hpp"
    3939#include "linkedcell.hpp"
    40 #include "lists.hpp"
    4140#include "molecule.hpp"
    4241#include "periodentafel.hpp"
  • src/periodentafel.cpp

    r8aba3c r03c77c  
    2929#include "Helpers/helpers.hpp"
    3030#include "CodePatterns/Log.hpp"
    31 //#include "lists.hpp"
    3231#include "periodentafel.hpp"
    3332#include "CodePatterns/Verbose.hpp"
  • src/unittests/BondGraphUnitTest.cpp

    r8aba3c r03c77c  
    156156{
    157157
    158   //atom *Walker = TestMolecule->start->next;
    159   //atom *Runner = TestMolecule->end->previous;
    160   //CPPUNIT_ASSERT( TestMolecule->end != Walker );
    161158  CPPUNIT_ASSERT_EQUAL( false , BG->LoadBondLengthTable(dummy) );
    162159  CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph(TestMolecule) );
Note: See TracChangeset for help on using the changeset viewer.