Changeset 5f612ee for src/builder.cpp


Ignore:
Timestamp:
Apr 27, 2010, 2:25:42 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:
632bc3
Parents:
13d5a9 (diff), c695c9 (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.
Message:

Merge branch 'Analysis_PairCorrelation' into StructureRefactoring

Conflicts:

molecuilder/src/Makefile.am
molecuilder/src/World.cpp
molecuilder/src/World.hpp
molecuilder/src/boundary.cpp
molecuilder/src/builder.cpp
molecuilder/src/log.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/periodentafel.cpp
molecuilder/src/tesselation.cpp
molecuilder/src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
molecuilder/src/unittests/Makefile.am
molecuilder/src/unittests/bondgraphunittest.cpp
molecuilder/src/unittests/gslvectorunittest.cpp
molecuilder/src/unittests/logunittest.cpp
molecuilder/src/unittests/tesselation_boundarytriangleunittest.hpp
molecuilder/src/vector.cpp
molecuilder/tests/Tesselations/defs.in

Conflicts have been many and too numerous to listen here, just the few general cases

  • new molecule() replaced by World::getInstance().createMolecule()
  • new atom() replaced by World::getInstance().createAtom() where appropriate.
  • Some DoLog()s added interfered with changes to the message produced by Log() << Verbose(.) << ...
  • DoLog() has been erroneously added to TestRunner.cpp as well, there cout is appropriate
  • ...

Additionally, there was a bug in atom::clone(), sort was set to atom::nr of the atom to clone not of the clone itself. This caused a failure of the fragmentation.

This merge has been fully checked from a clean build directory with subsequent configure,make all install and make check.
It configures, compiles and runs all test cases and the test suite without errors.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    r13d5a9 r5f612ee  
    5454#include <cstring>
    5555
     56#include "analysis_bonds.hpp"
    5657#include "analysis_correlation.hpp"
    5758#include "atom.hpp"
     
    7980#include "World.hpp"
    8081#include "version.h"
     82#include "World.hpp"
    8183
    8284/********************************************* Subsubmenu routine ************************************/
     
    9597  bool valid;
    9698
    97   Log() << Verbose(0) << "===========ADD ATOM============================" << endl;
    98   Log() << Verbose(0) << " a - state absolute coordinates of atom" << endl;
    99   Log() << Verbose(0) << " b - state relative coordinates of atom wrt to reference point" << endl;
    100   Log() << Verbose(0) << " c - state relative coordinates of atom wrt to already placed atom" << endl;
    101   Log() << Verbose(0) << " d - state two atoms, two angles and a distance" << endl;
    102   Log() << Verbose(0) << " e - least square distance position to a set of atoms" << endl;
    103   Log() << Verbose(0) << "all else - go back" << endl;
    104   Log() << Verbose(0) << "===============================================" << endl;
    105   Log() << Verbose(0) << "Note: Specifiy angles in degrees not multiples of Pi!" << endl;
    106   Log() << Verbose(0) << "INPUT: ";
     99  cout << Verbose(0) << "===========ADD ATOM============================" << endl;
     100  cout << Verbose(0) << " a - state absolute coordinates of atom" << endl;
     101  cout << Verbose(0) << " b - state relative coordinates of atom wrt to reference point" << endl;
     102  cout << Verbose(0) << " c - state relative coordinates of atom wrt to already placed atom" << endl;
     103  cout << Verbose(0) << " d - state two atoms, two angles and a distance" << endl;
     104  cout << Verbose(0) << " e - least square distance position to a set of atoms" << endl;
     105  cout << Verbose(0) << "all else - go back" << endl;
     106  cout << Verbose(0) << "===============================================" << endl;
     107  cout << Verbose(0) << "Note: Specifiy angles in degrees not multiples of Pi!" << endl;
     108  cout << Verbose(0) << "INPUT: ";
    107109  cin >> choice;
    108110
    109111  switch (choice) {
    110112    default:
    111       eLog() << Verbose(2) << "Not a valid choice." << endl;
     113      DoeLog(2) && (eLog()<< Verbose(2) << "Not a valid choice." << endl);
    112114      break;
    113115      case 'a': // absolute coordinates of atom
    114         Log() << Verbose(0) << "Enter absolute coordinates." << endl;
     116        cout << Verbose(0) << "Enter absolute coordinates." << endl;
    115117        first = new atom;
    116         first->x.AskPosition(mol->cell_size, false);
     118        first->x.AskPosition(World::getInstance().getDomain(), false);
    117119        first->type = periode->AskElement();  // give type
    118120        mol->AddAtom(first);  // add to molecule
     
    123125        valid = true;
    124126        do {
    125           if (!valid) eLog() << Verbose(2) << "Resulting position out of cell." << endl;
    126           Log() << Verbose(0) << "Enter reference coordinates." << endl;
    127           x.AskPosition(mol->cell_size, true);
    128           Log() << Verbose(0) << "Enter relative coordinates." << endl;
    129           first->x.AskPosition(mol->cell_size, false);
     127          if (!valid) DoeLog(2) && (eLog()<< Verbose(2) << "Resulting position out of cell." << endl);
     128          cout << Verbose(0) << "Enter reference coordinates." << endl;
     129          x.AskPosition(World::getInstance().getDomain(), true);
     130          cout << Verbose(0) << "Enter relative coordinates." << endl;
     131          first->x.AskPosition(World::getInstance().getDomain(), false);
    130132          first->x.AddVector((const Vector *)&x);
    131           Log() << Verbose(0) << "\n";
     133          cout << Verbose(0) << "\n";
    132134        } while (!(valid = mol->CheckBounds((const Vector *)&first->x)));
    133135        first->type = periode->AskElement();  // give type
     
    139141        valid = true;
    140142        do {
    141           if (!valid) eLog() << Verbose(2) << "Resulting position out of cell." << endl;
     143          if (!valid) DoeLog(2) && (eLog()<< Verbose(2) << "Resulting position out of cell." << endl);
    142144          second = mol->AskAtom("Enter atom number: ");
    143           Log() << Verbose(0) << "Enter relative coordinates." << endl;
    144           first->x.AskPosition(mol->cell_size, false);
     145          DoLog(0) && (Log() << Verbose(0) << "Enter relative coordinates." << endl);
     146          first->x.AskPosition(World::getInstance().getDomain(), false);
    145147          for (int i=NDIM;i--;) {
    146148            first->x.x[i] += second->x.x[i];
     
    156158        do {
    157159          if (!valid) {
    158             eLog() << Verbose(2) << "Resulting coordinates out of cell - " << first->x << endl;
     160            DoeLog(2) && (eLog()<< Verbose(2) << "Resulting coordinates out of cell - " << first->x << endl);
    159161          }
    160           Log() << Verbose(0) << "First, we need two atoms, the first atom is the central, while the second is the outer one." << endl;
     162          cout << Verbose(0) << "First, we need two atoms, the first atom is the central, while the second is the outer one." << endl;
    161163          second = mol->AskAtom("Enter central atom: ");
    162164          third = mol->AskAtom("Enter second atom (specifying the axis for first angle): ");
     
    169171          c *= M_PI/180.;
    170172          bound(&c, -M_PI, M_PI);
    171           Log() << Verbose(0) << "radius: " << a << "\t phi: " << b*180./M_PI << "\t theta: " << c*180./M_PI << endl;
     173          cout << Verbose(0) << "radius: " << a << "\t phi: " << b*180./M_PI << "\t theta: " << c*180./M_PI << endl;
    172174/*
    173175          second->Output(1,1,(ofstream *)&cout);
     
    181183
    182184          if (!z.SolveSystem(&x,&y,&n, b, c, a)) {
    183             Log() << Verbose(0) << "Failure solving self-dependent linear system!" << endl;
     185         coutg() << Verbose(0) << "Failure solving self-dependent linear system!" << endl;
    184186            continue;
    185187          }
    186           Log() << Verbose(0) << "resulting relative coordinates: ";
     188          DoLog(0) && (Log() << Verbose(0) << "resulting relative coordinates: ");
    187189          z.Output();
    188           Log() << Verbose(0) << endl;
     190          DoLog(0) && (Log() << Verbose(0) << endl);
    189191          */
    190192          // calc axis vector
     
    194196          Log() << Verbose(0) << "x: ",
    195197          x.Output();
    196           Log() << Verbose(0) << endl;
     198          DoLog(0) && (Log() << Verbose(0) << endl);
    197199          z.MakeNormalVector(&second->x,&third->x,&fourth->x);
    198200          Log() << Verbose(0) << "z: ",
    199201          z.Output();
    200           Log() << Verbose(0) << endl;
     202          DoLog(0) && (Log() << Verbose(0) << endl);
    201203          y.MakeNormalVector(&x,&z);
    202204          Log() << Verbose(0) << "y: ",
    203205          y.Output();
    204           Log() << Verbose(0) << endl;
     206          DoLog(0) && (Log() << Verbose(0) << endl);
    205207
    206208          // rotate vector around first angle
     
    209211          Log() << Verbose(0) << "Rotated vector: ",
    210212          first->x.Output();
    211           Log() << Verbose(0) << endl;
     213          DoLog(0) && (Log() << Verbose(0) << endl);
    212214          // remove the projection onto the rotation plane of the second angle
    213215          n.CopyVector(&y);
     
    215217          Log() << Verbose(0) << "N1: ",
    216218          n.Output();
    217           Log() << Verbose(0) << endl;
     219          DoLog(0) && (Log() << Verbose(0) << endl);
    218220          first->x.SubtractVector(&n);
    219221          Log() << Verbose(0) << "Subtracted vector: ",
    220222          first->x.Output();
    221           Log() << Verbose(0) << endl;
     223          DoLog(0) && (Log() << Verbose(0) << endl);
    222224          n.CopyVector(&z);
    223225          n.Scale(first->x.ScalarProduct(&z));
    224226          Log() << Verbose(0) << "N2: ",
    225227          n.Output();
    226           Log() << Verbose(0) << endl;
     228          DoLog(0) && (Log() << Verbose(0) << endl);
    227229          first->x.SubtractVector(&n);
    228230          Log() << Verbose(0) << "2nd subtracted vector: ",
    229231          first->x.Output();
    230           Log() << Verbose(0) << endl;
     232          DoLog(0) && (Log() << Verbose(0) << endl);
    231233
    232234          // rotate another vector around second angle
     
    235237          Log() << Verbose(0) << "2nd Rotated vector: ",
    236238          n.Output();
    237           Log() << Verbose(0) << endl;
     239          DoLog(0) && (Log() << Verbose(0) << endl);
    238240
    239241          // add the two linear independent vectors
     
    243245          first->x.AddVector(&second->x);
    244246
    245           Log() << Verbose(0) << "resulting coordinates: ";
     247          DoLog(0) && (Log() << Verbose(0) << "resulting coordinates: ");
    246248          first->x.Output();
    247           Log() << Verbose(0) << endl;
     249          DoLog(0) && (Log() << Verbose(0) << endl);
    248250        } while (!(valid = mol->CheckBounds((const Vector *)&first->x)));
    249251        first->type = periode->AskElement();  // give type
     
    258260          atoms[i] = NULL;
    259261        int i=0, j=0;
    260         Log() << Verbose(0) << "Now we need at least three molecules.\n";
     262        cout << Verbose(0) << "Now we need at least three molecules.\n";
    261263        do {
    262           Log() << Verbose(0) << "Enter " << i+1 << "th atom: ";
     264          cout << Verbose(0) << "Enter " << i+1 << "th atom: ";
    263265          cin >> j;
    264266          if (j != -1) {
     
    274276        } else {
    275277          delete first;
    276           Log() << Verbose(0) << "Please enter at least two vectors!\n";
     278          cout << Verbose(0) << "Please enter at least two vectors!\n";
    277279        }
    278280        break;
     
    288290  char choice;  // menu choice char
    289291
    290   Log() << Verbose(0) << "===========CENTER ATOMS=========================" << endl;
    291   Log() << Verbose(0) << " a - on origin" << endl;
    292   Log() << Verbose(0) << " b - on center of gravity" << endl;
    293   Log() << Verbose(0) << " c - within box with additional boundary" << endl;
    294   Log() << Verbose(0) << " d - within given simulation box" << endl;
    295   Log() << Verbose(0) << "all else - go back" << endl;
    296   Log() << Verbose(0) << "===============================================" << endl;
    297   Log() << Verbose(0) << "INPUT: ";
     292  cout << Verbose(0) << "===========CENTER ATOMS=========================" << endl;
     293  cout << Verbose(0) << " a - on origin" << endl;
     294  cout << Verbose(0) << " b - on center of gravity" << endl;
     295  cout << Verbose(0) << " c - within box with additional boundary" << endl;
     296  cout << Verbose(0) << " d - within given simulation box" << endl;
     297  cout << Verbose(0) << "all else - go back" << endl;
     298  cout << Verbose(0) << "===============================================" << endl;
     299  cout << Verbose(0) << "INPUT: ";
    298300  cin >> choice;
    299301
    300302  switch (choice) {
    301303    default:
    302       Log() << Verbose(0) << "Not a valid choice." << endl;
     304      cout << Verbose(0) << "Not a valid choice." << endl;
    303305      break;
    304306    case 'a':
    305       Log() << Verbose(0) << "Centering atoms in config file on origin." << endl;
     307      cout << Verbose(0) << "Centering atoms in config file on origin." << endl;
    306308      mol->CenterOrigin();
    307309      break;
    308310    case 'b':
    309       Log() << Verbose(0) << "Centering atoms in config file on center of gravity." << endl;
     311      cout << Verbose(0) << "Centering atoms in config file on center of gravity." << endl;
    310312      mol->CenterPeriodic();
    311313      break;
    312314    case 'c':
    313       Log() << Verbose(0) << "Centering atoms in config file within given additional boundary." << endl;
     315      cout << Verbose(0) << "Centering atoms in config file within given additional boundary." << endl;
    314316      for (int i=0;i<NDIM;i++) {
    315         Log() << Verbose(0) << "Enter axis " << i << " boundary: ";
     317        cout << Verbose(0) << "Enter axis " << i << " boundary: ";
    316318        cin >> y.x[i];
    317319      }
     
    324326      break;
    325327    case 'd':
    326       Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl;
     328      cout << Verbose(1) << "Centering atoms in config file within given simulation box." << endl;
    327329      for (int i=0;i<NDIM;i++) {
    328         Log() << Verbose(0) << "Enter axis " << i << " boundary: ";
     330        cout << Verbose(0) << "Enter axis " << i << " boundary: ";
    329331        cin >> x.x[i];
    330332      }
     
    347349  char choice;  // menu choice char
    348350
    349   Log() << Verbose(0) << "===========ALIGN ATOMS=========================" << endl;
    350   Log() << Verbose(0) << " a - state three atoms defining align plane" << endl;
    351   Log() << Verbose(0) << " b - state alignment vector" << endl;
    352   Log() << Verbose(0) << " c - state two atoms in alignment direction" << endl;
    353   Log() << Verbose(0) << " d - align automatically by least square fit" << endl;
    354   Log() << Verbose(0) << "all else - go back" << endl;
    355   Log() << Verbose(0) << "===============================================" << endl;
    356   Log() << Verbose(0) << "INPUT: ";
     351  cout << Verbose(0) << "===========ALIGN ATOMS=========================" << endl;
     352  cout << Verbose(0) << " a - state three atoms defining align plane" << endl;
     353  cout << Verbose(0) << " b - state alignment vector" << endl;
     354  cout << Verbose(0) << " c - state two atoms in alignment direction" << endl;
     355  cout << Verbose(0) << " d - align automatically by least square fit" << endl;
     356  cout << Verbose(0) << "all else - go back" << endl;
     357  cout << Verbose(0) << "===============================================" << endl;
     358  cout << Verbose(0) << "INPUT: ";
    357359  cin >> choice;
    358360
     
    367369      break;
    368370    case 'b': // normal vector of mirror plane
    369       Log() << Verbose(0) << "Enter normal vector of mirror plane." << endl;
    370       n.AskPosition(mol->cell_size,0);
     371      cout << Verbose(0) << "Enter normal vector of mirror plane." << endl;
     372      n.AskPosition(World::getInstance().getDomain(),0);
    371373      n.Normalize();
    372374      break;
     
    387389        fscanf(stdin, "%3s", shorthand);
    388390      } while ((param.type = periode->FindElement(shorthand)) == NULL);
    389       Log() << Verbose(0) << "Element is " << param.type->name << endl;
     391      cout << Verbose(0) << "Element is " << param.type->name << endl;
    390392      mol->GetAlignvector(&param);
    391393      for (int i=NDIM;i--;) {
     
    394396      }
    395397      gsl_vector_free(param.x);
    396       Log() << Verbose(0) << "Offset vector: ";
     398      cout << Verbose(0) << "Offset vector: ";
    397399      x.Output();
    398       Log() << Verbose(0) << endl;
     400      DoLog(0) && (Log() << Verbose(0) << endl);
    399401      n.Normalize();
    400402      break;
    401403  };
    402   Log() << Verbose(0) << "Alignment vector: ";
     404  DoLog(0) && (Log() << Verbose(0) << "Alignment vector: ");
    403405  n.Output();
    404   Log() << Verbose(0) << endl;
     406  DoLog(0) && (Log() << Verbose(0) << endl);
    405407  mol->Align(&n);
    406408};
     
    415417  char choice;  // menu choice char
    416418
    417   Log() << Verbose(0) << "===========MIRROR ATOMS=========================" << endl;
    418   Log() << Verbose(0) << " a - state three atoms defining mirror plane" << endl;
    419   Log() << Verbose(0) << " b - state normal vector of mirror plane" << endl;
    420   Log() << Verbose(0) << " c - state two atoms in normal direction" << endl;
    421   Log() << Verbose(0) << "all else - go back" << endl;
    422   Log() << Verbose(0) << "===============================================" << endl;
    423   Log() << Verbose(0) << "INPUT: ";
     419  DoLog(0) && (Log() << Verbose(0) << "===========MIRROR ATOMS=========================" << endl);
     420  DoLog(0) && (Log() << Verbose(0) << " a - state three atoms defining mirror plane" << endl);
     421  DoLog(0) && (Log() << Verbose(0) << " b - state normal vector of mirror plane" << endl);
     422  DoLog(0) && (Log() << Verbose(0) << " c - state two atoms in normal direction" << endl);
     423  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     424  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
     425  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    424426  cin >> choice;
    425427
     
    434436      break;
    435437    case 'b': // normal vector of mirror plane
    436       Log() << Verbose(0) << "Enter normal vector of mirror plane." << endl;
    437       n.AskPosition(mol->cell_size,0);
     438      DoLog(0) && (Log() << Verbose(0) << "Enter normal vector of mirror plane." << endl);
     439      n.AskPosition(World::getInstance().getDomain(),0);
    438440      n.Normalize();
    439441      break;
     
    447449      break;
    448450  };
    449   Log() << Verbose(0) << "Normal vector: ";
     451  DoLog(0) && (Log() << Verbose(0) << "Normal vector: ");
    450452  n.Output();
    451   Log() << Verbose(0) << endl;
     453  DoLog(0) && (Log() << Verbose(0) << endl);
    452454  mol->Mirror((const Vector *)&n);
    453455};
     
    463465  char choice;  // menu choice char
    464466
    465   Log() << Verbose(0) << "===========REMOVE ATOMS=========================" << endl;
    466   Log() << Verbose(0) << " a - state atom for removal by number" << endl;
    467   Log() << Verbose(0) << " b - keep only in radius around atom" << endl;
    468   Log() << Verbose(0) << " c - remove this with one axis greater value" << endl;
    469   Log() << Verbose(0) << "all else - go back" << endl;
    470   Log() << Verbose(0) << "===============================================" << endl;
    471   Log() << Verbose(0) << "INPUT: ";
     467  DoLog(0) && (Log() << Verbose(0) << "===========REMOVE ATOMS=========================" << endl);
     468  DoLog(0) && (Log() << Verbose(0) << " a - state atom for removal by number" << endl);
     469  DoLog(0) && (Log() << Verbose(0) << " b - keep only in radius around atom" << endl);
     470  DoLog(0) && (Log() << Verbose(0) << " c - remove this with one axis greater value" << endl);
     471  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     472  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
     473  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    472474  cin >> choice;
    473475
     
    476478    case 'a':
    477479      if (mol->RemoveAtom(mol->AskAtom("Enter number of atom within molecule: ")))
    478         Log() << Verbose(1) << "Atom removed." << endl;
     480        DoLog(1) && (Log() << Verbose(1) << "Atom removed." << endl);
    479481      else
    480         Log() << Verbose(1) << "Atom not found." << endl;
     482        DoLog(1) && (Log() << Verbose(1) << "Atom not found." << endl);
    481483      break;
    482484    case 'b':
    483485      second = mol->AskAtom("Enter number of atom as reference point: ");
    484       Log() << Verbose(0) << "Enter radius: ";
     486      DoLog(0) && (Log() << Verbose(0) << "Enter radius: ");
    485487      cin >> tmp1;
    486488      first = mol->start;
     
    494496      break;
    495497    case 'c':
    496       Log() << Verbose(0) << "Which axis is it: ";
     498      DoLog(0) && (Log() << Verbose(0) << "Which axis is it: ");
    497499      cin >> axis;
    498       Log() << Verbose(0) << "Lower boundary: ";
     500      DoLog(0) && (Log() << Verbose(0) << "Lower boundary: ");
    499501      cin >> tmp1;
    500       Log() << Verbose(0) << "Upper boundary: ";
     502      DoLog(0) && (Log() << Verbose(0) << "Upper boundary: ");
    501503      cin >> tmp2;
    502504      first = mol->start;
     
    528530  char choice;  // menu choice char
    529531
    530   Log() << Verbose(0) << "===========MEASURE ATOMS=========================" << endl;
    531   Log() << Verbose(0) << " a - calculate bond length between one atom and all others" << endl;
    532   Log() << Verbose(0) << " b - calculate bond length between two atoms" << endl;
    533   Log() << Verbose(0) << " c - calculate bond angle" << endl;
    534   Log() << Verbose(0) << " d - calculate principal axis of the system" << endl;
    535   Log() << Verbose(0) << " e - calculate volume of the convex envelope" << endl;
    536   Log() << Verbose(0) << " f - calculate temperature from current velocity" << endl;
    537   Log() << Verbose(0) << " g - output all temperatures per step from velocities" << endl;
    538   Log() << Verbose(0) << "all else - go back" << endl;
    539   Log() << Verbose(0) << "===============================================" << endl;
    540   Log() << Verbose(0) << "INPUT: ";
     532  DoLog(0) && (Log() << Verbose(0) << "===========MEASURE ATOMS=========================" << endl);
     533  DoLog(0) && (Log() << Verbose(0) << " a - calculate bond length between one atom and all others" << endl);
     534  DoLog(0) && (Log() << Verbose(0) << " b - calculate bond length between two atoms" << endl);
     535  DoLog(0) && (Log() << Verbose(0) << " c - calculate bond angle" << endl);
     536  DoLog(0) && (Log() << Verbose(0) << " d - calculate principal axis of the system" << endl);
     537  DoLog(0) && (Log() << Verbose(0) << " e - calculate volume of the convex envelope" << endl);
     538  DoLog(0) && (Log() << Verbose(0) << " f - calculate temperature from current velocity" << endl);
     539  DoLog(0) && (Log() << Verbose(0) << " g - output all temperatures per step from velocities" << endl);
     540  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     541  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
     542  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    541543  cin >> choice;
    542544
    543545  switch(choice) {
    544546    default:
    545       Log() << Verbose(1) << "Not a valid choice." << endl;
     547      DoLog(1) && (Log() << Verbose(1) << "Not a valid choice." << endl);
    546548      break;
    547549    case 'a':
     
    575577      x.SubtractVector((const Vector *)&second->x);
    576578      tmp1 = x.Norm();
    577       Log() << Verbose(1) << "Distance vector is ";
     579      DoLog(1) && (Log() << Verbose(1) << "Distance vector is ");
    578580      x.Output();
    579       Log() << Verbose(0) << "." << endl << "Norm of distance is " << tmp1 << "." << endl;
     581      DoLog(0) && (Log() << Verbose(0) << "." << endl << "Norm of distance is " << tmp1 << "." << endl);
    580582      break;
    581583
    582584    case 'c':
    583       Log() << Verbose(0) << "Evaluating bond angle between three - first, central, last - atoms." << endl;
     585      DoLog(0) && (Log() << Verbose(0) << "Evaluating bond angle between three - first, central, last - atoms." << endl);
    584586      first = mol->AskAtom("Enter first atom: ");
    585587      second = mol->AskAtom("Enter central atom: ");
     
    590592      y.CopyVector((const Vector *)&third->x);
    591593      y.SubtractVector((const Vector *)&second->x);
    592       Log() << Verbose(0) << "Bond angle between first atom Nr." << first->nr << ", central atom Nr." << second->nr << " and last atom Nr." << third->nr << ": ";
    593       Log() << Verbose(0) << (acos(x.ScalarProduct((const Vector *)&y)/(y.Norm()*x.Norm()))/M_PI*180.) << " degrees" << endl;
     594      DoLog(0) && (Log() << Verbose(0) << "Bond angle between first atom Nr." << first->nr << ", central atom Nr." << second->nr << " and last atom Nr." << third->nr << ": ");
     595      DoLog(0) && (Log() << Verbose(0) << (acos(x.ScalarProduct((const Vector *)&y)/(y.Norm()*x.Norm()))/M_PI*180.) << " degrees" << endl);
    594596      break;
    595597    case 'd':
    596       Log() << Verbose(0) << "Evaluating prinicipal axis." << endl;
    597       Log() << Verbose(0) << "Shall we rotate? [0/1]: ";
     598      DoLog(0) && (Log() << Verbose(0) << "Evaluating prinicipal axis." << endl);
     599      DoLog(0) && (Log() << Verbose(0) << "Shall we rotate? [0/1]: ");
    598600      cin >> Z;
    599601      if ((Z >=0) && (Z <=1))
     
    604606    case 'e':
    605607      {
    606         Log() << Verbose(0) << "Evaluating volume of the convex envelope.";
     608        DoLog(0) && (Log() << Verbose(0) << "Evaluating volume of the convex envelope.");
    607609        class Tesselation *TesselStruct = NULL;
    608610        const LinkedCell *LCList = NULL;
     
    610612        FindConvexBorder(mol, TesselStruct, LCList, NULL);
    611613        double clustervolume = VolumeOfConvexEnvelope(TesselStruct, configuration);
    612         Log() << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl;\
     614        DoLog(0) && (Log() << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl);\
    613615        delete(LCList);
    614616        delete(TesselStruct);
     
    621623      {
    622624        char filename[255];
    623         Log() << Verbose(0) << "Please enter filename: " << endl;
     625        DoLog(0) && (Log() << Verbose(0) << "Please enter filename: " << endl);
    624626        cin >> filename;
    625         Log() << Verbose(1) << "Storing temperatures in " << filename << "." << endl;
     627        DoLog(1) && (Log() << Verbose(1) << "Storing temperatures in " << filename << "." << endl);
    626628        ofstream *output = new ofstream(filename, ios::trunc);
    627629        if (!mol->OutputTemperatureFromTrajectories(output, 0, mol->MDSteps))
    628           Log() << Verbose(2) << "File could not be written." << endl;
     630          DoLog(2) && (Log() << Verbose(2) << "File could not be written." << endl);
    629631        else
    630           Log() << Verbose(2) << "File stored." << endl;
     632          DoLog(2) && (Log() << Verbose(2) << "File stored." << endl);
    631633        output->close();
    632634        delete(output);
     
    645647  clock_t start, end;
    646648
    647   Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl;
    648   Log() << Verbose(0) << "What's the desired bond order: ";
     649  DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl);
     650  DoLog(0) && (Log() << Verbose(0) << "What's the desired bond order: ");
    649651  cin >> Order1;
    650652  if (mol->first->next != mol->last) {  // there are bonds
     
    652654    mol->FragmentMolecule(Order1, configuration);
    653655    end = clock();
    654     Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl;
     656    DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
    655657  } else
    656     Log() << Verbose(0) << "Connection matrix has not yet been generated!" << endl;
     658    DoLog(0) && (Log() << Verbose(0) << "Connection matrix has not yet been generated!" << endl);
    657659};
    658660
     
    665667static void ManipulateAtoms(periodentafel *periode, MoleculeListClass *molecules, config *configuration)
    666668{
    667   atom *first, *second;
     669  atom *first, *second, *third;
    668670  molecule *mol = NULL;
    669671  Vector x,y,z,n; // coordinates for absolute point in cell volume
     
    673675  bool valid;
    674676
    675   Log() << Verbose(0) << "=========MANIPULATE ATOMS======================" << endl;
    676   Log() << Verbose(0) << "a - add an atom" << endl;
    677   Log() << Verbose(0) << "r - remove an atom" << endl;
    678   Log() << Verbose(0) << "b - scale a bond between atoms" << endl;
    679   Log() << Verbose(0) << "u - change an atoms element" << endl;
    680   Log() << Verbose(0) << "l - measure lengths, angles, ... for an atom" << endl;
    681   Log() << Verbose(0) << "all else - go back" << endl;
    682   Log() << Verbose(0) << "===============================================" << endl;
     677  DoLog(0) && (Log() << Verbose(0) << "=========MANIPULATE ATOMS======================" << endl);
     678  DoLog(0) && (Log() << Verbose(0) << "a - add an atom" << endl);
     679  DoLog(0) && (Log() << Verbose(0) << "r - remove an atom" << endl);
     680  DoLog(0) && (Log() << Verbose(0) << "b - scale a bond between atoms" << endl);
     681  DoLog(0) && (Log() << Verbose(0) << "t - turn an atom round another bond" << endl);
     682  DoLog(0) && (Log() << Verbose(0) << "u - change an atoms element" << endl);
     683  DoLog(0) && (Log() << Verbose(0) << "l - measure lengths, angles, ... for an atom" << endl);
     684  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     685  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
    683686  if (molecules->NumberOfActiveMolecules() > 1)
    684     eLog() << Verbose(2) << "There is more than one molecule active! Atoms will be added to each." << endl;
    685   Log() << Verbose(0) << "INPUT: ";
     687    DoeLog(2) && (eLog()<< Verbose(2) << "There is more than one molecule active! Atoms will be added to each." << endl);
     688  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    686689  cin >> choice;
    687690
    688691  switch (choice) {
    689692    default:
    690       Log() << Verbose(0) << "Not a valid choice." << endl;
     693      DoLog(0) && (Log() << Verbose(0) << "Not a valid choice." << endl);
    691694      break;
    692695
     
    695698        if ((*ListRunner)->ActiveFlag) {
    696699        mol = *ListRunner;
    697         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     700        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    698701        AddAtoms(periode, mol);
    699702      }
     
    704707        if ((*ListRunner)->ActiveFlag) {
    705708        mol = *ListRunner;
    706         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
    707         Log() << Verbose(0) << "Scaling bond length between two atoms." << endl;
     709        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
     710        DoLog(0) && (Log() << Verbose(0) << "Scaling bond length between two atoms." << endl);
    708711        first = mol->AskAtom("Enter first (fixed) atom: ");
    709712        second = mol->AskAtom("Enter second (shifting) atom: ");
     
    712715          minBond += (first->x.x[i]-second->x.x[i])*(first->x.x[i] - second->x.x[i]);
    713716        minBond = sqrt(minBond);
    714         Log() << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl;
    715         Log() << Verbose(0) << "Enter new bond length [a.u.]: ";
     717        DoLog(0) && (Log() << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl);
     718        DoLog(0) && (Log() << Verbose(0) << "Enter new bond length [a.u.]: ");
    716719        cin >> bond;
    717720        for (int i=NDIM;i--;) {
     
    727730        if ((*ListRunner)->ActiveFlag) {
    728731        mol = *ListRunner;
    729         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
    730        Log() << Verbose(0) << "Angstroem -> Bohrradius: 1.8897261\t\tBohrradius -> Angstroem: 0.52917721" << endl;
    731        Log() << Verbose(0) << "Enter three factors: ";
     732        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
     733       DoLog(0) && (Log() << Verbose(0) << "Angstroem -> Bohrradius: 1.8897261\t\tBohrradius -> Angstroem: 0.52917721" << endl);
     734       DoLog(0) && (Log() << Verbose(0) << "Enter three factors: ");
    732735       factor = new double[NDIM];
    733736       cin >> factor[0];
     
    744747        if ((*ListRunner)->ActiveFlag) {
    745748        mol = *ListRunner;
    746         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     749        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    747750        MeasureAtoms(periode, mol, configuration);
    748751      }
     
    753756        if ((*ListRunner)->ActiveFlag) {
    754757        mol = *ListRunner;
    755         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     758        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    756759        RemoveAtoms(mol);
    757760      }
     761      break;
     762
     763    case 't': // turn/rotate atom
     764      for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     765        if ((*ListRunner)->ActiveFlag) {
     766          mol = *ListRunner;
     767          DoLog(0) && (Log() << Verbose(0) << "Turning atom around another bond - first is atom to turn, second (central) and third specify bond" << endl);
     768          first = mol->AskAtom("Enter turning atom: ");
     769          second = mol->AskAtom("Enter central atom: ");
     770          third  = mol->AskAtom("Enter bond atom: ");
     771          cout << Verbose(0) << "Enter new angle in degrees: ";
     772          double tmp = 0.;
     773          cin >> tmp;
     774          // calculate old angle
     775          x.CopyVector((const Vector *)&first->x);
     776          x.SubtractVector((const Vector *)&second->x);
     777          y.CopyVector((const Vector *)&third->x);
     778          y.SubtractVector((const Vector *)&second->x);
     779          double alpha = (acos(x.ScalarProduct((const Vector *)&y)/(y.Norm()*x.Norm()))/M_PI*180.);
     780          cout << Verbose(0) << "Bond angle between first atom Nr." << first->nr << ", central atom Nr." << second->nr << " and last atom Nr." << third->nr << ": ";
     781          cout << Verbose(0) << alpha << " degrees" << endl;
     782          // rotate
     783          z.MakeNormalVector(&x,&y);
     784          x.RotateVector(&z,(alpha-tmp)*M_PI/180.);
     785          x.AddVector(&second->x);
     786          first->x.CopyVector(&x);
     787          // check new angle
     788          x.CopyVector((const Vector *)&first->x);
     789          x.SubtractVector((const Vector *)&second->x);
     790          alpha = (acos(x.ScalarProduct((const Vector *)&y)/(y.Norm()*x.Norm()))/M_PI*180.);
     791          cout << Verbose(0) << "new Bond angle between first atom Nr." << first->nr << ", central atom Nr." << second->nr << " and last atom Nr." << third->nr << ": ";
     792          cout << Verbose(0) << alpha << " degrees" << endl;
     793        }
    758794      break;
    759795
     
    763799        int Z;
    764800        mol = *ListRunner;
    765         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     801        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    766802        first = NULL;
    767803        do {
    768           Log() << Verbose(0) << "Change the element of which atom: ";
     804          DoLog(0) && (Log() << Verbose(0) << "Change the element of which atom: ");
    769805          cin >> Z;
    770806        } while ((first = mol->FindAtom(Z)) == NULL);
    771         Log() << Verbose(0) << "New element by atomic number Z: ";
     807        DoLog(0) && (Log() << Verbose(0) << "New element by atomic number Z: ");
    772808        cin >> Z;
    773809        first->type = periode->FindElement(Z);
    774         Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->type->name << "." << endl;
     810        DoLog(0) && (Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->type->name << "." << endl);
    775811      }
    776812      break;
     
    793829  MoleculeLeafClass *Subgraphs = NULL;
    794830
    795   Log() << Verbose(0) << "=========MANIPULATE GLOBALLY===================" << endl;
    796   Log() << Verbose(0) << "c - scale by unit transformation" << endl;
    797   Log() << Verbose(0) << "d - duplicate molecule/periodic cell" << endl;
    798   Log() << Verbose(0) << "f - fragment molecule many-body bond order style" << endl;
    799   Log() << Verbose(0) << "g - center atoms in box" << endl;
    800   Log() << Verbose(0) << "i - realign molecule" << endl;
    801   Log() << Verbose(0) << "m - mirror all molecules" << endl;
    802   Log() << Verbose(0) << "o - create connection matrix" << endl;
    803   Log() << Verbose(0) << "t - translate molecule by vector" << endl;
    804   Log() << Verbose(0) << "all else - go back" << endl;
    805   Log() << Verbose(0) << "===============================================" << endl;
     831  DoLog(0) && (Log() << Verbose(0) << "=========MANIPULATE GLOBALLY===================" << endl);
     832  DoLog(0) && (Log() << Verbose(0) << "c - scale by unit transformation" << endl);
     833  DoLog(0) && (Log() << Verbose(0) << "d - duplicate molecule/periodic cell" << endl);
     834  DoLog(0) && (Log() << Verbose(0) << "f - fragment molecule many-body bond order style" << endl);
     835  DoLog(0) && (Log() << Verbose(0) << "g - center atoms in box" << endl);
     836  DoLog(0) && (Log() << Verbose(0) << "i - realign molecule" << endl);
     837  DoLog(0) && (Log() << Verbose(0) << "m - mirror all molecules" << endl);
     838  DoLog(0) && (Log() << Verbose(0) << "o - create connection matrix" << endl);
     839  DoLog(0) && (Log() << Verbose(0) << "t - translate molecule by vector" << endl);
     840  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     841  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
    806842  if (molecules->NumberOfActiveMolecules() > 1)
    807     eLog() << Verbose(2) << "There is more than one molecule active! Atoms will be added to each." << endl;
    808   Log() << Verbose(0) << "INPUT: ";
     843    DoeLog(2) && (eLog()<< Verbose(2) << "There is more than one molecule active! Atoms will be added to each." << endl);
     844  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    809845  cin >> choice;
    810846
    811847  switch (choice) {
    812848    default:
    813       Log() << Verbose(0) << "Not a valid choice." << endl;
     849      DoLog(0) && (Log() << Verbose(0) << "Not a valid choice." << endl);
    814850      break;
    815851
     
    818854        if ((*ListRunner)->ActiveFlag) {
    819855        mol = *ListRunner;
    820         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
    821         Log() << Verbose(0) << "State the axis [(+-)123]: ";
     856        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
     857        DoLog(0) && (Log() << Verbose(0) << "State the axis [(+-)123]: ");
    822858        cin >> axis;
    823         Log() << Verbose(0) << "State the factor: ";
     859        DoLog(0) && (Log() << Verbose(0) << "State the factor: ");
    824860        cin >> faktor;
    825861
     
    838874          }
    839875          if (count != j)
    840             eLog() << Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl;
     876            DoeLog(1) && (eLog()<< Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl);
    841877          x.Zero();
    842878          y.Zero();
    843           y.x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
     879          y.x[abs(axis)-1] = World::getInstance().getDomain()[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
    844880          for (int i=1;i<faktor;i++) {  // then add this list with respective translation factor times
    845881            x.AddVector(&y); // per factor one cell width further
     
    864900            mol->Translate(&x);
    865901          }
    866           mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;
     902          World::getInstance().getDomain()[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;
    867903        }
    868904      }
     
    877913        if ((*ListRunner)->ActiveFlag) {
    878914        mol = *ListRunner;
    879         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     915        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    880916        CenterAtoms(mol);
    881917      }
     
    886922        if ((*ListRunner)->ActiveFlag) {
    887923        mol = *ListRunner;
    888         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     924        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    889925        AlignAtoms(periode, mol);
    890926      }
     
    895931        if ((*ListRunner)->ActiveFlag) {
    896932        mol = *ListRunner;
    897         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
     933        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
    898934        MirrorAtoms(mol);
    899935      }
     
    906942          double bonddistance;
    907943          clock_t start,end;
    908           Log() << Verbose(0) << "What's the maximum bond distance: ";
     944          DoLog(0) && (Log() << Verbose(0) << "What's the maximum bond distance: ");
    909945          cin >> bonddistance;
    910946          start = clock();
    911947          mol->CreateAdjacencyList(bonddistance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
    912948          end = clock();
    913           Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl;
     949          DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
    914950        }
    915951      break;
     
    919955        if ((*ListRunner)->ActiveFlag) {
    920956        mol = *ListRunner;
    921         Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl;
    922         Log() << Verbose(0) << "Enter translation vector." << endl;
    923         x.AskPosition(mol->cell_size,0);
     957        DoLog(0) && (Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl);
     958        DoLog(0) && (Log() << Verbose(0) << "Enter translation vector." << endl);
     959        x.AskPosition(World::getInstance().getDomain(),0);
    924960        mol->Center.AddVector((const Vector *)&x);
    925961     }
     
    948984  molecule *mol = NULL;
    949985
    950   Log() << Verbose(0) << "==========EDIT MOLECULES=====================" << endl;
    951   Log() << Verbose(0) << "c - create new molecule" << endl;
    952   Log() << Verbose(0) << "l - load molecule from xyz file" << endl;
    953   Log() << Verbose(0) << "n - change molecule's name" << endl;
    954   Log() << Verbose(0) << "N - give molecules filename" << endl;
    955   Log() << Verbose(0) << "p - parse atoms in xyz file into molecule" << endl;
    956   Log() << Verbose(0) << "r - remove a molecule" << endl;
    957   Log() << Verbose(0) << "all else - go back" << endl;
    958   Log() << Verbose(0) << "===============================================" << endl;
    959   Log() << Verbose(0) << "INPUT: ";
     986  DoLog(0) && (Log() << Verbose(0) << "==========EDIT MOLECULES=====================" << endl);
     987  DoLog(0) && (Log() << Verbose(0) << "c - create new molecule" << endl);
     988  DoLog(0) && (Log() << Verbose(0) << "l - load molecule from xyz file" << endl);
     989  DoLog(0) && (Log() << Verbose(0) << "n - change molecule's name" << endl);
     990  DoLog(0) && (Log() << Verbose(0) << "N - give molecules filename" << endl);
     991  DoLog(0) && (Log() << Verbose(0) << "p - parse atoms in xyz file into molecule" << endl);
     992  DoLog(0) && (Log() << Verbose(0) << "r - remove a molecule" << endl);
     993  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     994  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
     995  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    960996  cin >> choice;
    961997
    962998  switch (choice) {
    963999    default:
    964       Log() << Verbose(0) << "Not a valid choice." << endl;
     1000      DoLog(0) && (Log() << Verbose(0) << "Not a valid choice." << endl);
    9651001      break;
    9661002    case 'c':
    967       mol = new molecule(periode);
     1003      mol = World::getInstance().createMolecule();
    9681004      molecules->insert(mol);
    9691005      break;
     
    9721008      {
    9731009        char filename[MAXSTRINGSIZE];
    974         Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
    975         mol = new molecule(periode);
     1010        DoLog(0) && (Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl);
     1011        mol = World::getInstance().createMolecule();
    9761012        do {
    977           Log() << Verbose(0) << "Enter file name: ";
     1013          DoLog(0) && (Log() << Verbose(0) << "Enter file name: ");
    9781014          cin >> filename;
    9791015        } while (!mol->AddXYZFile(filename));
     
    9811017        // center at set box dimensions
    9821018        mol->CenterEdge(&center);
    983         mol->cell_size[0] = center.x[0];
    984         mol->cell_size[1] = 0;
    985         mol->cell_size[2] = center.x[1];
    986         mol->cell_size[3] = 0;
    987         mol->cell_size[4] = 0;
    988         mol->cell_size[5] = center.x[2];
     1019        double * const cell_size = World::getInstance().getDomain();
     1020        cell_size[0] = center.x[0];
     1021        cell_size[1] = 0;
     1022        cell_size[2] = center.x[1];
     1023        cell_size[3] = 0;
     1024        cell_size[4] = 0;
     1025        cell_size[5] = center.x[2];
    9891026        molecules->insert(mol);
    9901027      }
     
    9951032        char filename[MAXSTRINGSIZE];
    9961033        do {
    997           Log() << Verbose(0) << "Enter index of molecule: ";
     1034          DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule: ");
    9981035          cin >> nr;
    9991036          mol = molecules->ReturnIndex(nr);
    10001037        } while (mol == NULL);
    1001         Log() << Verbose(0) << "Enter name: ";
     1038        DoLog(0) && (Log() << Verbose(0) << "Enter name: ");
    10021039        cin >> filename;
    10031040        strcpy(mol->name, filename);
     
    10091046        char filename[MAXSTRINGSIZE];
    10101047        do {
    1011           Log() << Verbose(0) << "Enter index of molecule: ";
     1048          DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule: ");
    10121049          cin >> nr;
    10131050          mol = molecules->ReturnIndex(nr);
    10141051        } while (mol == NULL);
    1015         Log() << Verbose(0) << "Enter name: ";
     1052        DoLog(0) && (Log() << Verbose(0) << "Enter name: ");
    10161053        cin >> filename;
    10171054        mol->SetNameFromFilename(filename);
     
    10241061        mol = NULL;
    10251062        do {
    1026           Log() << Verbose(0) << "Enter index of molecule: ";
     1063          DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule: ");
    10271064          cin >> nr;
    10281065          mol = molecules->ReturnIndex(nr);
    10291066        } while (mol == NULL);
    1030         Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
     1067        DoLog(0) && (Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl);
    10311068        do {
    1032           Log() << Verbose(0) << "Enter file name: ";
     1069          DoLog(0) && (Log() << Verbose(0) << "Enter file name: ");
    10331070          cin >> filename;
    10341071        } while (!mol->AddXYZFile(filename));
     
    10381075
    10391076    case 'r':
    1040       Log() << Verbose(0) << "Enter index of molecule: ";
     1077      DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule: ");
    10411078      cin >> nr;
    10421079      count = 1;
     
    10611098  char choice;  // menu choice char
    10621099
    1063   Log() << Verbose(0) << "===========MERGE MOLECULES=====================" << endl;
    1064   Log() << Verbose(0) << "a - simple add of one molecule to another" << endl;
    1065   Log() << Verbose(0) << "e - embedding merge of two molecules" << endl;
    1066   Log() << Verbose(0) << "m - multi-merge of all molecules" << endl;
    1067   Log() << Verbose(0) << "s - scatter merge of two molecules" << endl;
    1068   Log() << Verbose(0) << "t - simple merge of two molecules" << endl;
    1069   Log() << Verbose(0) << "all else - go back" << endl;
    1070   Log() << Verbose(0) << "===============================================" << endl;
    1071   Log() << Verbose(0) << "INPUT: ";
     1100  DoLog(0) && (Log() << Verbose(0) << "===========MERGE MOLECULES=====================" << endl);
     1101  DoLog(0) && (Log() << Verbose(0) << "a - simple add of one molecule to another" << endl);
     1102  DoLog(0) && (Log() << Verbose(0) << "b - count the number of bonds of two elements" << endl);
     1103  DoLog(0) && (Log() << Verbose(0) << "B - count the number of bonds of three elements " << endl);
     1104  DoLog(0) && (Log() << Verbose(0) << "e - embedding merge of two molecules" << endl);
     1105  DoLog(0) && (Log() << Verbose(0) << "h - count the number of hydrogen bonds" << endl);
     1106  DoLog(0) && (Log() << Verbose(0) << "b - count the number of hydrogen bonds" << endl);
     1107  DoLog(0) && (Log() << Verbose(0) << "m - multi-merge of all molecules" << endl);
     1108  DoLog(0) && (Log() << Verbose(0) << "s - scatter merge of two molecules" << endl);
     1109  DoLog(0) && (Log() << Verbose(0) << "t - simple merge of two molecules" << endl);
     1110  DoLog(0) && (Log() << Verbose(0) << "all else - go back" << endl);
     1111  DoLog(0) && (Log() << Verbose(0) << "===============================================" << endl);
     1112  DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
    10721113  cin >> choice;
    10731114
    10741115  switch (choice) {
    10751116    default:
    1076       Log() << Verbose(0) << "Not a valid choice." << endl;
     1117      DoLog(0) && (Log() << Verbose(0) << "Not a valid choice." << endl);
    10771118      break;
    10781119
     
    10831124        {
    10841125          do {
    1085             Log() << Verbose(0) << "Enter index of destination molecule: ";
     1126            DoLog(0) && (Log() << Verbose(0) << "Enter index of destination molecule: ");
    10861127            cin >> dest;
    10871128            destmol = molecules->ReturnIndex(dest);
    10881129          } while ((destmol == NULL) && (dest != -1));
    10891130          do {
    1090             Log() << Verbose(0) << "Enter index of source molecule to add from: ";
     1131            DoLog(0) && (Log() << Verbose(0) << "Enter index of source molecule to add from: ");
    10911132            cin >> src;
    10921133            srcmol = molecules->ReturnIndex(src);
     
    10981139      break;
    10991140
     1141    case 'b':
     1142      {
     1143        const int nr = 2;
     1144        char *names[nr] = {"first", "second"};
     1145        int Z[nr];
     1146        element *elements[nr];
     1147        for (int i=0;i<nr;i++) {
     1148          Z[i] = 0;
     1149          do {
     1150            cout << "Enter " << names[i] << " element: ";
     1151            cin >> Z[i];
     1152          } while ((Z[i] <= 0) && (Z[i] > MAX_ELEMENTS));
     1153          elements[i] = periode->FindElement(Z[i]);
     1154        }
     1155        const int count = CountBondsOfTwo(molecules, elements[0], elements[1]);
     1156        cout << endl << "There are " << count << " ";
     1157        for (int i=0;i<nr;i++) {
     1158          if (i==0)
     1159            cout << elements[i]->symbol;
     1160          else
     1161            cout << "-" << elements[i]->symbol;
     1162        }
     1163        cout << " bonds." << endl;
     1164      }
     1165    break;
     1166
     1167    case 'B':
     1168      {
     1169        const int nr = 3;
     1170        char *names[nr] = {"first", "second", "third"};
     1171        int Z[nr];
     1172        element *elements[nr];
     1173        for (int i=0;i<nr;i++) {
     1174          Z[i] = 0;
     1175          do {
     1176            cout << "Enter " << names[i] << " element: ";
     1177            cin >> Z[i];
     1178          } while ((Z[i] <= 0) && (Z[i] > MAX_ELEMENTS));
     1179          elements[i] = periode->FindElement(Z[i]);
     1180        }
     1181        const int count = CountBondsOfThree(molecules, elements[0], elements[1], elements[2]);
     1182        cout << endl << "There are " << count << " ";
     1183        for (int i=0;i<nr;i++) {
     1184          if (i==0)
     1185            cout << elements[i]->symbol;
     1186          else
     1187            cout << "-" << elements[i]->symbol;
     1188        }
     1189        cout << " bonds." << endl;
     1190      }
     1191    break;
     1192
    11001193    case 'e':
    11011194      {
     
    11031196        molecule *srcmol = NULL, *destmol = NULL;
    11041197        do {
    1105           Log() << Verbose(0) << "Enter index of matrix molecule (the variable one): ";
     1198          DoLog(0) && (Log() << Verbose(0) << "Enter index of matrix molecule (the variable one): ");
    11061199          cin >> src;
    11071200          srcmol = molecules->ReturnIndex(src);
    11081201        } while ((srcmol == NULL) && (src != -1));
    11091202        do {
    1110           Log() << Verbose(0) << "Enter index of molecule to merge into (the fixed one): ";
     1203          DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule to merge into (the fixed one): ");
    11111204          cin >> dest;
    11121205          destmol = molecules->ReturnIndex(dest);
     
    11171210      break;
    11181211
     1212    case 'h':
     1213      {
     1214        int Z;
     1215        cout << "Please enter interface element: ";
     1216        cin >> Z;
     1217        element * const InterfaceElement = periode->FindElement(Z);
     1218        cout << endl << "There are " << CountHydrogenBridgeBonds(molecules, InterfaceElement) << " hydrogen bridges with connections to " << (InterfaceElement != 0 ? InterfaceElement->name : "None") << "." << endl;
     1219      }
     1220      break;
     1221
    11191222    case 'm':
    11201223      {
     
    11221225        molecule *mol = NULL;
    11231226        do {
    1124           Log() << Verbose(0) << "Enter index of molecule to merge into: ";
     1227          DoLog(0) && (Log() << Verbose(0) << "Enter index of molecule to merge into: ");
    11251228          cin >> nr;
    11261229          mol = molecules->ReturnIndex(nr);
     
    11391242
    11401243    case 's':
    1141       Log() << Verbose(0) << "Not implemented yet." << endl;
     1244      DoLog(0) && (Log() << Verbose(0) << "Not implemented yet." << endl);
    11421245      break;
    11431246
     
    11481251        {
    11491252          do {
    1150             Log() << Verbose(0) << "Enter index of destination molecule: ";
     1253            DoLog(0) && (Log() << Verbose(0) << "Enter index of destination molecule: ");
    11511254            cin >> dest;
    11521255            destmol = molecules->ReturnIndex(dest);
    11531256          } while ((destmol == NULL) && (dest != -1));
    11541257          do {
    1155             Log() << Verbose(0) << "Enter index of source molecule to merge into: ";
     1258            DoLog(0) && (Log() << Verbose(0) << "Enter index of source molecule to merge into: ");
    11561259            cin >> src;
    11571260            srcmol = molecules->ReturnIndex(src);
     
    11811284    mol = (molecules->ListOfMolecules.front())->CopyMolecule();
    11821285  else {
    1183     eLog() << Verbose(0) << "I don't have anything to test on ... ";
     1286    DoeLog(0) && (eLog()<< Verbose(0) << "I don't have anything to test on ... ");
    11841287    performCriticalExit();
    11851288    return;
     
    11881291
    11891292  // generate some KeySets
    1190   Log() << Verbose(0) << "Generating KeySets." << endl;
     1293  DoLog(0) && (Log() << Verbose(0) << "Generating KeySets." << endl);
    11911294  KeySet TestSets[mol->AtomCount+1];
    11921295  i=1;
     
    11981301    i++;
    11991302  }
    1200   Log() << Verbose(0) << "Testing insertion of already present item in KeySets." << endl;
     1303  DoLog(0) && (Log() << Verbose(0) << "Testing insertion of already present item in KeySets." << endl);
    12011304  KeySetTestPair test;
    12021305  test = TestSets[mol->AtomCount-1].insert(Walker->nr);
    12031306  if (test.second) {
    1204     Log() << Verbose(1) << "Insertion worked?!" << endl;
     1307    DoLog(1) && (Log() << Verbose(1) << "Insertion worked?!" << endl);
    12051308  } else {
    1206     Log() << Verbose(1) << "Insertion rejected: Present object is " << (*test.first) << "." << endl;
     1309    DoLog(1) && (Log() << Verbose(1) << "Insertion rejected: Present object is " << (*test.first) << "." << endl);
    12071310  }
    12081311  TestSets[mol->AtomCount].insert(mol->end->previous->nr);
     
    12101313
    12111314  // constructing Graph structure
    1212   Log() << Verbose(0) << "Generating Subgraph class." << endl;
     1315  DoLog(0) && (Log() << Verbose(0) << "Generating Subgraph class." << endl);
    12131316  Graph Subgraphs;
    12141317
    12151318  // insert KeySets into Subgraphs
    1216   Log() << Verbose(0) << "Inserting KeySets into Subgraph class." << endl;
     1319  DoLog(0) && (Log() << Verbose(0) << "Inserting KeySets into Subgraph class." << endl);
    12171320  for (int j=0;j<mol->AtomCount;j++) {
    12181321    Subgraphs.insert(GraphPair (TestSets[j],pair<int, double>(counter++, 1.)));
    12191322  }
    1220   Log() << Verbose(0) << "Testing insertion of already present item in Subgraph." << endl;
     1323  DoLog(0) && (Log() << Verbose(0) << "Testing insertion of already present item in Subgraph." << endl);
    12211324  GraphTestPair test2;
    12221325  test2 = Subgraphs.insert(GraphPair (TestSets[mol->AtomCount],pair<int, double>(counter++, 1.)));
    12231326  if (test2.second) {
    1224     Log() << Verbose(1) << "Insertion worked?!" << endl;
     1327    DoLog(1) && (Log() << Verbose(1) << "Insertion worked?!" << endl);
    12251328  } else {
    1226     Log() << Verbose(1) << "Insertion rejected: Present object is " << (*(test2.first)).second.first << "." << endl;
     1329    DoLog(1) && (Log() << Verbose(1) << "Insertion rejected: Present object is " << (*(test2.first)).second.first << "." << endl);
    12271330  }
    12281331
    12291332  // show graphs
    1230   Log() << Verbose(0) << "Showing Subgraph's contents, checking that it's sorted." << endl;
     1333  DoLog(0) && (Log() << Verbose(0) << "Showing Subgraph's contents, checking that it's sorted." << endl);
    12311334  Graph::iterator A = Subgraphs.begin();
    12321335  while (A !=  Subgraphs.end()) {
    1233     Log() << Verbose(0) << (*A).second.first << ": ";
     1336    DoLog(0) && (Log() << Verbose(0) << (*A).second.first << ": ");
    12341337    KeySet::iterator key = (*A).first.begin();
    12351338    comp = -1;
    12361339    while (key != (*A).first.end()) {
    12371340      if ((*key) > comp)
    1238         Log() << Verbose(0) << (*key) << " ";
     1341        DoLog(0) && (Log() << Verbose(0) << (*key) << " ");
    12391342      else
    1240         Log() << Verbose(0) << (*key) << "! ";
     1343        DoLog(0) && (Log() << Verbose(0) << (*key) << "! ");
    12411344      comp = (*key);
    12421345      key++;
    12431346    }
    1244     Log() << Verbose(0) << endl;
     1347    DoLog(0) && (Log() << Verbose(0) << endl);
    12451348    A++;
    12461349  }
     
    12491352
    12501353#endif
     1354
     1355/** Tries given filename or standard on saving the config file.
     1356 * \param *ConfigFileName name of file
     1357 * \param *configuration pointer to configuration structure with all the values
     1358 * \param *periode pointer to periodentafel structure with all the elements
     1359 * \param *molecules list of molecules structure with all the atoms and coordinates
     1360 */
     1361static void SaveConfig(char *ConfigFileName, config *configuration, periodentafel *periode, MoleculeListClass *molecules)
     1362{
     1363  char filename[MAXSTRINGSIZE];
     1364  ofstream output;
     1365  molecule *mol = World::getInstance().createMolecule();
     1366  mol->SetNameFromFilename(ConfigFileName);
     1367
     1368  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
     1369    DoeLog(2) && (eLog()<< Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl);
     1370  }
     1371
     1372
     1373  // first save as PDB data
     1374  if (ConfigFileName != NULL)
     1375    strcpy(filename, ConfigFileName);
     1376  if (output == NULL)
     1377    strcpy(filename,"main_pcp_linux");
     1378  DoLog(0) && (Log() << Verbose(0) << "Saving as pdb input ");
     1379  if (configuration->SavePDB(filename, molecules))
     1380    DoLog(0) && (Log() << Verbose(0) << "done." << endl);
     1381  else
     1382    DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1383
     1384  // then save as tremolo data file
     1385  if (ConfigFileName != NULL)
     1386    strcpy(filename, ConfigFileName);
     1387  if (output == NULL)
     1388    strcpy(filename,"main_pcp_linux");
     1389  DoLog(0) && (Log() << Verbose(0) << "Saving as tremolo data input ");
     1390  if (configuration->SaveTREMOLO(filename, molecules))
     1391    DoLog(0) && (Log() << Verbose(0) << "done." << endl);
     1392  else
     1393    DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1394
     1395  // translate each to its center and merge all molecules in MoleculeListClass into this molecule
     1396  int N = molecules->ListOfMolecules.size();
     1397  int *src = new int[N];
     1398  N=0;
     1399  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
     1400    src[N++] = (*ListRunner)->IndexNr;
     1401    (*ListRunner)->Translate(&(*ListRunner)->Center);
     1402  }
     1403  molecules->SimpleMultiAdd(mol, src, N);
     1404  delete[](src);
     1405
     1406  // ... and translate back
     1407  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
     1408    (*ListRunner)->Center.Scale(-1.);
     1409    (*ListRunner)->Translate(&(*ListRunner)->Center);
     1410    (*ListRunner)->Center.Scale(-1.);
     1411  }
     1412
     1413  DoLog(0) && (Log() << Verbose(0) << "Storing configuration ... " << endl);
     1414  // get correct valence orbitals
     1415  mol->CalculateOrbitals(*configuration);
     1416  configuration->InitMaxMinStopStep = configuration->MaxMinStopStep = configuration->MaxPsiDouble;
     1417  if (ConfigFileName != NULL) { // test the file name
     1418    strcpy(filename, ConfigFileName);
     1419    output.open(filename, ios::trunc);
     1420  } else if (strlen(configuration->configname) != 0) {
     1421    strcpy(filename, configuration->configname);
     1422    output.open(configuration->configname, ios::trunc);
     1423    } else {
     1424      strcpy(filename, DEFAULTCONFIG);
     1425      output.open(DEFAULTCONFIG, ios::trunc);
     1426    }
     1427  output.close();
     1428  output.clear();
     1429  DoLog(0) && (Log() << Verbose(0) << "Saving of config file ");
     1430  if (configuration->Save(filename, periode, mol))
     1431    DoLog(0) && (Log() << Verbose(0) << "successful." << endl);
     1432  else
     1433    DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1434
     1435  // and save to xyz file
     1436  if (ConfigFileName != NULL) {
     1437    strcpy(filename, ConfigFileName);
     1438    strcat(filename, ".xyz");
     1439    output.open(filename, ios::trunc);
     1440  }
     1441  if (output == NULL) {
     1442    strcpy(filename,"main_pcp_linux");
     1443    strcat(filename, ".xyz");
     1444    output.open(filename, ios::trunc);
     1445  }
     1446  DoLog(0) && (Log() << Verbose(0) << "Saving of XYZ file ");
     1447  if (mol->MDSteps <= 1) {
     1448    if (mol->OutputXYZ(&output))
     1449      DoLog(0) && (Log() << Verbose(0) << "successful." << endl);
     1450    else
     1451      DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1452  } else {
     1453    if (mol->OutputTrajectoriesXYZ(&output))
     1454      DoLog(0) && (Log() << Verbose(0) << "successful." << endl);
     1455    else
     1456      DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1457  }
     1458  output.close();
     1459  output.clear();
     1460
     1461  // and save as MPQC configuration
     1462  if (ConfigFileName != NULL)
     1463    strcpy(filename, ConfigFileName);
     1464  if (output == NULL)
     1465    strcpy(filename,"main_pcp_linux");
     1466  DoLog(0) && (Log() << Verbose(0) << "Saving as mpqc input ");
     1467  if (configuration->SaveMPQC(filename, mol))
     1468    DoLog(0) && (Log() << Verbose(0) << "done." << endl);
     1469  else
     1470    DoLog(0) && (Log() << Verbose(0) << "failed." << endl);
     1471
     1472  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
     1473    DoeLog(2) && (eLog()<< Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl);
     1474  }
     1475
     1476  World::getInstance().destroyMolecule(mol);
     1477};
    12511478
    12521479/** Parses the command line options.
     
    12751502  enum ConfigStatus configPresent = absent;
    12761503  clock_t start,end;
     1504  double MaxDistance = -1;
    12771505  int argptr;
    12781506  molecule *mol = NULL;
     
    12861514    do {
    12871515      if (argv[argptr][0] == '-') {
    1288         Log() << Verbose(0) << "Recognized command line argument: " << argv[argptr][1] << ".\n";
     1516        DoLog(0) && (Log() << Verbose(0) << "Recognized command line argument: " << argv[argptr][1] << ".\n");
    12891517        argptr++;
    12901518        switch(argv[argptr-1][1]) {
     
    12921520          case 'H':
    12931521          case '?':
    1294             Log() << Verbose(0) << "MoleCuilder suite" << endl << "==================" << endl << endl;
    1295             Log() << Verbose(0) << "Usage: " << argv[0] << "[config file] [-{acefpsthH?vfrp}] [further arguments]" << endl;
    1296             Log() << Verbose(0) << "or simply " << argv[0] << " without arguments for interactive session." << endl;
    1297             Log() << Verbose(0) << "\t-a Z x1 x2 x3\tAdd new atom of element Z at coordinates (x1,x2,x3)." << endl;
    1298             Log() << Verbose(0) << "\t-A <source>\tCreate adjacency list from bonds parsed from 'dbond'-style file." <<endl;
    1299             Log() << Verbose(0) << "\t-b xx xy xz yy yz zz\tCenter atoms in domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl;
    1300             Log() << Verbose(0) << "\t-B xx xy xz yy yz zz\tBound atoms by domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl;
    1301             Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl;
    1302             Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
    1303             Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    1304             Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
    1305             Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl;
    1306             Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    1307             Log() << Verbose(0) << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl;
    1308             Log() << Verbose(0) << "\t-F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl;
    1309             Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    1310             Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
    1311             Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl;
    1312             Log() << Verbose(0) << "\t-j\t<path> Store all bonds to file." << endl;
    1313             Log() << Verbose(0) << "\t-J\t<path> Store adjacency per atom to file." << endl;
    1314             Log() << Verbose(0) << "\t-L <step0> <step1> <prefix>\tStore a linear interpolation between two configurations <step0> and <step1> into single config files with prefix <prefix> and as Trajectories into the current config file." << endl;
    1315             Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
    1316             Log() << Verbose(0) << "\t-M <basis>\tSetting basis to store to MPQC config files." << endl;
    1317             Log() << Verbose(0) << "\t-n\tFast parsing (i.e. no trajectories are looked for)." << endl;
    1318             Log() << Verbose(0) << "\t-N <radius> <file>\tGet non-convex-envelope." << endl;
    1319             Log() << Verbose(0) << "\t-o <out>\tGet volume of the convex envelope (and store to tecplot file)." << endl;
    1320             Log() << Verbose(0) << "\t-O\tCenter atoms in origin." << endl;
    1321             Log() << Verbose(0) << "\t-p <file>\tParse given xyz file and create raw config file from it." << endl;
    1322             Log() << Verbose(0) << "\t-P <file>\tParse given forces file and append as an MD step to config file via Verlet." << endl;
    1323             Log() << Verbose(0) << "\t-r <id>\t\tRemove an atom with given id." << endl;
    1324             Log() << Verbose(0) << "\t-R <id> <radius>\t\tRemove all atoms out of sphere around a given one." << endl;
    1325             Log() << Verbose(0) << "\t-s x1 x2 x3\tScale all atom coordinates by this vector (x1,x2,x3)." << endl;
    1326             Log() << Verbose(0) << "\t-S <file> Store temperatures from the config file in <file>." << endl;
    1327             Log() << Verbose(0) << "\t-t x1 x2 x3\tTranslate all atoms by this vector (x1,x2,x3)." << endl;
    1328             Log() << Verbose(0) << "\t-T x1 x2 x3\tTranslate periodically all atoms by this vector (x1,x2,x3)." << endl;
    1329             Log() << Verbose(0) << "\t-u rho\tsuspend in water solution and output necessary cell lengths, average density rho and repetition." << endl;
    1330             Log() << Verbose(0) << "\t-v\t\tsets verbosity (more is more)." << endl;
    1331             Log() << Verbose(0) << "\t-V\t\tGives version information." << endl;
    1332             Log() << Verbose(0) << "Note: config files must not begin with '-' !" << endl;
     1522            DoLog(0) && (Log() << Verbose(0) << "MoleCuilder suite" << endl << "==================" << endl << endl);
     1523            DoLog(0) && (Log() << Verbose(0) << "Usage: " << argv[0] << "[config file] [-{acefpsthH?vfrp}] [further arguments]" << endl);
     1524            DoLog(0) && (Log() << Verbose(0) << "or simply " << argv[0] << " without arguments for interactive session." << endl);
     1525            DoLog(0) && (Log() << Verbose(0) << "\t-a Z x1 x2 x3\tAdd new atom of element Z at coordinates (x1,x2,x3)." << endl);
     1526            DoLog(0) && (Log() << Verbose(0) << "\t-A <source>\tCreate adjacency list from bonds parsed from 'dbond'-style file." <<endl);
     1527            DoLog(0) && (Log() << Verbose(0) << "\t-b xx xy xz yy yz zz\tCenter atoms in domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl);
     1528            DoLog(0) && (Log() << Verbose(0) << "\t-B xx xy xz yy yz zz\tBound atoms by domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl);
     1529            DoLog(0) && (Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl);
     1530            DoLog(0) && (Log() << Verbose(0) << "\t-C <type> [params] <output> <bin output> <BinWidth> <BinStart> <BinEnd>\tPair Correlation analysis." << endl);
     1531            DoLog(0) && (Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl);
     1532            DoLog(0) && (Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl);
     1533            DoLog(0) && (Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl);
     1534            DoLog(0) && (Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl);
     1535            DoLog(0) && (Log() << Verbose(0) << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl);
     1536            DoLog(0) && (Log() << Verbose(0) << "\t-F <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl);
     1537            DoLog(0) && (Log() << Verbose(0) << "\t-FF <MaxDistance> <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl);
     1538            DoLog(0) && (Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl);
     1539            DoLog(0) && (Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl);
     1540            DoLog(0) && (Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl);
     1541            DoLog(0) && (Log() << Verbose(0) << "\t-j\t<path> Store all bonds to file." << endl);
     1542            DoLog(0) && (Log() << Verbose(0) << "\t-J\t<path> Store adjacency per atom to file." << endl);
     1543            DoLog(0) && (Log() << Verbose(0) << "\t-L <step0> <step1> <prefix>\tStore a linear interpolation between two configurations <step0> and <step1> into single config files with prefix <prefix> and as Trajectories into the current config file." << endl);
     1544            DoLog(0) && (Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl);
     1545            DoLog(0) && (Log() << Verbose(0) << "\t-M <basis>\tSetting basis to store to MPQC config files." << endl);
     1546            DoLog(0) && (Log() << Verbose(0) << "\t-n\tFast parsing (i.e. no trajectories are looked for)." << endl);
     1547            DoLog(0) && (Log() << Verbose(0) << "\t-N <radius> <file>\tGet non-convex-envelope." << endl);
     1548            DoLog(0) && (Log() << Verbose(0) << "\t-o <out>\tGet volume of the convex envelope (and store to tecplot file)." << endl);
     1549            DoLog(0) && (Log() << Verbose(0) << "\t-O\tCenter atoms in origin." << endl);
     1550            DoLog(0) && (Log() << Verbose(0) << "\t-p <file>\tParse given xyz file and create raw config file from it." << endl);
     1551            DoLog(0) && (Log() << Verbose(0) << "\t-P <file>\tParse given forces file and append as an MD step to config file via Verlet." << endl);
     1552            DoLog(0) && (Log() << Verbose(0) << "\t-r <id>\t\tRemove an atom with given id." << endl);
     1553            DoLog(0) && (Log() << Verbose(0) << "\t-R <id> <radius>\t\tRemove all atoms out of sphere around a given one." << endl);
     1554            DoLog(0) && (Log() << Verbose(0) << "\t-s x1 x2 x3\tScale all atom coordinates by this vector (x1,x2,x3)." << endl);
     1555            DoLog(0) && (Log() << Verbose(0) << "\t-S <file> Store temperatures from the config file in <file>." << endl);
     1556            DoLog(0) && (Log() << Verbose(0) << "\t-t x1 x2 x3\tTranslate all atoms by this vector (x1,x2,x3)." << endl);
     1557            DoLog(0) && (Log() << Verbose(0) << "\t-T x1 x2 x3\tTranslate periodically all atoms by this vector (x1,x2,x3)." << endl);
     1558            DoLog(0) && (Log() << Verbose(0) << "\t-u rho\tsuspend in water solution and output necessary cell lengths, average density rho and repetition." << endl);
     1559            DoLog(0) && (Log() << Verbose(0) << "\t-v\t\tsets verbosity (more is more)." << endl);
     1560            DoLog(0) && (Log() << Verbose(0) << "\t-V\t\tGives version information." << endl);
     1561            DoLog(0) && (Log() << Verbose(0) << "\t-X\t\tset default name of a molecule." << endl);
     1562            DoLog(0) && (Log() << Verbose(0) << "Note: config files must not begin with '-' !" << endl);
    13331563            return (1);
    13341564            break;
     
    13381568            }
    13391569            setVerbosity(verbosity);
    1340             Log() << Verbose(0) << "Setting verbosity to " << verbosity << "." << endl;
     1570            DoLog(0) && (Log() << Verbose(0) << "Setting verbosity to " << verbosity << "." << endl);
    13411571            break;
    13421572          case 'V':
    1343             Log() << Verbose(0) << argv[0] << " " << VERSIONSTRING << endl;
    1344             Log() << Verbose(0) << "Build your own molecule position set." << endl;
     1573            DoLog(0) && (Log() << Verbose(0) << argv[0] << " " << VERSIONSTRING << endl);
     1574            DoLog(0) && (Log() << Verbose(0) << "Build your own molecule position set." << endl);
    13451575            return (1);
     1576            break;
     1577          case 'B':
     1578            if (ExitFlag == 0) ExitFlag = 1;
     1579            if ((argptr+5 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) ) {
     1580              ExitFlag = 255;
     1581              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for bounding in box: -B <xx> <xy> <xz> <yy> <yz> <zz>" << endl);
     1582              performCriticalExit();
     1583            } else {
     1584              SaveFlag = true;
     1585              j = -1;
     1586              DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl);
     1587              double * const cell_size = World::getInstance().getDomain();
     1588              for (int i=0;i<6;i++) {
     1589                cell_size[i] = atof(argv[argptr+i]);
     1590              }
     1591              argptr+=6;
     1592            }
    13461593            break;
    13471594          case 'e':
    13481595            if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1349               eLog() << Verbose(0) << "Not enough or invalid arguments for specifying element db: -e <db file>" << endl;
     1596              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for specifying element db: -e <db file>" << endl);
    13501597              performCriticalExit();
    13511598            } else {
    1352               Log() << Verbose(0) << "Using " << argv[argptr] << " as elements database." << endl;
     1599              DoLog(0) && (Log() << Verbose(0) << "Using " << argv[argptr] << " as elements database." << endl);
    13531600              strncpy (configuration.databasepath, argv[argptr], MAXSTRINGSIZE-1);
    13541601              argptr+=1;
     
    13571604          case 'g':
    13581605            if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1359               eLog() << Verbose(0) << "Not enough or invalid arguments for specifying bond length table: -g <table file>" << endl;
     1606              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for specifying bond length table: -g <table file>" << endl);
    13601607              performCriticalExit();
    13611608            } else {
    13621609              BondGraphFileName = argv[argptr];
    1363               Log() << Verbose(0) << "Using " << BondGraphFileName << " as bond length table." << endl;
     1610              DoLog(0) && (Log() << Verbose(0) << "Using " << BondGraphFileName << " as bond length table." << endl);
    13641611              argptr+=1;
    13651612            }
    13661613            break;
    13671614          case 'n':
    1368             Log() << Verbose(0) << "I won't parse trajectories." << endl;
     1615            DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl);
    13691616            configuration.FastParsing = true;
     1617            break;
     1618          case 'X':
     1619            {
     1620              World::getInstance().setDefaultName(argv[argptr]);
     1621              DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << *World::getInstance().getDefaultName() << "." << endl);
     1622            }
    13701623            break;
    13711624          default:   // no match? Step on
     
    13791632    // 3a. Parse the element database
    13801633    if (periode->LoadPeriodentafel(configuration.databasepath)) {
    1381       Log() << Verbose(0) << "Element list loaded successfully." << endl;
     1634      DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl);
    13821635      //periode->Output();
    13831636    } else {
    1384       Log() << Verbose(0) << "Element list loading failed." << endl;
     1637      DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl);
    13851638      return 1;
    13861639    }
     
    13881641    if (argv[1][0] != '-') {
    13891642      // simply create a new molecule, wherein the config file is loaded and the manipulation takes place
    1390       Log() << Verbose(0) << "Config file given." << endl;
     1643      DoLog(0) && (Log() << Verbose(0) << "Config file given." << endl);
    13911644      test.open(argv[1], ios::in);
    13921645      if (test == NULL) {
     
    13941647        output.open(argv[1], ios::out);
    13951648        if (output == NULL) {
    1396           Log() << Verbose(1) << "Specified config file " << argv[1] << " not found." << endl;
     1649          DoLog(1) && (Log() << Verbose(1) << "Specified config file " << argv[1] << " not found." << endl);
    13971650          configPresent = absent;
    13981651        } else {
    1399           Log() << Verbose(0) << "Empty configuration file." << endl;
     1652          DoLog(0) && (Log() << Verbose(0) << "Empty configuration file." << endl);
    14001653          ConfigFileName = argv[1];
    14011654          configPresent = empty;
     
    14051658        test.close();
    14061659        ConfigFileName = argv[1];
    1407         Log() << Verbose(1) << "Specified config file found, parsing ... ";
     1660        DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... ");
    14081661        switch (configuration.TestSyntax(ConfigFileName, periode)) {
    14091662          case 1:
    1410             Log() << Verbose(0) << "new syntax." << endl;
     1663            DoLog(0) && (Log() << Verbose(0) << "new syntax." << endl);
    14111664            configuration.Load(ConfigFileName, BondGraphFileName, periode, molecules);
    14121665            configPresent = present;
    14131666            break;
    14141667          case 0:
    1415             Log() << Verbose(0) << "old syntax." << endl;
     1668            DoLog(0) && (Log() << Verbose(0) << "old syntax." << endl);
    14161669            configuration.LoadOld(ConfigFileName, BondGraphFileName, periode, molecules);
    14171670            configPresent = present;
    14181671            break;
    14191672          default:
    1420             Log() << Verbose(0) << "Unknown syntax or empty, yet present file." << endl;
     1673            DoLog(0) && (Log() << Verbose(0) << "Unknown syntax or empty, yet present file." << endl);
    14211674            configPresent = empty;
    14221675       }
     
    14421695       configuration.BG = new BondGraph(configuration.GetIsAngstroem());
    14431696       if ((!BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
    1444          Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
     1697         DoLog(0) && (Log() << Verbose(0) << "Bond length table loaded successfully." << endl);
    14451698       } else {
    1446          eLog() << Verbose(1) << "Bond length table loading failed." << endl;
     1699         DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table loading failed." << endl);
    14471700       }
    14481701     }
     
    14511704    argptr = 1;
    14521705    do {
    1453       Log() << Verbose(0) << "Current Command line argument: " << argv[argptr] << "." << endl;
     1706      DoLog(0) && (Log() << Verbose(0) << "Current Command line argument: " << argv[argptr] << "." << endl);
    14541707      if (argv[argptr][0] == '-') {
    14551708        argptr++;
     
    14601713              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    14611714                ExitFlag = 255;
    1462                 eLog() << Verbose(0) << "Not enough arguments for parsing: -p <xyz file>" << endl;
     1715                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough arguments for parsing: -p <xyz file>" << endl);
    14631716                performCriticalExit();
    14641717              } else {
    14651718                SaveFlag = true;
    1466                 Log() << Verbose(1) << "Parsing xyz file for new atoms." << endl;
     1719                DoLog(1) && (Log() << Verbose(1) << "Parsing xyz file for new atoms." << endl);
    14671720                if (!mol->AddXYZFile(argv[argptr]))
    1468                   Log() << Verbose(2) << "File not found." << endl;
     1721                  DoLog(2) && (Log() << Verbose(2) << "File not found." << endl);
    14691722                else {
    1470                   Log() << Verbose(2) << "File found and parsed." << endl;
     1723                  DoLog(2) && (Log() << Verbose(2) << "File found and parsed." << endl);
    14711724                  configPresent = present;
    14721725                }
     
    14771730              if ((argptr >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3]))) {
    14781731                ExitFlag = 255;
    1479                 eLog() << Verbose(0) << "Not enough or invalid arguments for adding atom: -a <element> <x> <y> <z>" << endl;
     1732                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for adding atom: -a <element> <x> <y> <z>" << endl);
    14801733                performCriticalExit();
    14811734              } else {
     
    14851738                first->type = periode->FindElement(atoi(argv[argptr]));
    14861739                if (first->type != NULL)
    1487                   Log() << Verbose(2) << "found element " << first->type->name << endl;
     1740                  DoLog(2) && (Log() << Verbose(2) << "found element " << first->type->name << endl);
    14881741                for (int i=NDIM;i--;)
    14891742                  first->x.x[i] = atof(argv[argptr+1+i]);
     
    14931746                    configPresent = present;
    14941747                } else
    1495                   eLog() << Verbose(1) << "Could not find the specified element." << endl;
     1748                  DoeLog(1) && (eLog()<< Verbose(1) << "Could not find the specified element." << endl);
    14961749                argptr+=4;
    14971750              }
     
    15061759              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    15071760                ExitFlag = 255;
    1508                 eLog() << Verbose(0) << "Not enough or invalid arguments given for setting MPQC basis: -B <basis name>" << endl;
     1761                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting MPQC basis: -B <basis name>" << endl);
    15091762                performCriticalExit();
    15101763              } else {
    15111764                configuration.basis = argv[argptr];
    1512                 Log() << Verbose(1) << "Setting MPQC basis to " << configuration.basis << "." << endl;
     1765                DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration.basis << "." << endl);
    15131766                argptr+=1;
    15141767              }
     
    15171770              if (ExitFlag == 0) ExitFlag = 1;
    15181771              {
    1519                 Log() << Verbose(1) << "Depth-First-Search Analysis." << endl;
     1772                DoLog(1) && (Log() << Verbose(1) << "Depth-First-Search Analysis." << endl);
    15201773                MoleculeLeafClass *Subgraphs = NULL;      // list of subgraphs from DFS analysis
    15211774                int *MinimumRingSize = new int[mol->AtomCount];
     
    15481801              break;
    15491802            case 'I':
    1550               Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
     1803              DoLog(1) && (Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl);
    15511804              // @TODO rather do the dissection afterwards
    15521805              molecules->DissectMoleculeIntoConnectedSubgraphs(periode, &configuration);
     
    15591812                  }
    15601813              }
    1561               if (mol == NULL) {
     1814              if ((mol == NULL) && (!molecules->ListOfMolecules.empty())) {
    15621815                mol = *(molecules->ListOfMolecules.begin());
    1563                 mol->ActiveFlag = true;
     1816                if (mol != NULL)
     1817                  mol->ActiveFlag = true;
    15641818              }
    15651819              break;
    15661820            case 'C':
    1567               if (ExitFlag == 0) ExitFlag = 1;
    1568               if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr][0] == '-') || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-')) {
    1569                 ExitFlag = 255;
    1570                 eLog() << Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C <Z> <output> <bin output>" << endl;
    1571                 performCriticalExit();
    1572               } else {
    1573                 ofstream output(argv[argptr+1]);
    1574                 ofstream binoutput(argv[argptr+2]);
    1575                 const double radius = 5.;
    1576 
    1577                 // get the boundary
    1578                 class molecule *Boundary = NULL;
    1579                 class Tesselation *TesselStruct = NULL;
    1580                 const LinkedCell *LCList = NULL;
    1581                 // find biggest molecule
    1582                 int counter  = 0;
    1583                 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1584                   if ((Boundary == NULL) || (Boundary->AtomCount < (*BigFinder)->AtomCount)) {
    1585                     Boundary = *BigFinder;
     1821              {
     1822                int ranges[3] = {1, 1, 1};
     1823                bool periodic = (argv[argptr-1][2] =='p');
     1824                if (ExitFlag == 0) ExitFlag = 1;
     1825                if ((argptr >= argc)) {
     1826                  ExitFlag = 255;
     1827                  DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C[p] <type: E/P/S> [more params] <output> <bin output> <BinStart> <BinEnd>" << endl);
     1828                  performCriticalExit();
     1829                } else {
     1830                  switch(argv[argptr][0]) {
     1831                    case 'E':
     1832                      {
     1833                        if ((argptr+6 >= argc) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+5])) || (!IsValidNumber(argv[argptr+6])) || (!IsValidNumber(argv[argptr+2])) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-') || (argv[argptr+3][0] == '-') || (argv[argptr+4][0] == '-')) {
     1834                          ExitFlag = 255;
     1835                          DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C E <Z1> <Z2> <output> <bin output>" << endl);
     1836                          performCriticalExit();
     1837                        } else {
     1838                          ofstream output(argv[argptr+3]);
     1839                          ofstream binoutput(argv[argptr+4]);
     1840                          const double BinStart = atof(argv[argptr+5]);
     1841                          const double BinEnd = atof(argv[argptr+6]);
     1842
     1843                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1844                          const element *elemental2 = periode->FindElement((const int) atoi(argv[argptr+2]));
     1845                          PairCorrelationMap *correlationmap = NULL;
     1846                          if (periodic)
     1847                            correlationmap = PeriodicPairCorrelation(molecules, elemental, elemental2, ranges);
     1848                          else
     1849                            correlationmap = PairCorrelation(molecules, elemental, elemental2);
     1850                          //OutputCorrelationToSurface(&output, correlationmap);
     1851                          BinPairMap *binmap = BinData( correlationmap, 0.5, BinStart, BinEnd );
     1852                          OutputCorrelation ( &binoutput, binmap );
     1853                          output.close();
     1854                          binoutput.close();
     1855                          delete(binmap);
     1856                          delete(correlationmap);
     1857                          argptr+=7;
     1858                        }
     1859                      }
     1860                      break;
     1861
     1862                    case 'P':
     1863                      {
     1864                        if ((argptr+8 >= argc) || (!IsValidNumber(argv[argptr+1])) ||  (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+7])) || (!IsValidNumber(argv[argptr+8])) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-') || (argv[argptr+3][0] == '-') || (argv[argptr+4][0] == '-') || (argv[argptr+5][0] == '-') || (argv[argptr+6][0] == '-')) {
     1865                          ExitFlag = 255;
     1866                          DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C P <Z1> <x> <y> <z> <output> <bin output>" << endl);
     1867                          performCriticalExit();
     1868                        } else {
     1869                          ofstream output(argv[argptr+5]);
     1870                          ofstream binoutput(argv[argptr+6]);
     1871                          const double BinStart = atof(argv[argptr+7]);
     1872                          const double BinEnd = atof(argv[argptr+8]);
     1873
     1874                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1875                          Vector *Point = new Vector((const double) atof(argv[argptr+1]),(const double) atof(argv[argptr+2]),(const double) atof(argv[argptr+3]));
     1876                          CorrelationToPointMap *correlationmap = NULL;
     1877                          if (periodic)
     1878                            correlationmap  = PeriodicCorrelationToPoint(molecules, elemental, Point, ranges);
     1879                          else
     1880                            correlationmap = CorrelationToPoint(molecules, elemental, Point);
     1881                          //OutputCorrelationToSurface(&output, correlationmap);
     1882                          BinPairMap *binmap = BinData( correlationmap, 0.5, BinStart, BinEnd );
     1883                          OutputCorrelation ( &binoutput, binmap );
     1884                          output.close();
     1885                          binoutput.close();
     1886                          delete(Point);
     1887                          delete(binmap);
     1888                          delete(correlationmap);
     1889                          argptr+=9;
     1890                        }
     1891                      }
     1892                      break;
     1893
     1894                    case 'S':
     1895                      {
     1896                        if ((argptr+6 >= argc) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) || (!IsValidNumber(argv[argptr+6])) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-') || (argv[argptr+3][0] == '-')) {
     1897                          ExitFlag = 255;
     1898                          DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C S <Z> <output> <bin output> <BinWidth> <BinStart> <BinEnd>" << endl);
     1899                          performCriticalExit();
     1900                        } else {
     1901                          ofstream output(argv[argptr+2]);
     1902                          ofstream binoutput(argv[argptr+3]);
     1903                          const double radius = 4.;
     1904                          const double BinWidth = atof(argv[argptr+4]);
     1905                          const double BinStart = atof(argv[argptr+5]);
     1906                          const double BinEnd = atof(argv[argptr+6]);
     1907                          double LCWidth = 20.;
     1908                          if (BinEnd > 0) {
     1909                            if (BinEnd > 2.*radius)
     1910                                LCWidth = BinEnd;
     1911                            else
     1912                              LCWidth = 2.*radius;
     1913                          }
     1914
     1915                          // get the boundary
     1916                          class molecule *Boundary = NULL;
     1917                          class Tesselation *TesselStruct = NULL;
     1918                          const LinkedCell *LCList = NULL;
     1919                          // find biggest molecule
     1920                          int counter  = 0;
     1921                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
     1922                            if ((Boundary == NULL) || (Boundary->AtomCount < (*BigFinder)->AtomCount)) {
     1923                              Boundary = *BigFinder;
     1924                            }
     1925                            counter++;
     1926                          }
     1927                          bool *Actives = Malloc<bool>(counter, "ParseCommandLineOptions() - case C -- *Actives");
     1928                          counter = 0;
     1929                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
     1930                            Actives[counter++] = (*BigFinder)->ActiveFlag;
     1931                            (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
     1932                          }
     1933                          LCList = new LinkedCell(Boundary, LCWidth);
     1934                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1935                          FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
     1936                          CorrelationToSurfaceMap *surfacemap = NULL;
     1937                          if (periodic)
     1938                            surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges);
     1939                          else
     1940                            surfacemap = CorrelationToSurface( molecules, elemental, TesselStruct, LCList);
     1941                          OutputCorrelationToSurface(&output, surfacemap);
     1942                          // check whether radius was appropriate
     1943                          {
     1944                            double start; double end;
     1945                            GetMinMax( surfacemap, start, end);
     1946                            if (LCWidth < end)
     1947                              DoeLog(1) && (eLog()<< Verbose(1) << "Linked Cell width is smaller than the found range of values! Bins can only be correct up to: " << radius << "." << endl);
     1948                          }
     1949                          BinPairMap *binmap = BinData( surfacemap, BinWidth, BinStart, BinEnd );
     1950                          OutputCorrelation ( &binoutput, binmap );
     1951                          output.close();
     1952                          binoutput.close();
     1953                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
     1954                            (*BigFinder)->ActiveFlag = Actives[counter++];
     1955                          Free(&Actives);
     1956                          delete(LCList);
     1957                          delete(TesselStruct);
     1958                          delete(binmap);
     1959                          delete(surfacemap);
     1960                          argptr+=7;
     1961                        }
     1962                      }
     1963                      break;
     1964
     1965                    default:
     1966                      ExitFlag = 255;
     1967                      DoeLog(0) && (eLog()<< Verbose(0) << "Invalid type given for pair correlation analysis: -C <type: E/P/S> [more params] <output> <bin output>" << endl);
     1968                      performCriticalExit();
     1969                      break;
    15861970                  }
    1587                   counter++;
    15881971                }
    1589                 bool *Actives = Malloc<bool>(counter, "ParseCommandLineOptions() - case C -- *Actives");
    1590                 counter = 0;
    1591                 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1592                   Actives[counter++] = (*BigFinder)->ActiveFlag;
    1593                   (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    1594                 }
    1595                 LCList = new LinkedCell(Boundary, 2.*radius);
    1596                 const element *elemental = periode->FindElement((atomicNumber_t) atoi(argv[argptr]));
    1597                 FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
    1598                 int ranges[NDIM] = {1,1,1};
    1599                 CorrelationToSurfaceMap *surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges );
    1600                 OutputCorrelationToSurface(&output, surfacemap);
    1601                 BinPairMap *binmap = BinData( surfacemap, 0.5, 0., 20. );
    1602                 OutputCorrelation ( &binoutput, binmap );
    1603                 output.close();
    1604                 binoutput.close();
    1605                 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1606                   (*BigFinder)->ActiveFlag = Actives[counter++];
    1607                 Free(&Actives);
    1608                 delete(LCList);
    1609                 delete(TesselStruct);
    1610                 argptr+=3;
    1611               }
    1612               break;
     1972                break;
     1973              }
    16131974            case 'E':
    16141975              if (ExitFlag == 0) ExitFlag = 1;
    16151976              if ((argptr+1 >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr+1][0] == '-')) {
    16161977                ExitFlag = 255;
    1617                 eLog() << Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> <element>" << endl;
     1978                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> <element>" << endl);
    16181979                performCriticalExit();
    16191980              } else {
    16201981                SaveFlag = true;
    1621                 Log() << Verbose(1) << "Changing atom " << argv[argptr] << " to element " << argv[argptr+1] << "." << endl;
     1982                DoLog(1) && (Log() << Verbose(1) << "Changing atom " << argv[argptr] << " to element " << argv[argptr+1] << "." << endl);
    16221983                first = mol->FindAtom(atoi(argv[argptr]));
    16231984                first->type = periode->FindElement(atoi(argv[argptr+1]));
     
    16271988            case 'F':
    16281989              if (ExitFlag == 0) ExitFlag = 1;
    1629               if (argptr+6 >=argc) {
     1990              MaxDistance = -1;
     1991              if (argv[argptr-1][2] == 'F') { // option is -FF?
     1992                // fetch first argument as max distance to surface
     1993                MaxDistance = atof(argv[argptr++]);
     1994                DoLog(0) && (Log() << Verbose(0) << "Filling with maximum layer distance of " << MaxDistance << "." << endl);
     1995              }
     1996              if ((argptr+7 >=argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) || (!IsValidNumber(argv[argptr+6])) || (!IsValidNumber(argv[argptr+7]))) {
    16301997                ExitFlag = 255;
    1631                 eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <boundary> <randatom> <randmol> <DoRotate>" << endl;
     1998                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <xyz of filler> <dist_x> <dist_y> <dist_z> <boundary> <randatom> <randmol> <DoRotate>" << endl);
    16321999                performCriticalExit();
    16332000              } else {
    16342001                SaveFlag = true;
    1635                 Log() << Verbose(1) << "Filling Box with water molecules." << endl;
     2002                DoLog(1) && (Log() << Verbose(1) << "Filling Box with water molecules." << endl);
    16362003                // construct water molecule
    16372004                molecule *filler = World::getInstance().createMolecule();
     2005                if (!filler->AddXYZFile(argv[argptr])) {
     2006                  DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << argv[argptr] << "." << endl);
     2007                }
     2008                filler->SetNameFromFilename(argv[argptr]);
     2009                configuration.BG->ConstructBondGraph(filler);
    16382010                molecule *Filling = NULL;
    16392011                atom *second = NULL, *third = NULL;
    1640 //                first = new atom();
    1641 //                first->type = periode->FindElement(5);
    1642 //                first->x.Zero();
    1643 //                filler->AddAtom(first);
    16442012                first = World::getInstance().createAtom();
    16452013                first->type = periode->FindElement(1);
     
    16592027                double distance[NDIM];
    16602028                for (int i=0;i<NDIM;i++)
    1661                   distance[i] = atof(argv[argptr+i]);
    1662                 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
     2029                  distance[i] = atof(argv[argptr+i+1]);
     2030                Filling = FillBoxWithMolecule(molecules, filler, configuration, MaxDistance, distance, atof(argv[argptr+4]), atof(argv[argptr+5]), atof(argv[argptr+6]), atoi(argv[argptr+7]));
    16632031                if (Filling != NULL) {
    16642032                  Filling->ActiveFlag = false;
     
    16732041              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    16742042                ExitFlag =255;
    1675                 eLog() << Verbose(0) << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl;
     2043                DoeLog(0) && (eLog()<< Verbose(0) << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl);
    16762044                performCriticalExit();
    16772045              } else {
    1678                 Log() << Verbose(0) << "Parsing bonds from " << argv[argptr] << "." << endl;
     2046                DoLog(0) && (Log() << Verbose(0) << "Parsing bonds from " << argv[argptr] << "." << endl);
    16792047                ifstream *input = new ifstream(argv[argptr]);
    16802048                mol->CreateAdjacencyListFromDbondFile(input);
     
    16882056              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    16892057                ExitFlag =255;
    1690                 eLog() << Verbose(0) << "Missing path of adjacency file: -j <path>" << endl;
     2058                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of adjacency file: -j <path>" << endl);
    16912059                performCriticalExit();
    16922060              } else {
    1693                 Log() << Verbose(0) << "Storing adjacency to path " << argv[argptr] << "." << endl;
     2061                DoLog(0) && (Log() << Verbose(0) << "Storing adjacency to path " << argv[argptr] << "." << endl);
    16942062                configuration.BG->ConstructBondGraph(mol);
    1695                 mol->StoreAdjacencyToFile(argv[argptr]);
     2063                mol->StoreAdjacencyToFile(NULL, argv[argptr]);
    16962064                argptr+=1;
    16972065              }
     
    17022070              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    17032071                ExitFlag =255;
    1704                 eLog() << Verbose(0) << "Missing path of bonds file: -j <path>" << endl;
     2072                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of bonds file: -j <path>" << endl);
    17052073                performCriticalExit();
    17062074              } else {
    1707                 Log() << Verbose(0) << "Storing bonds to path " << argv[argptr] << "." << endl;
     2075                DoLog(0) && (Log() << Verbose(0) << "Storing bonds to path " << argv[argptr] << "." << endl);
    17082076                configuration.BG->ConstructBondGraph(mol);
    1709                 mol->StoreBondsToFile(argv[argptr]);
     2077                mol->StoreBondsToFile(NULL, argv[argptr]);
    17102078                argptr+=1;
    17112079              }
     
    17162084              if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){
    17172085                ExitFlag = 255;
    1718                 eLog() << Verbose(0) << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl;
     2086                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl);
    17192087                performCriticalExit();
    17202088              } else {
     
    17242092                //string filename(argv[argptr+1]);
    17252093                //filename.append(".csv");
    1726                 Log() << Verbose(0) << "Evaluating non-convex envelope of biggest molecule.";
    1727                 Log() << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl;
     2094                DoLog(0) && (Log() << Verbose(0) << "Evaluating non-convex envelope of biggest molecule.");
     2095                DoLog(1) && (Log() << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl);
    17282096                // find biggest molecule
    17292097                int counter  = 0;
     
    17352103                  counter++;
    17362104                }
    1737                 Log() << Verbose(1) << "Biggest molecule has " << Boundary->AtomCount << " atoms." << endl;
     2105                DoLog(1) && (Log() << Verbose(1) << "Biggest molecule has " << Boundary->AtomCount << " atoms." << endl);
    17382106                start = clock();
    17392107                LCList = new LinkedCell(Boundary, atof(argv[argptr])*2.);
     
    17422110                //FindDistributionOfEllipsoids(T, &LCList, N, number, filename.c_str());
    17432111                end = clock();
    1744                 Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl;
     2112                DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
    17452113                delete(LCList);
    17462114                delete(T);
     
    17522120              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    17532121                ExitFlag = 255;
    1754                 eLog() << Verbose(0) << "Not enough or invalid arguments given for storing tempature: -S <temperature file>" << endl;
     2122                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for storing tempature: -S <temperature file>" << endl);
    17552123                performCriticalExit();
    17562124              } else {
    1757                 Log() << Verbose(1) << "Storing temperatures in " << argv[argptr] << "." << endl;
     2125                DoLog(1) && (Log() << Verbose(1) << "Storing temperatures in " << argv[argptr] << "." << endl);
    17582126                ofstream *output = new ofstream(argv[argptr], ios::trunc);
    17592127                if (!mol->OutputTemperatureFromTrajectories(output, 0, mol->MDSteps))
    1760                   Log() << Verbose(2) << "File could not be written." << endl;
     2128                  DoLog(2) && (Log() << Verbose(2) << "File could not be written." << endl);
    17612129                else
    1762                   Log() << Verbose(2) << "File stored." << endl;
     2130                  DoLog(2) && (Log() << Verbose(2) << "File stored." << endl);
    17632131                output->close();
    17642132                delete(output);
     
    17702138              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    17712139                ExitFlag = 255;
    1772                 eLog() << Verbose(0) << "Not enough or invalid arguments given for storing tempature: -L <step0> <step1> <prefix> <identity mapping?>" << endl;
     2140                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for storing tempature: -L <step0> <step1> <prefix> <identity mapping?>" << endl);
    17732141                performCriticalExit();
    17742142              } else {
    17752143                SaveFlag = true;
    1776                 Log() << Verbose(1) << "Linear interpolation between configuration " << argv[argptr] << " and " << argv[argptr+1] << "." << endl;
     2144                DoLog(1) && (Log() << Verbose(1) << "Linear interpolation between configuration " << argv[argptr] << " and " << argv[argptr+1] << "." << endl);
    17772145                if (atoi(argv[argptr+3]) == 1)
    1778                   Log() << Verbose(1) << "Using Identity for the permutation map." << endl;
     2146                  DoLog(1) && (Log() << Verbose(1) << "Using Identity for the permutation map." << endl);
    17792147                if (!mol->LinearInterpolationBetweenConfiguration(atoi(argv[argptr]), atoi(argv[argptr+1]), argv[argptr+2], configuration, atoi(argv[argptr+3])) == 1 ? true : false)
    1780                   Log() << Verbose(2) << "Could not store " << argv[argptr+2] << " files." << endl;
     2148                  DoLog(2) && (Log() << Verbose(2) << "Could not store " << argv[argptr+2] << " files." << endl);
    17812149                else
    1782                   Log() << Verbose(2) << "Steps created and " << argv[argptr+2] << " files stored." << endl;
     2150                  DoLog(2) && (Log() << Verbose(2) << "Steps created and " << argv[argptr+2] << " files stored." << endl);
    17832151                argptr+=4;
    17842152              }
     
    17882156              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    17892157                ExitFlag = 255;
    1790                 eLog() << Verbose(0) << "Not enough or invalid arguments given for parsing and integrating forces: -P <forces file>" << endl;
     2158                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for parsing and integrating forces: -P <forces file>" << endl);
    17912159                performCriticalExit();
    17922160              } else {
    17932161                SaveFlag = true;
    1794                 Log() << Verbose(1) << "Parsing forces file and Verlet integrating." << endl;
     2162                DoLog(1) && (Log() << Verbose(1) << "Parsing forces file and Verlet integrating." << endl);
    17952163                if (!mol->VerletForceIntegration(argv[argptr], configuration))
    1796                   Log() << Verbose(2) << "File not found." << endl;
     2164                  DoLog(2) && (Log() << Verbose(2) << "File not found." << endl);
    17972165                else
    1798                   Log() << Verbose(2) << "File found and parsed." << endl;
     2166                  DoLog(2) && (Log() << Verbose(2) << "File found and parsed." << endl);
    17992167                argptr+=1;
    18002168              }
     
    18042172              if ((argptr+1 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])))  {
    18052173                ExitFlag = 255;
    1806                 eLog() << Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R <id> <distance>" << endl;
     2174                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R <id> <distance>" << endl);
    18072175                performCriticalExit();
    18082176              } else {
    18092177                SaveFlag = true;
    1810                 Log() << Verbose(1) << "Removing atoms around " << argv[argptr] << " with radius " << argv[argptr+1] << "." << endl;
     2178                DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << argv[argptr] << " with radius " << argv[argptr+1] << "." << endl);
    18112179                double tmp1 = atof(argv[argptr+1]);
    18122180                atom *third = mol->FindAtom(atoi(argv[argptr]));
     
    18212189                  }
    18222190                } else {
    1823                   eLog() << Verbose(1) << "Removal failed due to missing atoms on molecule or wrong id." << endl;
     2191                  DoeLog(1) && (eLog()<< Verbose(1) << "Removal failed due to missing atoms on molecule or wrong id." << endl);
    18242192                }
    18252193                argptr+=2;
     
    18302198              if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    18312199                ExitFlag = 255;
    1832                 eLog() << Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z>" << endl;
     2200                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z>" << endl);
    18332201                performCriticalExit();
    18342202              } else {
    18352203                if (ExitFlag == 0) ExitFlag = 1;
    18362204                SaveFlag = true;
    1837                 Log() << Verbose(1) << "Translating all ions by given vector." << endl;
     2205                DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
    18382206                for (int i=NDIM;i--;)
    18392207                  x.x[i] = atof(argv[argptr+i]);
     
    18462214              if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    18472215                ExitFlag = 255;
    1848                 eLog() << Verbose(0) << "Not enough or invalid arguments given for periodic translation: -T <x> <y> <z>" << endl;
     2216                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for periodic translation: -T <x> <y> <z>" << endl);
    18492217                performCriticalExit();
    18502218              } else {
    18512219                if (ExitFlag == 0) ExitFlag = 1;
    18522220                SaveFlag = true;
    1853                 Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl;
     2221                DoLog(1) && (Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl);
    18542222                for (int i=NDIM;i--;)
    18552223                  x.x[i] = atof(argv[argptr+i]);
     
    18622230              if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    18632231                ExitFlag = 255;
    1864                 eLog() << Verbose(0) << "Not enough or invalid arguments given for scaling: -s <factor_x> [factor_y] [factor_z]" << endl;
     2232                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for scaling: -s <factor_x> [factor_y] [factor_z]" << endl);
    18652233                performCriticalExit();
    18662234              } else {
    18672235                SaveFlag = true;
    18682236                j = -1;
    1869                 Log() << Verbose(1) << "Scaling all ion positions by factor." << endl;
     2237                DoLog(1) && (Log() << Verbose(1) << "Scaling all ion positions by factor." << endl);
    18702238                factor = new double[NDIM];
    18712239                factor[0] = atof(argv[argptr]);
     
    18732241                factor[2] = atof(argv[argptr+2]);
    18742242                mol->Scale((const double ** const)&factor);
     2243                double * const cell_size = World::getInstance().getDomain();
    18752244                for (int i=0;i<NDIM;i++) {
    18762245                  j += i+1;
    18772246                  x.x[i] = atof(argv[NDIM+i]);
    1878                   mol->cell_size[j]*=factor[i];
     2247                  cell_size[j]*=factor[i];
    18792248                }
    18802249                delete[](factor);
     
    18862255              if ((argptr+5 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) ) {
    18872256                ExitFlag = 255;
    1888                 eLog() << Verbose(0) << "Not enough or invalid arguments given for centering in box: -b <xx> <xy> <xz> <yy> <yz> <zz>" << endl;
     2257                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for centering in box: -b <xx> <xy> <xz> <yy> <yz> <zz>" << endl);
    18892258                performCriticalExit();
    18902259              } else {
    18912260                SaveFlag = true;
    18922261                j = -1;
    1893                 Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl;
     2262                DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl);
     2263                double * const cell_size = World::getInstance().getDomain();
    18942264                for (int i=0;i<6;i++) {
    1895                   mol->cell_size[i] = atof(argv[argptr+i]);
     2265                  cell_size[i] = atof(argv[argptr+i]);
    18962266                }
    18972267                // center
     
    19042274              if ((argptr+5 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) ) {
    19052275                ExitFlag = 255;
    1906                 eLog() << Verbose(0) << "Not enough or invalid arguments given for bounding in box: -B <xx> <xy> <xz> <yy> <yz> <zz>" << endl;
     2276                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for bounding in box: -B <xx> <xy> <xz> <yy> <yz> <zz>" << endl);
    19072277                performCriticalExit();
    19082278              } else {
    19092279                SaveFlag = true;
    19102280                j = -1;
    1911                 Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl;
     2281                DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl);
     2282                double * const cell_size = World::getInstance().getDomain();
    19122283                for (int i=0;i<6;i++) {
    1913                   mol->cell_size[i] = atof(argv[argptr+i]);
     2284                  cell_size[i] = atof(argv[argptr+i]);
    19142285                }
    19152286                // center
     
    19222293              if ((argptr+2 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    19232294                ExitFlag = 255;
    1924                 eLog() << Verbose(0) << "Not enough or invalid arguments given for centering with boundary: -c <boundary_x> <boundary_y> <boundary_z>" << endl;
     2295                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for centering with boundary: -c <boundary_x> <boundary_y> <boundary_z>" << endl);
    19252296                performCriticalExit();
    19262297              } else {
    19272298                SaveFlag = true;
    19282299                j = -1;
    1929                 Log() << Verbose(1) << "Centering atoms in config file within given additional boundary." << endl;
     2300                DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given additional boundary." << endl);
    19302301                // make every coordinate positive
    19312302                mol->CenterEdge(&x);
     
    19332304                mol->SetBoxDimension(&x);
    19342305                // translate each coordinate by boundary
     2306                double * const cell_size = World::getInstance().getDomain();
    19352307                j=-1;
    19362308                for (int i=0;i<NDIM;i++) {
    19372309                  j += i+1;
    19382310                  x.x[i] = atof(argv[argptr+i]);
    1939                   mol->cell_size[j] += x.x[i]*2.;
     2311                  cell_size[j] += x.x[i]*2.;
    19402312                }
    19412313                mol->Translate((const Vector *)&x);
     
    19462318              if (ExitFlag == 0) ExitFlag = 1;
    19472319              SaveFlag = true;
    1948               Log() << Verbose(1) << "Centering atoms on edge and setting box dimensions." << endl;
     2320              DoLog(1) && (Log() << Verbose(1) << "Centering atoms on edge and setting box dimensions." << endl);
    19492321              x.Zero();
    19502322              mol->CenterEdge(&x);
     
    19562328              if ((argptr >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])))  {
    19572329                ExitFlag = 255;
    1958                 eLog() << Verbose(0) << "Not enough or invalid arguments given for removing atoms: -r <id>" << endl;
     2330                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -r <id>" << endl);
    19592331                performCriticalExit();
    19602332              } else {
    19612333                SaveFlag = true;
    1962                 Log() << Verbose(1) << "Removing atom " << argv[argptr] << "." << endl;
     2334                DoLog(1) && (Log() << Verbose(1) << "Removing atom " << argv[argptr] << "." << endl);
    19632335                atom *first = mol->FindAtom(atoi(argv[argptr]));
    19642336                mol->RemoveAtom(first);
     
    19702342              if ((argptr+1 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1]))) {
    19712343                ExitFlag = 255;
    1972                 eLog() << Verbose(0) << "Not enough or invalid arguments for fragmentation: -f <max. bond distance> <bond order>" << endl;
     2344                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for fragmentation: -f <max. bond distance> <bond order>" << endl);
    19732345                performCriticalExit();
    19742346              } else {
    1975                 Log() << Verbose(0) << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << "." << endl;
    1976                 Log() << Verbose(0) << "Creating connection matrix..." << endl;
     2347                DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << "." << endl);
     2348                DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl);
    19772349                start = clock();
    1978                 mol->CreateAdjacencyList(atof(argv[argptr++]), configuration.GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
    1979                 Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl;
     2350                mol->CreateAdjacencyList(atof(argv[argptr]), configuration.GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
     2351                DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl);
    19802352                if (mol->first->next != mol->last) {
    1981                   ExitFlag = mol->FragmentMolecule(atoi(argv[argptr]), &configuration);
     2353                  ExitFlag = mol->FragmentMolecule(atoi(argv[argptr+1]), &configuration);
    19822354                }
    19832355                end = clock();
    1984                 Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl;
     2356                DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
    19852357                argptr+=2;
    19862358              }
     
    19902362              j = atoi(argv[argptr++]);
    19912363              if ((j<0) || (j>1)) {
    1992                 eLog() << Verbose(1) << "Argument of '-m' should be either 0 for no-rotate or 1 for rotate." << endl;
     2364                DoeLog(1) && (eLog()<< Verbose(1) << "Argument of '-m' should be either 0 for no-rotate or 1 for rotate." << endl);
    19932365                j = 0;
    19942366              }
    19952367              if (j) {
    19962368                SaveFlag = true;
    1997                 Log() << Verbose(0) << "Converting to prinicipal axis system." << endl;
     2369                DoLog(0) && (Log() << Verbose(0) << "Converting to prinicipal axis system." << endl);
    19982370              } else
    1999                 Log() << Verbose(0) << "Evaluating prinicipal axis." << endl;
     2371                DoLog(0) && (Log() << Verbose(0) << "Evaluating prinicipal axis." << endl);
    20002372              mol->PrincipalAxisSystem((bool)j);
    20012373              break;
     
    20042376              if ((argptr+1 >= argc) || (argv[argptr][0] == '-')){
    20052377                ExitFlag = 255;
    2006                 eLog() << Verbose(0) << "Not enough or invalid arguments given for convex envelope: -o <convex output file> <non-convex output file>" << endl;
     2378                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for convex envelope: -o <convex output file> <non-convex output file>" << endl);
    20072379                performCriticalExit();
    20082380              } else {
    20092381                class Tesselation *TesselStruct = NULL;
    20102382                const LinkedCell *LCList = NULL;
    2011                 Log() << Verbose(0) << "Evaluating volume of the convex envelope.";
    2012                 Log() << Verbose(1) << "Storing tecplot convex data in " << argv[argptr] << "." << endl;
    2013                 Log() << Verbose(1) << "Storing tecplot non-convex data in " << argv[argptr+1] << "." << endl;
     2383                DoLog(0) && (Log() << Verbose(0) << "Evaluating volume of the convex envelope.");
     2384                DoLog(1) && (Log() << Verbose(1) << "Storing tecplot convex data in " << argv[argptr] << "." << endl);
     2385                DoLog(1) && (Log() << Verbose(1) << "Storing tecplot non-convex data in " << argv[argptr+1] << "." << endl);
    20142386                LCList = new LinkedCell(mol, 10.);
    20152387                //FindConvexBorder(mol, LCList, argv[argptr]);
     
    20182390                double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, argv[argptr]);
    20192391                double clustervolume = VolumeOfConvexEnvelope(TesselStruct, &configuration);
    2020                 Log() << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl;
    2021                 Log() << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl;
     2392                DoLog(0) && (Log() << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
     2393                DoLog(0) && (Log() << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
    20222394                delete(TesselStruct);
    20232395                delete(LCList);
     
    20292401              if ((argptr+1 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) ) {
    20302402                ExitFlag = 255;
    2031                 eLog() << Verbose(0) << "Not enough or invalid arguments given for suspension with specified volume: -U <volume> <density>" << endl;
     2403                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for suspension with specified volume: -U <volume> <density>" << endl);
    20322404                performCriticalExit();
    20332405              } else {
    20342406                volume = atof(argv[argptr++]);
    2035                 Log() << Verbose(0) << "Using " << volume << " angstrom^3 as the volume instead of convex envelope one's." << endl;
     2407                DoLog(0) && (Log() << Verbose(0) << "Using " << volume << " angstrom^3 as the volume instead of convex envelope one's." << endl);
    20362408              }
    20372409            case 'u':
     
    20402412                if (volume != -1)
    20412413                  ExitFlag = 255;
    2042                   eLog() << Verbose(0) << "Not enough or invalid arguments given for suspension: -u <density>" << endl;
     2414                  DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for suspension: -u <density>" << endl);
    20432415                  performCriticalExit();
    20442416              } else {
    20452417                double density;
    20462418                SaveFlag = true;
    2047                 Log() << Verbose(0) << "Evaluating necessary cell volume for a cluster suspended in water.";
     2419                DoLog(0) && (Log() << Verbose(0) << "Evaluating necessary cell volume for a cluster suspended in water.");
    20482420                density = atof(argv[argptr++]);
    20492421                if (density < 1.0) {
    2050                   eLog() << Verbose(1) << "Density must be greater than 1.0g/cm^3 !" << endl;
     2422                  DoeLog(1) && (eLog()<< Verbose(1) << "Density must be greater than 1.0g/cm^3 !" << endl);
    20512423                  density = 1.3;
    20522424                }
     
    20542426//                  repetition[i] = atoi(argv[argptr++]);
    20552427//                  if (repetition[i] < 1)
    2056 //                    eLog() << Verbose(1) << "repetition value must be greater 1!" << endl;
     2428//                    DoeLog(1) && (eLog()<< Verbose(1) << "repetition value must be greater 1!" << endl);
    20572429//                  repetition[i] = 1;
    20582430//                }
     
    20642436              if ((argptr+2 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    20652437                ExitFlag = 255;
    2066                 eLog() << Verbose(0) << "Not enough or invalid arguments given for repeating cells: -d <repeat_x> <repeat_y> <repeat_z>" << endl;
     2438                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for repeating cells: -d <repeat_x> <repeat_y> <repeat_z>" << endl);
    20672439                performCriticalExit();
    20682440              } else {
    20692441                SaveFlag = true;
     2442                double * const cell_size = World::getInstance().getDomain();
    20702443                for (int axis = 1; axis <= NDIM; axis++) {
    20712444                  int faktor = atoi(argv[argptr++]);
     
    20742447                  Vector ** vectors;
    20752448                  if (faktor < 1) {
    2076                     eLog() << Verbose(1) << "Repetition factor must be greater than 1!" << endl;
     2449                    DoeLog(1) && (eLog()<< Verbose(1) << "Repetition factor mus be greater than 1!" << endl);
    20772450                    faktor = 1;
    20782451                  }
     
    20912464                    }
    20922465                    if (count != j)
    2093                       eLog() << Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl;
     2466                      DoeLog(1) && (eLog()<< Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl);
    20942467                    x.Zero();
    20952468                    y.Zero();
    2096                     y.x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
     2469                    y.x[abs(axis)-1] = cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
    20972470                    for (int i=1;i<faktor;i++) {  // then add this list with respective translation factor times
    20982471                      x.AddVector(&y); // per factor one cell width further
     
    21152488                      mol->Translate(&x);
    21162489                    }
    2117                     mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;
     2490                    cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;
    21182491                  }
    21192492                }
     
    21322505  } else {  // no arguments, hence scan the elements db
    21332506    if (periode->LoadPeriodentafel(configuration.databasepath))
    2134       Log() << Verbose(0) << "Element list loaded successfully." << endl;
     2507      DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl);
    21352508    else
    2136       Log() << Verbose(0) << "Element list loading failed." << endl;
     2509      DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl);
    21372510    configuration.RetrieveConfigPathAndName("main_pcp_linux");
    21382511  }
     
    21912564    char *ConfigFileName = NULL;
    21922565    int j;
     2566
     2567    cout << ESPACKVersion << endl;
    21932568
    21942569    setVerbosity(0);
     
    22102585        World::getInstance().getMolecules()->insert(mol);
    22112586        cout << "Molecule created" << endl;
    2212         if(mol->cell_size[0] == 0.){
     2587        if(World::getInstance().getDomain()[0] == 0.){
    22132588            Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl;
    22142589            for(int i = 0;i < 6;i++){
    22152590                Log() << Verbose(1) << "Cell size" << i << ": ";
    2216                 cin >> mol->cell_size[i];
     2591                cin >> World::getInstance().getDomain()[i];
    22172592            }
    22182593        }
Note: See TracChangeset for help on using the changeset viewer.