Changes in / [e6317b:f8e486]


Ignore:
Files:
19 added
4 deleted
71 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    re6317b rf8e486  
    2727
    2828# Boost libraries
    29 AX_BOOST_BASE([1.40])
     29AX_BOOST_BASE([1.33.1])
    3030AX_BOOST_PROGRAM_OPTIONS
    3131#AX_BOOST_FOREACH
    3232#AX_BOOST_FILESYSTEM
    3333AX_BOOST_THREAD
     34#AX_BOOST_PROGRAM_OPTIONS
    3435#AX_BOOST_SERIALIZATION
    3536
  • src/Actions/ActionRegistry.cpp

    re6317b rf8e486  
    3939}
    4040
    41 bool ActionRegistry::isActionByNamePresent(const std::string name){
    42   map<const string,Action*>::iterator iter;
    43   iter = actionMap.find(name);
    44   return iter!=actionMap.end();
    45 }
    46 
    4741void ActionRegistry::registerAction(Action* action){
    4842  pair<map<const string,Action*>::iterator,bool> ret;
  • src/Actions/ActionRegistry.hpp

    re6317b rf8e486  
    2121public:
    2222  Action* getActionByName(const std::string);
    23   bool isActionByNamePresent(const std::string name);
    2423  void registerAction(Action*);
    2524  void unregisterAction(Action*);
  • src/Actions/AnalysisAction/MolecularVolumeAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "boundary.hpp"
    1213#include "config.hpp"
  • src/Actions/AnalysisAction/PairCorrelationAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "analysis_correlation.hpp"
    12 #include "boundary.hpp"
    13 #include "linkedcell.hpp"
    1413#include "log.hpp"
    1514#include "element.hpp"
    16 #include "molecule.hpp"
    1715#include "periodentafel.hpp"
    18 #include "vector.hpp"
    1916#include "World.hpp"
    2017
     
    4037  Dialog *dialog = UIFactory::getInstance().makeDialog();
    4138  int ranges[3] = {1, 1, 1};
     39  double BinStart = 0.;
    4240  double BinEnd = 0.;
    43   double BinStart = 0.;
    44   double BinWidth = 0.;
    45   molecule *Boundary = NULL;
    4641  string outputname;
    4742  string binoutputname;
     
    4944  ofstream output;
    5045  ofstream binoutput;
    51   std::vector< element *> elements;
    52   string type;
    53   Vector Point;
    54   BinPairMap *binmap = NULL;
    55   MoleculeListClass *molecules = World::getInstance().getMolecules();
     46  const element *elemental1;
     47  const element *elemental2;
    5648
    57   // first dialog: Obtain which type of correlation
    58   dialog->queryString(NAME, &type, MapOfActions::getInstance().getDescription(NAME));
    59   if(dialog->display()) {
    60     delete dialog;
    61   } else {
    62     delete dialog;
    63     return Action::failure;
    64   }
    65 
    66   // second dialog: Obtain parameters specific to this type
    67   dialog = UIFactory::getInstance().makeDialog();
    68   if (type == "P")
    69     dialog->queryVector("position", &Point, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription("position"));
    70   if (type == "S")
    71     dialog->queryMolecule("molecule-by-id", &Boundary, MapOfActions::getInstance().getDescription("molecule-by-id"));
    72   dialog->queryElement("elements", &elements, MapOfActions::getInstance().getDescription("elements"));
     49  dialog->queryElement("elements", &elemental1, MapOfActions::getInstance().getDescription("elements"));
     50  dialog->queryElement("elements", &elemental2, MapOfActions::getInstance().getDescription("elements"));
    7351  dialog->queryDouble("bin-start", &BinStart, MapOfActions::getInstance().getDescription("bin-start"));
    74   dialog->queryDouble("bin-width", &BinWidth, MapOfActions::getInstance().getDescription("bin-width"));
    7552  dialog->queryDouble("bin-end", &BinEnd, MapOfActions::getInstance().getDescription("bin-end"));
    7653  dialog->queryString("output-file", &outputname, MapOfActions::getInstance().getDescription("output-file"));
     
    8259    binoutput.open(binoutputname.c_str());
    8360    PairCorrelationMap *correlationmap = NULL;
    84     if (type == "E") {
    85       PairCorrelationMap *correlationmap = NULL;
    86       if (periodic)
    87         correlationmap = PeriodicPairCorrelation(World::getInstance().getMolecules(), elements, ranges);
    88       else
    89         correlationmap = PairCorrelation(World::getInstance().getMolecules(), elements);
    90       //OutputCorrelationToSurface(&output, correlationmap);
    91       binmap = BinData( correlationmap, BinWidth, BinStart, BinEnd );
    92     } else if (type == "P")  {
    93       cout << "Point to correlate to is  " << Point << endl;
    94       CorrelationToPointMap *correlationmap = NULL;
    95       if (periodic)
    96         correlationmap  = PeriodicCorrelationToPoint(molecules, elements, &Point, ranges);
    97       else
    98         correlationmap = CorrelationToPoint(molecules, elements, &Point);
    99       //OutputCorrelationToSurface(&output, correlationmap);
    100       binmap = BinData( correlationmap, BinWidth, BinStart, BinEnd );
    101     } else if (type == "S") {
    102       ASSERT(Boundary != NULL, "No molecule specified for SurfaceCorrelation.");
    103       const double radius = 4.;
    104       double LCWidth = 20.;
    105       if (BinEnd > 0) {
    106         if (BinEnd > 2.*radius)
    107             LCWidth = BinEnd;
    108         else
    109           LCWidth = 2.*radius;
    110       }
    111 
    112       // get the boundary
    113       class Tesselation *TesselStruct = NULL;
    114       const LinkedCell *LCList = NULL;
    115       // find biggest molecule
    116       int counter  = molecules->ListOfMolecules.size();
    117       bool *Actives = new bool[counter];
    118       counter = 0;
    119       for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    120         Actives[counter++] = (*BigFinder)->ActiveFlag;
    121         (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    122       }
    123       LCList = new LinkedCell(Boundary, LCWidth);
    124       FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
    125       CorrelationToSurfaceMap *surfacemap = NULL;
    126       if (periodic)
    127         surfacemap = PeriodicCorrelationToSurface( molecules, elements, TesselStruct, LCList, ranges);
    128       else
    129         surfacemap = CorrelationToSurface( molecules, elements, TesselStruct, LCList);
    130       OutputCorrelationToSurface(&output, surfacemap);
    131       // check whether radius was appropriate
    132       {
    133         double start; double end;
    134         GetMinMax( surfacemap, start, end);
    135         if (LCWidth < end)
    136           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);
    137       }
    138       binmap = BinData( surfacemap, BinWidth, BinStart, BinEnd );
    139     } else
    140       return Action::failure;
     61    if (periodic)
     62      correlationmap = PeriodicPairCorrelation(World::getInstance().getMolecules(), elemental1, elemental2, ranges);
     63    else
     64      correlationmap = PairCorrelation(World::getInstance().getMolecules(), elemental1, elemental2);
     65    //OutputCorrelationToSurface(&output, correlationmap);
     66    BinPairMap *binmap = BinData( correlationmap, 0.5, BinStart, BinEnd );
    14167    OutputCorrelation ( &binoutput, binmap );
    14268    output.close();
  • src/Actions/AnalysisAction/PrincipalAxisSystemAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "molecule.hpp"
    1213#include "log.hpp"
  • src/Actions/AtomAction/AddAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AtomAction/AddAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "element.hpp"
    1314#include "log.hpp"
    14 #include "molecule.hpp"
     15#include "periodentafel.hpp"
    1516#include "vector.hpp"
    1617#include "verbose.hpp"
     
    3738Action::state_ptr AtomAddAction::performCall() {
    3839  Dialog *dialog = UIFactory::getInstance().makeDialog();
    39   std::vector<element *> elements;
     40  int Z = -1;
    4041  Vector position;
    4142
    42   dialog->queryElement(NAME, &elements, MapOfActions::getInstance().getDescription(NAME));
     43  dialog->queryInt(NAME, &Z, MapOfActions::getInstance().getDescription(NAME));
    4344  dialog->queryVector("position", &position, World::getInstance().getDomain(), true, MapOfActions::getInstance().getDescription("position"));
    44   cout << "pre-dialog" << endl;
    4545
    4646  if(dialog->display()) {
    47     cout << "post-dialog" << endl;
    4847    delete dialog;
    49     if (elements.size() == 1) {
    50       atom * first = World::getInstance().createAtom();
    51       first->type = *(elements.begin());
    52       first->x = position;
     48    atom * first = World::getInstance().createAtom();
     49    first->type = World::getInstance().getPeriode()->FindElement(Z);
     50    first->x = position;
     51    if (first->type != NULL) {
    5352      DoLog(1) && (Log() << Verbose(1) << "Adding new atom with element " << first->type->name << " at " << (first->x) << "." << endl);
    54       // TODO: remove when all of World's atoms are stored.
    55       std::vector<molecule *> molecules = World::getInstance().getAllMolecules();
    56       if (!molecules.empty()) {
    57         std::vector<molecule *>::iterator iter = molecules.begin();
    58         (*iter)->AddAtom(first);
    59       }
    6053      return Action::success;
    6154    } else {
    6255      DoeLog(1) && (eLog()<< Verbose(1) << "Could not find the specified element." << endl);
     56      World::getInstance().destroyAtom(first);
    6357      return Action::failure;
    6458    }
  • src/Actions/AtomAction/ChangeElementAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AtomAction/ChangeElementAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "log.hpp"
     
    3536Action::state_ptr AtomChangeElementAction::performCall() {
    3637  Dialog *dialog = UIFactory::getInstance().makeDialog();
     38  int Z = -1;
    3739  atom *first = NULL;
    38   std::vector<element *> elements;
     40  element *elemental = NULL;
    3941
    40   dialog->queryAtom(NAME, &first, MapOfActions::getInstance().getDescription(NAME));
    41   dialog->queryElement("element", &elements, MapOfActions::getInstance().getDescription("element"));
     42  dialog->queryElement(NAME, (const element **) &elemental, MapOfActions::getInstance().getDescription(NAME));
     43  dialog->queryAtom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));
    4244
    4345  if(dialog->display()) {
    4446    delete dialog;
    45     ASSERT(elements.size() == 1, "Unequal to one element specified when changing an atom's element");
    46     ASSERT(first != NULL, "No valid atom specified");
    47     DoLog(1) && (Log() << Verbose(1) << "Changing atom " << *first << " to element " << elements.at(0) << "." << endl);
    48     if (elements.at(0) != NULL) {
    49       first->type = elements.at(0);
     47    DoLog(1) && (Log() << Verbose(1) << "Changing atom " << *first << " to element " << elemental << "." << endl);
     48    if (elemental != NULL) {
     49      first->type = elemental;
    5050      return Action::success;
    5151    } else
  • src/Actions/AtomAction/RemoveAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/AtomAction/RemoveAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "Descriptors/AtomDescriptor.hpp"
    1314#include "log.hpp"
    14 #include "molecule.hpp"
    1515#include "verbose.hpp"
    1616#include "World.hpp"
     
    4343    delete dialog;
    4444    DoLog(1) && (Log() << Verbose(1) << "Removing atom " << first->getId() << "." << endl);
    45     // TODO: this is not necessary when atoms and their storing to file are handled by the World
    46     // simply try to erase in every molecule found
    47     std::vector<molecule *> molecules = World::getInstance().getAllMolecules();
    48     for (std::vector<molecule *>::iterator iter = molecules.begin();iter != molecules.end(); ++iter) {
    49       (*iter)->erase(first);
    50     }
    5145    World::getInstance().destroyAtom(first);
    5246    return Action::success;
  • src/Actions/CmdAction/BondLengthTableAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/CmdAction/BondLengthTableAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "config.hpp"
    1213#include "log.hpp"
     
    4142
    4243  if(dialog->display()) {
    43     DoLog(0) && (Log() << Verbose(0) << "Using " << BondGraphFileName << " as bond length table." << endl);
    4444    delete dialog;
    4545  } else {
    4646    delete dialog;
    47     return Action::failure;
    4847  }
    4948
  • src/Actions/CmdAction/ElementDbAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/CmdAction/ElementDbAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "config.hpp"
    1213#include "log.hpp"
     
    4243  config *configuration = World::getInstance().getConfig();
    4344  dialog->queryString(NAME, &databasepath, MapOfActions::getInstance().getDescription(NAME));
     45  strcpy(configuration->databasepath, databasepath.c_str());
    4446
    4547  if(dialog->display()) {
    46     strcpy(configuration->databasepath, databasepath.c_str());
    4748    delete dialog;
    4849  } else {
    4950    delete dialog;
    50     return Action::failure;
    5151  }
    5252
  • src/Actions/CmdAction/FastParsingAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/CmdAction/FastParsingAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "config.hpp"
    1213#include "log.hpp"
  • src/Actions/CmdAction/VerboseAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/CmdAction/VerboseAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "log.hpp"
    1213#include "verbose.hpp"
  • src/Actions/CmdAction/VersionAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/CmdAction/VersionAction.hpp"
     11#include "CommandLineParser.hpp"
    1112
    1213#include <iostream>
  • src/Actions/FragmentationAction/DepthFirstSearchAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "config.hpp"
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/FragmentationAction/FragmentationAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "config.hpp"
     
    2627#include "Actions/MapOfActions.hpp"
    2728
    28 const char FragmentationFragmentationAction::NAME[] = "fragment-mol";
     29const char FragmentationFragmentationAction::NAME[] = "subspace-dissect";
    2930
    3031FragmentationFragmentationAction::FragmentationFragmentationAction() :
     
    3738Action::state_ptr FragmentationFragmentationAction::performCall() {
    3839  Dialog *dialog = UIFactory::getInstance().makeDialog();
    39   clock_t start,end;
    40   molecule *mol = NULL;
    41   double distance = -1.;
    42   int order = 0;
    43   config *configuration = World::getInstance().getConfig();
    44   int ExitFlag = 0;
    4540
    46   cout << "pre-dialog"<< endl;
    47   dialog->queryMolecule(NAME, &mol, MapOfActions::getInstance().getDescription(NAME));
    48   dialog->queryDouble("distance", &distance, MapOfActions::getInstance().getDescription("distance"));
    49   dialog->queryInt("order", &order, MapOfActions::getInstance().getDescription("order"));
     41  dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
    5042
    5143  if(dialog->display()) {
    52     cout << "POST-dialog"<< endl;
    53     ASSERT(mol != NULL, "No molecule has been picked for fragmentation.");
    54     DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << distance << " angstroem, order of " << order << "." << endl);
    55     DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl);
    56     start = clock();
    57     mol->CreateAdjacencyList(distance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
    58     DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl);
    59     if (mol->hasBondStructure()) {
    60       ExitFlag = mol->FragmentMolecule(order, configuration);
    61     }
    62     World::getInstance().setExitFlag(ExitFlag);
    63     end = clock();
    64     DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
    6544    delete dialog;
    6645    return Action::success;
  • src/Actions/FragmentationAction/SubgraphDissectionAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "config.hpp"
     
    2627#include "Actions/MapOfActions.hpp"
    2728
    28 const char FragmentationSubgraphDissectionAction::NAME[] = "subgraph-dissect";
     29const char FragmentationSubgraphDissectionAction::NAME[] = "subspace-dissect";
    2930
    3031FragmentationSubgraphDissectionAction::FragmentationSubgraphDissectionAction() :
     
    4142
    4243  if(dialog->display()) {
    43     DoLog(1) && (Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl);
    44     // @TODO rather do the dissection afterwards
    45     MoleculeListClass *molecules = World::getInstance().getMolecules();
    46     molecules->DissectMoleculeIntoConnectedSubgraphs(World::getInstance().getPeriode(), World::getInstance().getConfig());
    4744    delete dialog;
    4845    return Action::success;
  • src/Actions/Makefile.am

    re6317b rf8e486  
    3030  ${TESSELATIONACTIONHEADER} \
    3131  ${WORLDACTIONHEADER} \
    32   MapOfActions.hpp \
    33   Values.hpp
     32  MapOfActions.hpp
    3433 
    3534ANALYSISACTIONSOURCE = \
    3635  AnalysisAction/MolecularVolumeAction.cpp \
    3736  AnalysisAction/PairCorrelationAction.cpp \
     37  AnalysisAction/PairCorrelationToPointAction.cpp \
     38  AnalysisAction/PairCorrelationToSurfaceAction.cpp \
    3839  AnalysisAction/PrincipalAxisSystemAction.cpp
    3940ANALYSISACTIONHEADER = \
    4041  AnalysisAction/MolecularVolumeAction.hpp \
    4142  AnalysisAction/PairCorrelationAction.hpp \
     43  AnalysisAction/PairCorrelationToPointAction.hpp \
     44  AnalysisAction/PairCorrelationToSurfaceAction.hpp \
    4245  AnalysisAction/PrincipalAxisSystemAction.hpp
    4346
  • src/Actions/MapOfActions.cpp

    re6317b rf8e486  
    1414#include "Helpers/Assert.hpp"
    1515
    16 #include <boost/lexical_cast.hpp>
    17 #include <boost/optional.hpp>
    18 #include <boost/program_options.hpp>
    19 
    2016#include "CommandLineParser.hpp"
    2117#include "log.hpp"
    2218#include "verbose.hpp"
    23 
    24 #include "Actions/Values.hpp"
    25 
    26 void validate(boost::any& v, const std::vector<std::string>& values, VectorValue *, int)
    27 {
    28   VectorValue VV;
    29   if (values.size() != 3) {
    30     cerr <<  "Specified vector does not have three components but " << values.size() << endl;
    31     throw boost::program_options::validation_error("Specified vector does not have three components");
    32   }
    33   VV.x = boost::lexical_cast<double>(values.at(0));
    34   VV.y = boost::lexical_cast<double>(values.at(1));
    35   VV.z = boost::lexical_cast<double>(values.at(2));
    36   v = boost::any(VectorValue(VV));
    37 }
    38 
    39 void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int)
    40 {
    41   BoxValue BV;
    42   if (values.size() != 6) {
    43     cerr <<  "Specified vector does not have three components but " << values.size() << endl;
    44     throw boost::program_options::validation_error("Specified symmetric box matrix does not have six components");
    45   }
    46   BV.xx = boost::lexical_cast<double>(values.at(0));
    47   BV.xy = boost::lexical_cast<double>(values.at(1));
    48   BV.xz = boost::lexical_cast<double>(values.at(2));
    49   BV.yy = boost::lexical_cast<double>(values.at(3));
    50   BV.yz = boost::lexical_cast<double>(values.at(4));
    51   BV.zz = boost::lexical_cast<double>(values.at(5));
    52   v = boost::any(BoxValue(BV));
    53 }
    5419
    5520/** Constructor of class MapOfActions.
     
    8651  DescriptionMap["nonconvex-envelope"] = "create the non-convex envelope for a molecule";
    8752  DescriptionMap["molecular-volume"] = "calculate the volume of a given molecule";
    88   DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements, element and point or element and surface";
     53  DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements";
     54  DescriptionMap["pair-correlation-point"] = "pair correlation analysis between atoms of a element to a given point";
     55  DescriptionMap["pair-correlation-surface"] = "pair correlation analysis between atoms of a given element and a surface";
    8956  DescriptionMap["parse-xyz"] = "parse xyz file into World";
    9057  DescriptionMap["principal-axis-system"] = "calculate the principal axis system of the specified molecule";
     
    9865  DescriptionMap["save-temperature"] = "name of the temperature file to write to";
    9966  DescriptionMap["scale-box"] = "scale box and atomic positions inside";
    100   DescriptionMap["subgraph-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
     67  DescriptionMap["subspace-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
    10168  DescriptionMap["suspend-in-water"] = "suspend the given molecule in water such that in the domain the mean density is as specified";
    10269  DescriptionMap["translate-mol"] = "translate molecule by given vector";
     
    10572  DescriptionMap["version"] = "show version";
    10673  // keys for values
    107   DescriptionMap["atom-by-id"] = "index of an atom";
    10874  DescriptionMap["bin-output-file"] = "name of the bin output file";
    10975  DescriptionMap["bin-end"] = "start of the last bin";
    11076  DescriptionMap["bin-start"] = "start of the first bin";
    11177  DescriptionMap["bin-width"] = "width of the bins";
    112   DescriptionMap["convex-file"] = "filename of the non-convex envelope";
    11378  DescriptionMap["distance"] = "distance in space";
    11479  DescriptionMap["distances"] = "list of three of distances in space, one for each axis direction";
    115   DescriptionMap["DoRotate"] = "whether to rotate or just report angles";
    116   DescriptionMap["element"] = "single element";
    117   DescriptionMap["elements"] = "set of elements";
    118   DescriptionMap["end-step"] = "last or end step";
    119   DescriptionMap["id-mapping"] = "whether the identity shall be used in mapping atoms onto atoms or some closest distance measure shall be used";
     80  DescriptionMap["element"] = "set of elements";
     81  DescriptionMap["end-mol"] = "last or end step";
    12082  DescriptionMap["input"] = "name of input file";
    12183  DescriptionMap["length"] = "length in space";
     
    12385  DescriptionMap["MaxDistance"] = "maximum distance in space";
    12486  DescriptionMap["molecule-by-id"] = "index of a molecule";
    125   DescriptionMap["molecule-by-name"] = "name of a molecule";
    126   DescriptionMap["nonconvex-file"] = "filename of the non-convex envelope";
    127   DescriptionMap["order"] = "order of a discretization, dissection, ...";
    12887  DescriptionMap["output-file"] = "name of the output file";
    12988  DescriptionMap["periodic"] = "system is constraint to periodic boundary conditions (y/n)";
    13089  DescriptionMap["position"] = "position in R^3 space";
    131   DescriptionMap["sphere-radius"] = "radius of tesselation sphere";
    132   DescriptionMap["start-step"] = "first or start step";
     90  DescriptionMap["start-mol"] = "first or start step";
    13391
    13492  // short forms for the actions
     
    152110  ShortFormMap["linear-interpolate"] = "L";
    153111  ShortFormMap["nonconvex-envelope"] = "N";
    154   ShortFormMap["pair-correlation"] = "C";
     112  ShortFormMap["pair-correlation"] = "CE";
     113  ShortFormMap["pair-correlation-point"] = "CP";
     114  ShortFormMap["pair-correlation-surface"] = "CS";
    155115  ShortFormMap["parse-xyz"] = "p";
    156116  ShortFormMap["remove-atom"] = "r";
     
    163123  ShortFormMap["scale-box"] = "s";
    164124  ShortFormMap["set-basis"] = "M";
    165   ShortFormMap["subgraph-dissect"] = "I";
    166   ShortFormMap["suspend-in-water"] = "u";
     125  ShortFormMap["subspace-dissect"] = "I";
     126  ShortFormMap["suspend-in-water"] = "U";
    167127  ShortFormMap["translate-mol"] = "t";
    168128  ShortFormMap["verbose"] = "v";
     
    171131
    172132  // value types for the actions
    173   TypeMap["add-atom"] = Element;
     133  TypeMap["add-atom"] = Atom;
    174134  TypeMap["bond-file"] = String;
    175135  TypeMap["bond-table"] = String;
    176136  TypeMap["boundary"] = Vector;
    177   TypeMap["center-in-box"] = Box;
    178   TypeMap["change-box"] = Box;
    179   TypeMap["change-element"] = Atom;
     137  TypeMap["center-in-box"] = ListOfDoubles;
     138  TypeMap["change-box"] = ListOfDoubles;
     139  TypeMap["change-element"] = Element;
    180140  TypeMap["change-molname"] = String;
    181141  TypeMap["convex-envelope"] = Molecule;
     
    183143  TypeMap["depth-first-search"] = Double;
    184144  TypeMap["element-db"] = String;
     145  TypeMap["end-mol"] = Molecule;
    185146  TypeMap["fastparsing"] = Boolean;
    186147  TypeMap["fill-molecule"] = String;
     
    191152  TypeMap["nonconvex-envelope"] = Molecule;
    192153  TypeMap["parse-xyz"] = String;
    193   TypeMap["pair-correlation"] = String;
    194   TypeMap["principal-axis-system"] = Molecule;
     154  TypeMap["principal-axis-system"] = Axis;
    195155  TypeMap["remove-atom"] = Atom;
    196   TypeMap["remove-sphere"] = Double;
     156  TypeMap["remove-sphere"] = Atom;
    197157  TypeMap["repeat-box"] = Vector;
    198158  TypeMap["rotate-to-pas"] = Molecule;
     
    202162  TypeMap["scale-box"] = Vector;
    203163  TypeMap["set-basis"] = String;
    204   TypeMap["subgraph-dissect"] = None;
    205   TypeMap["suspend-in-water"] = Double;
     164  TypeMap["start-mol"] = Molecule;
     165  TypeMap["suspend-in-water"] = Molecule;
    206166  TypeMap["translate-mol"] = Vector;
    207167  TypeMap["verlet-integrate"] = String;
     
    209169
    210170  // value types for the values
    211   TypeMap["atom-by-id"] = Atom;
    212171  TypeMap["bin-output-file"] = String;
    213172  TypeMap["bin-end"] = Double;
    214173  TypeMap["bin-start"] = Double;
    215   TypeMap["bin-width"] = Double;
    216   TypeMap["convex-file"] = String;
    217174  TypeMap["distance"] = Double;
    218   TypeMap["distances"] = Vector;
    219   TypeMap["DoRotate"] = Boolean;
    220   TypeMap["element"] = Element;
     175  TypeMap["distances"] = ListOfDoubles;
     176  TypeMap["elements"] = Element;
    221177  TypeMap["elements"] = ListOfElements;
    222   TypeMap["end-step"] = Integer;
    223   TypeMap["id-mapping"] = Boolean;
    224178  TypeMap["length"] = Double;
    225   TypeMap["lengths"] = Vector;
     179  TypeMap["lengths"] = ListOfDoubles;
    226180  TypeMap["MaxDistance"] = Double;
    227181  TypeMap["molecule-by-id"] = Molecule;
    228   TypeMap["molecule-by-name"] = Molecule;
    229   TypeMap["nonconvex-file"] = String;
    230   TypeMap["order"] = Integer;
    231182  TypeMap["output-file"] = String;
    232183  TypeMap["periodic"] = Boolean;
    233184  TypeMap["position"] = Vector;
    234   TypeMap["sphere-radius"] = Double;
    235   TypeMap["start-step"] = Integer;
    236185
    237186  // default values for any action that needs one (always string!)
    238   DefaultValue["bin-width"] = "0.5";
    239   DefaultValue["fastparsing"] = "0";
    240   DefaultValue["atom-by-id"] = "-1";
    241187  DefaultValue["molecule-by-id"] = "-1";
    242   DefaultValue["periodic"] = "0";
    243188
    244189
    245190  // list of generic actions
    246         generic.insert("add-atom");
    247   generic.insert("bond-file");
    248         generic.insert("bond-table");
     191//      generic.insert("add-atom");
     192//  generic.insert("bond-file");
     193//      generic.insert("bond-table");
    249194  generic.insert("boundary");
    250195//  generic.insert("bound-in-box");
     
    253198        generic.insert("change-box");
    254199//  generic.insert("change-molname");
    255         generic.insert("change-element");
    256   generic.insert("convex-envelope");
    257         generic.insert("default-molname");
    258         generic.insert("depth-first-search");
    259         generic.insert("element-db");
    260         generic.insert("fastparsing");
    261   generic.insert("fill-molecule");
    262   generic.insert("fragment-mol");
     200//      generic.insert("change-element");
     201//  generic.insert("convex-envelope");
     202//      generic.insert("default-molname");
     203//      generic.insert("depth-first-search");
     204//      generic.insert("element-db");
     205//      generic.insert("fastparsing");
     206//  generic.insert("fill-molecule");
     207//  generic.insert("fragment-mol");
    263208  generic.insert("help");
    264         generic.insert("linear-interpolate");
     209//      generic.insert("linear-interpolate");
    265210//  generic.insert("molecular-volume");
    266   generic.insert("nonconvex-envelope");
    267         generic.insert("pair-correlation");
     211//  generic.insert("nonconvex-envelope");
     212//      generic.insert("pair-correlation");
     213//      generic.insert("pair-correlation-point");
     214//      generic.insert("pair-correlation-surface");
    268215//      generic.insert("parse-xyz");
    269216//  generic.insert("principal-axis-system");
    270   generic.insert("remove-atom");
    271   generic.insert("remove-sphere");
    272   generic.insert("repeat-box");
    273   generic.insert("rotate-to-pas");
    274         generic.insert("save-adjacency");
    275   generic.insert("save-bonds");
    276   generic.insert("save-temperature");
     217//  generic.insert("remove-atom");
     218//  generic.insert("remove-sphere");
     219    generic.insert("repeat-box");
     220//  generic.insert("rotate-to-pas");
     221//      generic.insert("save-adjacency");
     222//  generic.insert("save-bonds");
     223//  generic.insert("save-temperature");
    277224  generic.insert("scale-box");
    278   generic.insert("set-basis");
    279         generic.insert("subgraph-dissect");
    280   generic.insert("suspend-in-water");
    281   generic.insert("translate-mol");
     225//  generic.insert("set-basis");
     226//      generic.insert("subspace-dissect");
     227//  generic.insert("suspend-in-water");
     228//  generic.insert("translate-mol");
    282229        generic.insert("verbose");
    283   generic.insert("verlet-integrate");
     230//  generic.insert("verlet-integrate");
    284231        generic.insert("version");
     232//      // list of generic values
     233//      generic.insert("bin-output-file");
     234//  generic.insert("bin-end");
     235//  generic.insert("bin-start");
     236//  generic.insert("distance");
     237//  generic.insert("distances");
     238//  generic.insert("element");
     239//  generic.insert("end-mol");
     240    generic.insert("input");
     241//  generic.insert("length");
     242//  generic.insert("lengths");
     243//  generic.insert("MaxDistance");
     244//  generic.insert("molecule-by-id");
     245//  generic.insert("output-file");
     246//  generic.insert("periodic");
     247//  generic.insert("position");
     248//  generic.insert("start-mol");
    285249
    286250    // positional arguments
    287   generic.insert("input");
    288   inputfile.insert("input");
    289 
    290     // hidden arguments
    291   generic.insert("atom-by-id");
    292   generic.insert("bin-end");
    293   generic.insert("bin-output-file");
    294   generic.insert("bin-start");
    295   generic.insert("bin-width");
    296   generic.insert("convex-file");
    297   generic.insert("distance");
    298   generic.insert("DoRotate");
    299   generic.insert("distances");
    300   generic.insert("element");
    301   generic.insert("elements");
    302   generic.insert("end-step");
    303   generic.insert("id-mapping");
    304   generic.insert("lengths");
    305   generic.insert("MaxDistance");
    306   generic.insert("molecule-by-id");
    307   generic.insert("molecule-by-name");
    308   generic.insert("nonconvex-file");
    309   generic.insert("order");
    310   generic.insert("output-file");
    311   generic.insert("periodic");
    312   generic.insert("position");
    313   generic.insert("sphere-radius");
    314   generic.insert("start-step");
     251    inputfile.insert("input");
    315252}
    316253
     
    349286              ;
    350287            break;
    351           case Box:
    352             ListRunner->second->add_options()
    353               (getKeyAndShortForm(*OptionRunner).c_str(),
    354                   po::value<BoxValue>()->multitoken(),
    355                   getDescription(*OptionRunner).c_str())
    356               ;
    357             break;
    358288          case Integer:
    359289            ListRunner->second->add_options()
     
    409339            ListRunner->second->add_options()
    410340              (getKeyAndShortForm(*OptionRunner).c_str(),
    411                   po::value<VectorValue>()->multitoken(),
     341                  po::value< vector<double> >()->multitoken(),
     342                  getDescription(*OptionRunner).c_str())
     343              ;
     344            break;
     345          case Box:
     346            ListRunner->second->add_options()
     347              (getKeyAndShortForm(*OptionRunner).c_str(),
     348                  po::value< vector<double> >(),
    412349                  getDescription(*OptionRunner).c_str())
    413350              ;
     
    448385            ListRunner->second->add_options()
    449386              (getKeyAndShortForm(*OptionRunner).c_str(),
    450                   po::value< vector<int> >(),
     387                  DefaultValue.find(*OptionRunner) != DefaultValue.end() ?
     388                        po::value< int >()->default_value(atoi(DefaultValue[*OptionRunner].c_str())) :
     389                        po::value< int >(),
    451390                  getDescription(*OptionRunner).c_str())
    452391              ;
     
    558497}
    559498
    560 /** Returns the inverse to MapOfActions::ShortFormMap, i.e. lookup actionname for its short form.
    561  * \return map from short form of action to name of action
    562  */
    563 map <std::string, std::string> MapOfActions::getShortFormToActionMap()
    564 {
    565   map <std::string, std::string> result;
    566 
    567   for (map<std::string, std::string>::iterator iter = ShortFormMap.begin(); iter != ShortFormMap.end();  ++iter)
    568     result[iter->second] = iter->first;
    569 
    570   return result;
    571 }
    572499
    573500
  • src/Actions/MapOfActions.hpp

    re6317b rf8e486  
    3030  std::string getKeyAndShortForm(string actionname);
    3131  std::string getShortForm(string actionname);
    32   map <std::string, std::string> getShortFormToActionMap();
    3332
    3433  void AddOptionsToParser();
  • src/Actions/MoleculeAction/FillWithMoleculeAction.cpp

    re6317b rf8e486  
    6868
    6969  if(dialog->display()) {
    70     DoLog(1) && (Log() << Verbose(1) << "Filling Box with water molecules, lengths(" << lengths[0] << "," << lengths[1] << "," << lengths[2] << "), distances (" << distances[0] << "," << distances[1] << "," << distances[2] << "), MaxDistance " << MaxDistance << ", DoRotate " << DoRotate << "." << endl);
    7170    // construct water molecule
    7271    molecule *filler = World::getInstance().createMolecule();
    73     if (!filler->AddXYZFile(filename)) {
    74       DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << filename << "." << endl);
    75     }
    76     filler->SetNameFromFilename(filename.c_str());
     72//    if (!filler->AddXYZFile(filename)) {
     73//      DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << filename << "." << endl);
     74//    }
     75//    filler->SetNameFromFilename(filename);
    7776    molecule *Filling = NULL;
    78 //    atom *first = NULL, *second = NULL, *third = NULL;
    79 //    first = World::getInstance().createAtom();
    80 //    first->type = World::getInstance().getPeriode()->FindElement(1);
    81 //    first->x = Vector(0.441, -0.143, 0.);
    82 //    filler->AddAtom(first);
    83 //    second = World::getInstance().createAtom();
    84 //    second->type = World::getInstance().getPeriode()->FindElement(1);
    85 //    second->x = Vector(-0.464, 1.137, 0.0);
    86 //    filler->AddAtom(second);
    87 //    third = World::getInstance().createAtom();
    88 //    third->type = World::getInstance().getPeriode()->FindElement(8);
    89 //    third->x = Vector(-0.464, 0.177, 0.);
    90 //    filler->AddAtom(third);
    91 //    filler->AddBond(first, third, 1);
    92 //    filler->AddBond(second, third, 1);
     77    atom *first = NULL, *second = NULL, *third = NULL;
     78    first = World::getInstance().createAtom();
     79    first->type = World::getInstance().getPeriode()->FindElement(1);
     80    first->x = Vector(0.441, -0.143, 0.);
     81    filler->AddAtom(first);
     82    second = World::getInstance().createAtom();
     83    second->type = World::getInstance().getPeriode()->FindElement(1);
     84    second->x = Vector(-0.464, 1.137, 0.0);
     85    filler->AddAtom(second);
     86    third = World::getInstance().createAtom();
     87    third->type = World::getInstance().getPeriode()->FindElement(8);
     88    third->x = Vector(-0.464, 0.177, 0.);
     89    filler->AddAtom(third);
     90    filler->AddBond(first, third, 1);
     91    filler->AddBond(second, third, 1);
    9392    World::getInstance().getConfig()->BG->ConstructBondGraph(filler);
    94 //    filler->SetNameFromFilename("water");
     93    filler->SetNameFromFilename("water");
    9594    // call routine
    9695    double distance[NDIM];
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp

    re6317b rf8e486  
    6060
    6161  dialog->queryString(NAME, &filename, MapOfActions::getInstance().getDescription(NAME));
    62   dialog->queryInt("start-step", &start, MapOfActions::getInstance().getDescription("start-step"));
    63   dialog->queryInt("end-step", &end, MapOfActions::getInstance().getDescription("end-step"));
     62  dialog->queryInt("start-mol", &start, MapOfActions::getInstance().getDescription("start"));
     63  dialog->queryInt("end-mol", &start, MapOfActions::getInstance().getDescription("end"));
    6464  dialog->queryMolecule("molecule-by-id", &mol, MapOfActions::getInstance().getDescription("molecule-by-id"));
    6565  dialog->queryBoolean("id-mapping", &IdMapping, MapOfActions::getInstance().getDescription("id-mapping"));
  • src/Actions/MoleculeAction/TranslateAction.cpp

    re6317b rf8e486  
    5858  dialog->queryMolecule("molecule-by-id", &mol, MapOfActions::getInstance().getDescription("molecule-by-id"));
    5959  dialog->queryBoolean("periodic", &periodic, MapOfActions::getInstance().getDescription("periodic"));
    60   cout << "pre-dialog" << endl;
    6160
    6261  if(dialog->display()) {
    63     cout << "post-dialog" << endl;
    6462    DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
    6563    if (periodic)
  • src/Actions/TesselationAction/ConvexEnvelopeAction.cpp

    re6317b rf8e486  
    2121#include "atom.hpp"
    2222#include "boundary.hpp"
    23 #include "config.hpp"
    2423#include "linkedcell.hpp"
    2524#include "log.hpp"
     
    5756  molecule * mol = NULL;
    5857  bool Success = false;
    59   config *configuration = World::getInstance().getConfig();
    6058
    6159  dialog->queryMolecule(NAME, &mol, MapOfActions::getInstance().getDescription(NAME));
    62   dialog->queryString("convex-file", &filenameConvex, MapOfActions::getInstance().getDescription("convex-file"));
    63   dialog->queryString("nonconvex-file", &filenameNonConvex, MapOfActions::getInstance().getDescription("nonconvex-file"));
     60  dialog->queryString("output", &filenameConvex, MapOfActions::getInstance().getDescription("output"));
     61  dialog->queryString("output", &filenameNonConvex, MapOfActions::getInstance().getDescription("output"));
    6462
    6563  if(dialog->display()) {
     
    7472    FindNonConvexBorder(mol, TesselStruct, LCList, 50., filenameNonConvex.c_str());
    7573    //RemoveAllBoundaryPoints(TesselStruct, mol, argv[argptr]);
    76     const double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, filenameConvex.c_str());
    77     const double clustervolume = VolumeOfConvexEnvelope(TesselStruct, configuration);
    78     DoLog(0) && (Log() << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration->GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
    79     DoLog(0) && (Log() << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration->GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
     74    ConvexizeNonconvexEnvelope(TesselStruct, mol, filenameConvex.c_str());
    8075    delete(TesselStruct);
    8176    delete(LCList);
  • src/Actions/TesselationAction/NonConvexEnvelopeAction.cpp

    re6317b rf8e486  
    5858  clock_t start,end;
    5959
    60   dialog->queryMolecule(NAME, &Boundary, MapOfActions::getInstance().getDescription(NAME));
    61   dialog->queryString("nonconvex-file", &filename, MapOfActions::getInstance().getDescription("nonconvex-file"));
    62   dialog->queryDouble("sphere-radius", &SphereRadius, MapOfActions::getInstance().getDescription("sphere-radius"));
     60  dialog->queryDouble(NAME, &SphereRadius, MapOfActions::getInstance().getDescription(NAME));
     61  dialog->queryString("output", &filename, MapOfActions::getInstance().getDescription("output"));
     62  dialog->queryMolecule("molecule-by-id", &Boundary, MapOfActions::getInstance().getDescription("molecule-by-id"));
    6363
    6464  if(dialog->display()) {
  • src/Actions/WorldAction/AddEmptyBoundaryAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "log.hpp"
  • src/Actions/WorldAction/BoundInBoxAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/BoundInBoxAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "log.hpp"
    1213#include "molecule.hpp"
  • src/Actions/WorldAction/CenterInBoxAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/CenterInBoxAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "log.hpp"
    1213#include "molecule.hpp"
  • src/Actions/WorldAction/CenterOnEdgeAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/CenterOnEdgeAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "log.hpp"
  • src/Actions/WorldAction/ChangeBoxAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/ChangeBoxAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "log.hpp"
    1213#include "verbose.hpp"
  • src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "Descriptors/AtomDescriptor.hpp"
    1314#include "log.hpp"
    14 #include "molecule.hpp"
    1515#include "vector.hpp"
    1616#include "verbose.hpp"
     
    3838  Dialog *dialog = UIFactory::getInstance().makeDialog();
    3939  double radius = 0.;
    40   Vector point;
     40  atom *first = NULL;
    4141
    4242  dialog->queryDouble(NAME, &radius, MapOfActions::getInstance().getDescription(NAME));
    43   dialog->queryVector("position", &point, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription("position"));
     43  dialog->queryAtom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));
    4444
    4545  if(dialog->display()) {
    4646    delete dialog;
    47     DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << point << " with radius " << radius << "." << endl);
     47    DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << first->nr << " with radius " << radius << "." << endl);
    4848    vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
    49     vector<molecule *> molecules = World::getInstance().getAllMolecules();
    50     for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
    51       if (point.DistanceSquared((*AtomRunner)->x) > radius*radius) { // distance to first above radius ...
    52         // TODO: This is not necessary anymore when atoms are completely handled by World (create/destroy and load/save)
    53         for (vector<molecule *>::iterator iter = molecules.begin();iter != molecules.end();++iter)
    54           (*iter)->erase(*AtomRunner);
    55         World::getInstance().destroyAtom(*AtomRunner);
    56       }
     49    vector<atom*>::iterator AtomAdvancer = AllAtoms.begin();
     50    for (vector<atom*>::iterator AtomRunner = AtomAdvancer; AtomRunner != AllAtoms.end(); ) {
     51      ++AtomAdvancer;
     52      if (first != *AtomRunner) // dont't destroy reference ...
     53        if (first->x.DistanceSquared((*AtomRunner)->x) > radius*radius) // distance to first above radius ...
     54          World::getInstance().destroyAtom(*AtomRunner);
    5755    }
     56    World::getInstance().destroyAtom(first);
    5857    return Action::success;
    5958  } else {
  • src/Actions/WorldAction/RepeatBoxAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/RepeatBoxAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "log.hpp"
  • src/Actions/WorldAction/ScaleBoxAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/ScaleBoxAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "atom.hpp"
    1213#include "log.hpp"
  • src/Actions/WorldAction/SetDefaultNameAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/SetDefaultNameAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "log.hpp"
    12 #include "verbose.hpp"
    1313#include "World.hpp"
    1414
     
    3939
    4040  if(dialog->display()) {
    41     World::getInstance().setDefaultName(defaultname);
    42     DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl);
     41    char outputname[MAXSTRINGSIZE];
     42    strcpy(outputname, defaultname.c_str());
     43    World::getInstance().setDefaultName(outputname);
    4344    delete dialog;
    4445    return Action::success;
  • src/Actions/WorldAction/SetGaussianBasisAction.cpp

    re6317b rf8e486  
    99
    1010#include "Actions/WorldAction/SetGaussianBasisAction.hpp"
     11#include "CommandLineParser.hpp"
    1112#include "config.hpp"
    12 #include "log.hpp"
    13 #include "verbose.hpp"
    1413#include "World.hpp"
    1514
     
    3433Action::state_ptr WorldSetGaussianBasisAction::performCall() {
    3534  Dialog *dialog = UIFactory::getInstance().makeDialog();
    36   config *configuration = World::getInstance().getConfig();
    37   dialog->queryString(NAME, &(configuration->basis), MapOfActions::getInstance().getDescription(NAME));
     35
     36  dialog->queryString(NAME, &World::getInstance().getConfig()->basis, MapOfActions::getInstance().getDescription(NAME));
    3837
    3938  if(dialog->display()) {
    40     DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration->basis << "." << endl);
    4139    delete dialog;
    4240    return Action::success;
  • src/CommandLineParser.cpp

    re6317b rf8e486  
    1111#include <fstream>
    1212#include <iostream>
    13 #include <map>
    1413
    1514#include "Patterns/Singleton_impl.hpp"
    1615#include "CommandLineParser.hpp"
    17 #include "log.hpp"
    18 #include "verbose.hpp"
    1916
    2017using namespace std;
     
    5047}
    5148
    52 /** Scan the argument list for -a or --arguments and store their order for later use.
    53  * \param &ShortFormToActionMap e.g. gives "help" for "h"
    54  */
    55 void CommandLineParser::scanforSequenceOfArguments(map <std::string, std::string> &ShortFormToActionMap)
    56 {
    57   // go through all arguments
    58   for (int i=1;i<argc;i++) {
    59     (cout << Verbose(1) << "Checking on " << argv[i] << endl);
    60     // check whether they begin with - or -- and check that next letter is not numeric, if so insert
    61     if (argv[i][0] == '-') {
    62       (cout << Verbose(1) << "Possible argument: " << argv[i] << endl);
    63       if (argv[i][1] == '-') {
    64         (cout << Verbose(1) << "Putting " << argv[i] << " into the sequence." << endl);
    65         SequenceOfActions.push_back(&(argv[i][2]));
    66       } else if (((argv[i][1] < '0') || (argv[i][1] > '9')) && ((argv[i][1] != '.'))) {
    67         map <std::string, std::string>::iterator iter = ShortFormToActionMap.find(&(argv[i][1]));
    68         if (iter != ShortFormToActionMap.end()) {
    69           (cout << Verbose(1) << "Putting " << iter->second << " for " << iter->first << " into the sequence." << endl);
    70           SequenceOfActions.push_back(iter->second);
    71         }
    72       }
    73     }
    74   }
    75 }
    7649
    7750
     
    10174 * \param **_argv argument array from main()
    10275 */
    103 void CommandLineParser::Run(int _argc, char **_argv, map <std::string, std::string> &ShortFormToActionMap)
     76void CommandLineParser::Run(int _argc, char **_argv)
    10477{
    10578  setOptions(_argc,_argv);
    10679  Parse();
    107   scanforSequenceOfArguments(ShortFormToActionMap);
    10880}
    10981
  • src/CommandLineParser.hpp

    re6317b rf8e486  
    1515#include "Patterns/Singleton.hpp"
    1616
    17 #include <list>
    1817
    1918class CommandLineParser : public Singleton<CommandLineParser> {
     
    2221
    2322  // Parses the command line arguments in CommandLineParser::**argv with currently known options.
    24   void Run(int _argc, char **_argv, std::map <std::string, std::string> &ShortFormToActionMap);
     23  void Run(int _argc, char **_argv);
    2524
    2625  // Checks whether there have been any commands on the command line.
     
    4140  po::variables_map vm;
    4241
    43   // private sequence of actions as they appeared on the command line
    44   std::list<std::string> SequenceOfActions;
    45 
    4642private:
    4743  // private constructor and destructor
     
    6157  void Parse();
    6258
    63   // as boost's program_options does not care about of order of appearance but we do for actions,
    64   // we have to have a list and a function to obtain it.
    65   void scanforSequenceOfArguments(std::map <std::string, std::string> &ShortFormToActionMap);
    66 
    6759  // argument counter and array passed on from main()
    6860  int argc;
  • src/Helpers/MemDebug.hpp

    re6317b rf8e486  
    3333// to be loaded before the define
    3434#include <string>
    35 #include <boost/optional.hpp>
    3635#include <boost/shared_ptr.hpp>
    3736#include <boost/function.hpp>
  • src/Legacy/oldmenu.cpp

    re6317b rf8e486  
    8787        Dialog *dialog = UIFactory::getInstance().makeDialog();
    8888        first = World::getInstance().createAtom();
    89         std::vector<element *> elements;
    9089        dialog->queryVector("Please enter coordinates: ",&first->x,World::getInstance().getDomain(), false);
    91         dialog->queryElement("Please choose element: ",&elements);
     90        dialog->queryElement("Please choose element: ",&first->type);
    9291        if(dialog->display()){
    93           if (elements.size() == 1) {
    94             first->type = elements.at(0);
    95             mol->AddAtom(first);  // add to molecule
    96           } else {
    97             DoeLog(1) && (eLog() << Verbose(1) << "Unequal to one element given for element of new atom." << endl);
    98           }
     92          mol->AddAtom(first);  // add to molecule
    9993        }
    10094        else{
  • src/Makefile.am

    re6317b rf8e486  
    114114  Descriptors/MoleculeDescriptor.cpp \
    115115  Descriptors/MoleculeIdDescriptor.cpp \
    116   Descriptors/MoleculeNameDescriptor.cpp \
    117116  Descriptors/MoleculePtrDescriptor.cpp
    118117                                   
     
    123122  Descriptors/MoleculeDescriptor.hpp \
    124123  Descriptors/MoleculeIdDescriptor.hpp \
    125   Descriptors/MoleculeNameDescriptor.hpp \
    126124  Descriptors/MoleculePtrDescriptor.hpp
    127125                                   
     
    239237libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER}
    240238libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER}
    241 molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
    242239molecuilder_LDFLAGS = $(BOOST_LDFLAGS)
    243240molecuilder_SOURCES = builder.cpp
  • src/UIElements/CommandLineUI/CommandLineDialog.cpp

    re6317b rf8e486  
    88#include "Helpers/MemDebug.hpp"
    99
     10#include <cassert>
    1011#include <iostream>
    11 #include <vector>
    1212
    1313#include <Descriptors/AtomDescriptor.hpp>
     
    1616#include <Descriptors/MoleculeIdDescriptor.hpp>
    1717#include "CommandLineUI/CommandLineDialog.hpp"
    18 
    19 #include "Actions/Values.hpp"
    2018
    2119#include "element.hpp"
     
    8179}
    8280
    83 void CommandLineDialog::queryElement(const char* title, std::vector<element *> *target, string _description){
     81void CommandLineDialog::queryElement(const char* title, const element **target, string _description){
    8482  registerQuery(new ElementCommandLineQuery(title,target, _description));
    8583}
     
    108106    tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();
    109107    return true;
    110   } else {
    111     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing integer for " << getTitle() << "." << endl);
    112     return false;
    113   }
     108  } else
     109    return false;
    114110}
    115111
     
    121117
    122118bool CommandLineDialog::BooleanCommandLineQuery::handle() {
    123   if (CommandLineParser::getInstance().vm.count(getTitle())) {
    124     tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>();
    125     return true;
    126   } else {
    127     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing boolean for " << getTitle() << "." << endl);
    128     return false;
    129   }
     119  bool badInput = false;
     120  char input = ' ';
     121  do{
     122    badInput = false;
     123    Log() << Verbose(0) << getTitle();
     124    cin >> input;
     125    if ((input == 'y' ) || (input == 'Y')) {
     126      tmp = true;
     127    } else if ((input == 'n' ) || (input == 'N')) {
     128      tmp = false;
     129    } else {
     130      badInput=true;
     131      cin.clear();
     132      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     133      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
     134    }
     135  } while(badInput);
     136  // clear the input buffer of anything still in the line
     137  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     138  return true;
    130139}
    131140
     
    140149    tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();
    141150    return true;
    142   } else {
    143     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing string for " << getTitle() << "." << endl);
    144     return false;
    145   }
     151  } else
     152    return false;
    146153}
    147154
     
    156163    tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();
    157164    return true;
    158   } else {
    159     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing double for " << getTitle() << "." << endl);
    160     return false;
    161   }
     165  } else
     166    return false;
    162167}
    163168
     
    174179    tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));
    175180    return true;
    176   } else {
    177     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing atom for " << getTitle() << "." << endl);
    178     return false;
    179   }
     181  } else
     182    return false;
    180183}
    181184
     
    196199      tmp = NULL;
    197200    return true;
    198   } else {
    199     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing molecule for " << getTitle() << "." << endl);
    200     return false;
    201   }
     201  } else
     202    return false;
    202203}
    203204
     
    210211
    211212bool CommandLineDialog::VectorCommandLineQuery::handle() {
    212   VectorValue temp;
    213   if (CommandLineParser::getInstance().vm.count(getTitle())) {
    214     temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >();
    215     tmp->at(0) = temp.x;
    216     tmp->at(1) = temp.y;
    217     tmp->at(2) = temp.z;
    218     return true;
    219   } else {
    220     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing vector for " << getTitle() << "." << endl);
    221     return false;
    222   }
     213  vector<double> temp;
     214  if (CommandLineParser::getInstance().vm.count(getTitle())) {
     215    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
     216    assert((temp.size() == 3) && "Vector from command line does not have three components.");
     217    for (int i=0;i<NDIM;i++)
     218      tmp->at(i) = temp[i];
     219    return true;
     220  } else
     221    return false;
    223222}
    224223
     
    232231
    233232bool CommandLineDialog::BoxCommandLineQuery::handle() {
    234   BoxValue temp;
    235   if (CommandLineParser::getInstance().vm.count(getTitle())) {
    236     temp = CommandLineParser::getInstance().vm[getTitle()].as< BoxValue >();
    237     tmp[0] = temp.xx;
    238     tmp[1] = temp.xy;
    239     tmp[2] = temp.xz;
    240     tmp[3] = temp.yy;
    241     tmp[4] = temp.yz;
    242     tmp[5] = temp.zz;
    243     return true;
    244   } else {
    245     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing symmetric box matrix for " << getTitle() << "." << endl);
    246     return false;
    247   }
    248 }
    249 
    250 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(string title, std::vector<element *> *target, string _description) :
     233  vector<double> temp;
     234  if (CommandLineParser::getInstance().vm.count(getTitle())) {
     235    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
     236    assert((temp.size() == 6) && "Symmetric box matrix from command line does not have six components.");
     237    for (int i=0;i<6;i++) {
     238      tmp[i] = temp[i];
     239    }
     240    return true;
     241  } else
     242    return false;
     243}
     244
     245CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(string title, const element **target, string _description) :
    251246    Dialog::ElementQuery(title,target, _description)
    252247{}
     
    257252bool CommandLineDialog::ElementCommandLineQuery::handle() {
    258253  // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector?
    259   periodentafel *periode = World::getInstance().getPeriode();
    260   element *elemental = NULL;
     254  int Z;
    261255  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    262256    vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
    263     for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) {
    264       elemental = periode->FindElement(*ZRunner);
    265       ASSERT(elemental != NULL, "Invalid element specified in ElementCommandLineQuery");
    266       elements.push_back(elemental);
    267     }
    268     return true;
    269   } else {
    270     DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing element for " << getTitle() << "." << endl);
    271     return false;
    272   }
    273 }
     257    vector<int>::iterator ElementRunner = AllElements.begin();
     258    Z = *ElementRunner;
     259    // TODO: So far, this does not really erase the element in the parsed list.
     260    AllElements.erase(ElementRunner);
     261    tmp = World::getInstance().getPeriode()->FindElement(Z);
     262    return true;
     263  } else
     264    return false;
     265}
  • src/UIElements/CommandLineUI/CommandLineDialog.hpp

    re6317b rf8e486  
    3636  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
    3737  virtual void queryBox(const char*,double ** const, std::string = "");
    38   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
     38  virtual void queryElement(const char*,const element **, std::string = "");
    3939
    4040protected:
     
    105105  class ElementCommandLineQuery : public Dialog::ElementQuery {
    106106  public:
    107     ElementCommandLineQuery(std::string title, std::vector<element *> *_target, std::string _description = "");
     107    ElementCommandLineQuery(std::string title, const element **_target, std::string _description = "");
    108108    virtual ~ElementCommandLineQuery();
    109109    virtual bool handle();
  • src/UIElements/CommandLineUI/CommandLineWindow.cpp

    re6317b rf8e486  
    1414
    1515#include "Actions/ActionRegistry.hpp"
    16 #include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
    1716#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
    18 #include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
     17#include "Actions/AnalysisAction/PairCorrelationToPointAction.hpp"
     18#include "Actions/AnalysisAction/PairCorrelationToSurfaceAction.hpp"
    1919#include "Actions/AtomAction/AddAction.hpp"
    2020#include "Actions/AtomAction/ChangeElementAction.hpp"
     
    2828#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
    2929#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
    30 #include "Actions/FragmentationAction/FragmentationAction.hpp"
    3130#include "Actions/MoleculeAction/BondFileAction.hpp"
    3231#include "Actions/MoleculeAction/ChangeNameAction.hpp"
     
    3635#include "Actions/MoleculeAction/SaveBondsAction.hpp"
    3736#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
    38 #include "Actions/MoleculeAction/TranslateAction.hpp"
    3937#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
    4038#include "Actions/ParserAction/LoadXyzAction.hpp"
     
    7775CommandLineWindow::~CommandLineWindow()
    7876{
     77//  // go through all possible actions
     78//  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRegistry::getInstance().getBeginIter() != ActionRegistry::getInstance().getEndIter(); ActionRunner = ActionRegistry::getInstance().getBeginIter()) {
     79//    ActionRegistry::getInstance().unregisterAction(ActionRunner->second);
     80//    delete(ActionRunner->second);
     81//  }
     82
    7983  delete statusIndicator;
    8084}
     
    8286void CommandLineWindow::display() {
    8387  // go through all possible actions
    84   for (std::list<std::string>::iterator CommandRunner = CommandLineParser::getInstance().SequenceOfActions.begin(); CommandRunner != CommandLineParser::getInstance().SequenceOfActions.end(); ++CommandRunner) {
    85     cout << "Checking presence of " << *CommandRunner << endl;
    86     if (ActionRegistry::getInstance().isActionByNamePresent(*CommandRunner))
    87       ActionRegistry::getInstance().getActionByName(*CommandRunner)->call();
     88  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRunner != ActionRegistry::getInstance().getEndIter(); ActionRunner++) {
     89    // check whether action is present in command line
     90    if (CommandLineParser::getInstance().vm.count(ActionRunner->first)) {
     91      ActionRunner->second->call();
     92    }
    8893  }
    8994}
     
    9196void CommandLineWindow::populateAnalysisActions()
    9297{
    93   new AnalysisMolecularVolumeAction();
    9498  new AnalysisPairCorrelationAction();
    95   new AnalysisPrincipalAxisSystemAction();
     99  new AnalysisPairCorrelationToPointAction();
     100  new AnalysisPairCorrelationToSurfaceAction();
    96101}
    97102
     
    116121{
    117122  new FragmentationDepthFirstSearchAction();
    118   new FragmentationFragmentationAction();
    119   new FragmentationSubgraphDissectionAction();
    120123}
    121124
     
    129132  new MoleculeSaveBondsAction();
    130133  new MoleculeSaveTemperatureAction();
    131   new MoleculeTranslateAction();
    132134  new MoleculeVerletIntegrationAction();
    133135}
  • src/UIElements/Dialog.cpp

    re6317b rf8e486  
    4141    retval &= (*iter)->handle();
    4242    // if any query fails (is canceled), we can end the handling process
    43     if(!retval) {
    44       DoeLog(1) && (eLog() << Verbose(1) << "The following query failed: " << (**iter).getTitle() << "." << endl);
     43    if(!retval)
    4544      break;
    46     }
    4745  }
    4846  if (retval){
     
    203201
    204202// Element Queries
    205 Dialog::ElementQuery::ElementQuery(std::string title, std::vector<element *> *_target, std::string _description) :
     203Dialog::ElementQuery::ElementQuery(std::string title, const element **_target, std::string _description) :
    206204  Query(title, _description),
     205  tmp(0),
    207206  target(_target)
    208207  {}
     
    211210
    212211void Dialog::ElementQuery::setResult(){
    213   *target=elements;
    214 }
     212  *target=tmp;
     213}
  • src/UIElements/Dialog.hpp

    re6317b rf8e486  
    1111#include<string>
    1212#include<list>
    13 #include<vector>
    1413
    1514class atom;
     
    3332  virtual void queryVector(const char*,Vector *,const double *const,bool, std::string = "")=0;
    3433  virtual void queryBox(const char*,double ** const, std::string = "")=0;
    35   virtual void queryElement(const char*, std::vector<element *> *, std::string = "")=0;
     34  virtual void queryElement(const char*,const element **, std::string = "")=0;
    3635
    3736  virtual bool display();
     
    5049  //base class for all queries
    5150  class Query {
    52     friend class Dialog;
    5351  public:
    5452    Query(std::string _title, std::string _description = "");
     
    174172  class ElementQuery : public Query {
    175173  public:
    176     ElementQuery(std::string title, std::vector<element *> *_target, std::string _description = "");
     174    ElementQuery(std::string title, const element**_target, std::string _description = "");
    177175    virtual ~ElementQuery();
    178176    virtual bool handle()=0;
    179177    virtual void setResult();
    180178  protected:
    181     std::vector<element *> elements;
     179    const element *tmp;
    182180  private:
    183     std::vector<element *> * const target;
     181    const element **target;
    184182  };
    185183
  • src/UIElements/TextUI/TextDialog.cpp

    re6317b rf8e486  
    7474}
    7575
    76 void TextDialog::queryElement(const char* title, std::vector<element *> *target, string description){
     76void TextDialog::queryElement(const char* title, const element **target, string description){
    7777  registerQuery(new ElementTextQuery(title,target,description));
    7878}
     
    283283}
    284284
    285 TextDialog::ElementTextQuery::ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description) :
    286     Dialog::ElementQuery(title,_target,_description)
     285TextDialog::ElementTextQuery::ElementTextQuery(std::string title, const element **target, std::string _description) :
     286    Dialog::ElementQuery(title,target,_description)
    287287{}
    288288
     
    293293  bool badInput=false;
    294294  bool aborted = false;
    295   element * tmp = NULL;
    296295  do{
    297296    badInput = false;
     
    310309          Log() << Verbose(0) << "No element with this atomic number!" << endl;
    311310          badInput = true;
    312         } else {
    313           elements.push_back(tmp);
    314311        }
    315312      }
     
    334331          Log() << Verbose(0) << "No element with this shorthand!" << endl;
    335332          badInput = true;
    336         } else {
    337           elements.push_back(tmp);
    338333        }
    339334      }
  • src/UIElements/TextUI/TextDialog.hpp

    re6317b rf8e486  
    3333  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
    3434  virtual void queryBox(const char*,double ** const, std::string = "");
    35   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
     35  virtual void queryElement(const char*,const element **, std::string = "");
    3636
    3737protected:
     
    102102  class ElementTextQuery : public Dialog::ElementQuery {
    103103  public:
    104     ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description = NULL);
     104    ElementTextQuery(std::string title, const element **_target, std::string _description = NULL);
    105105    virtual ~ElementTextQuery();
    106106    virtual bool handle();
  • src/World.cpp

    re6317b rf8e486  
    8181}
    8282
    83 std::string World::getDefaultName() {
     83char * World::getDefaultName() {
    8484  return defaultName;
    8585}
    8686
    87 void World::setDefaultName(std::string name)
     87void World::setDefaultName(char * name)
    8888{
    89   defaultName = name;
     89  delete[](defaultName);
     90  const int length = strlen(name);
     91  if (length < MAXSTRINGSIZE) {
     92    defaultName = new char[length+2];
     93    strncpy(defaultName, name, length);
     94  } else {
     95    defaultName = new char[MAXSTRINGSIZE];
     96    strncpy(defaultName, "none", MAXSTRINGSIZE-1);
     97  }
    9098};
    9199
    92 int World::getExitFlag() {
    93   return ExitFlag;
    94 }
    95 
    96 void World::setExitFlag(int flag) {
    97   if (ExitFlag < flag)
    98     ExitFlag = flag;
    99 }
    100100
    101101/******************** Methods to change World state *********************/
     
    127127
    128128double *World::cell_size = NULL;
     129char *World::defaultName = NULL;
    129130
    130131atom *World::createAtom(){
     
    281282    periode(new periodentafel),
    282283    configuration(new config),
    283     ExitFlag(0),
    284284    atoms(),
    285285    currAtomId(0),
     
    295295  cell_size[4] = 0.;
    296296  cell_size[5] = 20.;
    297   defaultName = "none";
     297  defaultName = new char[MAXSTRINGSIZE];
     298  strcpy(defaultName, "none");
    298299  molecules_deprecated->signOn(this);
    299300}
     
    303304  molecules_deprecated->signOff(this);
    304305  delete[] cell_size;
     306  delete[] defaultName;
    305307  delete molecules_deprecated;
    306308  delete periode;
  • src/World.hpp

    re6317b rf8e486  
    135135   * get the default name
    136136   */
    137   std::string getDefaultName();
     137  char * getDefaultName();
    138138
    139139  /**
    140140   * set the default name
    141141   */
    142   void setDefaultName(std::string name);
    143 
    144   /*
    145    * get the ExitFlag
    146    */
    147   int getExitFlag();
    148 
    149   /*
    150    * set the ExitFlag
    151    */
    152   void setExitFlag(int flag);
     142  void setDefaultName(char * name);
    153143
    154144  /***** Methods to work with the World *****/
     
    253243  config *configuration;
    254244  static double *cell_size;
    255   std::string defaultName;
    256   int ExitFlag;
     245  static char *defaultName;
    257246public:
    258247  AtomSet atoms;
  • src/analysis_correlation.cpp

    re6317b rf8e486  
    2525/** Calculates the pair correlation between given elements.
    2626 * Note given element order is unimportant (i.e. g(Si, O) === g(O, Si))
    27  * \param *molecules list of molecules structure
    28  * \param &elements vector of elements to correlate
     27 * \param *out output stream for debugging
     28 * \param *molecules list of molecules structure
     29 * \param *type1 first element or NULL (if any element)
     30 * \param *type2 second element or NULL (if any element)
    2931 * \return Map of doubles with values the pair of the two atoms.
    3032 */
    31 PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements)
     33PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const element * const type1, const element * const type2 )
    3234{
    3335  Info FunctionInfo(__func__);
    3436  PairCorrelationMap *outmap = NULL;
    3537  double distance = 0.;
    36   double *domain = World::getInstance().getDomain();
    3738
    3839  if (molecules->ListOfMolecules.empty()) {
     
    4243  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    4344    (*MolWalker)->doCountAtoms();
    44 
    45   // create all possible pairs of elements
    46   set <pair<element *, element *> > PairsOfElements;
    47   if (elements.size() >= 2) {
    48     for (vector<element *>::const_iterator type1 = elements.begin(); type1 != elements.end(); ++type1)
    49       for (vector<element *>::const_iterator type2 = elements.begin(); type2 != elements.end(); ++type2)
    50         if (type1 != type2) {
    51           PairsOfElements.insert( pair<element *, element*>(*type1,*type2) );
    52           DoLog(1) && (Log() << Verbose(1) << "Creating element pair " << (*type1)->symbol << " and " << (*type2)->symbol << "." << endl);
    53         }
    54   } else if (elements.size() == 1) { // one to all are valid
    55     element *elemental = *elements.begin();
    56     PairsOfElements.insert( pair<element *, element*>(elemental,(element *)NULL) );
    57     PairsOfElements.insert( pair<element *, element*>((element *)NULL,elemental) );
    58   } else { // all elements valid
    59     PairsOfElements.insert( pair<element *, element*>((element *)NULL, (element *)NULL) );
    60   }
    61 
    6245  outmap = new PairCorrelationMap;
    6346  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++){
     
    6750      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    6851        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
    69         for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++){
    70           if ((*MolOtherWalker)->ActiveFlag) {
    71             DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
    72             for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
    73               DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
    74               if ((*iter)->getId() < (*runner)->getId()){
    75                 for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
    76                   if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
    77                     distance = (*iter)->node->PeriodicDistance(*(*runner)->node,  domain);
     52        if ((type1 == NULL) || ((*iter)->type == type1)) {
     53          for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++){
     54            if ((*MolOtherWalker)->ActiveFlag) {
     55              DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
     56              for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
     57                DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
     58                if ((*iter)->getId() < (*runner)->getId()){
     59                  if ((type2 == NULL) || ((*runner)->type == type2)) {
     60                    distance = (*iter)->node->PeriodicDistance(*(*runner)->node,  World::getInstance().getDomain());
    7861                    //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;
    7962                    outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
    8063                  }
     64                }
    8165              }
    8266            }
     
    9175/** Calculates the pair correlation between given elements.
    9276 * Note given element order is unimportant (i.e. g(Si, O) === g(O, Si))
    93  * \param *molecules list of molecules structure
    94  * \param &elements vector of elements to correlate
     77 * \param *out output stream for debugging
     78 * \param *molecules list of molecules structure
     79 * \param *type1 first element or NULL (if any element)
     80 * \param *type2 second element or NULL (if any element)
    9581 * \param ranges[NDIM] interval boundaries for the periodic images to scan also
    9682 * \return Map of doubles with values the pair of the two atoms.
    9783 */
    98 PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const int ranges[NDIM] )
     84PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const element * const type1, const element * const type2, const int ranges[NDIM] )
    9985{
    10086  Info FunctionInfo(__func__);
     
    114100  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    115101    (*MolWalker)->doCountAtoms();
    116 
    117   // create all possible pairs of elements
    118   set <pair<element *, element *> > PairsOfElements;
    119   if (elements.size() >= 2) {
    120     for (vector<element *>::const_iterator type1 = elements.begin(); type1 != elements.end(); ++type1)
    121       for (vector<element *>::const_iterator type2 = elements.begin(); type2 != elements.end(); ++type2)
    122         if (type1 != type2) {
    123           PairsOfElements.insert( pair<element *, element*>(*type1,*type2) );
    124           DoLog(1) && (Log() << Verbose(1) << "Creating element pair " << (*type1)->symbol << " and " << (*type2)->symbol << "." << endl);
    125         }
    126   } else if (elements.size() == 1) { // one to all are valid
    127     element *elemental = *elements.begin();
    128     PairsOfElements.insert( pair<element *, element*>(elemental,(element *)NULL) );
    129     PairsOfElements.insert( pair<element *, element*>((element *)NULL,elemental) );
    130   } else { // all elements valid
    131     PairsOfElements.insert( pair<element *, element*>((element *)NULL, (element *)NULL) );
    132   }
    133 
    134102  outmap = new PairCorrelationMap;
    135   for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++){
     103  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
    136104    if ((*MolWalker)->ActiveFlag) {
    137105      double * FullMatrix = ReturnFullMatrixforSymmetric(World::getInstance().getDomain());
    138106      double * FullInverseMatrix = InverseMatrix(FullMatrix);
    139107      DoeLog(2) && (eLog()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
    140       eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
    141108      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    142109        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
    143         periodicX = *(*iter)->node;
    144         periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    145         // go through every range in xyz and get distance
    146         for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
    147           for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    148             for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    149               checkX = Vector(n[0], n[1], n[2]) + periodicX;
    150               checkX.MatrixMultiplication(FullMatrix);
    151               for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++){
    152                 if ((*MolOtherWalker)->ActiveFlag) {
    153                   DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
    154                   for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
    155                     DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
    156                     if ((*iter)->getId() < (*runner)->getId()){
    157                       for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
    158                         if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
     110        if ((type1 == NULL) || ((*iter)->type == type1)) {
     111          periodicX = *(*iter)->node;
     112          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
     113          // go through every range in xyz and get distance
     114          for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
     115            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
     116              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
     117                checkX = Vector(n[0], n[1], n[2]) + periodicX;
     118                checkX.MatrixMultiplication(FullMatrix);
     119                for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++)
     120                  if ((*MolOtherWalker)->ActiveFlag) {
     121                    DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
     122                    for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
     123                      DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
     124                      if ((*iter)->nr < (*runner)->nr)
     125                        if ((type2 == NULL) || ((*runner)->type == type2)) {
    159126                          periodicOtherX = *(*runner)->node;
    160127                          periodicOtherX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
     
    170137                              }
    171138                        }
    172                     }
    173139                  }
    174                 }
    175140              }
    176141            }
     142        }
    177143      }
    178144      delete[](FullMatrix);
    179145      delete[](FullInverseMatrix);
    180146    }
    181   }
    182147
    183148  return outmap;
     
    185150
    186151/** Calculates the distance (pair) correlation between a given element and a point.
    187  * \param *molecules list of molecules structure
    188  * \param &elements vector of elements to correlate with point
     152 * \param *out output stream for debugging
     153 * \param *molecules list of molecules structure
     154 * \param *type element or NULL (if any element)
    189155 * \param *point vector to the correlation point
    190156 * \return Map of dobules with values as pairs of atom and the vector
    191157 */
    192 CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point )
     158CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const element * const type, const Vector *point )
    193159{
    194160  Info FunctionInfo(__func__);
    195161  CorrelationToPointMap *outmap = NULL;
    196162  double distance = 0.;
    197   double *cell_size = World::getInstance().getDomain();
    198163
    199164  if (molecules->ListOfMolecules.empty()) {
     
    209174      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    210175        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
    211         for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
    212           if ((*type == NULL) || ((*iter)->type == *type)) {
    213             distance = (*iter)->node->PeriodicDistance(*point, cell_size);
    214             DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
    215             outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
    216           }
     176        if ((type == NULL) || ((*iter)->type == type)) {
     177          distance = (*iter)->node->PeriodicDistance(*point, World::getInstance().getDomain());
     178          DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
     179          outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
     180        }
    217181      }
    218182    }
     
    222186
    223187/** Calculates the distance (pair) correlation between a given element, all its periodic images and a point.
    224  * \param *molecules list of molecules structure
    225  * \param &elements vector of elements to correlate to point
     188 * \param *out output stream for debugging
     189 * \param *molecules list of molecules structure
     190 * \param *type element or NULL (if any element)
    226191 * \param *point vector to the correlation point
    227192 * \param ranges[NDIM] interval boundaries for the periodic images to scan also
    228193 * \return Map of dobules with values as pairs of atom and the vector
    229194 */
    230 CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] )
     195CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const element * const type, const Vector *point, const int ranges[NDIM] )
    231196{
    232197  Info FunctionInfo(__func__);
     
    251216      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    252217        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
    253         for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
    254           if ((*type == NULL) || ((*iter)->type == *type)) {
    255             periodicX = *(*iter)->node;
    256             periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    257             // go through every range in xyz and get distance
    258             for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
    259               for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    260                 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    261                   checkX = Vector(n[0], n[1], n[2]) + periodicX;
    262                   checkX.MatrixMultiplication(FullMatrix);
    263                   distance = checkX.distance(*point);
    264                   DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
    265                   outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (*iter, point) ) );
    266                 }
    267           }
     218        if ((type == NULL) || ((*iter)->type == type)) {
     219          periodicX = *(*iter)->node;
     220          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
     221          // go through every range in xyz and get distance
     222          for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
     223            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
     224              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
     225                checkX = Vector(n[0], n[1], n[2]) + periodicX;
     226                checkX.MatrixMultiplication(FullMatrix);
     227                distance = checkX.distance(*point);
     228                DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
     229                outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (*iter, point) ) );
     230              }
     231        }
    268232      }
    269233      delete[](FullMatrix);
     
    275239
    276240/** Calculates the distance (pair) correlation between a given element and a surface.
    277  * \param *molecules list of molecules structure
    278  * \param &elements vector of elements to correlate to surface
     241 * \param *out output stream for debugging
     242 * \param *molecules list of molecules structure
     243 * \param *type element or NULL (if any element)
    279244 * \param *Surface pointer to Tesselation class surface
    280245 * \param *LC LinkedCell structure to quickly find neighbouring atoms
    281246 * \return Map of doubles with values as pairs of atom and the BoundaryTriangleSet that's closest
    282247 */
    283 CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC )
     248CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const element * const type, const Tesselation * const Surface, const LinkedCell *LC )
    284249{
    285250  Info FunctionInfo(__func__);
     
    303268      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    304269        DoLog(1) && (Log() << Verbose(1) << "\tCurrent atom is " << *(*iter) << "." << endl);
    305         for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
    306           if ((*type == NULL) || ((*iter)->type == *type)) {
    307             TriangleIntersectionList Intersections((*iter)->node,Surface,LC);
    308             distance = Intersections.GetSmallestDistance();
    309             triangle = Intersections.GetClosestTriangle();
    310             outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) );
    311           }
     270        if ((type == NULL) || ((*iter)->type == type)) {
     271          TriangleIntersectionList Intersections((*iter)->node,Surface,LC);
     272          distance = Intersections.GetSmallestDistance();
     273          triangle = Intersections.GetClosestTriangle();
     274          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) );
     275        }
    312276      }
    313277    } else {
     
    323287 * axis an integer from [ -ranges[i], ranges[i] ] onto it and multiply with the domain matrix to bring it back into
    324288 * the real space. Then, we Tesselation::FindClosestTriangleToPoint() and DistanceToTrianglePlane().
    325  * \param *molecules list of molecules structure
    326  * \param &elements vector of elements to correlate to surface
     289 * \param *out output stream for debugging
     290 * \param *molecules list of molecules structure
     291 * \param *type element or NULL (if any element)
    327292 * \param *Surface pointer to Tesselation class surface
    328293 * \param *LC LinkedCell structure to quickly find neighbouring atoms
     
    330295 * \return Map of doubles with values as pairs of atom and the BoundaryTriangleSet that's closest
    331296 */
    332 CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] )
     297CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const element * const type, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] )
    333298{
    334299  Info FunctionInfo(__func__);
     
    357322      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    358323        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
    359         for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
    360           if ((*type == NULL) || ((*iter)->type == *type)) {
    361             periodicX = *(*iter)->node;
    362             periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    363             // go through every range in xyz and get distance
    364             ShortestDistance = -1.;
    365             for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
    366               for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    367                 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    368                   checkX = Vector(n[0], n[1], n[2]) + periodicX;
    369                   checkX.MatrixMultiplication(FullMatrix);
    370                   TriangleIntersectionList Intersections(&checkX,Surface,LC);
    371                   distance = Intersections.GetSmallestDistance();
    372                   triangle = Intersections.GetClosestTriangle();
    373                   if ((ShortestDistance == -1.) || (distance < ShortestDistance)) {
    374                     ShortestDistance = distance;
    375                     ShortestTriangle = triangle;
    376                   }
     324        if ((type == NULL) || ((*iter)->type == type)) {
     325          periodicX = *(*iter)->node;
     326          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
     327          // go through every range in xyz and get distance
     328          ShortestDistance = -1.;
     329          for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
     330            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
     331              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
     332                checkX = Vector(n[0], n[1], n[2]) + periodicX;
     333                checkX.MatrixMultiplication(FullMatrix);
     334                TriangleIntersectionList Intersections(&checkX,Surface,LC);
     335                distance = Intersections.GetSmallestDistance();
     336                triangle = Intersections.GetClosestTriangle();
     337                if ((ShortestDistance == -1.) || (distance < ShortestDistance)) {
     338                  ShortestDistance = distance;
     339                  ShortestTriangle = triangle;
    377340                }
    378             // insert
    379             outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> (*iter, ShortestTriangle) ) );
    380             //Log() << Verbose(1) << "INFO: Inserting " << Walker << " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl;
    381           }
     341              }
     342          // insert
     343          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> (*iter, ShortestTriangle) ) );
     344          //Log() << Verbose(1) << "INFO: Inserting " << Walker << " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl;
     345        }
    382346      }
    383347      delete[](FullMatrix);
  • src/analysis_correlation.hpp

    re6317b rf8e486  
    4545/********************************************** declarations *******************************/
    4646
    47 PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements);
    48 CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point );
    49 CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC );
    50 PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const int ranges[NDIM] );
    51 CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] );
    52 CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] );
     47PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const element * const type1, const element * const  type2 );
     48CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const element * const type, const Vector *point );
     49CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const element * const type, const Tesselation * const Surface, const LinkedCell *LC );
     50PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const element * const type1, const element * const  type2, const int ranges[NDIM] );
     51CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const element * const type, const Vector *point, const int ranges[NDIM] );
     52CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const element * const type, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] );
    5353int GetBin ( const double value, const double BinWidth, const double BinStart );
    5454void OutputCorrelation( ofstream * const file, const BinPairMap * const map );
  • src/builder.cpp

    re6317b rf8e486  
    15311531            break;
    15321532          case 'v':
    1533             if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1534               DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for specifying verbosity: -v <level>" << endl);
    1535               performCriticalExit();
    1536             } else {
    1537               setVerbosity(atoi(argv[argptr]));
    1538               ArgcList.insert(argptr-1);
    1539               ArgcList.insert(argptr);
    1540               argptr++;
    1541             }
     1533            setVerbosity(atoi(argv[argptr]));
     1534            ArgcList.insert(argptr-1);
     1535            ArgcList.insert(argptr);
     1536            argptr++;
    15421537            break;
    15431538          case 'V':
     
    15461541            break;
    15471542          case 'B':
     1543            ArgcList.insert(argptr-1);
     1544            ArgcList.insert(argptr);
     1545            ArgcList.insert(argptr+1);
     1546            ArgcList.insert(argptr+2);
     1547            ArgcList.insert(argptr+3);
     1548            ArgcList.insert(argptr+4);
     1549            ArgcList.insert(argptr+5);
     1550            argptr+=6;
    15481551            if (ExitFlag == 0) ExitFlag = 1;
    1549             if ((argptr+5 >= argc)) {
    1550               DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for setting Box: -B <xx> <<xy> <<xz> <yy> <yz> <zz>" << endl);
    1551               performCriticalExit();
    1552             } else {
    1553               ArgcList.insert(argptr-1);
    1554               ArgcList.insert(argptr);
    1555               ArgcList.insert(argptr+1);
    1556               ArgcList.insert(argptr+2);
    1557               ArgcList.insert(argptr+3);
    1558               ArgcList.insert(argptr+4);
    1559               ArgcList.insert(argptr+5);
    1560               argptr+=6;
    1561             }
    15621552            break;
    15631553          case 'e':
     
    15661556              performCriticalExit();
    15671557            } else {
    1568               ArgcList.insert(argptr-1);
    1569               ArgcList.insert(argptr);
     1558              DoLog(0) && (Log() << Verbose(0) << "Using " << argv[argptr] << " as elements database." << endl);
     1559              strncpy (configuration.databasepath, argv[argptr], MAXSTRINGSIZE-1);
     1560              DatabasePathGiven = true;
    15701561              argptr+=1;
    15711562            }
     
    15761567              performCriticalExit();
    15771568            } else {
    1578               ArgcList.insert(argptr-1);
    1579               ArgcList.insert(argptr);
     1569              BondGraphFileName = argv[argptr];
     1570              DoLog(0) && (Log() << Verbose(0) << "Using " << BondGraphFileName << " as bond length table." << endl);
    15801571              argptr+=1;
    15811572            }
     
    15871578              performCriticalExit();
    15881579            } else {
    1589               ArgcList.insert(argptr-1);
    1590               ArgcList.insert(argptr);
     1580              configuration.basis = argv[argptr];
     1581              DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration.basis << "." << endl);
    15911582              argptr+=1;
    15921583            }
    15931584            break;
    15941585          case 'n':
    1595             if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1596               ExitFlag = 255;
    1597               DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting fast-parsing: -n <0/1>" << endl);
    1598               performCriticalExit();
    1599             } else {
    1600               ArgcList.insert(argptr-1);
    1601               ArgcList.insert(argptr);
    1602               argptr+=1;
    1603             }
     1586            DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl);
     1587            configuration.FastParsing = true;
    16041588            break;
    16051589          case 'X':
    1606             if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1607               ExitFlag = 255;
    1608               DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting default molecule name: -X <name>" << endl);
    1609               performCriticalExit();
    1610             } else {
    1611               ArgcList.insert(argptr-1);
    1612               ArgcList.insert(argptr);
    1613               argptr+=1;
     1590            {
     1591              World::getInstance().setDefaultName(argv[argptr]);
     1592              DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl);
    16141593            }
    16151594            break;
     
    16221601    } while (argptr < argc);
    16231602
     1603    // 3a. Parse the element database
     1604    if (DatabasePathGiven)
     1605      if (periode->LoadPeriodentafel(configuration.databasepath)) {
     1606        DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl);
     1607        //periode->Output();
     1608      } else {
     1609        DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl);
     1610        return 1;
     1611      }
    16241612    // 3b. Find config file name and parse if possible, also BondGraphFileName
    16251613    if (argv[1][0] != '-') {
     
    16761664       molecules->insert(mol);
    16771665     }
     1666     if (configuration.BG == NULL) {
     1667       configuration.BG = new BondGraph(configuration.GetIsAngstroem());
     1668       if ((!BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
     1669         DoLog(0) && (Log() << Verbose(0) << "Bond length table loaded successfully." << endl);
     1670       } else {
     1671         DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table loading failed." << endl);
     1672       }
     1673     }
    16781674
    16791675    // 4. parse again through options, now for those depending on elements db and config presence
     
    17041700            case 'a':
    17051701              if (ExitFlag == 0) ExitFlag = 1;
    1706               if ((argptr+4 >= argc) || (argv[argptr][0] == '-')) {
     1702              if ((argptr >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3]))) {
    17071703                ExitFlag = 255;
    1708                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough arguments for adding atom: -a <Z> --position <x> <y> <z>" << endl);
     1704                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for adding atom: -a <element> <x> <y> <z>" << endl);
    17091705                performCriticalExit();
    17101706              } else {
    1711                 ArgcList.insert(argptr-1);
    1712                 ArgcList.insert(argptr);
    1713                 ArgcList.insert(argptr+1);
    1714                 ArgcList.insert(argptr+2);
    1715                 ArgcList.insert(argptr+3);
    1716                 ArgcList.insert(argptr+4);
    1717                 argptr+=5;
     1707                SaveFlag = true;
     1708                Log() << Verbose(1) << "Adding new atom with element " << argv[argptr] << " at (" << argv[argptr+1] << "," << argv[argptr+2] << "," << argv[argptr+3] << "), ";
     1709                first = World::getInstance().createAtom();
     1710                first->type = periode->FindElement(atoi(argv[argptr]));
     1711                if (first->type != NULL)
     1712                  DoLog(2) && (Log() << Verbose(2) << "found element " << first->type->name << endl);
     1713                for (int i=NDIM;i--;)
     1714                  first->x[i] = atof(argv[argptr+1+i]);
     1715                if (first->type != NULL) {
     1716                  mol->AddAtom(first);  // add to molecule
     1717                  if ((configPresent == empty) && (mol->getAtomCount() != 0))
     1718                    configPresent = present;
     1719                } else
     1720                  DoeLog(1) && (eLog()<< Verbose(1) << "Could not find the specified element." << endl);
     1721                argptr+=4;
    17181722              }
    17191723              break;
     
    17261730            case 'D':
    17271731              if (ExitFlag == 0) ExitFlag = 1;
    1728               if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    1729                 ExitFlag = 255;
    1730                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for depth-first-search analysis: -D <max. bond distance>" << endl);
    1731                 performCriticalExit();
    1732               } else {
    1733                 ArgcList.insert(argptr-1);
    1734                 ArgcList.insert(argptr);
    1735                 argptr+=1;
    1736               }
     1732              {
     1733                DoLog(1) && (Log() << Verbose(1) << "Depth-First-Search Analysis." << endl);
     1734                MoleculeLeafClass *Subgraphs = NULL;      // list of subgraphs from DFS analysis
     1735                int *MinimumRingSize = new int[mol->getAtomCount()];
     1736                atom ***ListOfLocalAtoms = NULL;
     1737                class StackClass<bond *> *BackEdgeStack = NULL;
     1738                class StackClass<bond *> *LocalBackEdgeStack = NULL;
     1739                mol->CreateAdjacencyList(atof(argv[argptr]), configuration.GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
     1740                Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack);
     1741                if (Subgraphs != NULL) {
     1742                  int FragmentCounter = 0;
     1743                  while (Subgraphs->next != NULL) {
     1744                    Subgraphs = Subgraphs->next;
     1745                    Subgraphs->FillBondStructureFromReference(mol, FragmentCounter, ListOfLocalAtoms, false);  // we want to keep the created ListOfLocalAtoms
     1746                    LocalBackEdgeStack = new StackClass<bond *> (Subgraphs->Leaf->BondCount);
     1747                    Subgraphs->Leaf->PickLocalBackEdges(ListOfLocalAtoms[FragmentCounter], BackEdgeStack, LocalBackEdgeStack);
     1748                    Subgraphs->Leaf->CyclicStructureAnalysis(LocalBackEdgeStack, MinimumRingSize);
     1749                    delete(LocalBackEdgeStack);
     1750                    delete(Subgraphs->previous);
     1751                    FragmentCounter++;
     1752                  }
     1753                  delete(Subgraphs);
     1754                  for (int i=0;i<FragmentCounter;i++)
     1755                    delete[](ListOfLocalAtoms[i]);
     1756                  delete[](ListOfLocalAtoms);
     1757                }
     1758                delete(BackEdgeStack);
     1759                delete[](MinimumRingSize);
     1760              }
     1761              //argptr+=1;
    17371762              break;
    17381763            case 'I':
    17391764              DoLog(1) && (Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl);
    1740               ArgcList.insert(argptr-1);
    1741               argptr+=0;
     1765              // @TODO rather do the dissection afterwards
     1766              molecules->DissectMoleculeIntoConnectedSubgraphs(periode, &configuration);
     1767              mol = NULL;
     1768              if (molecules->ListOfMolecules.size() != 0) {
     1769                for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1770                  if ((*ListRunner)->ActiveFlag) {
     1771                    mol = *ListRunner;
     1772                    break;
     1773                  }
     1774              }
     1775              if ((mol == NULL) && (!molecules->ListOfMolecules.empty())) {
     1776                mol = *(molecules->ListOfMolecules.begin());
     1777                if (mol != NULL)
     1778                  mol->ActiveFlag = true;
     1779              }
    17421780              break;
    17431781            case 'C':
    17441782              {
     1783                int ranges[3] = {1, 1, 1};
     1784                bool periodic = (argv[argptr-1][2] =='p');
    17451785                if (ExitFlag == 0) ExitFlag = 1;
    1746                 if ((argptr+11 >= argc)) {
     1786                if ((argptr >= argc)) {
    17471787                  ExitFlag = 255;
    17481788                  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);
     
    17511791                  switch(argv[argptr][0]) {
    17521792                    case 'E':
    1753                       ArgcList.insert(argptr-1);
    1754                       ArgcList.insert(argptr);
    1755                       ArgcList.insert(argptr+1);
    1756                       ArgcList.insert(argptr+2);
    1757                       ArgcList.insert(argptr+3);
    1758                       ArgcList.insert(argptr+4);
    1759                       ArgcList.insert(argptr+5);
    1760                       ArgcList.insert(argptr+6);
    1761                       ArgcList.insert(argptr+7);
    1762                       ArgcList.insert(argptr+8);
    1763                       ArgcList.insert(argptr+9);
    1764                       ArgcList.insert(argptr+10);
    1765                       ArgcList.insert(argptr+11);
    1766                       argptr+=12;
     1793                      {
     1794                        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] == '-')) {
     1795                          ExitFlag = 255;
     1796                          DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C E <Z1> <Z2> <output> <bin output> <binstart> <binend>" << endl);
     1797                          performCriticalExit();
     1798                        } else {
     1799                          ofstream output(argv[argptr+3]);
     1800                          ofstream binoutput(argv[argptr+4]);
     1801                          const double BinStart = atof(argv[argptr+5]);
     1802                          const double BinEnd = atof(argv[argptr+6]);
     1803
     1804                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1805                          const element *elemental2 = periode->FindElement((const int) atoi(argv[argptr+2]));
     1806                          PairCorrelationMap *correlationmap = NULL;
     1807                          if (periodic)
     1808                            correlationmap = PeriodicPairCorrelation(molecules, elemental, elemental2, ranges);
     1809                          else
     1810                            correlationmap = PairCorrelation(molecules, elemental, elemental2);
     1811                          OutputPairCorrelation(&output, correlationmap);
     1812                          BinPairMap *binmap = BinData( correlationmap, 0.5, BinStart, BinEnd );
     1813                          OutputCorrelation ( &binoutput, binmap );
     1814                          output.close();
     1815                          binoutput.close();
     1816                          delete(binmap);
     1817                          delete(correlationmap);
     1818                          argptr+=7;
     1819                        }
     1820                      }
    17671821                      break;
    17681822
    17691823                    case 'P':
    1770                       ArgcList.insert(argptr-1);
    1771                       ArgcList.insert(argptr);
    1772                       ArgcList.insert(argptr+1);
    1773                       ArgcList.insert(argptr+2);
    1774                       ArgcList.insert(argptr+3);
    1775                       ArgcList.insert(argptr+4);
    1776                       ArgcList.insert(argptr+5);
    1777                       ArgcList.insert(argptr+6);
    1778                       ArgcList.insert(argptr+7);
    1779                       ArgcList.insert(argptr+8);
    1780                       ArgcList.insert(argptr+9);
    1781                       ArgcList.insert(argptr+10);
    1782                       ArgcList.insert(argptr+11);
    1783                       ArgcList.insert(argptr+12);
    1784                       ArgcList.insert(argptr+13);
    1785                       ArgcList.insert(argptr+14);
    1786                       argptr+=15;
     1824                      {
     1825                        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] == '-')) {
     1826                          ExitFlag = 255;
     1827                          DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C P <Z1> <x> <y> <z> <output> <bin output> <binstart> <binend>" << endl);
     1828                          performCriticalExit();
     1829                        } else {
     1830                          ofstream output(argv[argptr+5]);
     1831                          ofstream binoutput(argv[argptr+6]);
     1832                          const double BinStart = atof(argv[argptr+7]);
     1833                          const double BinEnd = atof(argv[argptr+8]);
     1834
     1835                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1836                          Vector *Point = new Vector((const double) atof(argv[argptr+1]),(const double) atof(argv[argptr+2]),(const double) atof(argv[argptr+3]));
     1837                          CorrelationToPointMap *correlationmap = NULL;
     1838                          if (periodic)
     1839                            correlationmap  = PeriodicCorrelationToPoint(molecules, elemental, Point, ranges);
     1840                          else
     1841                            correlationmap = CorrelationToPoint(molecules, elemental, Point);
     1842                          OutputCorrelationToPoint(&output, correlationmap);
     1843                          BinPairMap *binmap = BinData( correlationmap, 0.5, BinStart, BinEnd );
     1844                          OutputCorrelation ( &binoutput, binmap );
     1845                          output.close();
     1846                          binoutput.close();
     1847                          delete(Point);
     1848                          delete(binmap);
     1849                          delete(correlationmap);
     1850                          argptr+=9;
     1851                        }
     1852                      }
    17871853                      break;
    17881854
    17891855                    case 'S':
    1790                       ArgcList.insert(argptr-1);
    1791                       ArgcList.insert(argptr);
    1792                       ArgcList.insert(argptr+1);
    1793                       ArgcList.insert(argptr+2);
    1794                       ArgcList.insert(argptr+3);
    1795                       ArgcList.insert(argptr+4);
    1796                       ArgcList.insert(argptr+5);
    1797                       ArgcList.insert(argptr+6);
    1798                       ArgcList.insert(argptr+7);
    1799                       ArgcList.insert(argptr+8);
    1800                       ArgcList.insert(argptr+9);
    1801                       ArgcList.insert(argptr+10);
    1802                       ArgcList.insert(argptr+11);
    1803                       ArgcList.insert(argptr+12);
    1804                       ArgcList.insert(argptr+13);
    1805                       ArgcList.insert(argptr+14);
    1806                       argptr+=15;
     1856                      {
     1857                        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] == '-')) {
     1858                          ExitFlag = 255;
     1859                          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);
     1860                          performCriticalExit();
     1861                        } else {
     1862                          ofstream output(argv[argptr+2]);
     1863                          ofstream binoutput(argv[argptr+3]);
     1864                          const double radius = 4.;
     1865                          const double BinWidth = atof(argv[argptr+4]);
     1866                          const double BinStart = atof(argv[argptr+5]);
     1867                          const double BinEnd = atof(argv[argptr+6]);
     1868                          double LCWidth = 20.;
     1869                          if (BinEnd > 0) {
     1870                            if (BinEnd > 2.*radius)
     1871                                LCWidth = BinEnd;
     1872                            else
     1873                              LCWidth = 2.*radius;
     1874                          }
     1875
     1876                          // get the boundary
     1877                          class molecule *Boundary = NULL;
     1878                          class Tesselation *TesselStruct = NULL;
     1879                          const LinkedCell *LCList = NULL;
     1880                          // find biggest molecule
     1881                          int counter  = 0;
     1882                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
     1883                            if ((Boundary == NULL) || (Boundary->getAtomCount() < (*BigFinder)->getAtomCount())) {
     1884                              Boundary = *BigFinder;
     1885                            }
     1886                            counter++;
     1887                          }
     1888                          bool *Actives = new bool[counter];
     1889                          counter = 0;
     1890                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
     1891                            Actives[counter++] = (*BigFinder)->ActiveFlag;
     1892                            (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
     1893                          }
     1894                          LCList = new LinkedCell(Boundary, LCWidth);
     1895                          const element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
     1896                          FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
     1897                          CorrelationToSurfaceMap *surfacemap = NULL;
     1898                          if (periodic)
     1899                            surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges);
     1900                          else
     1901                            surfacemap = CorrelationToSurface( molecules, elemental, TesselStruct, LCList);
     1902                          OutputCorrelationToSurface(&output, surfacemap);
     1903                          // check whether radius was appropriate
     1904                          {
     1905                            double start; double end;
     1906                            GetMinMax( surfacemap, start, end);
     1907                            if (LCWidth < end)
     1908                              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);
     1909                          }
     1910                          BinPairMap *binmap = BinData( surfacemap, BinWidth, BinStart, BinEnd );
     1911                          OutputCorrelation ( &binoutput, binmap );
     1912                          output.close();
     1913                          binoutput.close();
     1914                          counter = 0;
     1915                          for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
     1916                            (*BigFinder)->ActiveFlag = Actives[counter++];
     1917                          delete[](Actives);
     1918                          delete(LCList);
     1919                          delete(TesselStruct);
     1920                          delete(binmap);
     1921                          delete(surfacemap);
     1922                          argptr+=7;
     1923                        }
     1924                      }
    18071925                      break;
    18081926
     
    18181936            case 'E':
    18191937              if (ExitFlag == 0) ExitFlag = 1;
    1820               if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr]))) {
     1938              if ((argptr+1 >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr+1][0] == '-')) {
    18211939                ExitFlag = 255;
    1822                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> --element <Z>" << endl);
     1940                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> <element>" << endl);
    18231941                performCriticalExit();
    18241942              } else {
    1825                 ArgcList.insert(argptr-1);
    1826                 ArgcList.insert(argptr);
    1827                 ArgcList.insert(argptr+1);
    1828                 ArgcList.insert(argptr+2);
    1829                 argptr+=3;
     1943                mol->getAtomCount();
     1944                SaveFlag = true;
     1945                DoLog(1) && (Log() << Verbose(1) << "Changing atom " << argv[argptr] << " to element " << argv[argptr+1] << "." << endl);
     1946                first = mol->FindAtom(atoi(argv[argptr]));
     1947                first->type = periode->FindElement(atoi(argv[argptr+1]));
     1948                argptr+=2;
    18301949              }
    18311950              break;
    18321951            case 'F':
    18331952              if (ExitFlag == 0) ExitFlag = 1;
    1834               if ((argptr+12 >= argc) || (argv[argptr][0] == '-')) {
     1953              MaxDistance = -1;
     1954              if (argv[argptr-1][2] == 'F') { // option is -FF?
     1955                // fetch first argument as max distance to surface
     1956                MaxDistance = atof(argv[argptr++]);
     1957                DoLog(0) && (Log() << Verbose(0) << "Filling with maximum layer distance of " << MaxDistance << "." << endl);
     1958              }
     1959              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]))) {
    18351960                ExitFlag = 255;
    1836                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for filling with molecule: -F <filler xyz file> --MaxDistance <distance or -1> --distances <x> <y> <z>  --lengths <surface> <randatm> <randmol> --DoRotate <0/1>" << endl);
     1961                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);
    18371962                performCriticalExit();
    18381963              } else {
    1839                 ArgcList.insert(argptr-1);
    1840                 ArgcList.insert(argptr);
    1841                 ArgcList.insert(argptr+1);
    1842                 ArgcList.insert(argptr+2);
    1843                 ArgcList.insert(argptr+3);
    1844                 ArgcList.insert(argptr+4);
    1845                 ArgcList.insert(argptr+5);
    1846                 ArgcList.insert(argptr+6);
    1847                 ArgcList.insert(argptr+7);
    1848                 ArgcList.insert(argptr+8);
    1849                 ArgcList.insert(argptr+9);
    1850                 ArgcList.insert(argptr+10);
    1851                 ArgcList.insert(argptr+11);
    1852                 ArgcList.insert(argptr+12);
    1853                 argptr+=13;
     1964                SaveFlag = true;
     1965                DoLog(1) && (Log() << Verbose(1) << "Filling Box with water molecules." << endl);
     1966                // construct water molecule
     1967                molecule *filler = World::getInstance().createMolecule();
     1968                if (!filler->AddXYZFile(argv[argptr])) {
     1969                  DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << argv[argptr] << "." << endl);
     1970                }
     1971                filler->SetNameFromFilename(argv[argptr]);
     1972                configuration.BG->ConstructBondGraph(filler);
     1973                molecule *Filling = NULL;
     1974                // call routine
     1975                double distance[NDIM];
     1976                for (int i=0;i<NDIM;i++)
     1977                  distance[i] = atof(argv[argptr+i+1]);
     1978                Filling = FillBoxWithMolecule(molecules, filler, configuration, MaxDistance, distance, atof(argv[argptr+4]), atof(argv[argptr+5]), atof(argv[argptr+6]), atoi(argv[argptr+7]));
     1979                if (Filling != NULL) {
     1980                  Filling->ActiveFlag = false;
     1981                  molecules->insert(Filling);
     1982                }
     1983                World::getInstance().destroyMolecule(filler);
     1984                argptr+=6;
    18541985              }
    18551986              break;
    18561987            case 'A':
    18571988              if (ExitFlag == 0) ExitFlag = 1;
    1858               if ((argptr+2 >= argc) || (argv[argptr][0] == '-')) {
     1989              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    18591990                ExitFlag =255;
    1860                 DoeLog(0) && (eLog()<< Verbose(0) << "Missing source file for bonds in molecule: -A <bond sourcefile> --molecule-by-id <molecule_id>" << endl);
     1991                DoeLog(0) && (eLog()<< Verbose(0) << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl);
    18611992                performCriticalExit();
    18621993              } else {
    1863                 ArgcList.insert(argptr-1);
    1864                 ArgcList.insert(argptr);
    1865                 ArgcList.insert(argptr+1);
    1866                 ArgcList.insert(argptr+2);
    1867                 argptr+=3;
     1994                DoLog(0) && (Log() << Verbose(0) << "Parsing bonds from " << argv[argptr] << "." << endl);
     1995                ifstream input(argv[argptr]);
     1996                mol->CreateAdjacencyListFromDbondFile(&input);
     1997                input.close();
     1998                argptr+=1;
    18681999              }
    18692000              break;
     
    18712002            case 'J':
    18722003              if (ExitFlag == 0) ExitFlag = 1;
    1873               if ((argptr+2 >= argc) || (argv[argptr][0] == '-')) {
     2004              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    18742005                ExitFlag =255;
    1875                 DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of adjacency file: -J <path> --molecule-by-id <molecule_id>" << endl);
     2006                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of adjacency file: -j <path>" << endl);
    18762007                performCriticalExit();
    18772008              } else {
    1878                 ArgcList.insert(argptr-1);
    1879                 ArgcList.insert(argptr);
    1880                 ArgcList.insert(argptr+1);
    1881                 ArgcList.insert(argptr+2);
    1882                 argptr+=3;
     2009                DoLog(0) && (Log() << Verbose(0) << "Storing adjacency to path " << argv[argptr] << "." << endl);
     2010                configuration.BG->ConstructBondGraph(mol);
     2011                mol->StoreAdjacencyToFile(NULL, argv[argptr]);
     2012                argptr+=1;
    18832013              }
    18842014              break;
     
    18882018              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    18892019                ExitFlag =255;
    1890                 DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of bonds file: -j <path> --molecule-by-id <molecule_id>" << endl);
     2020                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of bonds file: -j <path>" << endl);
    18912021                performCriticalExit();
    18922022              } else {
    1893                 ArgcList.insert(argptr-1);
    1894                 ArgcList.insert(argptr);
    1895                 ArgcList.insert(argptr+1);
    1896                 ArgcList.insert(argptr+2);
    1897                 argptr+=3;
     2023                DoLog(0) && (Log() << Verbose(0) << "Storing bonds to path " << argv[argptr] << "." << endl);
     2024                configuration.BG->ConstructBondGraph(mol);
     2025                mol->StoreBondsToFile(NULL, argv[argptr]);
     2026                argptr+=1;
    18982027              }
    18992028              break;
     
    19012030            case 'N':
    19022031              if (ExitFlag == 0) ExitFlag = 1;
    1903               if ((argptr+4 >= argc) || (argv[argptr][0] == '-')){
     2032              if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){
    19042033                ExitFlag = 255;
    1905                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for non-convex envelope: -N <molecule_id> --sphere-radius <radius> --nonconvex-file <output prefix>" << endl);
     2034                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl);
    19062035                performCriticalExit();
    19072036              } else {
    1908                 ArgcList.insert(argptr-1);
    1909                 ArgcList.insert(argptr);
    1910                 ArgcList.insert(argptr+1);
    1911                 ArgcList.insert(argptr+2);
    1912                 ArgcList.insert(argptr+3);
    1913                 ArgcList.insert(argptr+4);
    1914                 argptr+=5;
     2037                class Tesselation *T = NULL;
     2038                const LinkedCell *LCList = NULL;
     2039                molecule * Boundary = NULL;
     2040                //string filename(argv[argptr+1]);
     2041                //filename.append(".csv");
     2042                DoLog(0) && (Log() << Verbose(0) << "Evaluating non-convex envelope of biggest molecule.");
     2043                DoLog(1) && (Log() << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl);
     2044                // find biggest molecule
     2045                int counter  = 0;
     2046                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
     2047                  if ((Boundary == NULL) || (Boundary->getAtomCount() < (*BigFinder)->getAtomCount())) {
     2048                    Boundary = *BigFinder;
     2049                  }
     2050                  counter++;
     2051                }
     2052                DoLog(1) && (Log() << Verbose(1) << "Biggest molecule has " << Boundary->getAtomCount() << " atoms." << endl);
     2053                start = clock();
     2054                LCList = new LinkedCell(Boundary, atof(argv[argptr])*2.);
     2055                if (!FindNonConvexBorder(Boundary, T, LCList, atof(argv[argptr]), argv[argptr+1]))
     2056                  ExitFlag = 255;
     2057                //FindDistributionOfEllipsoids(T, &LCList, N, number, filename.c_str());
     2058                end = clock();
     2059                DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
     2060                delete(LCList);
     2061                delete(T);
     2062                argptr+=2;
    19152063              }
    19162064              break;
    19172065            case 'S':
    19182066              if (ExitFlag == 0) ExitFlag = 1;
    1919               if ((argptr+2 >= argc) || (argv[argptr][0] == '-')) {
     2067              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    19202068                ExitFlag = 255;
    1921                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for storing tempature: -S <temperature file> --molecule-by-id 0" << endl);
     2069                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for storing tempature: -S <temperature file>" << endl);
    19222070                performCriticalExit();
    19232071              } else {
    1924                 ArgcList.insert(argptr-1);
    1925                 ArgcList.insert(argptr);
    1926                 ArgcList.insert(argptr+1);
    1927                 ArgcList.insert(argptr+2);
    1928                 argptr+=3;
     2072                DoLog(1) && (Log() << Verbose(1) << "Storing temperatures in " << argv[argptr] << "." << endl);
     2073                ofstream *output = new ofstream(argv[argptr], ios::trunc);
     2074                if (!mol->OutputTemperatureFromTrajectories(output, 0, mol->MDSteps))
     2075                  DoLog(2) && (Log() << Verbose(2) << "File could not be written." << endl);
     2076                else
     2077                  DoLog(2) && (Log() << Verbose(2) << "File stored." << endl);
     2078                output->close();
     2079                delete(output);
     2080                argptr+=1;
    19292081              }
    19302082              break;
    19312083            case 'L':
    19322084              if (ExitFlag == 0) ExitFlag = 1;
    1933               if ((argptr+8 >= argc) || (argv[argptr][0] == '-')) {
     2085              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    19342086                ExitFlag = 255;
    1935                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for linear interpolation: -L <prefix> --start-step <step0> --end-step <step1> --molecule-by-id 0 --id-mapping <0/1>" << endl);
     2087                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for linear interpolation: -L <step0> <step1> <prefix> <identity mapping?>" << endl);
    19362088                performCriticalExit();
    19372089              } else {
    1938                 ArgcList.insert(argptr-1);
    1939                 ArgcList.insert(argptr);
    1940                 ArgcList.insert(argptr+1);
    1941                 ArgcList.insert(argptr+2);
    1942                 ArgcList.insert(argptr+3);
    1943                 ArgcList.insert(argptr+4);
    1944                 ArgcList.insert(argptr+5);
    1945                 ArgcList.insert(argptr+6);
    1946                 ArgcList.insert(argptr+7);
    1947                 ArgcList.insert(argptr+8);
    1948                 argptr+=9;
     2090                SaveFlag = true;
     2091                DoLog(1) && (Log() << Verbose(1) << "Linear interpolation between configuration " << argv[argptr] << " and " << argv[argptr+1] << "." << endl);
     2092                if (atoi(argv[argptr+3]) == 1)
     2093                  DoLog(1) && (Log() << Verbose(1) << "Using Identity for the permutation map." << endl);
     2094                if (!mol->LinearInterpolationBetweenConfiguration(atoi(argv[argptr]), atoi(argv[argptr+1]), argv[argptr+2], configuration, atoi(argv[argptr+3])) == 1 ? true : false)
     2095                  DoLog(2) && (Log() << Verbose(2) << "Could not store " << argv[argptr+2] << " files." << endl);
     2096                else
     2097                  DoLog(2) && (Log() << Verbose(2) << "Steps created and " << argv[argptr+2] << " files stored." << endl);
     2098                argptr+=4;
    19492099              }
    19502100              break;
    19512101            case 'P':
    19522102              if (ExitFlag == 0) ExitFlag = 1;
    1953               if ((argptr+2 >= argc) || (argv[argptr][0] == '-')) {
     2103              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
    19542104                ExitFlag = 255;
    1955                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for parsing and integrating forces: -P <forces file> --molecule-by-id <molecule_id>" << endl);
     2105                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for parsing and integrating forces: -P <forces file>" << endl);
    19562106                performCriticalExit();
    19572107              } else {
    1958                 ArgcList.insert(argptr-1);
    1959                 ArgcList.insert(argptr);
    1960                 ArgcList.insert(argptr+1);
    1961                 ArgcList.insert(argptr+2);
    1962                 argptr+=3;
     2108                SaveFlag = true;
     2109                DoLog(1) && (Log() << Verbose(1) << "Parsing forces file and Verlet integrating." << endl);
     2110                if (!mol->VerletForceIntegration(argv[argptr], configuration))
     2111                  DoLog(2) && (Log() << Verbose(2) << "File not found." << endl);
     2112                else
     2113                  DoLog(2) && (Log() << Verbose(2) << "File found and parsed." << endl);
     2114                argptr+=1;
    19632115              }
    19642116              break;
    19652117            case 'R':
    19662118              if (ExitFlag == 0) ExitFlag = 1;
    1967               if ((argptr+4 >= argc) || (argv[argptr][0] == '-'))  {
     2119              if ((argptr+3 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])))  {
    19682120                ExitFlag = 255;
    1969                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R <distance> --position <x> <y> <z>" << endl);
     2121                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R <x> <y> <z> <distance>" << endl);
    19702122                performCriticalExit();
    19712123              } else {
    1972                 ArgcList.insert(argptr-1);
    1973                 ArgcList.insert(argptr);
    1974                 ArgcList.insert(argptr+1);
    1975                 ArgcList.insert(argptr+2);
    1976                 ArgcList.insert(argptr+3);
    1977                 ArgcList.insert(argptr+4);
    1978                 argptr+=5;
     2124                SaveFlag = true;
     2125                const double radius = atof(argv[argptr+3]);
     2126                Vector point(atof(argv[argptr]),atof(argv[argptr+1]),atof(argv[argptr+2]));
     2127                DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << point << " with radius " << radius << "." << endl);
     2128                atom *Walker = NULL;
     2129                molecule::iterator advancer = mol->begin();
     2130                for(molecule::iterator iter = advancer; advancer != mol->end();) {
     2131                  iter = advancer++;
     2132                  if ((*iter)->x.DistanceSquared(point) > radius*radius){ // distance to first above radius ...
     2133                    Walker = (*iter);
     2134                    DoLog(1) && (Log() << Verbose(1) << "Removing atom " << *Walker << "." << endl);
     2135                    mol->RemoveAtom(*(iter));
     2136                    World::getInstance().destroyAtom(Walker);
     2137                  }
     2138                }
     2139                argptr+=4;
    19792140              }
    19802141              break;
    19812142            case 't':
    19822143              if (ExitFlag == 0) ExitFlag = 1;
    1983               if ((argptr+4 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
     2144              if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    19842145                ExitFlag = 255;
    1985                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z> --molecule-by-id <molecule_id> --periodic <0/1>" << endl);
     2146                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z>" << endl);
    19862147                performCriticalExit();
    19872148              } else {
    1988                 ArgcList.insert(argptr-1);
    1989                 ArgcList.insert(argptr);
    1990                 ArgcList.insert(argptr+1);
    1991                 ArgcList.insert(argptr+2);
    1992                 ArgcList.insert(argptr+3);
    1993                 ArgcList.insert(argptr+4);
    1994                 ArgcList.insert(argptr+5);
    1995                 ArgcList.insert(argptr+6);
    1996                 argptr+=7;
     2149                if (ExitFlag == 0) ExitFlag = 1;
     2150                SaveFlag = true;
     2151                DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
     2152                for (int i=NDIM;i--;)
     2153                  x[i] = atof(argv[argptr+i]);
     2154                mol->Translate((const Vector *)&x);
     2155                argptr+=3;
     2156              }
     2157              break;
     2158            case 'T':
     2159              if (ExitFlag == 0) ExitFlag = 1;
     2160              if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
     2161                ExitFlag = 255;
     2162                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for periodic translation: -T <x> <y> <z>" << endl);
     2163                performCriticalExit();
     2164              } else {
     2165                if (ExitFlag == 0) ExitFlag = 1;
     2166                SaveFlag = true;
     2167                DoLog(1) && (Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl);
     2168                for (int i=NDIM;i--;)
     2169                  x[i] = atof(argv[argptr+i]);
     2170                mol->TranslatePeriodically((const Vector *)&x);
     2171                argptr+=3;
    19972172              }
    19982173              break;
     
    20712246                performCriticalExit();
    20722247              } else {
    2073                 ArgcList.insert(argptr-1);
    2074                 ArgcList.insert(argptr);
     2248                mol->getAtomCount();
     2249                SaveFlag = true;
     2250                DoLog(1) && (Log() << Verbose(1) << "Removing atom " << argv[argptr] << "." << endl);
     2251                atom *first = mol->FindAtom(atoi(argv[argptr]));
     2252                mol->RemoveAtom(first);
    20752253                argptr+=1;
    20762254              }
     
    20782256            case 'f':
    20792257              if (ExitFlag == 0) ExitFlag = 1;
    2080               if ((argptr+1 >= argc) || (argv[argptr][0] == '-')) {
     2258              if ((argptr+1 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1]))) {
    20812259                ExitFlag = 255;
    20822260                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for fragmentation: -f <max. bond distance> <bond order>" << endl);
    20832261                performCriticalExit();
    20842262              } else {
    2085                 ArgcList.insert(argptr-1);
    2086                 ArgcList.insert(argptr);
    2087                 ArgcList.insert(argptr+1);
    2088                 ArgcList.insert(argptr+2);
    2089                 ArgcList.insert(argptr+3);
    2090                 ArgcList.insert(argptr+4);
    2091                 argptr+=5;
     2263                DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << "." << endl);
     2264                DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl);
     2265                start = clock();
     2266                mol->CreateAdjacencyList(atof(argv[argptr]), configuration.GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
     2267                DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl);
     2268                if (mol->hasBondStructure()) {
     2269                  ExitFlag = mol->FragmentMolecule(atoi(argv[argptr+1]), &configuration);
     2270                }
     2271                end = clock();
     2272                DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl);
     2273                argptr+=2;
    20922274              }
    20932275              break;
     
    21022284                SaveFlag = true;
    21032285                DoLog(0) && (Log() << Verbose(0) << "Converting to prinicipal axis system." << endl);
    2104                 mol->PrincipalAxisSystem((bool)j);
    21052286              } else
    2106                 ArgcList.insert(argptr-1);
    2107                 argptr+=0;
     2287                DoLog(0) && (Log() << Verbose(0) << "Evaluating prinicipal axis." << endl);
     2288              mol->PrincipalAxisSystem((bool)j);
    21082289              break;
    21092290            case 'o':
    21102291              if (ExitFlag == 0) ExitFlag = 1;
    2111               if ((argptr+4 >= argc) || (argv[argptr][0] == '-')){
     2292              if ((argptr+1 >= argc) || (argv[argptr][0] == '-')){
    21122293                ExitFlag = 255;
    2113                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for convex envelope: -o <molecule_id> --output-file <output file> --output-file <binned output file>" << endl);
     2294                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for convex envelope: -o <convex output file> <non-convex output file>" << endl);
    21142295                performCriticalExit();
    21152296              } else {
    2116                 ArgcList.insert(argptr-1);
    2117                 ArgcList.insert(argptr);
    2118                 ArgcList.insert(argptr+1);
    2119                 ArgcList.insert(argptr+2);
    2120                 ArgcList.insert(argptr+3);
    2121                 ArgcList.insert(argptr+4);
    2122                 argptr+=5;
     2297                class Tesselation *TesselStruct = NULL;
     2298                const LinkedCell *LCList = NULL;
     2299                DoLog(0) && (Log() << Verbose(0) << "Evaluating volume of the convex envelope.");
     2300                DoLog(1) && (Log() << Verbose(1) << "Storing tecplot convex data in " << argv[argptr] << "." << endl);
     2301                DoLog(1) && (Log() << Verbose(1) << "Storing tecplot non-convex data in " << argv[argptr+1] << "." << endl);
     2302                LCList = new LinkedCell(mol, 10.);
     2303                //FindConvexBorder(mol, LCList, argv[argptr]);
     2304                FindNonConvexBorder(mol, TesselStruct, LCList, 5., argv[argptr+1]);
     2305//                RemoveAllBoundaryPoints(TesselStruct, mol, argv[argptr]);
     2306                double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, argv[argptr]);
     2307                double clustervolume = VolumeOfConvexEnvelope(TesselStruct, &configuration);
     2308                DoLog(0) && (Log() << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
     2309                DoLog(0) && (Log() << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl);
     2310                delete(TesselStruct);
     2311                delete(LCList);
     2312                argptr+=2;
    21232313              }
    21242314              break;
     
    21412331                  performCriticalExit();
    21422332              } else {
    2143                 ArgcList.insert(argptr-1);
    2144                 ArgcList.insert(argptr);
    2145                 argptr+=1;
     2333                double density;
     2334                SaveFlag = true;
     2335                DoLog(0) && (Log() << Verbose(0) << "Evaluating necessary cell volume for a cluster suspended in water.");
     2336                density = atof(argv[argptr++]);
     2337                if (density < 1.0) {
     2338                  DoeLog(1) && (eLog()<< Verbose(1) << "Density must be greater than 1.0g/cm^3 !" << endl);
     2339                  density = 1.3;
     2340                }
     2341//                for(int i=0;i<NDIM;i++) {
     2342//                  repetition[i] = atoi(argv[argptr++]);
     2343//                  if (repetition[i] < 1)
     2344//                    DoeLog(1) && (eLog()<< Verbose(1) << "repetition value must be greater 1!" << endl);
     2345//                  repetition[i] = 1;
     2346//                }
     2347                PrepareClustersinWater(&configuration, mol, volume, density);  // if volume == 0, will calculate from ConvexEnvelope
    21462348              }
    21472349              break;
     
    22412443      // handle arguments by ParseCommandLineOptions()
    22422444      ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, ArgcList);
    2243       World::getInstance().setExitFlag(ExitFlag);
    22442445      // copy all remaining arguments to a new argv
    22452446      Arguments = new char *[ArgcList.size()];
     
    22552456      // handle remaining arguments by CommandLineParser
    22562457      MapOfActions::getInstance().AddOptionsToParser();
    2257       map <std::string, std::string> ShortFormToActionMap = MapOfActions::getInstance().getShortFormToActionMap();
    2258       CommandLineParser::getInstance().Run(ArgcSize,Arguments, ShortFormToActionMap);
     2458      CommandLineParser::getInstance().Run(ArgcSize,Arguments);
    22592459      if (!CommandLineParser::getInstance().isEmpty()) {
    22602460        DoLog(0) && (Log() << Verbose(0) << "Setting UI to CommandLine." << endl);
     
    22832483  delete[](ConfigFileName);
    22842484
    2285   ExitFlag = World::getInstance().getExitFlag();
    22862485  return (ExitFlag == 1 ? 0 : ExitFlag);
    22872486}
  • src/molecule.cpp

    re6317b rf8e486  
    4848  for(int i=MAX_ELEMENTS;i--;)
    4949    ElementsInMolecule[i] = 0;
    50   strcpy(name,World::getInstance().getDefaultName().c_str());
     50  strcpy(name,World::getInstance().getDefaultName());
    5151};
    5252
  • src/moleculelist.cpp

    re6317b rf8e486  
    802802      strncat(molecules[i]->name, number, MAXSTRINGSIZE - strlen(mol->name) - 1);
    803803    }
    804     DoLog(1) && (Log() << Verbose(1) << "MolName is " << molecules[i]->name << ", id is " << molecules[i]->getId() << endl);
     804    DoLog(1) && (Log() << Verbose(1) << "MolName is " << molecules[i]->name << endl);
    805805    for (molecule::iterator iter = MolecularWalker->Leaf->begin(); iter != MolecularWalker->Leaf->end(); ++iter) {
    806806      DoLog(1) && (Log() << Verbose(1) << **iter << endl);
  • src/periodentafel.cpp

    re6317b rf8e486  
    3232periodentafel::periodentafel()
    3333{
    34   bool status = true;
    35   status = LoadElementsDatabase(new stringstream(elementsDB,ios_base::in));
    36   ASSERT(status,  "General element initialization failed");
    37   status = LoadValenceDatabase(new stringstream(valenceDB,ios_base::in));
    38   ASSERT(status, "Valence entry of element initialization failed");
    39   status = LoadOrbitalsDatabase(new stringstream(orbitalsDB,ios_base::in));
    40   ASSERT(status, "Orbitals entry of element initialization failed");
    41   status = LoadHBondAngleDatabase(new stringstream(HbondangleDB,ios_base::in));
    42   ASSERT(status, "HBond angle entry of element initialization failed");
    43   status = LoadHBondLengthsDatabase(new stringstream(HbonddistanceDB,ios_base::in));
    44   ASSERT(status, "HBond distance entry of element initialization failed");
     34  ASSERT(LoadElementsDatabase(new stringstream(elementsDB,ios_base::in)), "General element initialization failed");
     35  ASSERT(LoadValenceDatabase(new stringstream(valenceDB,ios_base::in)), "Valence entry of element initialization failed");
     36  ASSERT(LoadOrbitalsDatabase(new stringstream(orbitalsDB,ios_base::in)), "Orbitals entry of element initialization failed");
     37  ASSERT(LoadHBondAngleDatabase(new stringstream(HbondangleDB,ios_base::in)), "HBond angle entry of element initialization failed");
     38  ASSERT(LoadHBondLengthsDatabase(new stringstream(HbonddistanceDB,ios_base::in)), "HBond distance entry of element initialization failed");
    4539};
    4640
     
    7266 * \param *pointer element to be removed
    7367 */
    74 size_t periodentafel::RemoveElement(element * const pointer)
    75 {
    76   return RemoveElement(pointer->getNumber());
     68void periodentafel::RemoveElement(element * const pointer)
     69{
     70  RemoveElement(pointer->getNumber());
    7771};
    7872
     
    8074 * \param Z element to be removed
    8175 */
    82 size_t periodentafel::RemoveElement(atomicNumber_t Z)
    83 {
    84   return elements.erase(Z);
     76void periodentafel::RemoveElement(atomicNumber_t Z)
     77{
     78  elements.erase(Z);
    8579};
    8680
     
    235229  strncat(filename, STANDARDELEMENTSDB, MAXSTRINGSIZE-strlen(filename));
    236230  input.open(filename);
    237   if (!input.fail())
    238     DoLog(0) && (Log() << Verbose(0) << "Using " << filename << " as elements database." << endl);
    239231  status = status && LoadElementsDatabase(&input);
    240   input.close();
    241   input.clear();
    242232
    243233  // fill valence DB per element
     
    246236  strncat(filename, STANDARDVALENCEDB, MAXSTRINGSIZE-strlen(filename));
    247237  input.open(filename);
    248   if (!input.fail())
    249     DoLog(0) && (Log() << Verbose(0) << "Using " << filename << " as valence database." << endl);
    250238  otherstatus = otherstatus && LoadValenceDatabase(&input);
    251   input.close();
    252   input.clear();
    253239
    254240  // fill orbitals DB per element
     
    257243  strncat(filename, STANDARDORBITALDB, MAXSTRINGSIZE-strlen(filename));
    258244  input.open(filename);
    259   if (!input.fail())
    260     DoLog(0) && (Log() << Verbose(0) << "Using " << filename << " as orbitals database." << endl);
    261245  otherstatus = otherstatus && LoadOrbitalsDatabase(&input);
    262   input.close();
    263   input.clear();
    264246
    265247  // fill H-BondAngle DB per element
     
    268250  strncat(filename, STANDARDHBONDANGLEDB, MAXSTRINGSIZE-strlen(filename));
    269251  input.open(filename);
    270   if (!input.fail())
    271     DoLog(0) && (Log() << Verbose(0) << "Using " << filename << " as H bond angle database." << endl);
    272252  otherstatus = otherstatus && LoadHBondAngleDatabase(&input);
    273   input.close();
    274   input.clear();
    275253
    276254  // fill H-BondDistance DB per element
     
    279257  strncat(filename, STANDARDHBONDDISTANCEDB, MAXSTRINGSIZE-strlen(filename));
    280258  input.open(filename);
    281   if (!input.fail())
    282     DoLog(0) && (Log() << Verbose(0) << "Using " << filename << " as H bond length database." << endl);
    283259  otherstatus = otherstatus && LoadHBondLengthsDatabase(&input);
    284   input.close();
    285   input.clear();
    286260
    287261  if (!otherstatus){
     
    300274  bool status = true;
    301275  int counter = 0;
    302   pair< std::map<atomicNumber_t,element*>::iterator, bool > InserterTest;
    303276  if (!(*input).fail()) {
    304277    (*input).getline(header1, MAXSTRINGSIZE);
     
    326299      //(*input) >> ws;
    327300      (*input) >> ws;
     301      if (elements.count(neues->Z)) {// if element already present, remove and delete it
     302        element * const Elemental = FindElement(neues->Z);
     303        ASSERT(Elemental != NULL, "element should be present but is not??");
     304        RemoveElement(Elemental);
     305        delete(Elemental);
     306      }
    328307      //neues->Output((ofstream *)&cout);
    329       if ((neues->getNumber() > 0) && (neues->getNumber() < MAX_ELEMENTS)) {
    330         if (elements.count(neues->getNumber())) {// if element already present, remove and delete old one (i.e. replace it)
    331           //cout << neues->symbol << " is present already." << endl;
    332           element * const Elemental = FindElement(neues->getNumber());
    333           ASSERT(Elemental != NULL, "element should be present but is not??");
    334           *Elemental = *neues;
    335         } else {
    336           InserterTest = elements.insert(pair <atomicNumber_t,element*> (neues->getNumber(), neues));
    337           ASSERT(InserterTest.second, "Could not insert new element into periodentafel on LoadElementsDatabase().");
    338         }
    339         DoLog(0) && (Log() << Verbose(0) << " " << elements[neues->getNumber()]->symbol);
     308      if ((neues->Z > 0) && (neues->Z < MAX_ELEMENTS)) {
     309        DoLog(0) && (Log() << Verbose(0) << " " << neues->symbol);
     310        elements[neues->getNumber()] = neues;
    340311        counter++;
    341312      } else {
     
    346317    }
    347318    DoLog(0) && (Log() << Verbose(0) << endl);
    348   } else {
    349     DoeLog(1) && (eLog() << Verbose(1) << "Could not open the database." << endl);
     319  } else
    350320    status = false;
    351   }
    352321
    353322  if (counter == 0)
  • src/periodentafel.hpp

    re6317b rf8e486  
    4444
    4545  iterator AddElement(element * const pointer);
    46   size_t RemoveElement(element * const pointer);
    47   size_t RemoveElement(atomicNumber_t);
     46  void RemoveElement(element * const pointer);
     47  void RemoveElement(atomicNumber_t);
    4848  void CleanupPeriodtable();
    4949  element * const FindElement(atomicNumber_t) const;
  • src/unittests/AnalysisCorrelationToPointUnitTest.cpp

    re6317b rf8e486  
    4444  point = NULL;
    4545
    46   // construct element list
    47   std::vector<element *> elements;
     46  // construct molecule (tetraeder of hydrogens)
    4847  hydrogen = World::getInstance().getPeriode()->FindElement(1);
    4948  CPPUNIT_ASSERT(hydrogen != NULL && "hydrogen element not found");
    50   elements.push_back(hydrogen);
    51   // construct molecule (tetraeder of hydrogens)
    5249  TestMolecule = World::getInstance().createMolecule();
    5350  Walker = World::getInstance().createAtom();
     
    7976
    8077  // init maps
    81   pointmap = CorrelationToPoint( (MoleculeListClass * const)TestList, elements, (const Vector *)point );
     78  pointmap = CorrelationToPoint( (MoleculeListClass * const)TestList, (const element * const)hydrogen, (const Vector *)point );
    8279  binmap = NULL;
    8380
  • src/unittests/AnalysisCorrelationToPointUnitTest.hpp

    re6317b rf8e486  
    3737      MoleculeListClass *TestList;
    3838      molecule *TestMolecule;
    39       element *hydrogen;
     39      const element *hydrogen;
    4040
    4141      CorrelationToPointMap *pointmap;
  • src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp

    re6317b rf8e486  
    5252  LC = NULL;
    5353
    54   // prepare element list
     54  // construct molecule (tetraeder of hydrogens) base
    5555  hydrogen = World::getInstance().getPeriode()->FindElement(1);
    56   CPPUNIT_ASSERT(hydrogen != NULL && "hydrogen element not found");
    57   elements.clear();
    58 
    59   // construct molecule (tetraeder of hydrogens) base
    6056  TestSurfaceMolecule = World::getInstance().createMolecule();
    6157
     
    155151{
    156152  // do the pair correlation
    157   elements.push_back(hydrogen);
    158   surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
     153  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    159154//  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
    160155  CPPUNIT_ASSERT( surfacemap != NULL );
     
    165160{
    166161  BinPairMap::iterator tester;
    167   elements.push_back(hydrogen);
    168   surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
     162  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    169163  // put pair correlation into bins and check with no range
    170164//  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
     
    181175{
    182176  BinPairMap::iterator tester;
    183   elements.push_back(hydrogen);
    184   surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
     177  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    185178//  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
    186179  // ... and check with [0., 2.] range
     
    200193{
    201194  BinPairMap::iterator tester;
    202   elements.push_back(carbon);
    203   surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
     195  surfacemap = CorrelationToSurface( TestList, carbon, Surface, LC );
    204196//  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
    205197  // put pair correlation into bins and check with no range
     
    220212{
    221213  BinPairMap::iterator tester;
    222   elements.push_back(carbon);
    223   surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
     214  surfacemap = CorrelationToSurface( TestList, carbon, Surface, LC );
    224215//  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
    225216  // ... and check with [0., 2.] range
  • src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp

    re6317b rf8e486  
    4545      MoleculeListClass *TestList;
    4646      molecule *TestSurfaceMolecule;
    47       element *hydrogen;
    48       element *carbon;
    49       std::vector<element *> elements;
     47      const element *hydrogen;
     48      const element *carbon;
    5049
    5150      CorrelationToSurfaceMap *surfacemap;
  • src/unittests/AnalysisPairCorrelationUnitTest.cpp

    re6317b rf8e486  
    4747  binmap = NULL;
    4848
    49   // construct element list
    50   std::vector<element *> elements;
     49  // construct molecule (tetraeder of hydrogens)
    5150  hydrogen = World::getInstance().getPeriode()->FindElement(1);
    52   CPPUNIT_ASSERT(hydrogen != NULL && "hydrogen element not found");
    53   elements.push_back(hydrogen);
    54   elements.push_back(hydrogen);
    55 
    56   // construct molecule (tetraeder of hydrogens)
    5751  TestMolecule = World::getInstance().createMolecule();
    5852  Walker = World::getInstance().createAtom();
     
    8175
    8276  // init maps
    83   correlationmap = PairCorrelation( TestList, elements);
     77  correlationmap = PairCorrelation( TestList, hydrogen, hydrogen );
    8478  binmap = NULL;
    8579
  • src/unittests/AnalysisPairCorrelationUnitTest.hpp

    re6317b rf8e486  
    3737      MoleculeListClass *TestList;
    3838      molecule *TestMolecule;
    39       element *hydrogen;
     39      const element *hydrogen;
    4040
    4141      PairCorrelationMap *correlationmap;
  • tests/Tesselations/defs.in

    re6317b rf8e486  
    5454        #echo "Current dir is `pwd`, calling $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -N $RADIUS $FILENAME."
    5555        if [ -e $mol.dbond ]; then
    56                 $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -A $mol.dbond -N 0 --sphere-radius $RADIUS --nonconvex-file $FILENAME 2>stderr >stdout || exitcode=$?
     56                $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -A $mol.dbond -N $RADIUS $FILENAME 2>stderr >stdout || exitcode=$?
    5757        else
    58                 $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -N 0 --sphere-radius $RADIUS --nonconvex-file $FILENAME 2>stderr >stdout || exitcode=$?
     58                $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -N $RADIUS $FILENAME 2>stderr >stdout || exitcode=$?
    5959        fi
    6060        #echo "Molecuilder done with exitcode $exitcode."
  • tests/regression/Analysis/3/post/bin_output.csv

    re6317b rf8e486  
    551.5     0
    662       0
    7 2.5     1
    8 3       1
    9 3.5     6
    10 4       7
    11 4.5     10
    12 5       8
    13 5.5     13
    14 6       5
     72.5     0
     83       0
     93.5     0
     104       0
     114.5     0
     125       3
     135.5     2
     146       3
    15156.5     6
    16 7       4
    17 7.5     1
    18 8       0
    19 8.5     0
    20 9       0
    21 9.5     0
    22 10      0
    23 10.5    0
    24 11      0
    25 11.5    0
     167       2
     177.5     5
     188       4
     198.5     5
     209       9
     219.5     9
     2210      5
     2310.5    7
     2411      1
     2511.5    1
    262612      0
    272712.5    0
  • tests/regression/testsuite-analysis.at

    re6317b rf8e486  
    44AT_KEYWORDS([analysis])
    55AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/pre/test.conf .], 0)
    6 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E --elements 1 8 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
     6AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E 1 8 output.csv bin_output.csv 0 20], 0, [stdout], [stderr])
    77AT_CHECK([fgrep "Begin of PairCorrelation" stdout], 0, [ignore], [ignore])
    88#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/post/$file], 0, [ignore], [ignore])
     
    1414AT_KEYWORDS([analysis])
    1515AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/pre/test.conf .], 0)
    16 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E --elements 1 8 --output-file output-5.csv --bin-output-file bin_output-5.csv --bin-start 0 --bin-end 5], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E 1 8 output-5.csv bin_output-5.csv 0 5], 0, [stdout], [stderr])
    1717#AT_CHECK([file=output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
    1818AT_CHECK([file=bin_output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
    19 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E --elements 1 8 --output-file output-10.csv --bin-output-file bin_output-10.csv --bin-start 5 --bin-end 10], 0, [stdout], [stderr])
     19AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E 1 8 output-10.csv bin_output-10.csv 5 10], 0, [stdout], [stderr])
    2020#AT_CHECK([file=output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
    2121AT_CHECK([file=bin_output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
    22 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E --elements 1 8 --output-file output-20.csv --bin-output-file bin_output-20.csv --bin-start 10 --bin-end 20], 0, [stdout], [stderr])
     22AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C E 1 8 output-20.csv bin_output-20.csv 10 20], 0, [stdout], [stderr])
    2323#AT_CHECK([file=output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
    2424AT_CHECK([file=bin_output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
     
    2929AT_KEYWORDS([analysis])
    3030AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/pre/test.conf .], 0)
    31 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 7 -C P --elements 1 --position 10. 10. 10. --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
     31AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -C P 1 10. 10. 10. output.csv bin_output.csv 0 20], 0, [stdout], [stderr])
    3232AT_CHECK([fgrep "Begin of CorrelationToPoint" stdout], 0, [ignore], [ignore])
    3333#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/post/$file], 0, [ignore], [ignore])
     
    3939AT_KEYWORDS([analysis])
    4040AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/pre/test.conf .], 0)
    41 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -I -C S --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20 --molecule-by-id 208], 0, [stdout], [stderr])
     41AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -I -C S 1 output.csv bin_output.csv 1. 0 20], 0, [stdout], [stderr])
    4242AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore])
    4343#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/post/$file], 0, [ignore], [ignore])
     
    4545AT_CLEANUP
    4646
    47 # 5. principal axis system
    48 #AT_SETUP([Analysis - principal axis system])
    49 #AT_KEYWORDS([analysis])
    50 #AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/test.conf .], 0)
    51 #AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -m 0], 0, [stdout], [stderr])
    52 #AT_CHECK([fgrep "eigenvalue = 4382.53," stdout], 0, [ignore], [ignore])
    53 #AT_CHECK([fgrep "eigenvalue = 4369.24," stdout], 0, [ignore], [ignore])
    54 #AT_CHECK([fgrep "eigenvalue = 28.9359," stdout], 0, [ignore], [ignore])
    55 #AT_CLEANUP
     47# 4. principal axis system
     48AT_SETUP([Analysis - principal axis system])
     49AT_KEYWORDS([analysis])
     50AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/test.conf .], 0)
     51AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -m 0], 0, [stdout], [stderr])
     52AT_CHECK([fgrep "eigenvalue = 4382.53," stdout], 0, [ignore], [ignore])
     53AT_CHECK([fgrep "eigenvalue = 4369.24," stdout], 0, [ignore], [ignore])
     54AT_CHECK([fgrep "eigenvalue = 28.9359," stdout], 0, [ignore], [ignore])
     55AT_CLEANUP
  • tests/regression/testsuite-filling.at

    re6317b rf8e486  
    1010H       0.758602 0.     -0.504284
    1111]])
    12 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -F water.xyz --MaxDistance -1 --distances 3.1 3.1 3.1  --lengths 2.1 0. 0. --DoRotate 0], 0, [stdout], [stderr])
     12AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 3 -F water.xyz 3.1 3.1 3.1 2.1 0. 0. 0], 0, [stdout], [stderr])
    1313AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Filling/1/post/$file], 0, [ignore], [ignore])
    1414AT_CLEANUP
  • tests/regression/testsuite-fragmentation.at

    re6317b rf8e486  
    1212AT_SETUP([Fragmentation - Fragmentation])
    1313AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/2/pre/test.conf .], 0)
    14 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -f 0 --distance 1.55 --order 2], 0, [ignore], [ignore])
     14AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -f 1.55 2], 0, [ignore], [ignore])
    1515AT_CHECK([ls -l BondFragment*.conf | wc -l], 0, [5
    1616], [ignore])
     
    1818
    1919# 3. check whether parsing of BondFragment files and re-rwriting config files is working (exit code is 2 as we don't need to continue wrt to ...OrderAtSite)
    20 # NOTE: Result code of 2 is not returned if "-v 1" is missing, then sequence of atoms is changed all the time and Adjacency files never match.
    21 AT_SETUP([Fragmentation - BROKEN: Fragmentation is at MaxOrder])
    22 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/3/pre/test.conf .], 0)
    23 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -f 0 --distance 1.55 --order 2], 0, [ignore], [ignore])
    24 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -f 0 --distance 1.55 --order 2], [ignore], [ignore], [ignore])
     20AT_SETUP([Fragmentation - Fragmentation is at MaxOrder])
     21AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/3/pre/* .], 0)
     22AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -f 1.55 2], 0, [ignore], [ignore])
     23AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -f 1.55 2], 2, [ignore], [ignore])
    2524AT_CLEANUP
  • tests/regression/testsuite-molecules.at

    re6317b rf8e486  
    44AT_KEYWORDS([Molecules])
    55AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/1/pre/test.* .], 0)
    6 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 4 -A test.dbond --molecule-by-id 0], 0, [stdout], [stderr])
     6AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 4 -A test.dbond], 0, [stdout], [stderr])
    77AT_CHECK([fgrep "Looking for atoms 2 and 9." stdout], 0, [ignore], [ignore])
    88AT_CLEANUP
     
    1212AT_KEYWORDS([Molecules])
    1313AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/pre/test.conf .], 0)
    14 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -j test.dbond --molecule-by-id 0], 0, [stdout], [stderr])
     14AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -j test.dbond], 0, [stdout], [stderr])
    1515AT_CHECK([file=test.dbond; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore])
    16 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -J test.adj --molecule-by-id 0], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -J test.adj], 0, [stdout], [stderr])
    1717AT_CHECK([file=test.adj; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore])
    1818AT_CLEANUP
     
    2222AT_KEYWORDS([Molecules])
    2323AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/3/pre/test.conf .], 0)
    24 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -S test.ekin --molecule-by-id 0], 0, [stdout], [stderr])
     24AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -S test.ekin], 0, [stdout], [stderr])
    2525AT_CHECK([file=test.ekin; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/3/post/$file], 0, [ignore], [ignore])
    2626AT_CLEANUP
     
    3030AT_KEYWORDS([Molecules])
    3131AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/4/pre/test.conf .], 0)
    32 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -L teststep --start-step 0 --end-step 1 --molecule-by-id 0 --id-mapping 1], 0, [stdout], [stderr])
     32AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -L 0 1 teststep 1], 0, [stdout], [stderr])
    3333AT_CLEANUP
    3434
     
    3737AT_KEYWORDS([Molecules])
    3838AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/pre/test.* .], 0)
    39 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -P test.forces --molecule-by-id 0], 134, [stdout], [stderr])
     39AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -P test.forces], 134, [stdout], [stderr])
    4040#AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/post/$file], 0, [ignore], [ignore])
    4141AT_CLEANUP
     
    4545AT_KEYWORDS([Molecules])
    4646AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test.* .], 0)
    47 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t 1. 1. 1. --molecule-by-id 0 --periodic 0], 0, [stdout], [stderr])
     47AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t 1. 1. 1.], 0, [stdout], [stderr])
    4848AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore])
    4949AT_CLEANUP
     
    5353AT_KEYWORDS([Molecules])
    5454AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/pre/test.* .], 0)
    55 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t 12. 12. 12. --molecule-by-id 0 --periodic 1], 0, [stdout], [stderr])
     55AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T 12. 12. 12.], 0, [stdout], [stderr])
    5656AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/post/$file], 0, [ignore], [ignore])
    5757AT_CLEANUP
    5858
    59 # 8. Rotate to PAS
     59# 8. Periodic translation
    6060AT_SETUP([Molecules - BROKEN: Rotate to PAS])
    6161AT_KEYWORDS([Molecules])
  • tests/regression/testsuite-simple_configuration.at

    re6317b rf8e486  
    2525AT_SETUP([Simple configuration - adding atom])
    2626AT_KEYWORDS([configuration])
    27 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a 1 --position 10. 10. 10.], 0, [ignore], [ignore])
     27AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a 1 10. 10. 10.], 0, [ignore], [ignore])
    2828AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
    2929AT_CHECK([file=test.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
     
    3535AT_KEYWORDS([configuration])
    3636AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.conf test.conf], 0)
    37 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E 0 --element 6], 0, [ignore], [ignore])
     37AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E 0 6], 0, [ignore], [ignore])
    3838AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore])
    3939AT_CLEANUP
     
    5353AT_KEYWORDS([configuration])
    5454AT_CHECK([../../molecuilder empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 255, [ignore], [stderr])
    55 AT_CHECK([fgrep -c "Not enough" stderr], 0, [1
     55AT_CHECK([fgrep -c "Not enough or invalid" stderr], 0, [1
    5656], [ignore])
    5757AT_CLEANUP
     
    6262AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/7/pre/test.conf .], 0)
    6363AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t], 255, [ignore], [stderr])
    64 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     64AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    6565AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 255, [ignore], [stderr])
    66 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     66AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    6767AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 255, [ignore], [stderr])
    68 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     68AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    6969AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 255, [ignore], [stderr])
    70 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     70AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    7171AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 255, [ignore], [stderr])
    72 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     72AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    7373AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 255, [ignore], [stderr])
    74 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     74AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    7575AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 255, [ignore], [stderr])
    76 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     76AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    7777AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 255, [ignore], [stderr])
    78 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     78AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    7979AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T -u], 255, [ignore], [stderr])
    80 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     80AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    8181AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -u], 255, [ignore], [stderr])
    82 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore])
     82AT_CHECK([fgrep -c "CRITICAL: Not enough or invalid" stderr], 0, [ignore], [ignore])
    8383AT_CLEANUP
    8484
     
    8787AT_KEYWORDS([configuration])
    8888AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.* .], 0)
    89 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -R 7. --position 7.283585982 3.275186040 3.535886037], 0, [stdout], [stderr])
     89AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -R 7.283585982 3.275186040 3.535886037 7.], 0, [stdout], [stderr])
    9090AT_CHECK([sort -n test.conf.xyz | grep -v "Created by" >test.conf.xyz-sorted], 0, [ignore], [ignore])
    9191AT_CHECK([sort -n ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/test.conf.xyz  | grep -v "Created by" >${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/test.conf.xyz-sorted], 0, [ignore], [ignore])
  • tests/regression/testsuite-standard_options.at

    re6317b rf8e486  
    5151AT_SETUP([Standard Options - fast trajectories])
    5252AT_KEYWORDS([options])
    53 AT_CHECK([../../molecuilder test.conf -n 1], 0, [stdout], [stderr])
     53AT_CHECK([../../molecuilder test.conf -n], 0, [stdout], [stderr])
    5454AT_CHECK([fgrep "I won't parse trajectories" stdout], 0, [ignore], [ignore])
    5555AT_CLEANUP
  • tests/regression/testsuite-tesselation.at

    re6317b rf8e486  
    44AT_KEYWORDS([Tesselation])
    55AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/1/pre/* .], 0)
    6 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -N 0 --sphere-radius 4. --nonconvex-file NonConvexEnvelope], 0, [stdout], [stderr])
     6AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -N 4. NonConvexEnvelope], 0, [stdout], [stderr])
    77AT_CHECK([file=NonConvexEnvelope.dat; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/1/post/$file], 0, [ignore], [ignore])
    88AT_CHECK([file=NonConvexEnvelope.r3d; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/1/post/$file], 0, [ignore], [ignore])
     
    1212AT_SETUP([Tesselation - Convex Envelope])
    1313AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/2/pre/* .], 0)
    14 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -o 0 --convex-file ConvexEnvelope --nonconvex-file NonConvexEnvelope], 0, [stdout], [stderr])
     14AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -o ConvexEnvelope NonConvexEnvelope], 0, [stdout], [stderr])
    1515AT_CHECK([file=ConvexEnvelope.dat; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/2/post/$file], 0, [ignore], [ignore])
    1616AT_CHECK([file=ConvexEnvelope.r3d; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/2/post/$file], 0, [ignore], [ignore])
     
    2222AT_SETUP([Tesselation - Big non-Convex Envelope])
    2323AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/3/pre/* .], 0)
    24 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -N 0 --sphere-radius 4. --nonconvex-file NonConvexEnvelope], 0, [stdout], [stderr])
     24AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -N 4. NonConvexEnvelope], 0, [stdout], [stderr])
    2525AT_CHECK([file=NonConvexEnvelope.dat; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/3/post/$file], 0, [ignore], [ignore])
    2626AT_CHECK([file=NonConvexEnvelope.r3d; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Tesselation/3/post/$file], 0, [ignore], [ignore])
Note: See TracChangeset for help on using the changeset viewer.