Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_fragmentation.cpp

    rbab12a ra67d19  
    88#include <cstring>
    99
    10 #include "World.hpp"
    1110#include "atom.hpp"
    1211#include "bond.hpp"
     
    677676  //if (FragmentationToDo) {    // we should always store the fragments again as coordination might have changed slightly without changing bond structure
    678677  // allocate memory for the pointer array and transmorph graphs into full molecular fragments
    679   BondFragments = new MoleculeListClass(World::getPointer());
     678  BondFragments = new MoleculeListClass();
    680679  int k=0;
    681680  for(Graph::iterator runner = TotalGraph.begin(); runner != TotalGraph.end(); runner++) {
     
    722721    // free memory for bond part
    723722    DoLog(1) && (Log() << Verbose(1) << "Freeing bond memory" << endl);
    724     Free(&FragmentList); // remove bond molecule from memory
     723    delete(FragmentList); // remove bond molecule from memory
    725724    Free(&SortIndex);
    726725  } else {
     
    907906      }
    908907    } else {
    909       DoeLog(1) && (eLog()<< Verbose(1) << "Son " << Runner->getName() << " has father " << FatherOfRunner->getName() << " but its entry in SonList is " << SonList[FatherOfRunner->nr] << "!" << endl);
     908      DoeLog(1) && (eLog()<< Verbose(1) << "Son " << Runner->Name << " has father " << FatherOfRunner->Name << " but its entry in SonList is " << SonList[FatherOfRunner->nr] << "!" << endl);
    910909    }
    911910    if ((LonelyFlag) && (Leaf->AtomCount > 1)) {
     
    930929{
    931930  atom **SonList = Calloc<atom*>(AtomCount, "molecule::StoreFragmentFromStack: **SonList");
    932   molecule *Leaf = World::getInstance().createMolecule();
     931  molecule *Leaf = new molecule(elemente);
    933932
    934933//  Log() << Verbose(1) << "Begin of StoreFragmentFromKeyset." << endl;
     
    16581657  atom *Walker = NULL;
    16591658  atom *OtherWalker = NULL;
    1660   double * const cell_size = World::getInstance().getDomain();
     1659  double * const cell_size = World::get()->cell_size;
    16611660  double *matrix = ReturnFullMatrixforSymmetric(cell_size);
    16621661  enum Shading *ColorList = NULL;
     
    16731672    // remove bonds that are beyond bonddistance
    16741673    for(int i=NDIM;i--;)
    1675       Translationvector[i] = 0.;
     1674      Translationvector.x[i] = 0.;
    16761675    // scan all bonds
    16771676    Binder = first;
     
    16801679      Binder = Binder->next;
    16811680      for (int i=NDIM;i--;) {
    1682         tmp = fabs(Binder->leftatom->x[i] - Binder->rightatom->x[i]);
     1681        tmp = fabs(Binder->leftatom->x.x[i] - Binder->rightatom->x.x[i]);
    16831682        //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl;
    16841683        if (tmp > BondDistance) {
     
    16941693      // create translation vector from their periodically modified distance
    16951694      for (int i=NDIM;i--;) {
    1696         tmp = Binder->leftatom->x[i] - Binder->rightatom->x[i];
     1695        tmp = Binder->leftatom->x.x[i] - Binder->rightatom->x.x[i];
    16971696        if (fabs(tmp) > BondDistance)
    1698           Translationvector[i] = (tmp < 0) ? +1. : -1.;
     1697          Translationvector.x[i] = (tmp < 0) ? +1. : -1.;
    16991698      }
    17001699      Translationvector.MatrixMultiplication(matrix);
    17011700      //Log() << Verbose(3) << "Translation vector is ";
    1702       Log() << Verbose(0) << Translationvector <<  endl;
     1701      Translationvector.Output();
     1702      DoLog(0) && (Log() << Verbose(0) << endl);
    17031703      // apply to all atoms of first component via BFS
    17041704      for (int i=AtomCount;i--;)
     
    17091709        //Log() << Verbose (3) << "Current Walker is: " << *Walker << "." << endl;
    17101710        ColorList[Walker->nr] = black;    // mark as explored
    1711         Walker->x += Translationvector; // translate
     1711        Walker->x.AddVector(&Translationvector); // translate
    17121712        for (BondList::const_iterator Runner = Walker->ListOfBonds.begin(); Runner != Walker->ListOfBonds.end(); (++Runner)) {
    17131713          if ((*Runner) != Binder) {
Note: See TracChangeset for help on using the changeset viewer.