Ignore:
Timestamp:
Mar 3, 2010, 10:13:19 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
5a40b8, 8758eb, bd506d
Parents:
9f03b2
Message:

singleton class World introduced, contains only cell_size from class molecule.

  • class World is actually code from Till Crueger from his branch StructureRefactoring.
  • has been introduced here in minimalistic form to allow molecule::cell_size to be outsourced to World::cell_size
  • access to cell_size can be obtained from anyhwere by invoking World::get()->cell_size
  • INFO: cell_size was placed in class molecule for the fragmentation procedure where the cell_size had to be individually adapted to each fragment.
  • all appearances have been changed accordingly. Where appropriate we have employed a const pointer onto cell_size.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/analysis_correlation.cpp

    r9f03b2 r9565ec  
    1818#include "vector.hpp"
    1919#include "verbose.hpp"
     20#include "World.hpp"
    2021
    2122
     
    5657                if (Walker->nr < OtherWalker->nr)
    5758                  if ((type2 == NULL) || (OtherWalker->type == type2)) {
    58                     distance = Walker->node->PeriodicDistance(OtherWalker->node, (*MolWalker)->cell_size);
     59                    distance = Walker->node->PeriodicDistance(OtherWalker->node, World::get()->cell_size);
    5960                    //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl;
    6061                    outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) );
     
    9798  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    9899    if ((*MolWalker)->ActiveFlag) {
    99       double * FullMatrix = ReturnFullMatrixforSymmetric((*MolWalker)->cell_size);
     100      double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size);
    100101      double * FullInverseMatrix = InverseMatrix(FullMatrix);
    101102      eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
     
    175176        Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl;
    176177        if ((type == NULL) || (Walker->type == type)) {
    177           distance = Walker->node->PeriodicDistance(point, (*MolWalker)->cell_size);
     178          distance = Walker->node->PeriodicDistance(point, World::get()->cell_size);
    178179          Log() << Verbose(4) << "Current distance is " << distance << "." << endl;
    179180          outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) );
     
    209210  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    210211    if ((*MolWalker)->ActiveFlag) {
    211       double * FullMatrix = ReturnFullMatrixforSymmetric((*MolWalker)->cell_size);
     212      double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size);
    212213      double * FullInverseMatrix = InverseMatrix(FullMatrix);
    213214      Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
     
    314315  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    315316    if ((*MolWalker)->ActiveFlag) {
    316       double * FullMatrix = ReturnFullMatrixforSymmetric((*MolWalker)->cell_size);
     317      double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size);
    317318      double * FullInverseMatrix = InverseMatrix(FullMatrix);
    318319      Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
Note: See TracChangeset for help on using the changeset viewer.