Changes in / [5ffa05:bd81f9]


Ignore:
Files:
93 added
26 deleted
456 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r5ffa05 rbd81f9  
    33
    44AC_PREREQ(2.59)
    5 AC_INIT(MoleCuilder, 1.2.4, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
     5AC_INIT(MoleCuilder, 1.2.5, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
    66AC_CONFIG_AUX_DIR([build-aux])
    77AC_CONFIG_SRCDIR([src/builder.cpp])
     
    8787# refer to the libtool manual, section "Updating library version information":
    8888# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
    89 AC_SUBST([MOLECUILDER_SO_VERSION], [8:0:1])
    90 AC_SUBST([MOLECUILDER_API_VERSION], [1.2.4])
     89AC_SUBST([MOLECUILDER_SO_VERSION], [9:0:0])
     90AC_SUBST([MOLECUILDER_API_VERSION], [1.2.5])
    9191
    9292dnl this macro is used to get the arguments supplied
  • src/Actions/Action.cpp

    r5ffa05 rbd81f9  
    174174    Dialog* dialog = createDialog();
    175175    if (dialog->hasQueries()) {
    176       dialog->display();
     176      if (!dialog->display())
     177        // dialog error or aborted -> throw exception
     178        throw ActionFailureException() << ActionNameString(getName());
    177179    }
    178180    delete(dialog);
     
    181183//  try {
    182184    startTimer();
    183     getParametersfromValueStorage();
     185    //getParametersfromValueStorage();
    184186    state = performCall();
    185187    endTimer();
  • src/Actions/Action.hpp

    r5ffa05 rbd81f9  
    1717#include <boost/shared_ptr.hpp>
    1818
     19#include <boost/preprocessor/list/adt.hpp>
     20
    1921/** Used in .def files in paramdefaults define to set that no default value exists.
    20  * We define NODEFAULT here, as it is used in .def files and needs to be present
     22 * We define NOPARAM_DEFAULT here, as it is used in .def files and needs to be present
    2123 * before these are included.
    2224 */
    23 #define NODEFAULT ""
     25#define NOPARAM_DEFAULT BOOST_PP_NIL
    2426
    2527// forward declaration
     
    185187
    186188  /**
    187    * This method is called by the Histor, when a redo is performed. It is
     189   * This method is called by the History, when a redo is performed. It is
    188190   * provided with the corresponding state produced by the undo method and
    189191   * needs to produce a State that can then be used for another undo.
     
    192194
    193195  /**
    194    * This special state can be used to indicate that the Action was successfull
     196   * This special state can be used to indicate that the Action was successful
    195197   * without providing a special state. Use this if your Action does not need
    196    * a speciallized state.
     198   * a specialized state.
    197199   */
    198200  static state_ptr success;
     
    200202  /**
    201203   * This special state can be returned, to indicate that the action could not do it's
    202    * work, was abborted by the user etc. If you return this state make sure to transactionize
     204   * work, was aborted by the user etc. If you return this state make sure to transactionize
    203205   * your Actions and unroll the complete transaction before this is returned.
    204206   */
     
    227229   * necessary ActionParameters by retrieving the values from ValueStorage.
    228230   */
    229   virtual void getParametersfromValueStorage()=0;
     231  //virtual void getParametersfromValueStorage()=0;
    230232
    231233  /**
     
    268270 * It is implementing a memento pattern. The base class is completely empty,
    269271 * since no general state internals can be given. The Action performing
    270  * the Undo should downcast to the apropriate type.
     272 * the Undo should downcast to the appropriate type.
    271273 */
    272274class ActionState{
  • src/Actions/ActionRegistry.cpp

    r5ffa05 rbd81f9  
    3434using namespace MoleCuilder;
    3535
     36// static entities
     37bool ActionRegistry::completely_instatiated = false;
     38
    3639/** Constructor for class ActionRegistry.
    3740 */
     
    4043  //std::cout << "ActionRegistry::ActionRegistry() called, instance is " << this << "." << std::endl;
    4144  fillRegistry();
     45  completely_instatiated = true;
    4246}
    4347
  • src/Actions/ActionRegistry.hpp

    r5ffa05 rbd81f9  
    4848  int getLastPosition(const std::string &MenuName) const;
    4949
     50  /** Static getter for the state of the registry.
     51   *
     52   * @return true - ActionRegistry's cstor has run through, false - else
     53   */
     54  static bool getCompletely_instatiated()
     55  { return completely_instatiated; }
     56
    5057private:
    5158  ActionRegistry();
     
    5360
    5461  void fillRegistry();
     62
     63  //!> this tells whether ActionRegistry has been completed instantiated.
     64  static bool completely_instatiated;
    5565};
    5666
  • src/Actions/Action_impl_header.hpp

    r5ffa05 rbd81f9  
    1414#include <boost/preprocessor/comparison/equal.hpp>
    1515#include <boost/preprocessor/comparison/not_equal.hpp>
     16#include <boost/preprocessor/control/expr_if.hpp>
    1617#include <boost/preprocessor/control/if.hpp>
    1718#include <boost/preprocessor/debug/assert.hpp>
    1819#include <boost/preprocessor/iteration/local.hpp>
     20#include <boost/preprocessor/list/adt.hpp>
    1921#include <boost/preprocessor/punctuation/comma_if.hpp>
     22#include <boost/preprocessor/punctuation/paren.hpp>
    2023#include <boost/preprocessor/repetition/repeat.hpp>
    2124#include <boost/preprocessor/seq/elem.hpp>
     
    3134#include "Actions/ValueStorage.hpp"
    3235
     36#include "Parameters/Parameter.hpp"
     37
    3338// some derived names: if CATEGORY is not given, we don't prefix with it
    3439#ifdef CATEGORY
     
    4752#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
    4853#endif
     54#ifndef paramdefaults
     55#define MAXPARAMDEFAULTS 0
     56// this is required for valid_print "else part"
     57#define sequencer(z,n,data) \
     58  BOOST_PP_SEQ_PUSH_BACK( data, NOPARAM_DEFAULT)
     59#define paramdefaults BOOST_PP_REPEAT( MAXPARAMTYPES, sequencer, BOOST_PP_SEQ_NIL )
     60#else
     61#define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
     62#endif
     63#define PARAM_DEFAULT(x) \
     64    (x, BOOST_PP_NIL)
    4965
    5066// check user has given name and category
     
    7793#endif
    7894
    79 // check if paramdefaults is given, otherwise fill list with NODEFAULT
     95// check if paramdefaults is given, otherwise fill list with NOPARAM_DEFAULT
    8096// this does not work: paramdefaults has to be completely defined before
    8197// being used within option_print (used as an array there and not as
    8298// some function call still to be expanded)
    83 //#define paramdefaults (NODEFAULT)
     99//#define paramdefaults (NOPARAM_DEFAULT)
    84100//#define tempvalue(z,n,value)
    85 //  BOOST_PP_CAT(value,(NODEFAULT))
     101//  BOOST_PP_CAT(value,(NOPARAM_DEFAULT))
    86102//BOOST_PP_REPEAT(tempvalue, MAXPARAMTYPES, paramdefaults)
    87103//#undef tempvalue
     
    95111#endif
    96112
    97 // print a list of type ref followed by a separator, i.e. "int i;"
     113// print a list of type ref followed by a separator, i.e. "Parameter<int> i;"
    98114#define type_print(z,n,TYPELIST, VARLIST, separator) \
     115  Parameter < \
    99116  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
    100   BOOST_PP_SEQ_ELEM(n, VARLIST)\
     117  > \
     118  BOOST_PP_SEQ_ELEM(n, VARLIST) \
    101119  separator
    102120
     
    108126
    109127// prints Options.insert
    110 #ifdef paramdefaults
    111128#define option_print(z,n,unused, unused2) \
    112129  tester = Options. insert (\
     
    116133          BOOST_PP_SEQ_ELEM(n, paramtokens), \
    117134          &typeid( BOOST_PP_SEQ_ELEM(n, paramtypes) ), \
    118           BOOST_PP_SEQ_ELEM(n, paramdescriptions), \
    119           std::string( BOOST_PP_SEQ_ELEM(n, paramdefaults) ) )\
     135          BOOST_PP_SEQ_ELEM(n, paramdescriptions) \
     136          BOOST_PP_COMMA_IF( BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, paramdefaults) ) ) ) \
     137          BOOST_PP_EXPR_IF( \
     138              BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, paramdefaults) ) ), \
     139              toString BOOST_PP_LPAREN() \
     140                  BOOST_PP_LIST_FIRST( BOOST_PP_SEQ_ELEM(n, paramdefaults) )) \
     141              BOOST_PP_RPAREN() \
     142          )\
    120143      )\
    121144  ); \
    122145  ASSERT(tester.second, "ActionTrait<ACTION>::ActionTrait<ACTION>() option token present twice!");
    123 #else
    124 #define option_print(z,n,unused, unused2) \
    125   tester = Options. insert (\
    126       std::pair< std::string, OptionTrait *> ( \
    127       BOOST_PP_SEQ_ELEM(n, paramtokens), \
    128       new OptionTrait(\
    129           BOOST_PP_SEQ_ELEM(n, paramtokens), \
    130           &typeid( BOOST_PP_SEQ_ELEM(n, paramtypes) ), \
    131           BOOST_PP_SEQ_ELEM(n, paramdescriptions), \
    132           NODEFAULT )\
    133       )\
    134   ); \
    135   ASSERT(tester.second, "ActionTrait<ACTION>::ActionTrait<ACTION>() option token present twice!");
    136 #endif
    137146
    138147namespace MoleCuilder {
     
    205214
    206215  struct PARAMS : ActionParameters {
     216    //!> constructor for class PARAMS, setting valid ranges
     217    PARAMS();
     218    //!> copy constructor for class PARAMS, setting valid ranges
     219    PARAMS(const PARAMS &p);
    207220  #if defined paramtypes && defined paramreferences
    208221  #define BOOST_PP_LOCAL_MACRO(n) type_print(~, n, paramtypes, paramreferences, ;)
     
    219232
    220233private:
    221   virtual void getParametersfromValueStorage();
     234  //virtual void getParametersfromValueStorage();
    222235  virtual Action::state_ptr performCall();
    223236  virtual Action::state_ptr performUndo(Action::state_ptr);
     
    227240}
    228241
     242#undef paramvalids
    229243#undef paramtypes
    230244#undef paramtokens
     
    233247#undef paramdefaults
    234248#undef MAXPARAMTYPES
     249#undef MAXPARAMDEFAULTS
    235250#undef statetypes
    236251#undef statereferences
    237252#undef MAXSTATETYPES
     253#undef PARAM_DEFAULT
    238254
    239255#undef option_print
     256#undef sequencer
    240257#undef type_print
    241258#undef type_list
  • src/Actions/Action_impl_pre.hpp

    r5ffa05 rbd81f9  
    3737#include <boost/preprocessor/comparison/equal.hpp>
    3838#include <boost/preprocessor/comparison/not_equal.hpp>
     39#include <boost/preprocessor/control/expr_if.hpp>
    3940#include <boost/preprocessor/control/if.hpp>
    4041#include <boost/preprocessor/debug/assert.hpp>
    4142#include <boost/preprocessor/iteration/local.hpp>
     43#include <boost/preprocessor/list/adt.hpp>
    4244#include <boost/preprocessor/punctuation/comma_if.hpp>
    4345#include <boost/preprocessor/repetition/repeat.hpp>
     
    4850#include <boost/preprocessor/seq/transform.hpp>
    4951
     52#include "Parameters/Parameter.hpp"
     53
     54
    5055// some derived names: if CATEGORY is not given, we don't prefix with it
    5156#ifdef CATEGORY
     
    7378#define MAXSTATETYPES BOOST_PP_SEQ_SIZE(statetypes)
    7479#endif
     80#ifndef paramdefaults
     81#define MAXPARAMDEFAULTS 0
     82// this is required for valid_print "else part"
     83#define sequencer(z,n,data) \
     84  BOOST_PP_SEQ_PUSH_BACK( data, NOPARAM_DEFAULT)
     85#define paramdefaults BOOST_PP_REPEAT( MAXPARAMTYPES, sequencer, BOOST_PP_SEQ_NIL )
     86#else
     87#define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
     88#endif
     89#define PARAM_DEFAULT(x) \
     90    (x, BOOST_PP_NIL)
    7591
    7692// check user has given name and category
     
    118134  dialog->query<\
    119135  BOOST_PP_SEQ_ELEM(n, paramtypes)\
    120   >(\
     136  >( params. \
     137  BOOST_PP_SEQ_ELEM(n, paramreferences)\
     138  ,\
    121139  BOOST_PP_SEQ_ELEM(n, paramtokens)\
    122140  , Traits.getDescription()\
    123141  );
    124142
     143// print an initialiser list, i.e. "var( token, valid (,default) )(,)"
     144#define valid_print(z,n,TOKENLIST, VARLIST, VALIDLIST, DEFAULTLIST) \
     145  BOOST_PP_COMMA_IF(n) \
     146  BOOST_PP_SEQ_ELEM(n, VARLIST) \
     147  ( \
     148  BOOST_PP_SEQ_ELEM(n, TOKENLIST) \
     149  , \
     150  BOOST_PP_SEQ_ELEM(n, VALIDLIST) \
     151  BOOST_PP_COMMA_IF( BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) ) ) ) \
     152  BOOST_PP_EXPR_IF( \
     153      BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) ) ), \
     154      BOOST_PP_LIST_FIRST( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) )) \
     155  )
     156
     157// print an initialiser list, i.e. "var( valid . var )(,)"
     158#define validcopy_print(z,n,TOKENLIST, VARLIST, VALID) \
     159  BOOST_PP_COMMA_IF(n) \
     160  BOOST_PP_SEQ_ELEM(n, VARLIST) \
     161  ( \
     162  VALID . \
     163  BOOST_PP_SEQ_ELEM(n, VARLIST) \
     164  )
     165
    125166// prints set/queryCurrentValue (command) for paramreferences and paramtokens
    126 #define value_print(z,n,command, prefix) \
    127   ValueStorage::getInstance(). command (\
    128   BOOST_PP_SEQ_ELEM(n, paramtokens)\
    129   , \
    130   prefix\
    131   BOOST_PP_SEQ_ELEM(n, paramreferences)\
     167#define value_print(z, n, container, prefix) \
     168  prefix \
     169  BOOST_PP_SEQ_ELEM(n, container)\
     170  .set(\
     171  BOOST_PP_SEQ_ELEM(n, container)\
    132172  );
    133173
    134174// prints set/queryCurrentValue (command) for paramreferences and paramtokens
    135 #define valuetype_print(z,n,command, prefix) \
    136   ValueStorage::getInstance(). command< \
    137   BOOST_PP_SEQ_ELEM(n, paramtypes) \
    138   > (\
    139   BOOST_PP_SEQ_ELEM(n, paramtokens)\
    140   , \
    141   prefix\
    142   BOOST_PP_SEQ_ELEM(n, paramreferences)\
     175#define valuetype_print(z,n,container, types, prefix) \
     176  prefix \
     177  BOOST_PP_SEQ_ELEM(n, container) \
     178  .setAsString( \
     179  BOOST_PP_SEQ_ELEM(n, container) \
    143180  );
    144181
     
    206243}
    207244
     245// =========== parameter constructor ===========
     246ACTION::PARAMS::PARAMS()
     247#if defined paramtokens && defined paramreferences && defined paramvalids
     248      :
     249#define BOOST_PP_LOCAL_MACRO(n) valid_print(~, n, paramtokens, paramreferences, paramvalids, paramdefaults)
     250#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
     251#include BOOST_PP_LOCAL_ITERATE()
     252#endif
     253    {}
     254
     255ACTION::PARAMS::PARAMS(const PARAMS &p)
     256#if defined paramtokens && defined paramreferences
     257      :
     258#define BOOST_PP_LOCAL_MACRO(n) validcopy_print(~, n, paramtokens, paramreferences, p)
     259#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
     260#include BOOST_PP_LOCAL_ITERATE()
     261#endif
     262    {}
     263
    208264// =========== fill a dialog ===========
    209265Dialog* ACTION::fillDialog(Dialog *dialog) {
     
    226282// =========== command for calling action directly ===========
    227283void COMMAND(
    228 #if defined paramtypes && defined paramreferences
     284#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
    229285#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
    230286#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
     
    233289)
    234290{
    235   Action *ToCall = ActionRegistry::getInstance().getActionByName( TOKEN ); //->clone(params);
     291  ACTION *ToCall = dynamic_cast<ACTION*>(ActionRegistry::getInstance().getActionByName( TOKEN )); //->clone(params);
    236292  //ACTION::PARAMS params;
    237 #if BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
    238 #define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, setCurrentValue, )
     293#if defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
     294#define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, paramreferences, ToCall->params.)
    239295#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
    240296#include BOOST_PP_LOCAL_ITERATE()
     
    244300
    245301void BOOST_PP_CAT( COMMAND, _stringargs)(
    246 #if defined paramtypes && defined paramreferences
     302#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
    247303#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_TRANSFORM( type2string, , paramtypes), paramreferences)
    248304#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
     
    250306#endif
    251307        ) {
    252   Action *ToCall = ActionRegistry::getInstance().getActionByName( TOKEN ); //->clone(params);
     308  ACTION *ToCall = dynamic_cast<ACTION*>(ActionRegistry::getInstance().getActionByName( TOKEN )); //->clone(params);
    253309  //ACTION::PARAMS params;
    254 #if BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
    255 #define BOOST_PP_LOCAL_MACRO(n) valuetype_print(~, n, setCurrentValueByString, )
     310#if defined paramtypes && defined paramtypes && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
     311#define BOOST_PP_LOCAL_MACRO(n) valuetype_print(~, n, paramreferences, paramtypes, ToCall->params. )
    256312#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
    257313#include BOOST_PP_LOCAL_ITERATE()
     
    260316};
    261317
    262 // =========== obtain parameters from Storage, used by performCall() ===========
    263 void ACTION::getParametersfromValueStorage() {
    264 #if BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
    265 #define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, queryCurrentValue, params.)
    266 #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
    267 #include BOOST_PP_LOCAL_ITERATE()
    268 #endif
    269 };
    270 
    271318}
    272319
    273320// free up defines
     321#undef paramvalids
    274322#undef paramtypes
    275323#undef paramtokens
    276324#undef paramreferences
     325#undef paramdescriptions
     326#undef paramdefaults
    277327#undef MAXPARAMTYPES
     328#undef MAXPARAMDEFAULTS
    278329#undef statetypes
    279330#undef statereferences
    280331#undef MAXSTATETYPES
     332#undef PARAM_DEFAULT
    281333
    282334#undef type2string
     
    286338#undef type_list
    287339#undef dialog_print
     340#undef sequencer
     341#undef valid_print
     342#undef validcopy_print
    288343#undef value_print
    289344#undef valuetype_print
  • src/Actions/Action_impl_python.hpp

    r5ffa05 rbd81f9  
    1818#include <boost/preprocessor/facilities/expand.hpp>
    1919#include <boost/preprocessor/iteration/local.hpp>
     20#include <boost/preprocessor/list/adt.hpp>
    2021#include <boost/preprocessor/punctuation/comma_if.hpp>
    21 
    22 #define NODEFAULT ""
     22#include <boost/preprocessor/punctuation/paren.hpp>
    2323
    2424// some derived names: if CATEGORY is not given, we don't prefix with it
     
    3232#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
    3333#endif
     34
     35// for paramdefaults entries
     36#define PARAM_DEFAULT(x) \
     37    (x, BOOST_PP_NIL)
    3438
    3539// check if no lists given
     
    6165  BOOST_PP_SEQ_ELEM(n, STRINGLIST) \
    6266  ) \
    63   = BOOST_PP_SEQ_ELEM(n, DEFAULTLIST)
     67  = \
     68  BOOST_PP_IF( \
     69      BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, paramdefaults) ) ), \
     70      toString BOOST_PP_LPAREN() \
     71          BOOST_PP_LIST_FIRST( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) ) \
     72      BOOST_PP_RPAREN(), \
     73      std::string("") \
     74  )
    6475
    6576// print a list of comma-separated list, i.e. (,)arg("Action")
     
    142153#undef PARAMS
    143154#undef MAXPARAMTYPES
     155#undef PARAM_DEFAULT
    144156
    145157#undef help_print
  • src/Actions/Action_impl_undef.hpp

    r5ffa05 rbd81f9  
    1111#endif
    1212
     13#undef paramvalids
    1314#undef paramtypes
    1415#undef paramtokens
     16#undef paramreferences
    1517#undef paramdescriptions
    1618#undef paramdefaults
    17 #undef paramreferences
    1819
    1920#undef statetypes
  • src/Actions/AnalysisAction/CalculateBoundingBoxAction.def

    r5ffa05 rbd81f9  
    1010typedef std::vector<double> doubleVec;
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#undef paramtypes
    1618#undef paramreferences
     
    1820#undef paramdescriptions
    1921#undef paramdefaults
     22#undef paramvalids
    2023
    2124// Reaction cannot be undone, hence no state
  • src/Actions/AnalysisAction/CalculateCellVolumeAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramreferences
     
    1618#undef paramdescriptions
    1719#undef paramdefaults
     20#undef paramvalids
    1821
    1922// Reaction cannot be undone, hence no state
  • src/Actions/AnalysisAction/CalculateMolarMassAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramreferences
     
    1618#undef paramdescriptions
    1719#undef paramdefaults
     20#undef paramvalids
    1821
    1922// Reaction cannot be undone, hence no state
  • src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp

    r5ffa05 rbd81f9  
    5656
    5757  // select atoms and obtain zero dipole orientation
    58   Formula DipoleFormula(params.DipoleFormula);
    59   World::getInstance().setTime(params.timestepzero);
     58  Formula DipoleFormula(params.DipoleFormula.get());
     59  World::getInstance().setTime(params.timestepzero.get());
    6060  World::getInstance().clearMoleculeSelection(); // TODO: This should be done in setTime or where molecules are re-done
    6161  World::getInstance().selectAllMolecules(MoleculeByFormula(DipoleFormula));
     
    7171      +toString(DipoleFormula)+" selects no atoms.");
    7272  range<size_t> timesteps = getMaximumTrajectoryBounds(atoms);
    73   ASSERT(params.timestepzero < timesteps.first,
     73  ASSERT(params.timestepzero.get() < timesteps.first,
    7474    "AnalysisDipoleAngularCorrelationAction::performCall() - time step zero "
    75     +toString(params.timestepzero)+" is beyond trajectory range ("
     75    +toString(params.timestepzero.get())+" is beyond trajectory range ("
    7676    +toString(timesteps.first)+") of some atoms.");
    77   for (size_t step = params.timestepzero; step < timesteps.first; ++step) {
     77  for (size_t step = params.timestepzero.get(); step < timesteps.first; ++step) {
    7878    // calculate dipoles relative to zero orientation
    7979    DipoleAngularCorrelationMap *correlationmap = NULL;
     
    8787    // output correlation map
    8888    ofstream output;
    89     std::string filename = params.outputname.string()+"."+stepname+".dat";
     89    std::string filename = params.outputname.get().string()+"."+stepname+".dat";
    9090    output.open(filename.c_str());
    9191    OutputCorrelationMap<DipoleAngularCorrelationMap>(&output, correlationmap, OutputDipoleAngularCorrelation_Header, OutputDipoleAngularCorrelation_Value);
     
    9393
    9494    // bin map
    95     BinPairMap *binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
     95    BinPairMap *binmap = BinData( correlationmap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() );
    9696
    9797    // free correlation map
     
    100100    // output binned map
    101101    ofstream binoutput;
    102     std::string binfilename = params.binoutputname.string()+"."+stepname+".dat";
     102    std::string binfilename = params.binoutputname.get().string()+"."+stepname+".dat";
    103103    binoutput.open(binfilename.c_str());
    104104    OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value );
  • src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def

    r5ffa05 rbd81f9  
    1010#include <vector>
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     15#include "Parameters/Validators/Specific/FormulaValidator.hpp"
     16#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     17#include "Parameters/Validators/Specific/TimeStepPresentValidator.hpp"
     18
    1219// i.e. there is an integer with variable name Z that can be found in
    1320// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1522#define paramtypes (std::string)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(unsigned int)
    1623#define paramreferences (DipoleFormula)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(timestepzero)
    1724#define paramtokens ("dipole-angular-correlation")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("time-step-zero")
    1825#define paramdescriptions ("formula of molecules to calculate dipole of")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("initial time step to correlate following ones against")
    19 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
     26#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.5))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0))
     27#define paramvalids \
     28(FormulaValidator()) \
     29(RotationAngleValidator()) \
     30(RotationAngleValidator()) \
     31(RotationAngleValidator()) \
     32(!FilePresentValidator()) \
     33(!FilePresentValidator()) \
     34(TimeStepPresentValidator())
    2035
    2136// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/DipoleCorrelationAction.cpp

    r5ffa05 rbd81f9  
    4848
    4949  // execute action
    50   output.open(params.outputname.string().c_str());
    51   binoutput.open(params.binoutputname.string().c_str());
     50  output.open(params.outputname.get().string().c_str());
     51  binoutput.open(params.binoutputname.get().string().c_str());
    5252  DipoleCorrelationMap *correlationmap = NULL;
    5353  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
    5454  LOG(0, "STATUS: There are " << molecules.size() << " selected molecules.");
    55   ASSERT(!params.periodic, "AnalysisDipoleCorrelationAction() - periodic case not implemented.");
     55  ASSERT(!params.periodic.get(), "AnalysisDipoleCorrelationAction() - periodic case not implemented.");
    5656  correlationmap = DipoleCorrelation(molecules);
    5757  OutputCorrelationMap<DipoleCorrelationMap>(&output, correlationmap, OutputDipoleCorrelation_Header, OutputDipoleCorrelation_Value);
    58   binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
     58  binmap = BinData( correlationmap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() );
    5959  OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value );
    6060  delete(binmap);
  • src/Actions/AnalysisAction/DipoleCorrelationAction.def

    r5ffa05 rbd81f9  
    1010#include <vector>
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     15#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     16
    1217// i.e. there is an integer with variable name Z that can be found in
    1318// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     19// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1520#define paramtypes (double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
    1621#define paramreferences (BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
    1722#define paramtokens ("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
    1823#define paramdescriptions ("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
    19 #define paramdefaults (NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
     24#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(0.5))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(false))
     25#define paramvalids \
     26(RotationAngleValidator()) \
     27(RotationAngleValidator()) \
     28(RotationAngleValidator()) \
     29(!FilePresentValidator()) \
     30(!FilePresentValidator()) \
     31(DummyValidator<bool>())
    2032
    2133// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/MolecularVolumeAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramreferences
     
    1618#undef paramdescriptions
    1719#undef paramdefaults
     20#undef paramvalids
    1821
    1922// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/PairCorrelationAction.cpp

    r5ffa05 rbd81f9  
    4444/** =========== define the function ====================== */
    4545Action::state_ptr AnalysisPairCorrelationAction::performCall() {
    46   int ranges[3] = {1, 1, 1};
    4746  ofstream output;
    4847  ofstream binoutput;
     
    5150
    5251  // execute action
    53   output.open(params.outputname.string().c_str());
    54   binoutput.open(params.binoutputname.string().c_str());
     52  output.open(params.outputname.get().string().c_str());
     53  binoutput.open(params.binoutputname.get().string().c_str());
    5554  PairCorrelationMap *correlationmap = NULL;
    56   ASSERT(params.elements.size() == 2,
     55  ASSERT(params.elements.get().size() == 2,
    5756      "AnalysisPairCorrelationAction::performCall() - Exactly two elements are required for pair correlation.");
    58   std::vector<const element *>::const_iterator elemiter = params.elements.begin();
     57  std::vector<const element *>::const_iterator elemiter = params.elements.get().begin();
    5958  const World::AtomComposite atoms_first = World::getInstance().getAllAtoms(AtomByType(*(elemiter++)));
    6059  const World::AtomComposite atoms_second = World::getInstance().getAllAtoms(AtomByType(*(elemiter++)));
    61   ASSERT(elemiter == params.elements.end(),
     60  ASSERT(elemiter == params.elements.get().end(),
    6261      "AnalysisPairCorrelationAction::performCall() - Exactly two elements are required for pair correlation.");
    63   double max_distance = params.BinEnd;
    64   if (params.BinEnd <= 0.) {
     62  double max_distance = params.BinEnd.get();
     63  if (params.BinEnd.get() <= 0.) {
    6564    // find max distance within box from diagonal
    6665    const RealSpaceMatrix &M = World::getInstance().getDomain().getM();
     
    6968  correlationmap = PairCorrelation(atoms_first, atoms_second, max_distance);
    7069  OutputCorrelationMap<PairCorrelationMap>(&output, correlationmap, OutputPairCorrelation_Header, OutputPairCorrelation_Value);
    71   binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
     70  binmap = BinData( correlationmap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() );
    7271  OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value );
    7372  delete(binmap);
  • src/Actions/AnalysisAction/PairCorrelationAction.def

    r5ffa05 rbd81f9  
    1111class element;
    1212
     13#include "Parameters/Validators/DummyValidator.hpp"
     14#include "Parameters/Validators/Ops_Validator.hpp"
     15#include "Parameters/Validators/STLVectorValidator.hpp"
     16#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     17#include "Parameters/Validators/Specific/ElementValidator.hpp"
     18#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     19
     20#include "Parameters/Validators/DummyValidator.hpp"
     21
    1322// i.e. there is an integer with variable name Z that can be found in
    1423// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     24// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1625#define paramtypes (std::vector<const element *>)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
    1726#define paramreferences (elements)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
    1827#define paramtokens ("elements")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
    1928#define paramdescriptions ("set of elements")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
    20 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
     29#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.5))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(false))
     30#define paramvalids \
     31(STLVectorValidator< std::vector<const element *> >(2,2, ElementValidator())) \
     32(BoxLengthValidator()) \
     33(BoxLengthValidator()) \
     34(BoxLengthValidator()) \
     35(!FilePresentValidator()) \
     36(!FilePresentValidator()) \
     37(DummyValidator<bool>())
    2138
    2239// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/PointCorrelationAction.cpp

    r5ffa05 rbd81f9  
    5050
    5151  // execute action
    52   output.open(params.outputname.string().c_str());
    53   binoutput.open(params.binoutputname.string().c_str());
    54   cout << "Point to correlate to is  " << params.Point << endl;
     52  output.open(params.outputname.get().string().c_str());
     53  binoutput.open(params.binoutputname.get().string().c_str());
     54  cout << "Point to correlate to is  " << params.Point.get() << endl;
    5555  CorrelationToPointMap *correlationmap = NULL;
    56   for(std::vector<const element *>::iterator iter = params.elements.begin(); iter != params.elements.end(); ++iter)
     56  for(std::vector<const element *>::const_iterator iter = params.elements.get().begin(); iter != params.elements.get().end(); ++iter)
    5757    cout << "element is " << (*iter)->getSymbol() << endl;
    5858  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
    59   if (params.periodic)
    60     correlationmap  = PeriodicCorrelationToPoint(molecules, params.elements, &params.Point, ranges);
     59  if (params.periodic.get())
     60    correlationmap  = PeriodicCorrelationToPoint(molecules, params.elements.get(), &params.Point.get(), ranges);
    6161  else
    62     correlationmap = CorrelationToPoint(molecules, params.elements, &params.Point);
     62    correlationmap = CorrelationToPoint(molecules, params.elements.get(), &params.Point.get());
    6363  OutputCorrelationMap<CorrelationToPointMap>(&output, correlationmap, OutputCorrelationToPoint_Header, OutputCorrelationToPoint_Value);
    64   binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
     64  binmap = BinData( correlationmap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() );
    6565  OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value );
    6666  delete(binmap);
  • src/Actions/AnalysisAction/PointCorrelationAction.def

    r5ffa05 rbd81f9  
    1313class element;
    1414
     15#include "Parameters/Validators/DummyValidator.hpp"
     16#include "Parameters/Validators/Ops_Validator.hpp"
     17#include "Parameters/Validators/STLVectorValidator.hpp"
     18#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     19#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     20#include "Parameters/Validators/Specific/ElementValidator.hpp"
     21#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     22
    1523// i.e. there is an integer with variable name Z that can be found in
    1624// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    17 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     25// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1826#define paramtypes (std::vector<const element *>)(Vector)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
    1927#define paramreferences (elements)(Point)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
    2028#define paramtokens ("elements")("position")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
    2129#define paramdescriptions ("set of elements")("position in R^3 space")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
    22 #define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
     30#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.5))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(false))
     31#define paramvalids \
     32(STLVectorValidator< std::vector<const element *> >(ElementValidator())) \
     33(BoxVectorValidator()) \
     34(BoxLengthValidator()) \
     35(BoxLengthValidator()) \
     36(BoxLengthValidator()) \
     37(!FilePresentValidator()) \
     38(!FilePresentValidator()) \
     39(DummyValidator<bool>())
    2340
    2441// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/PrincipalAxisSystemAction.def

    r5ffa05 rbd81f9  
    1010// all includes and forward declarations necessary for non-integral types below
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#undef paramtypes
    1618#undef paramreferences
     
    1820#undef paramdescriptions
    1921#undef paramdefaults
     22#undef paramvalids
    2023
    2124// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp

    r5ffa05 rbd81f9  
    5353
    5454  // execute action
    55   output.open(params.outputname.string().c_str());
    56   binoutput.open(params.binoutputname.string().c_str());
    57   molecule *surfacemol = const_cast<molecule *>(params.Boundary);
    58   ASSERT(surfacemol != NULL, "No molecule specified for SurfaceCorrelation.");
     55  output.open(params.outputname.get().string().c_str());
     56  binoutput.open(params.binoutputname.get().string().c_str());
     57
     58  // check for selected molecules and create surfaces from them
     59  std::vector<atom *> atoms(World::getInstance().getSelectedAtoms());
     60  LinkedCell_deprecated * LCList = NULL;
     61  Tesselation * TesselStruct = NULL;
    5962  const double radius = 4.;
    6063  double LCWidth = 20.;
    61   if (params.BinEnd > 0) {
    62     if (params.BinEnd > 2.*radius)
    63       LCWidth = params.BinEnd;
     64  if (params.BinEnd.get() > 0) {
     65    if (params.BinEnd.get() > 2.*radius)
     66      LCWidth = params.BinEnd.get();
    6467    else
    6568      LCWidth = 2.*radius;
    6669  }
     70  if ( atoms.size() == 0) {
     71    ELOG(1, "You have not select any atoms.");
     72    return Action::failure;
     73  }
     74  // create adaptor for the selected atoms
     75  PointCloudAdaptor< std::vector<atom *> > cloud(&atoms, std::string("Selected atoms"));
    6776
    68   // get the boundary
    69   class Tesselation *TesselStruct = NULL;
    70   const LinkedCell_deprecated *LCList = NULL;
    71   // find biggest molecule
     77  // create tesselation
     78  LCList = new LinkedCell_deprecated(cloud, 2.*radius);
     79  TesselStruct = new Tesselation;
     80  (*TesselStruct)(cloud, radius);
     81
     82  // correlate
    7283  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
    7384  std::cout << "There are " << molecules.size() << " selected molecules." << std::endl;
    74   PointCloudAdaptor<molecule> cloud(surfacemol, surfacemol->name);
    75   LCList = new LinkedCell_deprecated(cloud, LCWidth);
    76   FindNonConvexBorder(surfacemol, TesselStruct, LCList, radius, NULL);
    7785  CorrelationToSurfaceMap *surfacemap = NULL;
    78   if (params.periodic)
    79     surfacemap = PeriodicCorrelationToSurface( molecules, params.elements, TesselStruct, LCList, ranges);
     86  if (params.periodic.get())
     87    surfacemap = PeriodicCorrelationToSurface( molecules, params.elements.get(), TesselStruct, LCList, ranges);
    8088  else
    81     surfacemap = CorrelationToSurface( molecules, params.elements, TesselStruct, LCList);
     89    surfacemap = CorrelationToSurface( molecules, params.elements.get(), TesselStruct, LCList);
    8290  delete LCList;
    8391  OutputCorrelationMap<CorrelationToSurfaceMap>(&output, surfacemap, OutputCorrelationToSurface_Header, OutputCorrelationToSurface_Value);
     
    8997      ELOG(1, "Linked Cell width is smaller than the found range of values! Bins can only be correct up to: " << radius << ".");
    9098  }
    91   binmap = BinData( surfacemap, params.BinWidth, params.BinStart, params.BinEnd );
     99  binmap = BinData( surfacemap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() );
    92100  OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value );
    93101  delete TesselStruct;  // surfacemap contains refs to triangles! delete here, not earlier!
  • src/Actions/AnalysisAction/SurfaceCorrelationAction.def

    r5ffa05 rbd81f9  
    1212class molecule;
    1313
     14#include "Parameters/Validators/DummyValidator.hpp"
     15#include "Parameters/Validators/Ops_Validator.hpp"
     16#include "Parameters/Validators/STLVectorValidator.hpp"
     17#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     18#include "Parameters/Validators/Specific/ElementValidator.hpp"
     19#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     20
    1421// i.e. there is an integer with variable name Z that can be found in
    1522// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    17 #define paramtypes (std::vector<const element *>)(const molecule *)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
    18 #define paramreferences (elements)(Boundary)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
    19 #define paramtokens ("elements")("molecule-by-id")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
    20 #define paramdescriptions ("set of elements")("index of a molecule")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
    21 #define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
     23// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     24#define paramtypes (std::vector<const element *>)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
     25#define paramreferences (elements)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
     26#define paramtokens ("elements")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
     27#define paramdescriptions ("set of elements")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
     28#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.5))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(false))
     29#define paramvalids \
     30(STLVectorValidator< std::vector<const element *> >(ElementValidator())) \
     31(BoxLengthValidator()) \
     32(BoxLengthValidator()) \
     33(BoxLengthValidator()) \
     34(!FilePresentValidator()) \
     35(!FilePresentValidator()) \
     36(DummyValidator<bool>())
    2237
    2338// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/AtomAction/AddAction.cpp

    r5ffa05 rbd81f9  
    4343  // execute action
    4444  atom * first = World::getInstance().createAtom();
    45   first->setType(params.elemental);
    46   first->setPosition(params.position);
     45  first->setType(params.elemental.get());
     46  first->setPosition(params.position.get());
    4747  LOG(1, "Adding new atom with element " << first->getType()->getName() << " at " << (first->getPosition()) << ".");
    4848  // TODO: remove when all of World's atoms are stored.
     
    6868
    6969  atom * first = World::getInstance().createAtom();
    70   first->setType(state->params.elemental);
    71   first->setPosition(state->params.position);
    72   LOG(1, "Re-adding new atom with element " << state->params.elemental->getName() << " at " << state->params.position << ".");
     70  first->setType(state->params.elemental.get());
     71  first->setPosition(state->params.position.get());
     72  LOG(1, "Re-adding new atom with element " << state->params.elemental.get()->getName() << " at " << state->params.position.get() << ".");
    7373  // TODO: remove when all of World's atoms are stored.
    7474  std::vector<molecule *> molecules = World::getInstance().getAllMolecules();
  • src/Actions/AtomAction/AddAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "LinearAlgebra/BoxVector.hpp"
     9#include "LinearAlgebra/Vector.hpp"
    1010#include "World.hpp"
    1111class element;
    1212
     13#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     14#include "Parameters/Validators/Specific/ElementValidator.hpp"
     15
    1316// i.e. there is an integer with variable name Z that can be found in
    1417// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    16 #define paramtypes (const element *)(BoxVector)
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     19//#define paramtypes (const element *)(BoxVector) TODO: use a validator
     20#define paramtypes (const element *)(Vector)
    1721#define paramtokens ("add-atom")("domain-position")
    1822#define paramdescriptions ("element of new atom")("position within current domain")
    1923#define paramreferences (elemental)(position)
    20 #define paramdefaults (NODEFAULT)(NODEFAULT)
     24#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)
     25#define paramvalids \
     26(ElementValidator()) \
     27(BoxVectorValidator())
    2128
    2229#define statetypes (const atomId_t)
  • src/Actions/AtomAction/ChangeElementAction.cpp

    r5ffa05 rbd81f9  
    5454  for (World::AtomSelectionIterator iter = World::getInstance().beginAtomSelection(); iter != World::getInstance().endAtomSelection(); ++iter) {
    5555    first = iter->second;
    56     LOG(1, "Changing atom " << *first << " to element " << *params.elemental << ".");
     56    LOG(1, "Changing atom " << *first << " to element " << *params.elemental.get() << ".");
    5757    mol = first->getMolecule();
    5858    first->removeFromMolecule(); // remove atom
    59     first->setType(params.elemental);
     59    first->setType(params.elemental.get());
    6060    mol->AddAtom(first);  // add atom to ensure correctness of formula
    6161  }
     
    8888    mol = first->getMolecule();
    8989    first->removeFromMolecule(); // remove atom
    90     first->setType(state->params.elemental);
     90    first->setType(state->params.elemental.get());
    9191    mol->AddAtom(first);  // add atom to ensure correctness of formula
    9292  }
  • src/Actions/AtomAction/ChangeElementAction.def

    r5ffa05 rbd81f9  
    1010typedef std::map<int, const element *> ElementMap;
    1111
     12#include "Parameters/Validators/Specific/ElementValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#define paramtypes (const element *)
    1618#define paramtokens ("change-element")
     
    1820#undef paramdefaults
    1921#define paramreferences (elemental)
     22#define paramvalids \
     23(ElementValidator())
    2024
    2125#define statetypes (ElementMap)
  • src/Actions/AtomAction/RemoveAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::vector<AtomicInfo>)
  • src/Actions/AtomAction/RotateAroundOriginByAngleAction.cpp

    r5ffa05 rbd81f9  
    4444
    4545  // check whether Axis is valid
    46   if (params.Axis.IsZero())
     46  if (params.Axis.get().IsZero())
    4747    return Action::failure;
    4848
    4949  // convert from degrees to radian
    50   params.angle *= M_PI/180.;
     50  double radian = params.angle.get() * M_PI/180.;
    5151
    5252  // Creation Line that is the rotation axis
    53   Line RotationAxis(Vector(0.,0.,0.), params.Axis);
     53  Line RotationAxis(Vector(0.,0.,0.), params.Axis.get());
    5454
    55   LOG(0, "Rotate around origin by " << params.angle << " radian, axis from origin to " << params.Axis << ".");
     55  LOG(0, "Rotate around origin by " << radian << " radian, axis from origin to " << params.Axis.get() << ".");
    5656  // TODO: use AtomSet::rotate?
    5757  for (std::vector<atom *>::iterator iter = selectedAtoms.begin(); iter != selectedAtoms.end(); ++iter) {
    58     (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), params.angle));
     58    (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), radian));
    5959  }
    6060  LOG(0, "done.");
     
    6565  AtomRotateAroundOriginByAngleState *state = assert_cast<AtomRotateAroundOriginByAngleState*>(_state.get());
    6666
     67  // convert from degrees to radian
     68  double radian = params.angle.get() * M_PI/180.;
     69
    6770  // Creation Line that is the rotation axis
    68   Line RotationAxis(Vector(0.,0.,0.), state->params.Axis);
     71  Line RotationAxis(Vector(0.,0.,0.), state->params.Axis.get());
    6972
    7073  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
    71     (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -state->params.angle));
     74    (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -radian));
    7275  }
    7376
     
    7881  AtomRotateAroundOriginByAngleState *state = assert_cast<AtomRotateAroundOriginByAngleState*>(_state.get());
    7982
     83  // convert from degrees to radian
     84  double radian = params.angle.get() * M_PI/180.;
     85
    8086  // Creation Line that is the rotation axis
    81   Line RotationAxis(Vector(0.,0.,0.), state->params.Axis);
     87  Line RotationAxis(Vector(0.,0.,0.), state->params.Axis.get());
    8288
    8389  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
    84     (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), state->params.angle));
     90    (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), radian));
    8591  }
    8692
  • src/Actions/AtomAction/RotateAroundOriginByAngleAction.def

    r5ffa05 rbd81f9  
    99#include "LinearAlgebra/Vector.hpp"
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1417#define paramtypes (double)(Vector)
    1518#define paramtokens ("rotate-around-origin")("position")
     
    1720#undef paramdefaults
    1821#define paramreferences (angle)(Axis)
     22#define paramvalids \
     23(RotationAngleValidator())\
     24(DummyValidator< Vector> ())
    1925
    2026#define statetypes (std::vector<atom*>)
  • src/Actions/AtomAction/SaveSelectedAtomsAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr AtomSaveSelectedAtomsAction::performCall() {
    40   LOG(1, "Storing selected atoms to file " << params.filename << ".");
     40  LOG(1, "Storing selected atoms to file " << params.filename.get() << ".");
    4141
    4242  // extract suffix
    4343  std::string FilenameSuffix;
    4444  std::string FilenamePrefix;
    45   if (params.filename.has_filename()) {
     45  if (params.filename.get().has_filename()) {
    4646    // get suffix
    4747#if BOOST_VERSION >= 104600
    48       FilenameSuffix = params.filename.extension().string().substr(1); // remove the prefixed "."
    49       FilenamePrefix = params.filename.stem().string();
     48      FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "."
     49      FilenamePrefix = params.filename.get().stem().string();
    5050#else
    51       FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "."
    52       FilenamePrefix = params.filename.stem();
     51      FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "."
     52      FilenamePrefix = params.filename.get().stem();
    5353#endif
    5454  } else {
     
    6060  // parse the file
    6161  boost::filesystem::ofstream output;
    62   output.open(params.filename);
     62  output.open(params.filename.get());
    6363  if (!output.fail()) {
    6464    FormatParserStorage::getInstance().saveSelectedAtoms(output, FilenameSuffix);
    6565  } else {
    66     ELOG(1, "Could not open file " << params.filename << ".");
     66    ELOG(1, "Could not open file " << params.filename.get() << ".");
    6767  }
    6868  output.close();
  • src/Actions/AtomAction/SaveSelectedAtomsAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1418#define paramtypes (boost::filesystem::path)
    1519#define paramtokens ("save-selected-atoms")
     
    1721#undef paramdefaults
    1822#define paramreferences (filename)
     23#define paramvalids \
     24(!FilePresentValidator() && ParserFileValidator())
    1925
    2026#undef statetypes
  • src/Actions/AtomAction/TranslateAction.cpp

    r5ffa05 rbd81f9  
    4444  // TODO: use AtomSet::translate
    4545  for (std::vector<atom *>::iterator iter = selectedAtoms.begin(); iter != selectedAtoms.end(); ++iter) {
    46     *(*iter) += params.x;
    47     if (params.periodic)
     46    *(*iter) += params.x.get();
     47    if (params.periodic.get())
    4848      (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition()));
    4949  }
     
    5757
    5858  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
    59     *(*iter) -= state->params.x;
    60     if (state->params.periodic)
     59    *(*iter) -= state->params.x.get();
     60    if (state->params.periodic.get())
    6161      (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition()));
    6262  }
     
    7070
    7171  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
    72     *(*iter) += state->params.x;
    73     if (state->params.periodic)
     72    *(*iter) += state->params.x.get();
     73    if (state->params.periodic.get())
    7474      (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition()));
    7575  }
  • src/Actions/AtomAction/TranslateAction.def

    r5ffa05 rbd81f9  
    1010#include "LinearAlgebra/Vector.hpp"
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#define paramtypes (Vector)(bool)
    1618#define paramtokens ("translate-atoms")("periodic")
    1719#define paramdescriptions ("translation vector")("system is constraint to periodic boundary conditions")
    1820#define paramreferences (x)(periodic)
    19 #define paramdefaults (NODEFAULT)("0")
     21#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(false))
     22#define paramvalids \
     23(DummyValidator< Vector >()) \
     24(DummyValidator< bool >())
    2025
    2126#define statetypes (std::vector<atom*>)
  • src/Actions/CommandAction/BondLengthTableAction.cpp

    r5ffa05 rbd81f9  
    4343  ostringstream usage;
    4444
    45   LOG(0, "Using " << params.BondGraphFileName << " as bond length table.");
     45  LOG(0, "Using " << params.BondGraphFileName.get() << " as bond length table.");
    4646  BondGraph *&BG = World::getInstance().getBondGraph();
    4747
     
    5757
    5858  BG->CleanupBondLengthTable();
    59   if ((!params.BondGraphFileName.empty())
    60       && boost::filesystem::exists(params.BondGraphFileName)) {
    61     std::ifstream input(params.BondGraphFileName.string().c_str());
     59  if ((!params.BondGraphFileName.get().empty())
     60      && boost::filesystem::exists(params.BondGraphFileName.get())) {
     61    std::ifstream input(params.BondGraphFileName.get().string().c_str());
    6262    if ((input.good()) && (BG->LoadBondLengthTable(input))) {
    6363      LOG(0, "Bond length table parsed successfully.");
     
    9696  BondGraph *&BG = World::getInstance().getBondGraph();
    9797  BG->CleanupBondLengthTable();
    98   std::ifstream input(state->params.BondGraphFileName.string().c_str());
     98  std::ifstream input(state->params.BondGraphFileName.get().string().c_str());
    9999  if ((input.good()) && (BG->LoadBondLengthTable(input))) {
    100100    LOG(0, "Bond length table parsed successfully.");
  • src/Actions/CommandAction/BondLengthTableAction.def

    r5ffa05 rbd81f9  
    1010#include "Graph/BondGraph.hpp"
    1111
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#define paramtypes (boost::filesystem::path)
    1618#define paramtokens ("bond-table")
     
    1820#undef paramdefaults
    1921#define paramreferences (BondGraphFileName)
     22#define paramvalids \
     23(FilePresentValidator())
    2024
    2125#define statetypes (std::string)
  • src/Actions/CommandAction/ElementDbAction.cpp

    r5ffa05 rbd81f9  
    6060  // TODO: Make databasepath a std::string
    6161  config *configuration = World::getInstance().getConfig();
    62   strcpy(configuration->databasepath, params.databasepath.branch_path().string().c_str());
     62  strcpy(configuration->databasepath, params.databasepath.get().branch_path().string().c_str());
    6363
    6464  // load table
     
    9696  // TODO: Make databasepath a std::string
    9797  config *configuration = World::getInstance().getConfig();
    98   strcpy(configuration->databasepath, state->params.databasepath.branch_path().string().c_str());
     98  strcpy(configuration->databasepath, state->params.databasepath.get().branch_path().string().c_str());
    9999
    100100  // load table
  • src/Actions/CommandAction/ElementDbAction.def

    r5ffa05 rbd81f9  
    99#include <sstream>
    1010
     11#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (boost::filesystem::path)
    1517#define paramtokens ("element-db")
     
    1719#undef paramdefaults
    1820#define paramreferences (databasepath)
     21#define paramvalids \
     22(FilePresentValidator())
    1923
    2024#define statetypes (std::string)
  • src/Actions/CommandAction/FastParsingAction.cpp

    r5ffa05 rbd81f9  
    4040  bool oldvalue = configuration->FastParsing;
    4141
    42   configuration->FastParsing = params.fastparsing;
     42  configuration->FastParsing = params.fastparsing.get();
    4343  if (configuration->FastParsing)
    4444    LOG(0, "I won't parse trajectories.");
     
    6565
    6666  config *configuration = World::getInstance().getConfig();
    67   configuration->FastParsing = state->params.fastparsing;
     67  configuration->FastParsing = state->params.fastparsing.get();
    6868  if (configuration->FastParsing)
    6969    LOG(0, "I won't parse trajectories.");
  • src/Actions/CommandAction/FastParsingAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (bool)
    1517#define paramtokens ("fastparsing")
     
    1719#undef paramdefaults
    1820#define paramreferences (fastparsing)
     21#define paramvalids \
     22(DummyValidator< bool >())
    1923
    2024#define statetypes (bool)
  • src/Actions/CommandAction/HelpAction.cpp

    r5ffa05 rbd81f9  
    6363  std::cout << std::endl;
    6464  // print list of actions or its options
    65   if (params.actionname == "none") {
     65  if (params.actionname.get() == std::string("none")) {
    6666    // print list of all Actions
    6767    std::cout << "Here is a list of all available Actions:" << std::endl;
     
    7575  } else {
    7676    // retrieve command from Registry and print its help
    77     if (ActionRegistry::getInstance().isActionPresentByName(params.actionname)) {
    78       const Action *instance = ActionRegistry::getInstance().getActionByName(params.actionname);
     77    if (ActionRegistry::getInstance().isActionPresentByName(params.actionname.get())) {
     78      const Action *instance = ActionRegistry::getInstance().getActionByName(params.actionname.get());
    7979      // else give description of Action and its option value if present
    8080      std::cout << instance->help();
     
    8282      std::cout << std::endl;
    8383    } else {
    84       ELOG(1, "No action is known by the name " << params.actionname << ".");
     84      ELOG(1, "No action is known by the name " << params.actionname.get() << ".");
    8585      return Action::failure;
    8686    }
  • src/Actions/CommandAction/HelpAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include <string>
     10#include <vector>
    911
     12#include "Parameters/Validators/DiscreteValidator.hpp"
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/ActionNameValidator.hpp"
    1015
    1116// i.e. there is an integer with variable name Z that can be found in
    1217// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1419#define paramtypes (std::string)
    1520#define paramtokens ("actionname")
    1621#define paramdescriptions ("Name of an action whose option list is then given")
    17 #define paramdefaults ("none")
     22#define paramdefaults (PARAM_DEFAULT(std::string("none")))
    1823#define paramreferences (actionname)
     24#define paramvalids \
     25(DiscreteValidator<std::string>(std::vector<std::string>(1, std::string("none"))) || ActionNameValidator())
     26// NOTE: The _default_ value MUST NOT require validation via ActionNameValidator!
     27// This will trigger an infinite loop of ActionRegistry::fillRegistry() calls as ActionRegistry is
     28// at the time of the filling on of the default values not yet completely constructed!
    1929
    2030#undef statetypes
  • src/Actions/CommandAction/VerboseAction.cpp

    r5ffa05 rbd81f9  
    3535/** =========== define the function ====================== */
    3636Action::state_ptr CommandVerboseAction::performCall() {
    37   int oldverbosity = getVerbosity();
     37  unsigned int oldverbosity = getVerbosity();
    3838
    39   if (oldverbosity != params.verbosity) {
     39  if (oldverbosity != params.verbosity.get()) {
    4040    // prepare undo state
    4141    CommandVerboseState *UndoState = new CommandVerboseState(oldverbosity, params);
    4242    // set new verbosity
    43     setVerbosity(params.verbosity);
    44     LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity << ".");
     43    setVerbosity(params.verbosity.get());
     44    LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity.get() << ".");
    4545    return Action::state_ptr(UndoState);
    4646  } else {
     
    5353  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    5454
    55   LOG(0, "Setting verbosity from " << state->params.verbosity << " to " << state->oldverbosity << ".");
     55  LOG(0, "Setting verbosity from " << state->params.verbosity.get() << " to " << state->oldverbosity << ".");
    5656  setVerbosity(state->oldverbosity);
    5757
     
    6262  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    6363
    64   LOG(0, "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity << ".");
    65   setVerbosity(state->params.verbosity);
     64  LOG(0, "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity.get() << ".");
     65  setVerbosity(state->params.verbosity.get());
    6666
    6767  return Action::state_ptr(_state);
  • src/Actions/CommandAction/VerboseAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (int)
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (unsigned int)
    1517#define paramtokens ("verbose")
    1618#define paramdescriptions ("set verbosity level")
    1719#undef paramdefaults
    1820#define paramreferences (verbosity)
     21#define paramvalids \
     22(DummyValidator< unsigned int >())
    1923
    20 #define statetypes (int)
     24#define statetypes (unsigned int)
    2125#define statereferences (oldverbosity)
    2226
  • src/Actions/CommandAction/VersionAction.def

    r5ffa05 rbd81f9  
    99#include "version.h"
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#undef statetypes
  • src/Actions/CommandAction/WarrantyAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#undef statetypes
  • src/Actions/FillAction/FillRegularGridAction.cpp

    r5ffa05 rbd81f9  
    8282  LinkedCell_deprecated * LC = NULL;
    8383  Tesselation * TesselStruct = NULL;
    84   if (params.SphereRadius != 0.) {
     84  if (params.SphereRadius.get() != 0.) {
    8585    if ( atoms.size() == 0) {
    86       ELOG(1, "You have given a sphere radius " << params.SphereRadius
     86      ELOG(1, "You have given a sphere radius " << params.SphereRadius.get()
    8787          << " != 0, but have not select any molecules.");
    8888      return Action::failure;
     
    9292
    9393    // create tesselation
    94     LC = new LinkedCell_deprecated(cloud, 2.*params.SphereRadius);
     94    LC = new LinkedCell_deprecated(cloud, 2.*params.SphereRadius.get());
    9595    TesselStruct = new Tesselation;
    96     (*TesselStruct)(cloud, params.SphereRadius);
     96    (*TesselStruct)(cloud, params.SphereRadius.get());
    9797
    9898    // and create predicate
     
    106106    FillPredicate *voidnode_predicate = new FillPredicate(
    107107        IsVoidNode_FillPredicate(
    108             Sphere(zeroVec, params.mindistance)
     108            Sphere(zeroVec, params.mindistance.get())
    109109            )
    110110        );
     
    112112    if (surface_predicate != NULL)
    113113      Andpredicate = (Andpredicate) && !(*surface_predicate);
    114     Mesh *mesh = new CubeMesh(params.counts, params.offset, World::getInstance().getDomain().getM());
     114    Mesh *mesh = new CubeMesh(params.counts.get(), params.offset.get(), World::getInstance().getDomain().getM());
    115115    Inserter *inserter = new Inserter(
    116116        Inserter::impl_ptr(
    117117            new RandomInserter(
    118                 params.RandAtomDisplacement,
    119                 params.RandMoleculeDisplacement,
    120                 params.DoRotate)
     118                params.RandAtomDisplacement.get(),
     119                params.RandMoleculeDisplacement.get(),
     120                params.DoRotate.get())
    121121            )
    122122        );
  • src/Actions/FillAction/FillRegularGridAction.def

    r5ffa05 rbd81f9  
    1212#include "types.hpp"
    1313
     14#include "LinearAlgebra/defs.hpp"
     15#include "Parameters/Validators/DummyValidator.hpp"
     16#include "Parameters/Validators/STLVectorValidator.hpp"
     17#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     18#include "Parameters/Validators/Specific/VectorZeroOneComponentsValidator.hpp"
     19
    1420// i.e. there is an integer with variable name Z that can be found in
    1521// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    17 #define paramtypes (Vector)(Vector)(double)(double)(double)(double)(bool)
     22// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     23#define paramtypes (std::vector< unsigned int >)(Vector)(double)(double)(double)(double)(bool)
    1824#define paramtokens ("mesh-size")("mesh-offset")("min-distance")("tesselation-radius")("random-atom-displacement")("random-molecule-displacement")("DoRotate")
    1925#define paramdescriptions ("number of points per axis")("offset to start of partition, must be in [0,1)")("Minimum distance to other atoms")("radius of rolling sphere in tesselating selected molecule's surfaces")("magnitude of random atom displacement")("magnitude of random molecule displacement")("whether to rotate or not")
    20 #define paramdefaults (NODEFAULT)("0.,0.,0.")("1.")("0.")("0.")("0.")("0")
     26#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(Vector(0.,0.,0.)))(PARAM_DEFAULT(1.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(false))
    2127#define paramreferences (counts)(offset)(mindistance)(SphereRadius)(RandAtomDisplacement)(RandMoleculeDisplacement)(DoRotate)
     28#define paramvalids \
     29(STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM)) \
     30(VectorZeroOneComponentsValidator()) \
     31(BoxLengthValidator()) \
     32(BoxLengthValidator()) \
     33(BoxLengthValidator()) \
     34(BoxLengthValidator()) \
     35(DummyValidator< bool >())
    2236
    2337#define statetypes (std::vector<AtomicInfo>)(std::vector<BondInfo>)(std::vector<AtomicInfo>)(std::vector<Vector>)
  • src/Actions/FillAction/FillSphericalSurfaceAction.cpp

    r5ffa05 rbd81f9  
    7171  Vector sum = zeroVec;
    7272  for (molecule::iterator it2=filler->begin();it2 !=filler->end();++it2) {
    73     const Vector helper = (**it2).getPosition().partition(params.AlignedAxis).second;
     73    const Vector helper = (**it2).getPosition().partition(params.AlignedAxis.get()).second;
    7474    sum += helper;
    7575  }
     
    8989    FillPredicate *voidnode_predicate = new FillPredicate(
    9090        IsVoidNode_FillPredicate(
    91             Sphere(zeroVec, params.mindistance)
     91            Sphere(zeroVec, params.mindistance.get())
    9292            )
    9393        );
    94     Shape s = Sphere(params.center, params.radius);
     94    Shape s = Sphere(params.center.get(), params.radius.get());
    9595    boost::function<const NodeSet ()> func =
    96         boost::bind(&Shape::getHomogeneousPointsOnSurface, boost::ref(s), params.N);
     96        boost::bind(&Shape::getHomogeneousPointsOnSurface, boost::ref(s), params.N.get());
    9797    Mesh *mesh = new MeshAdaptor(func);
    9898    Inserter *inserter = new Inserter(
    99         Inserter::impl_ptr(new SurfaceInserter(s, params.AlignedAxis)));
     99        Inserter::impl_ptr(new SurfaceInserter(s, params.AlignedAxis.get())));
    100100
    101101    // fill
  • src/Actions/FillAction/FillSphericalSurfaceAction.def

    r5ffa05 rbd81f9  
    1212#include "types.hpp"
    1313
     14#include "Parameters/Validators/DummyValidator.hpp"
     15#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     16#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     17
    1418// i.e. there is an integer with variable name Z that can be found in
    1519// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    17 #define paramtypes (Vector)(double)(int)(double)(Vector)
     20// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     21#define paramtypes (Vector)(double)(unsigned int)(double)(Vector)
    1822#define paramtokens ("center")("radius")("count")("min-distance")("Alignment-Axis")
    1923#define paramdescriptions ("center of the sphere")("sphere size")("number of instances to be added, changed according to geometric needs")("minimum distance between added instances")("The filler molecule is rotated relative to this alignment axis")
    20 #define paramdefaults ("0.,0.,0.")(NODEFAULT)("12")("1.")(NODEFAULT)
     24#define paramdefaults (PARAM_DEFAULT(Vector(0.,0.,0.)))(NOPARAM_DEFAULT)(PARAM_DEFAULT(12))(PARAM_DEFAULT(1.))(NOPARAM_DEFAULT)
    2125#define paramreferences (center)(radius)(N)(mindistance)(AlignedAxis)
     26#define paramvalids \
     27(BoxVectorValidator()) \
     28(BoxLengthValidator()) \
     29(DummyValidator< unsigned int >()) \
     30(BoxLengthValidator()) \
     31(DummyValidator< Vector >())
    2232
    2333#define statetypes (std::vector<AtomicInfo>)(std::vector<BondInfo>)(std::vector<AtomicInfo>)(std::vector<Vector>)
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    r5ffa05 rbd81f9  
    4545
    4646  LOG(0, "STATUS: Fragmenting molecular system with current connection matrix maximum bond distance "
    47       << params.distance << " up to "
    48       << params.order << " order. Fragment files begin with "
    49       << params.prefix << " and are stored as: "
    50       << params.types << "." << std::endl);
     47      << params.distance.get() << " up to "
     48      << params.order.get() << " order. Fragment files begin with "
     49      << params.prefix.get() << " and are stored as: "
     50      << params.types.get() << "." << std::endl);
    5151
    5252  DepthFirstSearchAnalysis DFS;
     
    5454    mol = iter->second;
    5555    ASSERT(mol != NULL, "No molecule has been picked for fragmentation.");
    56     LOG(2, "INFO: Fragmenting molecule with bond distance " << params.distance << " angstroem, order of " << params.order << ".");
     56    LOG(2, "INFO: Fragmenting molecule with bond distance " << params.distance.get() << " angstroem, order of " << params.order.get() << ".");
    5757    start = clock();
    5858    if (mol->hasBondStructure()) {
    59       Fragmentation Fragmenter(mol, params.DoSaturation ? DoSaturate : DontSaturate);
    60       Fragmenter.setOutputTypes(params.types);
    61       ExitFlag = Fragmenter.FragmentMolecule(params.order, params.prefix, DFS);
     59      Fragmentation Fragmenter(mol, params.DoSaturation.get() ? DoSaturate : DontSaturate);
     60      Fragmenter.setOutputTypes(params.types.get());
     61      ExitFlag = Fragmenter.FragmentMolecule(params.order.get(), params.prefix.get(), DFS);
    6262    }
    6363    World::getInstance().setExitFlag(ExitFlag);
  • src/Actions/FragmentationAction/FragmentationAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include <boost/assign.hpp>
    910#include <string>
    1011#include <vector>
    1112
     13#include "Parameters/Validators/DummyValidator.hpp"
     14#include "Parameters/Validators/GenericValidators.hpp"
     15#include "Parameters/Validators/STLVectorValidator.hpp"
     16#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     17#include "Parameters/Validators/Specific/ParserTypeValidator.hpp"
     18
    1219// i.e. there is an integer with variable name Z that can be found in
    1320// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    15 #define paramtypes (std::string)(double)(int)(bool)(std::vector<std::string>)
     21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     22#define paramtypes (std::string)(double)(unsigned int)(bool)(std::vector<std::string>)
    1623#define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("output-types")
    1724#define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files")
    18 #define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("1")("pcp tremolo xyz")
     25#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true)) (PARAM_DEFAULT(std::vector<std::string>(1, std::string("pcp"))))
    1926#define paramreferences (prefix)(distance)(order)(DoSaturation)(types)
     27#define paramvalids \
     28(DummyValidator< std::string >()) \
     29(BoxLengthValidator()) \
     30(DummyValidator< unsigned int >()) \
     31(DummyValidator< bool >()) \
     32(STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator()))
    2033
    2134#undef statetypes
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r5ffa05 rbd81f9  
    267267
    268268  // Phase One: obtain ids
    269   controller.requestIds(params.host, params.port, params.jobfiles.size());
     269  std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
     270  controller.requestIds(params.host.get(), params.port.get(), jobfiles.size());
    270271  {
    271272    io_service.reset();
     
    276277  {
    277278    std::vector<FragmentJob::ptr> jobs;
    278     for (std::vector< boost::filesystem::path >::const_iterator iter = params.jobfiles.begin();
    279         iter != params.jobfiles.end(); ++iter) {
     279    for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles .begin();
     280        iter != jobfiles .end(); ++iter) {
    280281      const std::string &filename = (*iter).string();
    281282      if (boost::filesystem::exists(filename)) {
     
    283284        LOG(1, "INFO: Creating MPQCCommandJob with filename'"
    284285            +filename+"', and id "+toString(next_id)+".");
    285         parsejob(jobs, params.executable.string(), filename, next_id);
     286        parsejob(jobs, params.executable.get().string(), filename, next_id);
    286287      } else {
    287288        ELOG(1, "Fragment job "+filename+" does not exist.");
     
    290291    }
    291292    controller.addJobs(jobs);
    292     controller.sendJobs(params.host, params.port);
     293    controller.sendJobs(params.host.get(), params.port.get());
    293294  }
    294295  {
     
    299300  // Phase Three: calculate result
    300301  size_t NoCalculatedResults = 0;
    301   while (NoCalculatedResults != params.jobfiles.size()) {
     302  while (NoCalculatedResults != jobfiles.size()) {
    302303    // wait a bit
    303304    boost::asio::deadline_timer timer(io_service);
     
    305306    timer.wait();
    306307    // then request status
    307     controller.checkResults(params.host, params.port);
     308    controller.checkResults(params.host.get(), params.port.get());
    308309    {
    309310      io_service.reset();
     
    316317  }
    317318  // Phase Three: get result
    318   controller.receiveResults(params.host, params.port);
     319  controller.receiveResults(params.host.get(), params.port.get());
    319320  {
    320321    io_service.reset();
     
    324325  // Final phase: print result
    325326  {
    326     LOG(1, "INFO: Parsing fragment files from " << params.path << ".");
     327    LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
    327328    std::vector<FragmentResult::ptr> results = controller.getReceivedResults();
    328329    printReceivedMPQCResults(
    329330        results,
    330         params.path,
    331         getNoAtomsFromAdjacencyFile(params.path));
     331        params.path.get(),
     332        getNoAtomsFromAdjacencyFile(params.path.get()));
    332333  }
    333334  size_t Exitflag = controller.getExitflag();
  • src/Actions/FragmentationAction/FragmentationAutomationAction.def

    r5ffa05 rbd81f9  
    1111#include <vector>
    1212
     13#include "Parameters/Validators/DummyValidator.hpp"
     14#include "Parameters/Validators/Ops_Validator.hpp"
     15#include "Parameters/Validators/STLVectorValidator.hpp"
     16#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     17#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     18
    1319// i.e. there is an integer with variable name Z that can be found in
    1420// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1622#define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)
    1723#define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")
    1824#define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")
    19 #define paramdefaults (NODEFAULT)(NODEFAULT)("127.0.0.1")("1026")(NODEFAULT)
     25#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)
    2026#define paramreferences (jobfiles)(path)(host)(port)(executable)
     27#define paramvalids \
     28(STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
     29(DummyValidator< std::string >()) \
     30(DummyValidator< std::string >()) \
     31(DummyValidator< std::string >()) \
     32(DummyValidator< boost::filesystem::path >())
    2133
    2234#undef statetypes
  • src/Actions/GraphAction/CreateAdjacencyAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#undef statetypes
  • src/Actions/GraphAction/DepthFirstSearchAction.cpp

    r5ffa05 rbd81f9  
    5555      LocalBackEdgeStack = new std::deque<bond *>; // no need to have it Subgraphs->Leaf->BondCount size
    5656      DFS.PickLocalBackEdges(ListOfAtoms, LocalBackEdgeStack);
    57       CyclicStructureAnalysis CycleAnalysis(params.DoSaturation ? DoSaturate : DontSaturate);
     57      CyclicStructureAnalysis CycleAnalysis(params.DoSaturation.get() ? DoSaturate : DontSaturate);
    5858      CycleAnalysis(LocalBackEdgeStack);
    5959      delete(LocalBackEdgeStack);
  • src/Actions/GraphAction/DepthFirstSearchAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (bool)
    1517#define paramtokens ("DoSaturate")
    1618#define paramdescriptions ("whether to treat hydrogen special or not")
    17 #define paramdefaults ("1")
     19#define paramdefaults (PARAM_DEFAULT(true))
    1820#define paramreferences (DoSaturation)
     21#define paramvalids \
     22(DummyValidator< bool >())
    1923
    2024#undef statetypes
  • src/Actions/GraphAction/SubgraphDissectionAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (MolAtomList)
  • src/Actions/MoleculeAction/BondFileAction.cpp

    r5ffa05 rbd81f9  
    4343  if(World::getInstance().countSelectedMolecules() == 1) {
    4444    mol = World::getInstance().beginMoleculeSelection()->second;
    45     LOG(0, "STATUS: Parsing bonds from " << params.bondfile
    46         << ", skipping " << params.skiplines << "lines"
    47         << ", adding " << params.id_offset << " to each id.");
    48     ifstream input(params.bondfile.string().c_str());
     45    LOG(0, "STATUS: Parsing bonds from " << params.bondfile.get()
     46        << ", skipping " << params.skiplines.get() << "lines"
     47        << ", adding " << params.id_offset.get() << " to each id.");
     48    ifstream input(params.bondfile.get().string().c_str());
    4949    World::AtomComposite Set = mol->getAtomSet();
    50     World::getInstance().getBondGraph()->CreateAdjacencyListFromDbondFile(Set, &input, params.skiplines, params.id_offset);
     50    World::getInstance().getBondGraph()->CreateAdjacencyListFromDbondFile(Set, &input, params.skiplines.get(), params.id_offset.get());
    5151    input.close();
    5252    mol->getBondCount();
  • src/Actions/MoleculeAction/BondFileAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (boost::filesystem::path)(int)(int)
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     17#define paramtypes (boost::filesystem::path)(unsigned int)(unsigned int)
    1518#define paramtokens ("bond-file")("skiplines")("offset")
    1619#define paramdescriptions ("name of the bond file")("number of header lines to skip")("offset to add to each id")
    17 #define paramdefaults (NODEFAULT)("1")("0")
     20#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(1))(PARAM_DEFAULT(0))
    1821#define paramreferences (bondfile)(skiplines)(id_offset)
     22#define paramvalids \
     23(FilePresentValidator()) \
     24(DummyValidator< unsigned int >()) \
     25(DummyValidator< unsigned int >())
    1926
    2027#undef statetypes
  • src/Actions/MoleculeAction/ChangeNameAction.cpp

    r5ffa05 rbd81f9  
    4040    mol = World::getInstance().beginMoleculeSelection()->second;
    4141    string oldName = mol->getName();
    42     mol->setName(params.name);
     42    mol->setName(params.name.get());
    4343    return Action::state_ptr(new MoleculeChangeNameState(mol,params));
    4444  } else
     
    5050
    5151  string newName = state->mol->getName();
    52   state->mol->setName(state->params.name);
    53   state->params.name = newName;
     52  state->mol->setName(state->params.name.get());
     53  state->params.name.set(newName);
    5454
    5555  return Action::state_ptr(_state);
  • src/Actions/MoleculeAction/ChangeNameAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (std::string)
    1517#define paramtokens ("change-molname")
     
    1719#undef paramdefaults
    1820#define paramreferences (name)
     21#define paramvalids \
     22(DummyValidator< std::string >())
    1923
    2024#define statetypes (molecule*)
  • src/Actions/MoleculeAction/CopyAction.cpp

    r5ffa05 rbd81f9  
    2020#include "CodePatterns/MemDebug.hpp"
    2121
     22#include "Actions/UndoRedoHelpers.hpp"
    2223#include "CodePatterns/Log.hpp"
    2324#include "CodePatterns/Verbose.hpp"
     
    3132#include <fstream>
    3233#include <string>
     34#include <vector>
    3335
    3436#include "Actions/MoleculeAction/CopyAction.hpp"
     
    4042#include "Action_impl_pre.hpp"
    4143/** =========== define the function ====================== */
    42 Action::state_ptr MoleculeCopyAction::performCall() {
    43   molecule *copy = NULL;
     44Action::state_ptr MoleculeCopyAction::performCall()
     45{
     46  std::vector<moleculeId_t> molecules;
     47  for (World::MoleculeSelectionConstIterator iter = World::getInstance().beginMoleculeSelection();
     48      iter != World::getInstance().endMoleculeSelection(); ++iter) {
     49    molecule * const copy = (iter->second)->CopyMolecule();
     50    Vector *Center = (iter->second)->DetermineCenterOfAll();
     51    *Center *= -1.;
     52    *Center += params.position.get();
     53    copy->Translate(Center);
     54    delete(Center);
     55    molecules.push_back(copy->getId());
     56  }
    4457
    45   copy = params.mol->CopyMolecule();
    46   Vector *Center = params.mol->DetermineCenterOfAll();
    47   *Center *= -1.;
    48   *Center += params.position;
    49   copy->Translate(Center);
    50   delete(Center);
    51 
    52   return Action::state_ptr(new MoleculeCopyState(copy,params));
     58  return Action::state_ptr(new MoleculeCopyState(molecules,params));
    5359}
    5460
     
    5662  MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get());
    5763
    58   state->copy->removeAtomsinMolecule();
    59   World::getInstance().destroyMolecule(state->copy);
     64  RemoveMoleculesWithAtomsByIds(state->copies);
    6065
    6166  return Action::state_ptr(_state);
     
    6368
    6469Action::state_ptr MoleculeCopyAction::performRedo(Action::state_ptr _state){
    65   MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get());
    66 
    67   molecule *copy = state->params.mol->CopyMolecule();
    68   Vector *Center = state->params.mol->DetermineCenterOfAll();
    69   *Center *= -1.;
    70   *Center += state->params.position;
    71   copy->Translate(Center);
    72   delete(Center);
    73 
    74   return Action::state_ptr(new MoleculeCopyState(copy,state->params));
     70  return performCall();
    7571}
    7672
  • src/Actions/MoleculeAction/CopyAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 class MoleculeListClass;
     9#include <vector>
     10
     11#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
    1012
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (const molecule *)(Vector)
    15 #define paramtokens ("copy-molecule")("position")
    16 #define paramdescriptions ("molecule to copy")("position in R^3 space")
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (Vector)
     17#define paramtokens ("position")
     18#define paramdescriptions ("position in R^3 space")
    1719#undef paramdefaults
    18 #define paramreferences (mol)(position)
     20#define paramreferences (position)
     21#define paramvalids \
     22(BoxVectorValidator())
    1923
    20 #define statetypes (molecule *)
    21 #define statereferences (copy)
     24#define statetypes (const std::vector<moleculeId_t>)
     25#define statereferences (copies)
    2226
    2327// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp

    r5ffa05 rbd81f9  
    4646/** =========== define the function ====================== */
    4747Action::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() {
    48   if (!boost::filesystem::exists(params.fillername)) {
    49     ELOG(1, "File with filler molecule " << params.fillername << " does not exist!");
     48  if (!boost::filesystem::exists(params.fillername.get())) {
     49    ELOG(1, "File with filler molecule " << params.fillername.get() << " does not exist!");
    5050    return Action::failure;
    5151  }
    5252
    5353  LOG(1, "INFO: Filling Box with water molecules, "
    54       << " minimum distance to molecules" << params.boundary
    55       << ", random atom displacement " << params.RandAtomDisplacement
    56       << ", random molecule displacement " << params.RandMoleculeDisplacement
    57       << ", distances between fillers (" << params.distances[0] << "," << params.distances[1] << "," << params.distances[2]
    58       << "), MinDistance " << params.MinDistance
    59       << ", DoRotate " << params.DoRotate << ".");
     54      << " minimum distance to molecules" << params.boundary.get()
     55      << ", random atom displacement " << params.RandAtomDisplacement.get()
     56      << ", random molecule displacement " << params.RandMoleculeDisplacement.get()
     57      << ", distances between fillers (" << params.distances.get()[0] << "," << params.distances.get()[1] << "," << params.distances.get()[2]
     58      << "), MinDistance " << params.MinDistance.get()
     59      << ", DoRotate " << params.DoRotate.get() << ".");
    6060  // construct water molecule
    6161  std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules();
    6262//  LOG(0, presentmolecules.size() << " molecules initially are present.");
    63   std::string FilenameSuffix = params.fillername.string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length());
     63  std::string FilenameSuffix = params.fillername.get().string().substr(params.fillername.get().string().find_last_of('.')+1, params.fillername.get().string().length());
    6464  ifstream input;
    65   input.open(params.fillername.string().c_str());
     65  input.open(params.fillername.get().string().c_str());
    6666  ParserTypes type = FormatParserStorage::getInstance().getTypeFromSuffix(FilenameSuffix);
    6767  FormatParserInterface &parser = FormatParserStorage::getInstance().get(type);
     
    7272  ASSERT(filler != NULL,
    7373      "MoleculeFillVoidWithMoleculeAction::performCall() - no last molecule found, nothing parsed?.");
    74   filler->SetNameFromFilename(params.fillername.string().c_str());
     74  filler->SetNameFromFilename(params.fillername.get().string().c_str());
    7575  World::AtomComposite Set = filler->getAtomSet();
    7676  World::getInstance().getBondGraph()->CreateAdjacency(Set);
     
    7979  double distance[NDIM];
    8080  for (int i=0;i<NDIM;i++)
    81     distance[i] = params.distances[i];
     81    distance[i] = params.distances.get()[i];
    8282  FillVoidWithMolecule(
    8383      filler,
    8484      *(World::getInstance().getConfig()),
    8585      distance,
    86       params.boundary,
    87       params.RandAtomDisplacement,
    88       params.RandMoleculeDisplacement,
    89       params.MinDistance,
    90       params.DoRotate);
     86      params.boundary.get(),
     87      params.RandAtomDisplacement.get(),
     88      params.RandMoleculeDisplacement.get(),
     89      params.MinDistance.get(),
     90      params.DoRotate.get());
    9191
    9292  // generate list of newly created molecules
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99#include "LinearAlgebra/Vector.hpp"
    10 class MoleculeListClass;
     10
     11#include "LinearAlgebra/defs.hpp"
     12#include "Parameters/Validators/DummyValidator.hpp"
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     15#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     16#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     17#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
    1118
    1219// i.e. there is an integer with variable name Z that can be found in
    1320// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1522#define paramtypes (boost::filesystem::path)(Vector)(double)(double)(double)(double)(bool)
    1623#define paramtokens ("fill-void")("distances")("distance-to-molecule")("random-atom-displacement")("random-molecule-displacement")("distance-to-boundary")("DoRotate")
    1724#define paramdescriptions ("name of xyz file of filler molecule")("list of three of distances in space, one for each axis direction")("minimum distance to present molecules")("magnitude of random atom displacement")("magnitude of random molecule displacement")("minimum distance to boundary")("whether to rotate or not")
    18 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.")("0.")("0.")("0.")("0")
     25#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(false))
    1926#define paramreferences (fillername)(distances)(boundary)(RandAtomDisplacement)(RandMoleculeDisplacement)(MinDistance)(DoRotate)
     27#define paramvalids \
     28(FilePresentValidator() && ParserFileValidator()) \
     29(BoxVectorValidator()) \
     30(BoxLengthValidator()) \
     31(BoxLengthValidator()) \
     32(BoxLengthValidator()) \
     33(BoxLengthValidator()) \
     34(DummyValidator< bool >())
    2035
    2136#define statetypes (std::vector<molecule *>)
  • src/Actions/MoleculeAction/FillWithMoleculeAction.cpp

    r5ffa05 rbd81f9  
    4646
    4747  LOG(1, "INFO: Filling Box with water molecules, "
    48       << " minimum distance to molecules" << params.boundary
    49       << ", random atom displacement " << params.RandAtomDisplacement
    50       << ", random molecule displacement " << params.RandMoleculeDisplacement
    51       << ", distances between fillers (" << params.distances[0] << "," << params.distances[1] << "," << params.distances[2]
    52       << "), MinDistance " << params.MaxDistance
    53       << ", DoRotate " << params.DoRotate << ".");
     48      << " minimum distance to molecules" << params.boundary.get()
     49      << ", random atom displacement " << params.RandAtomDisplacement.get()
     50      << ", random molecule displacement " << params.RandMoleculeDisplacement.get()
     51      << ", distances between fillers (" << params.distances.get()[0] << "," << params.distances.get()[1] << "," << params.distances.get()[2]
     52      << "), MinDistance " << params.MaxDistance.get()
     53      << ", DoRotate " << params.DoRotate.get() << ".");
    5454  // construct water molecule
    5555  std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules();
    5656//  LOG(0, presentmolecules.size() << " molecules initially are present.");
    57   std::string FilenameSuffix = params.fillername.string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length());
     57  std::string FilenameSuffix = params.fillername.get().string().substr(params.fillername.get().string().find_last_of('.')+1, params.fillername.get().string().length());
    5858  ifstream input;
    59   LOG(0, "STATUS: Loading filler molecule " << params.fillername.string().c_str()
     59  LOG(0, "STATUS: Loading filler molecule " << params.fillername.get().string().c_str()
    6060      << " of suffix " << FilenameSuffix << ".");
    61   input.open(params.fillername.string().c_str());
     61  input.open(params.fillername.get().string().c_str());
    6262  FormatParserStorage::getInstance().load(input, FilenameSuffix);
    6363  input.close();
     
    6767  ASSERT(filler != NULL,
    6868      "MoleculeFillWithMoleculeAction::performCall() - no last molecule found, nothing parsed?.");
    69   filler->SetNameFromFilename(params.fillername.string().c_str());
     69  filler->SetNameFromFilename(params.fillername.get().string().c_str());
    7070  World::AtomComposite Set = filler->getAtomSet();
    7171  LOG(1, "INFO: The filler molecules has " << Set.size() << " atoms.");
     
    7878  double distance[NDIM];
    7979  for (int i=0;i<NDIM;i++)
    80     distance[i] = params.distances[i];
     80    distance[i] = params.distances.get()[i];
    8181  FillBoxWithMolecule(
    8282      World::getInstance().getMolecules(),
    8383      filler, *(World::getInstance().getConfig()),
    84       params.MaxDistance,
     84      params.MaxDistance.get(),
    8585      distance,
    86       params.boundary,
    87       params.RandAtomDisplacement,
    88       params.RandMoleculeDisplacement,
    89       params.DoRotate);
     86      params.boundary.get(),
     87      params.RandAtomDisplacement.get(),
     88      params.RandMoleculeDisplacement.get(),
     89      params.DoRotate.get());
    9090  for (molecule::iterator iter = filler->begin(); !filler->empty(); iter = filler->begin()) {
    9191    atom *Walker = *iter;
  • src/Actions/MoleculeAction/FillWithMoleculeAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include <boost/assign.hpp>
    910#include <boost/filesystem/path.hpp>
     11#include <vector>
    1012#include "LinearAlgebra/Vector.hpp"
    11 class MoleculeListClass;
     13
     14#include "Parameters/Validators/DiscreteValidator.hpp"
     15#include "Parameters/Validators/DummyValidator.hpp"
     16#include "Parameters/Validators/Ops_Validator.hpp"
     17#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     18#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     19#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     20#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
    1221
    1322// i.e. there is an integer with variable name Z that can be found in
    1423// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     24// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1625#define paramtypes (boost::filesystem::path)(Vector)(double)(double)(double)(double)(bool)
    1726#define paramtokens ("fill-molecule")("distances")("distance-to-molecule")("random-atom-displacement")("random-molecule-displacement")("MaxDistance")("DoRotate")
    1827#define paramdescriptions ("name of xyz file of filler molecule")("list of three of distances in space, one for each axis direction")("minimum distance to present molecules")("magnitude of random atom displacement")("magnitude of random molecule displacement")("maximum spatial distance")("whether to rotate or not")
    19 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.")("0.")("0.")("0.")("0")
     28#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(false))
    2029#define paramreferences (fillername)(distances)(boundary)(RandAtomDisplacement)(RandMoleculeDisplacement)(MaxDistance)(DoRotate)
     30#define paramvalids \
     31(FilePresentValidator() && ParserFileValidator()) \
     32(BoxVectorValidator()) \
     33(BoxLengthValidator()) \
     34(BoxLengthValidator()) \
     35(BoxLengthValidator()) \
     36(BoxLengthValidator() || DiscreteValidator<double>(std::vector<double>(1,-1.))) \
     37(DummyValidator< bool >())
    2138
    2239#define statetypes (std::vector<molecule *>)
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp

    r5ffa05 rbd81f9  
    4343/** =========== define the function ====================== */
    4444Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {
    45   LOG(0, "STATUS: Linear interpolation between configuration " << params.start << " and " << params.end << "." << endl);
    46   ASSERT(params.end > params.start, "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step.");
     45  LOG(0, "STATUS: Linear interpolation between configuration " << params.start.get() << " and " << params.end.get() << "." << endl);
     46  ASSERT(params.end.get() > params.start.get(), "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step.");
    4747  AtomSetMixin<std::vector<atom*> > set(World::getInstance().getSelectedAtoms());
    48   LinearInterpolationBetweenSteps<std::vector<atom*> > LinearInterpolate(set,(unsigned int)(params.interpolation_steps));
    49   LinearInterpolate(params.start, params.end, params.IdMapping);
     48  LinearInterpolationBetweenSteps<std::vector<atom*> > LinearInterpolate(set,(unsigned int)(params.interpolation_steps.get()));
     49  LinearInterpolate(params.start.get(), params.end.get(), params.IdMapping.get());
    5050  LOG(0, "STATUS: done." << endl);
    5151
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12#include "Parameters/Validators/GenericValidators.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (int)(int)(int)(bool)
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     17#define paramtypes (unsigned int)(unsigned int)(unsigned int)(bool)
    1518#define paramtokens ("start-step")("interpolation-steps")("end-step")("id-mapping")
    1619#define paramdescriptions ("first or start step")("number of steps to interpolate in between start and end step")("last or end step")("whether the identity shall be used in mapping atoms onto atoms or not")
    1720#undef paramdefaults
    1821#define paramreferences (start)(interpolation_steps)(end)(IdMapping)
     22#define paramvalids \
     23(DummyValidator< unsigned int >()) \
     24(NotZeroValidator< unsigned int >()) \
     25(DummyValidator< unsigned int >()) \
     26(DummyValidator< bool >())
    1927
    2028#undef statetypes
  • src/Actions/MoleculeAction/LoadAction.cpp

    r5ffa05 rbd81f9  
    4444Action::state_ptr MoleculeLoadAction::performCall() {
    4545  // parsing file if present
    46   if (!boost::filesystem::exists(params.filename)) {
    47     LOG(1, "Specified input file " << params.filename << " not found.");
     46  if (!boost::filesystem::exists(params.filename.get())) {
     47    LOG(1, "Specified input file " << params.filename.get() << " not found.");
    4848    return Action::failure;
    4949  } else {
     
    5353    std::string FilenameSuffix;
    5454    std::string FilenamePrefix;
    55     if (params.filename.has_filename()) {
     55    if (params.filename.get().has_filename()) {
    5656      // get suffix
    5757#if BOOST_VERSION >= 104600
    58       FilenameSuffix = params.filename.extension().string().substr(1); // remove the prefixed "."
    59       FilenamePrefix = params.filename.stem().string();
     58      FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "."
     59      FilenamePrefix = params.filename.get().stem().string();
    6060#else
    61       FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "."
    62       FilenamePrefix = params.filename.stem();
     61      FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "."
     62      FilenamePrefix = params.filename.get().stem();
    6363#endif
    6464    } else {
     
    7979    // parse the file
    8080    boost::filesystem::ifstream input;
    81     input.open(params.filename);
     81    input.open(params.filename.get());
    8282    FormatParserStorage::getInstance().load(input, FilenameSuffix);
    8383    input.close();
     
    125125  // parse the file
    126126  boost::filesystem::ifstream input;
    127   input.open(state->params.filename);
     127  input.open(state->params.filename.get());
    128128  FormatParserStorage::getInstance().load(input, state->FilenameSuffix);
    129129  input.close();
  • src/Actions/MoleculeAction/LoadAction.def

    r5ffa05 rbd81f9  
    1111#include <boost/shared_ptr.hpp>
    1212
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     15#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     16
    1317// i.e. there is an integer with variable name Z that can be found in
    1418// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     19// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1620#define paramtypes (boost::filesystem::path)
    1721#define paramtokens ("load")
     
    1923#undef paramdefaults
    2024#define paramreferences (filename)
     25#define paramvalids \
     26(FilePresentValidator() && ParserFileValidator())
    2127
    2228#define statetypes (moleculeId_t)(std::string)(std::string)(boost::shared_ptr<FormatParser_Parameters>)
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp

    r5ffa05 rbd81f9  
    4848  BOOST_FOREACH(molecule *mol, selectedMolecules) {
    4949    // check whether Axis is valid
    50     if (params.Axis.IsZero())
     50    if (params.Axis.get().IsZero())
    5151      return Action::failure;
    5252
    5353    // convert from degrees to radian
    54     params.angle *= M_PI/180.;
     54    params.angle.set(params.angle.get() * M_PI/180.);
    5555
    5656    // Creation Line that is the rotation axis
    5757    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    5858    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    59     Line RotationAxis(*CenterOfGravity, params.Axis);
     59    Line RotationAxis(*CenterOfGravity, params.Axis.get());
    6060    delete(CenterOfGravity);
    61     LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle << " radian around axis " << RotationAxis << ".");
     61    LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle.get() << " radian around axis " << RotationAxis << ".");
    6262
    6363    for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    64       (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), params.angle));
     64      (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), params.angle.get()));
    6565    }
    6666    LOG(0, "done.");
     
    7676    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    7777    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    78     Line RotationAxis(*CenterOfGravity, state->params.Axis);
     78    Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
    7979    delete(CenterOfGravity);
    80     LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle << " radian around axis " << RotationAxis << ".");
     80    LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    8181
    8282    for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    83       (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -state->params.angle));
     83      (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -state->params.angle.get()));
    8484    }
    8585  }
     
    9494    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    9595    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    96     Line RotationAxis(*CenterOfGravity, state->params.Axis);
     96    Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
    9797    delete(CenterOfGravity);
    98     LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle << " radian around axis " << RotationAxis << ".");
     98    LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    9999
    100100    for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    101       (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), state->params.angle));
     101      (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), state->params.angle.get()));
    102102    }
    103103  }
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.def

    r5ffa05 rbd81f9  
    1010class Vector;
    1111
     12#include "Parameters/Validators/DummyValidator.hpp"
     13#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     14
    1215// i.e. there is an integer with variable name Z that can be found in
    1316// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1518#define paramtypes (double)(Vector)
    1619#define paramtokens ("rotate-around-self")("axis")
     
    1821#undef paramdefaults
    1922#define paramreferences (angle)(Axis)
     23#define paramvalids \
     24(RotationAngleValidator()) \
     25(DummyValidator< Vector >())
    2026
    2127#define statetypes (std::vector<molecule*>)
  • src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp

    r5ffa05 rbd81f9  
    4949    RealSpaceMatrix InertiaTensor = mol->getInertiaTensor();
    5050
    51     mol->RotateToPrincipalAxisSystem(params.Axis);
     51    mol->RotateToPrincipalAxisSystem(const_cast<Vector &>(params.Axis.get()));
    5252
    5353    // summing anew for debugging (resulting matrix has to be diagonal!)
  • src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.def

    r5ffa05 rbd81f9  
    1212class MoleculeListClass;
    1313
     14#include "Parameters/Validators/DummyValidator.hpp"
     15
    1416// i.e. there is an integer with variable name Z that can be found in
    1517// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1719#define paramtypes (Vector)
    1820#define paramtokens ("rotate-to-principal-axis-system")
     
    2022#undef paramdefaults
    2123#define paramreferences (Axis)
     24#define paramvalids \
     25(DummyValidator< Vector >())
    2226
    2327#undef statetypes
  • src/Actions/MoleculeAction/SaveAdjacencyAction.cpp

    r5ffa05 rbd81f9  
    4242  for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
    4343    mol = iter->second;
    44     LOG(0, "Storing adjacency to path " << params.adjacencyfile << ".");
     44    LOG(0, "Storing adjacency to path " << params.adjacencyfile.get() << ".");
    4545    // TODO: sollte stream nicht filename benutzen, besser fuer unit test
    4646#if BOOST_VERSION >= 104600
    47     mol->StoreAdjacencyToFile(params.adjacencyfile.leaf().string(), params.adjacencyfile.branch_path().string());
     47    mol->StoreAdjacencyToFile(params.adjacencyfile.get().leaf().string(), params.adjacencyfile.get().branch_path().string());
    4848#else
    49     mol->StoreAdjacencyToFile(params.adjacencyfile.leaf(), params.adjacencyfile.branch_path().string());
     49    mol->StoreAdjacencyToFile(params.adjacencyfile.get().leaf(), params.adjacencyfile.get().branch_path().string());
    5050#endif
    5151  }
  • src/Actions/MoleculeAction/SaveAdjacencyAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1417#define paramtypes (boost::filesystem::path)
    1518#define paramtokens ("save-adjacency")
     
    1720#undef paramdefaults
    1821#define paramreferences (adjacencyfile)
     22#define paramvalids \
     23(!FilePresentValidator())
    1924
    2025#undef statetypes
  • src/Actions/MoleculeAction/SaveBondsAction.cpp

    r5ffa05 rbd81f9  
    4242  for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
    4343    mol = iter->second;
    44     LOG(0, "Storing bonds to path " << params.bondsfile << ".");
     44    LOG(0, "Storing bonds to path " << params.bondsfile.get() << ".");
    4545    // TODO: sollte stream, nicht filenamen direkt nutzen, besser fuer unit tests
    4646#if BOOST_VERSION >= 104600
    47     mol->StoreBondsToFile(params.bondsfile.leaf().string(), params.bondsfile.branch_path().string());
     47    mol->StoreBondsToFile(params.bondsfile.get().leaf().string(), params.bondsfile.get().branch_path().string());
    4848#else
    49     mol->StoreBondsToFile(params.bondsfile.leaf(), params.bondsfile.branch_path().string());
     49    mol->StoreBondsToFile(params.bondsfile.get().leaf(), params.bondsfile.get().branch_path().string());
    5050#endif
    5151  }
  • src/Actions/MoleculeAction/SaveBondsAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1417#define paramtypes (boost::filesystem::path)
    1518#define paramtokens ("save-bonds")
     
    1720#undef paramdefaults
    1821#define paramreferences (bondsfile)
     22#define paramvalids \
     23(!FilePresentValidator())
    1924
    2025#undef statetypes
  • src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr MoleculeSaveSelectedMoleculesAction::performCall() {
    40   LOG(1, "Storing selected molecules to file " << params.filename << ".");
     40  LOG(1, "Storing selected molecules to file " << params.filename.get() << ".");
    4141
    4242  // extract suffix
    4343  std::string FilenameSuffix;
    4444  std::string FilenamePrefix;
    45   if (params.filename.has_filename()) {
     45  if (params.filename.get().has_filename()) {
    4646    // get suffix
    4747#if BOOST_VERSION >= 104600
    48       FilenameSuffix = params.filename.extension().string().substr(1); // remove the prefixed "."
    49       FilenamePrefix = params.filename.stem().string();
     48      FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "."
     49      FilenamePrefix = params.filename.get().stem().string();
    5050#else
    51       FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "."
    52       FilenamePrefix = params.filename.stem();
     51      FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "."
     52      FilenamePrefix = params.filename.get().stem();
    5353#endif
    5454  } else {
     
    6060  // parse the file
    6161  boost::filesystem::ofstream output;
    62   output.open(params.filename);
     62  output.open(params.filename.get());
    6363  if (!output.fail()) {
    6464    FormatParserStorage::getInstance().saveSelectedMolecules(output, FilenameSuffix);
    6565  } else {
    66     ELOG(1, "Could not open file " << params.filename << ".");
     66    ELOG(1, "Could not open file " << params.filename.get() << ".");
    6767  }
    6868  output.close();
  • src/Actions/MoleculeAction/SaveSelectedMoleculesAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1418#define paramtypes (boost::filesystem::path)
    1519#define paramtokens ("save-selected-molecules")
     
    1721#undef paramdefaults
    1822#define paramreferences (filename)
     23#define paramvalids \
     24(!FilePresentValidator() && ParserFileValidator())
    1925
    2026#undef statetypes
  • src/Actions/MoleculeAction/SaveTemperatureAction.cpp

    r5ffa05 rbd81f9  
    4242/** =========== define the function ====================== */
    4343Action::state_ptr MoleculeSaveTemperatureAction::performCall() {
    44   LOG(1, "Storing temperatures in " << params.temperaturefile << ".");
     44  LOG(1, "Storing temperatures in " << params.temperaturefile.get() << ".");
    4545  ofstream output;
    46   output.open(params.temperaturefile.string().c_str(), ios::trunc);
     46  output.open(params.temperaturefile.get().string().c_str(), ios::trunc);
    4747  AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms());
    4848  const size_t MDSteps = set.getMaxTrajectorySize();
  • src/Actions/MoleculeAction/SaveTemperatureAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1417#define paramtypes (boost::filesystem::path)
    1518#define paramtokens ("save-temperature")
     
    1720#undef paramdefaults
    1821#define paramreferences (temperaturefile)
     22#define paramvalids \
     23(!FilePresentValidator())
    1924
    2025#undef statetypes
  • src/Actions/MoleculeAction/SuspendInWaterAction.cpp

    r5ffa05 rbd81f9  
    4444    mol = iter->second;
    4545    LOG(0, "Evaluating necessary cell volume for a cluster suspended in water.");
    46     if (params.density < 1.0) {
     46    if (params.density.get() < 1.0) {
    4747      ELOG(1, "Density must be greater than 1.0g/cm^3!");
    4848    } else {
    49       PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density);  // if volume == 0, will calculate from ConvexEnvelope
     49      PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density.get());  // if volume == 0, will calculate from ConvexEnvelope
    5050    }
    5151  }
  • src/Actions/MoleculeAction/SuspendInWaterAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/GenericValidators.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (double)
    1517#define paramtokens ("suspend-in-water")
     
    1719#undef paramdefaults
    1820#define paramreferences (density)
     21#define paramvalids \
     22(PositiveValidator< double >())
    1923
    2024#undef statetypes
  • src/Actions/MoleculeAction/VerletIntegrationAction.cpp

    r5ffa05 rbd81f9  
    4545  // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test
    4646  char outputname[MAXSTRINGSIZE];
    47   strcpy(outputname, params.forcesfile.string().c_str());
     47  strcpy(outputname, params.forcesfile.get().string().c_str());
    4848  AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms());
    49   for (int step = 0; step < params.MDSteps; ++step) {
    50     VerletForceIntegration<std::vector<atom *> > Verlet(set, params.Deltat, step, false);
    51     if (!Verlet(outputname, 1, 0, params.FixedCenterOfMass))
    52       LOG(2, "File " << params.forcesfile << " not found.");
     49  for (unsigned int step = 0; step < params.MDSteps.get(); ++step) {
     50    VerletForceIntegration<std::vector<atom *> > Verlet(set, params.Deltat.get(), step, false);
     51    if (!Verlet(outputname, 1, 0, params.FixedCenterOfMass.get()))
     52      LOG(2, "File " << params.forcesfile.get() << " not found.");
    5353    else
    54       LOG(2, "File " << params.forcesfile << " found and parsed.");
     54      LOG(2, "File " << params.forcesfile.get() << " found and parsed.");
    5555  }
    5656
  • src/Actions/MoleculeAction/VerletIntegrationAction.def

    r5ffa05 rbd81f9  
    99class MoleculeListClass;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12#include "Parameters/Validators/GenericValidators.hpp"
     13#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (boost::filesystem::path)(double)(int)(bool)
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     18#define paramtypes (boost::filesystem::path)(double)(unsigned int)(bool)
    1519#define paramtokens ("verlet-integration")("deltat")("MDSteps")("keep-fixed-CenterOfMass")
    1620#define paramdescriptions ("perform verlet integration of a given force file")("time step width")("number of MDSteps to integrate")("whether forces and velocities shall be corrected such that center of mass remains at rest")
    1721#undef paramdefaults
    1822#define paramreferences (forcesfile)(Deltat)(MDSteps)(FixedCenterOfMass)
     23#define paramvalids \
     24(FilePresentValidator()) \
     25(PositiveValidator< double >()) \
     26(NotZeroValidator< unsigned int >()) \
     27(DummyValidator< bool >())
    1928
    2029#undef statetypes
  • src/Actions/ParserAction/ParseTremoloPotentialsAction.cpp

    r5ffa05 rbd81f9  
    4242  FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>();
    4343  // parsing file if present
    44   if (!boost::filesystem::exists(params.filename)) {
    45     LOG(1, "Specified potentials file " << params.filename << " not found.");
     44  if (!boost::filesystem::exists(params.filename.get())) {
     45    LOG(1, "Specified potentials file " << params.filename.get() << " not found.");
    4646    // DONT FAIL: it's just empty we re-create default id-mapping
    4747    parser.createKnownTypesByIdentity();
     
    5151
    5252    // parse the file
    53     test.open(params.filename);
     53    test.open(params.filename.get());
    5454    parser.parseKnownTypes(test);
    5555    test.close();
  • src/Actions/ParserAction/ParseTremoloPotentialsAction.def

    r5ffa05 rbd81f9  
    99#include <boost/filesystem.hpp>
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13#include "Parameters/Validators/Specific/FileSuffixValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1418#define paramtypes (boost::filesystem::path)
    1519#define paramtokens ("parse-tremolo-potentials")
     
    1721#undef paramdefaults
    1822#define paramreferences (filename)
     23#define paramvalids \
     24(FilePresentValidator() && FileSuffixValidator("potentials"))
    1925
    2026#undef statetypes
  • src/Actions/ParserAction/SaveSelectedAtomsAsExtTypesAction.cpp

    r5ffa05 rbd81f9  
    4040/** =========== define the function ====================== */
    4141Action::state_ptr ParserSaveSelectedAtomsAsExtTypesAction::performCall() {
    42   if (boost::filesystem::exists(params.filename)) {
    43     ELOG(1, "Specified exttypes file " << params.filename << " already exists.");
     42  if (boost::filesystem::exists(params.filename.get())) {
     43    ELOG(1, "Specified exttypes file " << params.filename.get() << " already exists.");
    4444
    4545    return Action::failure;
     
    4747    const FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>();
    4848
    49     LOG(1, "Creating exttypes file " << params.filename << " ... ");
     49    LOG(1, "Creating exttypes file " << params.filename.get() << " ... ");
    5050    boost::filesystem::ofstream test;
    51     test.open(params.filename);
    52     const bool status = parser.saveAtomsInExttypes(test, World::getInstance().getSelectedAtoms(), params.id);
     51    test.open(params.filename.get());
     52    const bool status = parser.saveAtomsInExttypes(test, World::getInstance().getSelectedAtoms(), params.id.get());
    5353    test.close();
    5454
  • src/Actions/ParserAction/SaveSelectedAtomsAsExtTypesAction.def

    r5ffa05 rbd81f9  
    99#include <boost/filesystem.hpp>
    1010
     11#include "Parameters/Validators/Specific/FileSuffixValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (int)(boost::filesystem::path)
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (unsigned int)(boost::filesystem::path)
    1517#define paramtokens ("save-selected-atoms-as-exttypes")("filename")
    16 #define paramdescriptions ("Type id for this selection of atoms")("path to tremolo's exttypes file")
     18#define paramdescriptions ("Type id for this selection of atoms")("path to tremolo's .exttypes file to which we append")
    1719#undef paramdefaults
    1820#define paramreferences (id)(filename)
     21#define paramvalids \
     22(DummyValidator< unsigned int >()) \
     23(FileSuffixValidator("exttypes"))
    1924
    2025#undef statetypes
  • src/Actions/ParserAction/SetOutputFormatsAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr ParserSetOutputFormatsAction::performCall() {
    40   LOG(1, "Format list is: " << params.FormatList);
    41   for (vector<std::string>::iterator iter = params.FormatList.begin(); iter != params.FormatList.end(); ++iter) {
     40  LOG(1, "Format list is: " << params.FormatList.get());
     41  for (vector<std::string>::const_iterator iter = params.FormatList.get().begin(); iter != params.FormatList.get().end(); ++iter) {
    4242    if (!FormatParserStorage::getInstance().add(*iter)) {
    4343      ELOG(1, "Unknown parser format in ParserSetOutputFormatsAction: '" << *iter << "'");
  • src/Actions/ParserAction/SetOutputFormatsAction.def

    r5ffa05 rbd81f9  
    99#include <vector>
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/STLVectorValidator.hpp"
     13#include "Parameters/Validators/UniqueValidator.hpp"
     14#include "Parameters/Validators/Specific/ParserTypeValidator.hpp"
     15
    1116// i.e. there is an integer with variable name Z that can be found in
    1217// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1419#define paramtypes (std::vector<std::string>)
    1520#define paramtokens ("set-output")
     
    1722#undef paramdefaults
    1823#define paramreferences (FormatList)
     24#define paramvalids \
     25(STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator()) && UniqueValidator< std::vector<std::string> >())
    1926
    2027#undef statetypes
  • src/Actions/ParserAction/SetParserParametersAction.cpp

    r5ffa05 rbd81f9  
    2727#include "Actions/ValueStorage.hpp"
    2828
     29#include <algorithm>
    2930#include <iostream>
    3031#include <string>
     
    4041Action::state_ptr ParserSetParserParametersAction::performCall() {
    4142  // get parser
    42   ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(params.parsername);
     43  ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(params.parsername.get());
    4344  FormatParser_Parameters *parameters = FormatParserStorage::getInstance().get(type).parameters;
    4445  ASSERT(parameters != NULL,
     
    5051
    5152  // obtain information
    52   std::stringstream newparamstream(params.newparams);
     53  std::stringstream newparamstream;
     54  const std::vector< std::string > keyvalues = params.newparams.get();
     55  std::for_each(keyvalues.begin(), keyvalues.end(), newparamstream << boost::lambda::_1 << ";");
    5356  newparamstream >> *parameters;
    5457
     
    5962  ParserSetParserParametersState *state = assert_cast<ParserSetParserParametersState*>(_state.get());
    6063
    61   ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername);
     64  ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername.get());
    6265  FormatParser_Parameters *parser = FormatParserStorage::getInstance().get(type).parameters;
    6366  std::stringstream oldparamstream(state->oldparams);
     
    7073  ParserSetParserParametersState *state = assert_cast<ParserSetParserParametersState*>(_state.get());
    7174
    72   ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername);
     75  ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername.get());
    7376  FormatParser_Parameters *parser = FormatParserStorage::getInstance().get(type).parameters;
    74   std::stringstream newparamstream(state->params.newparams);
     77  std::stringstream newparamstream;
     78  const std::vector< std::string > keyvalues = state->params.newparams.get();
     79  std::for_each(keyvalues.begin(), keyvalues.end(), newparamstream << boost::lambda::_1 << ";");
    7580  newparamstream >> *parser;
    7681
  • src/Actions/ParserAction/SetParserParametersAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include <vector>
     10#include <string>
    911
     12#include "Parameters/Validators/STLVectorValidator.hpp"
     13#include "Parameters/Validators/Specific/KeyValueValidator.hpp"
     14#include "Parameters/Validators/Specific/ParserTypeValidator.hpp"
    1015
    1116// i.e. there is an integer with variable name Z that can be found in
    1217// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (std::string)(std::string)
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     19#define paramtypes (std::string)(std::vector<std::string>)
    1520#define paramtokens ("set-parser-parameters")("parser-parameters")
    1621#define paramdescriptions ("name of the parser to change")("parameter (key = value;)")
    17 #define paramdefaults (NODEFAULT)(NODEFAULT)
     22#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)
    1823#define paramreferences (parsername)(newparams)
     24#define paramvalids \
     25(ParserTypeValidator())\
     26(STLVectorValidator< std::vector<std::string> >(1, 99, KeyValueValidator()))
    1927
    2028#define statetypes (std::string)
  • src/Actions/ParserAction/SetTremoloAtomdataAction.cpp

    r5ffa05 rbd81f9  
    4141  FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>();
    4242
    43   LOG(1, "Setting Tremolo's ATOMDATA to: '" << params.atomdata_string << "'");
     43  LOG(1, "Setting Tremolo's ATOMDATA to: '" << params.atomdata_string.get() << "'");
    4444
    45   parser.setAtomData(params.atomdata_string);
     45  const std::string old_atomdata = parser.getAtomData();
    4646
    47   return Action::success;
     47  if (params.atomdata_reset.get())
     48    parser.resetAtomData(params.atomdata_string.get());
     49  else
     50    parser.setAtomData(params.atomdata_string.get());
     51
     52  return Action::state_ptr(new ParserSetTremoloAtomdataState(old_atomdata, params));
    4853}
    4954
    5055Action::state_ptr ParserSetTremoloAtomdataAction::performUndo(Action::state_ptr _state) {
    51 //  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
     56  ParserSetTremoloAtomdataState *state = assert_cast<ParserSetTremoloAtomdataState*>(_state.get());
    5257
    53   return Action::failure;
    54 //  string newName = state->mol->getName();
    55 //  state->mol->setName(state->lastName);
    56 //
    57 //  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
     58  FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>();
     59  LOG(1, "INFO: Reverting to 'ATOMDATA " << state->old_atomdata << "'.");
     60  parser.resetAtomData(state->old_atomdata);
     61
     62  return Action::state_ptr(_state);
    5863}
    5964
    6065Action::state_ptr ParserSetTremoloAtomdataAction::performRedo(Action::state_ptr _state){
    61   return Action::failure;
     66  ParserSetTremoloAtomdataState *state = assert_cast<ParserSetTremoloAtomdataState*>(_state.get());
     67
     68  FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>();
     69
     70  if (state->params.atomdata_reset.get())
     71    parser.resetAtomData(state->params.atomdata_string.get());
     72  else
     73    parser.setAtomData(state->params.atomdata_string.get());
     74
     75  return Action::state_ptr(_state);
    6276}
    6377
    6478bool ParserSetTremoloAtomdataAction::canUndo() {
    65   return false;
     79  return true;
    6680}
    6781
    6882bool ParserSetTremoloAtomdataAction::shouldUndo() {
    69   return false;
     83  return true;
    7084}
    7185/** =========== end of function ====================== */
  • src/Actions/ParserAction/SetTremoloAtomdataAction.def

    r5ffa05 rbd81f9  
    99#include <boost/filesystem.hpp>
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12#include "Parameters/Validators/Specific/AtomDataValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (std::string)
    15 #define paramtokens ("set-tremolo-atomdata")
    16 #define paramdescriptions ("properties to set, space-separated")
    17 #undef paramdefaults
    18 #define paramreferences (atomdata_string)
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     17#define paramtypes (std::string)(bool)
     18#define paramtokens ("set-tremolo-atomdata")("reset")
     19#define paramdescriptions ("properties to set, space-separated")("whether to append (false) or overwrite (true) with given atomdata")
     20#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))
     21#define paramreferences (atomdata_string)(atomdata_reset)
     22#define paramvalids \
     23(AtomDataValidator()) \
     24(DummyValidator<bool>())
    1925
    20 #undef statetypes
    21 #undef statereferences
     26#define statetypes (std::string)
     27#define statereferences (old_atomdata)
    2228
    2329// some defines for all the names, you may use ACTION, STATE and PARAMS
  • src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.cpp

    r5ffa05 rbd81f9  
    4747
    4848  // set the new default
    49   RandomNumberDistributionFactory::getInstance().setCurrentType(params.distribution_type);
     49  RandomNumberDistributionFactory::getInstance().setCurrentType(params.distribution_type.get());
    5050  LOG(0, "STATUS: Distribution of random number generator is now: "
    5151      << RandomNumberDistributionFactory::getInstance().getCurrentTypeName());
     
    5555      RandomNumberDistributionFactory::getInstance().getPrototype().getParameterSet();
    5656  // set each parameter (that is not -1);
    57   if (!params.parameters.isDefault()) {
     57  {
     58    std::stringstream input(params.parameters.get());
    5859    RandomNumberDistribution_Parameters *currentparameters =
    5960        RandomNumberDistributionFactory::getInstance().getPrototype().getParameterSet();
    60     currentparameters->update(params.parameters);
    61     LOG(1, "INFO: Changing prototype's parameters to " << params.parameters << ".");
    62     RandomNumberDistributionFactory::getInstance().manipulatePrototype(*currentparameters);
     61    input >> *currentparameters;  // add new values on top
     62    if (!currentparameters->isDefault()) {
     63      LOG(1, "Changing prototype's parameters.");
     64      RandomNumberDistributionFactory::getInstance().manipulatePrototype(*currentparameters);
     65    }
    6366    delete currentparameters;
    6467  }
     
    7174  }
    7275
     76  std::stringstream output;
     77  output << *oldparameters;
    7378  CommandSetRandomNumbersDistributionState *newstate =
    74       new CommandSetRandomNumbersDistributionState(oldtype,*oldparameters,params);
     79      new CommandSetRandomNumbersDistributionState(oldtype,output.str(),params);
    7580  delete oldparameters;
    7681  return Action::state_ptr(newstate);
     
    9499
    95100  // set each parameter back (that is not -1);
    96   if (!state->old_parameters.isDefault()) {
    97     LOG(1, "INFO: Changing back prototype's parameters to " << state->old_parameters << ".");
    98     RandomNumberDistributionFactory::getInstance().manipulatePrototype(state->old_parameters);
     101  {
     102    std::stringstream input(state->old_parameters);
     103    RandomNumberDistribution_Parameters *currentparameters =
     104        RandomNumberDistributionFactory::getInstance().getPrototype().getParameterSet();
     105    input >> *currentparameters;
     106    if (!currentparameters->isDefault()) {
     107      LOG(1, "Changing prototype's parameters.");
     108      RandomNumberDistributionFactory::getInstance().manipulatePrototype(*currentparameters);
     109    }
     110    delete currentparameters;
    99111  }
    100112
     
    106118  }
    107119
     120  std::stringstream output;
     121  output << *newparameters;
    108122  CommandSetRandomNumbersDistributionState *newstate =
    109       new CommandSetRandomNumbersDistributionState(newtype,*newparameters,params);
     123      new CommandSetRandomNumbersDistributionState(newtype,output.str(),params);
    110124  delete newparameters;
    111125  return Action::state_ptr(newstate);
  • src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
     9#include <string>
     10
     11#include "Parameters/Validators/Specific/RandomNumberValidators.hpp"
     12#include "Parameters/Validators/Specific/KeyValueValidator.hpp"
    1013
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (std::string)(class RandomNumberDistribution_Parameters)
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     17#define paramtypes (std::string)(std::string)
    1518#define paramtokens ("set-random-number-distribution")("random-number-distribution-parameters")
    1619#define paramdescriptions ("name of the distribution from boost::random")("parameter set for requested distribution")
    17 #define paramdefaults (NODEFAULT)("p=-1")
     20#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(std::string("p=-1")))
    1821#define paramreferences (distribution_type)(parameters)
     22#define paramvalids \
     23(RandomNumberDistributionNameValidator()) \
     24(KeyValueValidator())
    1925
    20 #define statetypes (std::string)(RandomNumberDistribution_Parameters)
     26#define statetypes (std::string)(std::string)
    2127#define statereferences (old_distribution_type)(old_parameters)
    2228
  • src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.cpp

    r5ffa05 rbd81f9  
    4747
    4848  // set the new default
    49   RandomNumberEngineFactory::getInstance().setCurrentType(params.engine_type);
     49  RandomNumberEngineFactory::getInstance().setCurrentType(params.engine_type.get());
    5050  LOG(0, "STATUS: Engine of random number generator is now: "
    5151      << RandomNumberEngineFactory::getInstance().getCurrentTypeName());
     
    5656  // set each parameter (that is not -1);
    5757  {
    58     std::stringstream input(params.parameters);
     58    std::stringstream input(params.parameters.get());
    5959    RandomNumberEngine_Parameters *currentparameters =
    6060        RandomNumberEngineFactory::getInstance().getPrototype().getParameterSet();
  • src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/Specific/RandomNumberValidators.hpp"
     11#include "Parameters/Validators/Specific/KeyValueValidator.hpp"
     12
    1013// i.e. there is an integer with variable name Z that can be found in
    1114// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1316#define paramtypes (std::string)(std::string)
    1417#define paramtokens ("set-random-number-engine")("random-number-engine-parameters")
    1518#define paramdescriptions ("name of the pseudo-random engine from boost::random")("seed of the pseudo-random number sequence")
    16 #define paramdefaults (NODEFAULT)("seed=-1")
     19#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(std::string("seed=-1")))
    1720#define paramreferences (engine_type)(parameters)
     21#define paramvalids \
     22(RandomNumberEngineNameValidator()) \
     23(KeyValueValidator())
    1824
    1925#define statetypes (std::string)(std::string)
  • src/Actions/RedoAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramreferences
  • src/Actions/SelectionAction/Atoms/AllAtomsAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp

    r5ffa05 rbd81f9  
    4747  RealSpaceMatrix RotationMatrix;
    4848
    49   RotationMatrix.setRotation(params.Xangle, params.Yangle, params.Zangle);
     49  RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get());
    5050
    51   LOG(1, "Selecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position << " and extension of " << params.extension << ".");
    52   Shape s = translate(transform(stretch(Cuboid(),params.extension),RotationMatrix),params.position);
     51  LOG(1, "Selecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position.get() << " and extension of " << params.extension.get() << ".");
     52  Shape s = translate(transform(stretch(Cuboid(),params.extension.get()),RotationMatrix),params.position.get());
    5353  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s));
    5454  World::getInstance().selectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.def

    r5ffa05 rbd81f9  
    1111class atom;
    1212
     13#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     14#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     15#include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp"
     16
    1317// i.e. there is an integer with variable name Z that can be found in
    1418// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     19// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1620#define paramtypes (Vector)(Vector)(double)(double)(double)
    1721#define paramtokens ("select-atoms-inside-cuboid")("position")("angle-x")("angle-y")("angle-z")
    1822#define paramdescriptions ("dimensions of cuboid")("position in R^3 space")("angle of a rotation around x axis")("angle of a rotation around y axis")("angle of a rotation around z axis")
    19 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.")("0.")("0.")
     23#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))
    2024#define paramreferences (extension)(position)(Xangle)(Yangle)(Zangle)
     25#define paramvalids \
     26(VectorPositiveComponentsValidator()) \
     27(BoxVectorValidator()) \
     28(RotationAngleValidator()) \
     29(RotationAngleValidator()) \
     30(RotationAngleValidator())
    2131
    2232#define statetypes (std::vector<atom*>)(Shape)
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp

    r5ffa05 rbd81f9  
    4444/** =========== define the function ====================== */
    4545Action::state_ptr SelectionAllAtomsInsideSphereAction::performCall() {
    46   LOG(1, "Selecting all atoms inside a sphere at " << params.position << " with radius " << params.radius << ".");
    47   Shape s = translate(resize(Sphere(),params.radius),params.position);
     46  LOG(1, "Selecting all atoms inside a sphere at " << params.position.get() << " with radius " << params.radius.get() << ".");
     47  Shape s = translate(resize(Sphere(),params.radius.get()),params.position.get());
    4848  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s));
    4949  World::getInstance().selectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.def

    r5ffa05 rbd81f9  
    1010class Shape;
    1111
     12#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     13#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     14
    1215// i.e. there is an integer with variable name Z that can be found in
    1316// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1518#define paramtypes (double)(Vector)
    1619#define paramtokens ("select-atoms-inside-sphere")("position")
     
    1821#undef paramdefaults
    1922#define paramreferences (radius)(position)
     23#define paramvalids \
     24(BoxLengthValidator()) \
     25(BoxVectorValidator())
    2026
    2127#define statetypes (std::vector<atom*>)(Shape)
  • src/Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp

    r5ffa05 rbd81f9  
    4141/** =========== define the function ====================== */
    4242Action::state_ptr SelectionAtomByElementAction::performCall() {
    43   LOG(1, "Selecting atoms of type " << *params.elemental);
     43  LOG(1, "Selecting atoms of type " << *params.elemental.get());
    4444  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection());
    45   World::getInstance().selectAllAtoms(AtomByType(params.elemental));
     45  World::getInstance().selectAllAtoms(AtomByType(params.elemental.get()));
    4646  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    4747  return Action::state_ptr(new SelectionAtomByElementState(selectedAtoms,params));
     
    5151  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    5252
    53   World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental));
     53  World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get()));
    5454  BOOST_FOREACH(atom *_atom, state->selectedAtoms)
    5555    World::getInstance().selectAtom(_atom);
     
    6161  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    6262
    63   World::getInstance().selectAllAtoms(AtomByType(state->params.elemental));
     63  World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get()));
    6464
    6565  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Atoms/AtomByElementAction.def

    r5ffa05 rbd81f9  
    99class element;
    1010
     11#include "Parameters/Validators/Specific/ElementValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (const element*)
    1517#define paramtokens ("select-atom-by-element")
     
    1719#undef paramdefaults
    1820#define paramreferences (elemental)
     21#define paramvalids \
     22(ElementValidator())
    1923
    2024#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr SelectionAtomByIdAction::performCall() {
    40   const atom *Walker = World::getInstance().getAtom(AtomById(params.WalkerId));
     40  const atom *Walker = World::getInstance().getAtom(AtomById(params.WalkerId.get()));
    4141  if (Walker != NULL) {
    4242    if (!World::getInstance().isSelected(Walker)) {
     
    5656  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    5757
    58   const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     58  const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    5959  World::getInstance().unselectAtom(Walker);
    6060
     
    6565  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    6666
    67   const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     67  const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    6868  World::getInstance().selectAtom(Walker);
    6969
  • src/Actions/SelectionAction/Atoms/AtomByIdAction.def

    r5ffa05 rbd81f9  
    99class atom;
    1010
     11#include "Parameters/Validators/Specific/AtomIdValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (atomId_t)
    1517#define paramtokens ("select-atom-by-id")
     
    1719#undef paramdefaults
    1820#define paramreferences (WalkerId)
     21#define paramvalids \
     22(AtomIdValidator())
    1923
    2024#undef statetypes
  • src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp

    r5ffa05 rbd81f9  
    3939/** =========== define the function ====================== */
    4040Action::state_ptr SelectionAtomByOrderAction::performCall() {
    41   const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order));
     41  const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order.get()));
    4242  if (Walker != NULL) {
    4343    if (!World::getInstance().isSelected(Walker)) {
  • src/Actions/SelectionAction/Atoms/AtomByOrderAction.def

    r5ffa05 rbd81f9  
    99class atom;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (int)
    1517#define paramtokens ("select-atom-by-order")
     
    1719#undef paramdefaults
    1820#define paramreferences (order)
     21#define paramvalids \
     22(DummyValidator< int >())
    1923
    2024#define statetypes (atomId_t)
  • src/Actions/SelectionAction/Atoms/ClearAllAtomsAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/InvertAtomsAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#undef statetypes
  • src/Actions/SelectionAction/Atoms/NotAllAtomsAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp

    r5ffa05 rbd81f9  
    4646Action::state_ptr SelectionNotAllAtomsInsideCuboidAction::performCall() {
    4747  RealSpaceMatrix RotationMatrix;
    48   RotationMatrix.setRotation(params.Xangle, params.Yangle, params.Zangle);
     48  RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get());
    4949
    50   LOG(1, "Unselecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position << " and extension of " << params.extension << ".");
    51   Shape s = translate(transform(stretch(Cuboid(),params.extension),RotationMatrix),params.position);
     50  LOG(1, "Unselecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position.get() << " and extension of " << params.extension.get() << ".");
     51  Shape s = translate(transform(stretch(Cuboid(),params.extension.get()),RotationMatrix),params.position.get());
    5252  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s));
    5353  World::getInstance().unselectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.def

    r5ffa05 rbd81f9  
    1212class Vector;
    1313
     14#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     15#include "Parameters/Validators/Specific/RotationAngleValidator.hpp"
     16#include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp"
     17
    1418// i.e. there is an integer with variable name Z that can be found in
    1519// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     20// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1721#define paramtypes (Vector)(Vector)(double)(double)(double)
    1822#define paramtokens ("unselect-atoms-inside-cuboid")("position")("angle-x")("angle-y")("angle-z")
    1923#define paramdescriptions ("dimension of cuboid")("position in R^3 space")("angle of a rotation around x axis")("angle of a rotation around y axis")("angle of a rotation around z axis")
    20 #define paramdefaults (NODEFAULT)(NODEFAULT)("0.")("0.")("0.")
     24#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))
    2125#define paramreferences (extension)(position)(Xangle)(Yangle)(Zangle)
     26#define paramvalids \
     27(VectorPositiveComponentsValidator()) \
     28(BoxVectorValidator()) \
     29(RotationAngleValidator()) \
     30(RotationAngleValidator()) \
     31(RotationAngleValidator())
    2232
    2333#define statetypes (std::vector<atom*>)(Shape)
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp

    r5ffa05 rbd81f9  
    4444/** =========== define the function ====================== */
    4545Action::state_ptr SelectionNotAllAtomsInsideSphereAction::performCall() {
    46   LOG(1, "Unselecting all atoms inside a sphere at " << params.position << " with radius " << params.radius << ".");
    47   Shape s = translate(resize(Sphere(),params.radius),params.position);
     46  LOG(1, "Unselecting all atoms inside a sphere at " << params.position.get() << " with radius " << params.radius.get() << ".");
     47  Shape s = translate(resize(Sphere(),params.radius.get()),params.position.get());
    4848  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s));
    4949  World::getInstance().unselectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.def

    r5ffa05 rbd81f9  
    1010class Vector;
    1111
     12#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     13#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
     14
    1215// i.e. there is an integer with variable name Z that can be found in
    1316// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1518#define paramtypes (double)(Vector)
    1619#define paramtokens ("unselect-atoms-inside-sphere")("position")
     
    1821#undef paramdefaults
    1922#define paramreferences (radius)(position)
     23#define paramvalids \
     24(BoxLengthValidator()) \
     25(BoxVectorValidator())
    2026
    2127#define statetypes (std::vector<atom*>)(Shape)
  • src/Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp

    r5ffa05 rbd81f9  
    4141/** =========== define the function ====================== */
    4242Action::state_ptr SelectionNotAtomByElementAction::performCall() {
    43   LOG(1, "Unselecting atoms of type " << *params.elemental);
     43  LOG(1, "Unselecting atoms of type " << *params.elemental.get());
    4444  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection());
    45   World::getInstance().unselectAllAtoms(AtomByType(params.elemental));
     45  World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get()));
    4646  LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected.");
    4747  return Action::state_ptr(new SelectionNotAtomByElementState(unselectedAtoms,params));
     
    5151  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    5252
    53   World::getInstance().selectAllAtoms(AtomByType(state->params.elemental));
     53  World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get()));
    5454  BOOST_FOREACH(atom *_atom, state->unselectedAtoms)
    5555    World::getInstance().unselectAtom(_atom);
     
    6161  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    6262
    63   World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental));
     63  World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get()));
    6464
    6565  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Atoms/NotAtomByElementAction.def

    r5ffa05 rbd81f9  
    99class element;
    1010
     11#include "Parameters/Validators/Specific/ElementValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (const element*)
    1517#define paramtokens ("unselect-atom-by-element")
     
    1719#undef paramdefaults
    1820#define paramreferences (elemental)
     21#define paramvalids \
     22(ElementValidator())
    1923
    2024#define statetypes (std::vector<atom*>)
  • src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr SelectionNotAtomByIdAction::performCall() {
    40   const atom * Walker = World::getInstance().getAtom(AtomById(params.WalkerId));
     40  const atom * Walker = World::getInstance().getAtom(AtomById(params.WalkerId.get()));
    4141  if (Walker != NULL) {
    4242    if (World::getInstance().isSelected(Walker)) {
     
    5656  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    5757
    58   const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     58  const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    5959  World::getInstance().selectAtom(Walker);
    6060
     
    6565  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    6666
    67   const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     67  const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    6868  World::getInstance().unselectAtom(Walker);
    6969
  • src/Actions/SelectionAction/Atoms/NotAtomByIdAction.def

    r5ffa05 rbd81f9  
    99class atom;
    1010
     11#include "Parameters/Validators/Specific/AtomIdValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (atomId_t)
    1517#define paramtokens ("unselect-atom-by-id")
     
    1719#undef paramdefaults
    1820#define paramreferences (WalkerId)
     21#define paramvalids \
     22(AtomIdValidator())
    1923
    2024#undef statetypes
  • src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp

    r5ffa05 rbd81f9  
    3939/** =========== define the function ====================== */
    4040Action::state_ptr SelectionNotAtomByOrderAction::performCall() {
    41   const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order));
     41  const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order.get()));
    4242  if (Walker != NULL) {
    4343    if (World::getInstance().isSelected(Walker)) {
  • src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.def

    r5ffa05 rbd81f9  
    99class atom;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (int)
    1517#define paramtokens ("unselect-atom-by-order")
     
    1719#undef paramdefaults
    1820#define paramreferences (order)
     21#define paramvalids \
     22(DummyValidator< int >())
    1923
    2024#define statetypes (atomId_t)
  • src/Actions/SelectionAction/Molecules/AllMoleculesAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/ClearAllMoleculesAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/InvertMoleculesAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#undef statetypes
  • src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp

    r5ffa05 rbd81f9  
    4040/** =========== define the function ====================== */
    4141Action::state_ptr SelectionMoleculeByFormulaAction::performCall() {
    42   LOG(1, "Selecting molecules with chemical formula " << params.formula << ":");
    43 //  std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula));
     42  LOG(1, "Selecting molecules with chemical formula " << params.formula.get() << ":");
     43//  std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula.get()));
    4444  std::vector<molecule *> selectedMolecules =
    45       World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula));
     45      World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get()));
    4646//  BOOST_FOREACH(molecule *mol, matchingMolecules)
    4747//    LOG(1, "\t" << mol->getId() << ", " << mol->getName() << ".");
    48   World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula));
     48  World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula.get()));
    4949  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
    5050  return Action::state_ptr(new SelectionMoleculeByFormulaState(selectedMolecules,params));
     
    5454  SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get());
    5555
    56   World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula));
     56  World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    5757  BOOST_FOREACH( molecule *mol, state->selectedMolecules)
    5858    World::getInstance().selectMolecule(mol);
     
    6464  SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get());
    6565
    66   World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula));
     66  World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    6767
    6868  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/Specific/FormulaValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (std::string)
    1517#define paramtokens ("select-molecules-by-formula")
     
    1719#undef paramdefaults
    1820#define paramreferences (formula)
     21#define paramvalids \
     22(FormulaValidator())
    1923
    2024#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/MoleculeByIdAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr SelectionMoleculeByIdAction::performCall() {
    40   const molecule *mol = World::getInstance().getMolecule(MoleculeById(params.molindex));
     40  const molecule *mol = World::getInstance().getMolecule(MoleculeById(params.molindex.get()));
    4141  if (mol != NULL) {
    4242    if (!World::getInstance().isSelected(mol)) {
    4343      LOG(1, "Selecting molecule " << mol->name);
    44       World::getInstance().selectAllMolecules(MoleculeById(params.molindex));
     44      World::getInstance().selectAllMolecules(MoleculeById(params.molindex.get()));
    4545      LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
    4646      return Action::state_ptr(new SelectionMoleculeByIdState(params));
     
    5656  SelectionMoleculeByIdState *state = assert_cast<SelectionMoleculeByIdState*>(_state.get());
    5757
    58   World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex));
     58  World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex.get()));
    5959
    6060  return Action::state_ptr(_state);
     
    6464  SelectionMoleculeByIdState *state = assert_cast<SelectionMoleculeByIdState*>(_state.get());
    6565
    66   World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex));
     66  World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex.get()));
    6767
    6868  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/MoleculeByIdAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include "types.hpp"
     10
     11#include "Parameters/Validators/Specific/MoleculeIdValidator.hpp"
    912
    1013// i.e. there is an integer with variable name Z that can be found in
    1114// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    13 #define paramtypes (int)
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (moleculeId_t)
    1417#define paramtokens ("select-molecule-by-id")
    1518#define paramdescriptions ("molecule index")
    1619#undef paramdefaults
    1720#define paramreferences (molindex)
     21#define paramvalids \
     22(MoleculeIdValidator())
    1823
    1924#undef statetypes
  • src/Actions/SelectionAction/Molecules/MoleculeByNameAction.cpp

    r5ffa05 rbd81f9  
    4040/** =========== define the function ====================== */
    4141Action::state_ptr SelectionMoleculeByNameAction::performCall() {
    42   LOG(1, "Selecting all molecules called " << params.molname);
     42  LOG(1, "Selecting all molecules called " << params.molname.get());
    4343  std::vector<molecule *> selectedMolecules =
    44       World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByName(params.molname));
    45   World::getInstance().selectAllMolecules(MoleculeByName(params.molname));
     44      World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByName(params.molname.get()));
     45  World::getInstance().selectAllMolecules(MoleculeByName(params.molname.get()));
    4646  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
    4747
     
    5252  SelectionMoleculeByNameState *state = assert_cast<SelectionMoleculeByNameState*>(_state.get());
    5353
    54   World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname));
     54  World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname.get()));
    5555  BOOST_FOREACH( molecule *mol, state->selectedMolecules)
    5656    World::getInstance().selectMolecule(mol);
     
    6262  SelectionMoleculeByNameState *state = assert_cast<SelectionMoleculeByNameState*>(_state.get());
    6363
    64   World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname));
     64  World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname.get()));
    6565
    6666  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/MoleculeByNameAction.def

    r5ffa05 rbd81f9  
    1111class molecule;
    1212
     13#include "Parameters/Validators/DummyValidator.hpp"
     14
    1315// i.e. there is an integer with variable name Z that can be found in
    1416// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1618#define paramtypes (std::string)
    1719#define paramtokens ("select-molecules-by-name")
     
    1921#undef paramdefaults
    2022#define paramreferences (molname)
     23#define paramvalids \
     24(DummyValidator< std::string >())
    2125
    2226#define statetypes (std::vector<molecule *>)
  • src/Actions/SelectionAction/Molecules/MoleculeByOrderAction.cpp

    r5ffa05 rbd81f9  
    3939
    4040Action::state_ptr SelectionMoleculeByOrderAction::performCall() {
    41   molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex));
     41  molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex.get()));
    4242
    4343  if (mol != NULL) {
  • src/Actions/SelectionAction/Molecules/MoleculeByOrderAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (int)
    1517#define paramtokens ("select-molecule-by-order")
     
    1719#undef paramdefaults
    1820#define paramreferences (molindex)
     21#define paramvalids \
     22(DummyValidator< int >())
    1923
    2024#define statetypes (const molecule *)
  • src/Actions/SelectionAction/Molecules/MoleculeOfAtomAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/NotAllMoleculesAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.cpp

    r5ffa05 rbd81f9  
    4040/** =========== define the function ====================== */
    4141Action::state_ptr SelectionNotMoleculeByFormulaAction::performCall() {
    42   LOG(1, "Unselecting molecules with chemical formula " << params.formula << ":");
    43   std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula));
     42  LOG(1, "Unselecting molecules with chemical formula " << params.formula.get() << ":");
     43  std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula.get()));
    4444  std::vector<molecule *> unselectedMolecules = World::getInstance().getAllMolecules(!MoleculesBySelection());
    45   World::getInstance().unselectAllMolecules(MoleculeByFormula(params.formula));
     45  World::getInstance().unselectAllMolecules(MoleculeByFormula(params.formula.get()));
    4646  LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected.");
    4747  return Action::state_ptr(new SelectionNotMoleculeByFormulaState(unselectedMolecules,params));
     
    5151  SelectionNotMoleculeByFormulaState *state = assert_cast<SelectionNotMoleculeByFormulaState*>(_state.get());
    5252
    53   World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula));
     53  World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    5454  BOOST_FOREACH( molecule *mol, state->unselectedMolecules)
    5555    World::getInstance().unselectMolecule(mol);
     
    6161  SelectionNotMoleculeByFormulaState *state = assert_cast<SelectionNotMoleculeByFormulaState*>(_state.get());
    6262
    63   World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula));
     63  World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    6464
    6565  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/Specific/FormulaValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (std::string)
    1517#define paramtokens ("unselect-molecules-by-formula")
     
    1719#undef paramdefaults
    1820#define paramreferences (formula)
     21#define paramvalids \
     22(FormulaValidator())
    1923
    2024#define statetypes (std::vector<molecule*>)
  • src/Actions/SelectionAction/Molecules/NotMoleculeByIdAction.cpp

    r5ffa05 rbd81f9  
    3838/** =========== define the function ====================== */
    3939Action::state_ptr SelectionNotMoleculeByIdAction::performCall() {
    40   const molecule *mol = World::getInstance().getMolecule(MoleculeById(params.molindex));
     40  const molecule *mol = World::getInstance().getMolecule(MoleculeById(params.molindex.get()));
    4141  if (mol != NULL) {
    4242    if (World::getInstance().isSelected(mol)) {
    4343      LOG(1, "Unselecting molecule " << mol->name);
    44       World::getInstance().unselectAllMolecules(MoleculeById(params.molindex));
     44      World::getInstance().unselectAllMolecules(MoleculeById(params.molindex.get()));
    4545      LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected.");
    4646      return Action::state_ptr(new SelectionNotMoleculeByIdState(params));
     
    5656  SelectionNotMoleculeByIdState *state = assert_cast<SelectionNotMoleculeByIdState*>(_state.get());
    5757
    58   World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex));
     58  World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex.get()));
    5959
    6060  return Action::state_ptr(_state);
     
    6464  SelectionNotMoleculeByIdState *state = assert_cast<SelectionNotMoleculeByIdState*>(_state.get());
    6565
    66   World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex));
     66  World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex.get()));
    6767
    6868  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/NotMoleculeByIdAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 class molecule;
     9#include "types.hpp"
     10
     11#include "Parameters/Validators/Specific/MoleculeIdValidator.hpp"
    1012
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (int)
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (moleculeId_t)
    1517#define paramtokens ("unselect-molecule-by-id")
    1618#define paramdescriptions ("molecule index")
    1719#undef paramdefaults
    1820#define paramreferences (molindex)
     21#define paramvalids \
     22(MoleculeIdValidator())
    1923
    2024#undef statetypes
  • src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.cpp

    r5ffa05 rbd81f9  
    4040/** =========== define the function ====================== */
    4141Action::state_ptr SelectionNotMoleculeByNameAction::performCall() {
    42   LOG(1, "Unselecting all molecule called " << params.molname);
     42  LOG(1, "Unselecting all molecule called " << params.molname.get());
    4343  std::vector<molecule *> unselectedMolecules =
    44       World::getInstance().getAllMolecules((!MoleculesBySelection()) && MoleculeByName(params.molname));
    45   World::getInstance().unselectAllMolecules(MoleculeByName(params.molname));
     44      World::getInstance().getAllMolecules((!MoleculesBySelection()) && MoleculeByName(params.molname.get()));
     45  World::getInstance().unselectAllMolecules(MoleculeByName(params.molname.get()));
    4646  LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected.");
    4747
     
    5252  SelectionNotMoleculeByNameState *state = assert_cast<SelectionNotMoleculeByNameState*>(_state.get());
    5353
    54   World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname));
     54  World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname.get()));
    5555  BOOST_FOREACH( molecule *mol, state->unselectedMolecules)
    5656    World::getInstance().unselectMolecule(mol);
     
    6262  SelectionNotMoleculeByNameState *state = assert_cast<SelectionNotMoleculeByNameState*>(_state.get());
    6363
    64   World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname));
     64  World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname.get()));
    6565
    6666  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (std::string)
    1517#define paramtokens ("unselect-molecules-by-name")
     
    1719#undef paramdefaults
    1820#define paramreferences (molname)
     21#define paramvalids \
     22(DummyValidator< std::string >())
    1923
    2024#define statetypes (std::vector<molecule *>)
  • src/Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.cpp

    r5ffa05 rbd81f9  
    3939
    4040Action::state_ptr SelectionNotMoleculeByOrderAction::performCall() {
    41   molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex));
     41  molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex.get()));
    4242
    4343  if (mol != NULL) {
  • src/Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.def

    r5ffa05 rbd81f9  
    99class molecule;
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (int)
    1517#define paramtokens ("unselect-molecule-by-order")
     
    1719#undef paramdefaults
    1820#define paramreferences (molindex)
     21#define paramvalids \
     22(DummyValidator< int >())
    1923
    2024#define statetypes (const molecule *)
  • src/Actions/SelectionAction/Molecules/NotMoleculeOfAtomAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramtokens
     
    1618#undef paramdefaults
    1719#undef paramreferences
     20#undef paramvalids
    1821
    1922#define statetypes (std::vector<molecule*>)
  • src/Actions/TesselationAction/ConvexEnvelopeAction.cpp

    r5ffa05 rbd81f9  
    5050    const LinkedCell_deprecated *LCList = NULL;
    5151    LOG(0, "Evaluating volume of the convex envelope.");
    52     LOG(1, "Storing tecplot convex data in " << params.filenameConvex << ".");
    53     LOG(1, "Storing tecplot non-convex data in " << params.filenameNonConvex << ".");
     52    LOG(1, "Storing tecplot convex data in " << params.filenameConvex.get() << ".");
     53    LOG(1, "Storing tecplot non-convex data in " << params.filenameNonConvex.get() << ".");
    5454    PointCloudAdaptor<molecule> cloud(mol, mol->name);
    5555    LCList = new LinkedCell_deprecated(cloud, 100.);
     
    5757    //FindConvexBorder(mol, BoundaryPoints, TesselStruct, LCList, argv[argptr]);
    5858    // TODO: Beide Funktionen sollten streams anstelle des Filenamen benutzen, besser fuer unit tests
    59     FindNonConvexBorder(mol, TesselStruct, LCList, 50., params.filenameNonConvex.string().c_str());
     59    FindNonConvexBorder(mol, TesselStruct, LCList, 50., params.filenameNonConvex.get().string().c_str());
    6060    //RemoveAllBoundaryPoints(TesselStruct, mol, argv[argptr]);
    61     const double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, params.filenameConvex.string().c_str());
     61    const double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, params.filenameConvex.get().string().c_str());
    6262    const double clustervolume = TesselStruct->getVolumeOfConvexEnvelope(configuration->GetIsAngstroem());
    6363    LOG(0, "The tesselated volume area is " << clustervolume << " " << (configuration->GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3.");
  • src/Actions/TesselationAction/ConvexEnvelopeAction.def

    r5ffa05 rbd81f9  
    99class TesselationListClass;
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13
    1114// i.e. there is an integer with variable name Z that can be found in
    1215// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1417#define paramtypes (boost::filesystem::path)(boost::filesystem::path)
    1518#define paramtokens ("convex-file")("nonconvex-file")
     
    1720#undef paramdefaults
    1821#define paramreferences (filenameConvex)(filenameNonConvex)
     22#define paramvalids \
     23(!FilePresentValidator()) \
     24(!FilePresentValidator())
    1925
    2026#undef statetypes
  • src/Actions/TesselationAction/NonConvexEnvelopeAction.cpp

    r5ffa05 rbd81f9  
    4949    const LinkedCell_deprecated *LCList = NULL;
    5050    LOG(0, "Evaluating non-convex envelope of molecule." << Boundary->getId());
    51     LOG(1, "Using rolling ball of radius " << params.SphereRadius << " and storing tecplot data in " << params.filename << ".");
     51    LOG(1, "Using rolling ball of radius " << params.SphereRadius.get() << " and storing tecplot data in " << params.filename.get() << ".");
    5252    LOG(1, "Specified molecule has " << Boundary->getAtomCount() << " atoms.");
    5353    start = clock();
    5454    PointCloudAdaptor< molecule > cloud(Boundary, Boundary->name);
    55     LCList = new LinkedCell_deprecated(cloud, params.SphereRadius*2.);
    56     Success = FindNonConvexBorder(Boundary, T, LCList, params.SphereRadius, params.filename.string().c_str());
    57     //FindDistributionOfEllipsoids(T, &LCList, N, number, params.filename.c_str());
     55    LCList = new LinkedCell_deprecated(cloud, params.SphereRadius.get()*2.);
     56    Success = FindNonConvexBorder(Boundary, T, LCList, params.SphereRadius.get(), params.filename.get().string().c_str());
     57    //FindDistributionOfEllipsoids(T, &LCList, N, number, params.filename.get().c_str());
    5858    end = clock();
    5959    LOG(0, "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s.");
  • src/Actions/TesselationAction/NonConvexEnvelopeAction.def

    r5ffa05 rbd81f9  
    99class TesselationListClass;
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
     13#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1418#define paramtypes (double)(boost::filesystem::path)
    1519#define paramtokens ("nonconvex-envelope")("nonconvex-file")
     
    1721#undef paramdefaults
    1822#define paramreferences (SphereRadius)(filename)
     23#define paramvalids \
     24(BoxLengthValidator()) \
     25(!FilePresentValidator())
    1926
    2027#undef statetypes
  • src/Actions/UndoAction.def

    r5ffa05 rbd81f9  
    88// all includes and forward declarations necessary for non-integral types below
    99
     10#include "Parameters/Validators/DummyValidator.hpp"
     11
    1012// i.e. there is an integer with variable name Z that can be found in
    1113// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    12 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1315#undef paramtypes
    1416#undef paramreferences
  • src/Actions/UndoRedoHelpers.cpp

    r5ffa05 rbd81f9  
    2626
    2727#include "Atom/atom.hpp"
     28#include "molecule.hpp"
    2829#include "Descriptors/AtomIdDescriptor.hpp"
     30#include "Descriptors/MoleculeIdDescriptor.hpp"
    2931#include "CodePatterns/Assert.hpp"
    3032#include "CodePatterns/Log.hpp"
     
    123125  }
    124126}
     127
     128void MoleCuilder::RemoveMoleculesWithAtomsByIds(const std::vector<moleculeId_t> &ids)
     129{
     130  for (std::vector<moleculeId_t>::const_iterator iter = ids.begin();
     131      iter != ids.end(); ++iter) {
     132    molecule * const mol = World::getInstance().getMolecule(MoleculeById(*iter));
     133    if (mol != NULL) {
     134      mol->removeAtomsinMolecule();
     135      World::getInstance().destroyMolecule(mol);
     136    }
     137  }
     138}
  • src/Actions/UndoRedoHelpers.hpp

    r5ffa05 rbd81f9  
    7070   */
    7171  void ResetAtomPosition(const std::vector<AtomicInfo> &movedatoms, const std::vector<Vector> &MovedToVector);
     72
     73  /** Remove all molecules identified by their ids given in \a ids.
     74   *
     75   * @param ids vector of molecular ids to remove
     76   */
     77  void RemoveMoleculesWithAtomsByIds(const std::vector<moleculeId_t> &ids);
    7278}
    7379
  • src/Actions/Values.cpp

    r5ffa05 rbd81f9  
    4747}
    4848
    49 Box BoxValue::toBox() const
     49RealSpaceMatrix RealSpaceMatrixValue::toRealSpaceMatrix() const
    5050{
    51   Box returnBox(ReturnFullMatrixforSymmetric(matrix));
     51  RealSpaceMatrix returnMatrix(ReturnFullMatrixforSymmetric(matrix));
    5252
    53   return returnBox;
     53  return returnMatrix;
    5454}
  • src/Actions/Values.hpp

    r5ffa05 rbd81f9  
    1818class Box;
    1919class BoxVector;
     20class RealSpaceMatrix;
    2021class Vector;
    2122
     
    3738 * as BoxValue and lateron inside the CommandLineQuery placed into the real Box.
    3839 */
    39 struct BoxValue
     40struct RealSpaceMatrixValue
    4041{
    4142  double matrix[(NDIM*(NDIM+1))/2];
    4243
    43   Box toBox() const;
     44  RealSpaceMatrix toRealSpaceMatrix() const;
    4445};
    4546
  • src/Actions/WorldAction/AddEmptyBoundaryAction.cpp

    r5ffa05 rbd81f9  
    7777    for (int i=0;i<NDIM;i++) {
    7878      j += i+1;
    79       cell_size[j] = (Max[i]-Min[i]+2.*params.boundary[i]);
     79      cell_size[j] = (Max[i]-Min[i]+2.*params.boundary.get()[i]);
    8080    }
    8181    World::getInstance().setDomain(cell_size);
     
    8686        AtomRunner != AllAtoms.end();
    8787        ++AtomRunner)
    88       *(*AtomRunner) -= Min - params.boundary;
     88      *(*AtomRunner) -= Min - params.boundary.get();
    8989
    9090    // give final box size
     
    125125      AtomRunner != AllAtoms.end();
    126126      ++AtomRunner)
    127     *(*AtomRunner) += state->Min - state->params.boundary;
     127    *(*AtomRunner) += state->Min - state->params.boundary.get();
    128128
    129129  return Action::state_ptr(_state);
     
    143143      AtomRunner != AllAtoms.end();
    144144      ++AtomRunner)
    145     *(*AtomRunner) -= state->Min - state->params.boundary;
     145    *(*AtomRunner) -= state->Min - state->params.boundary.get();
    146146
    147147  return Action::state_ptr(_state);
  • src/Actions/WorldAction/AddEmptyBoundaryAction.def

    r5ffa05 rbd81f9  
    1111#include "LinearAlgebra/Vector.hpp"
    1212
     13#include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp"
     14
    1315// i.e. there is an integer with variable name Z that can be found in
    1416// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1618#define paramtypes (Vector)
    1719#define paramtokens ("add-empty-boundary")
     
    1921#undef paramdefaults
    2022#define paramreferences (boundary)
     23#define paramvalids \
     24(VectorPositiveComponentsValidator())
    2125
    2226#define statetypes (std::string)(RealSpaceMatrix)(Vector)
  • src/Actions/WorldAction/BoundInBoxAction.def

    r5ffa05 rbd81f9  
    1111
    1212
     13#include "Parameters/Validators/DummyValidator.hpp"
     14
    1315// i.e. there is an integer with variable name Z that can be found in
    1416// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    15 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1618#undef paramtypes
    1719#undef paramtokens
     
    1921#undef paramdefaults
    2022#undef paramreferences
     23#undef paramvalids
    2124
    2225#define statetypes (std::vector< boost::shared_ptr<Vector> >)
  • src/Actions/WorldAction/CenterInBoxAction.cpp

    r5ffa05 rbd81f9  
    6969
    7070  // set new domain
    71   World::getInstance().setDomain(params.cell_size.getM());
     71  World::getInstance().setDomain(params.cell_size.get());
    7272
    7373  // center atoms
     
    125125
    126126  // set new domain
    127   World::getInstance().setDomain(state->params.cell_size.getM());
     127  World::getInstance().setDomain(state->params.cell_size.get());
    128128
    129129  // center atoms
  • src/Actions/WorldAction/CenterInBoxAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "Actions/Values.hpp"
    10 #include "Box.hpp"
    11 #include "LinearAlgebra/Vector.hpp"
    12 #include <boost/shared_ptr.hpp>
     9#include "LinearAlgebra/RealSpaceMatrix.hpp"
     10
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.hpp"
     13#include "Parameters/Validators/Specific/RealSpaceMatrixInvertibleValidator.hpp"
    1314
    1415// i.e. there is an integer with variable name Z that can be found in
    1516// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    17 #define paramtypes (Box)
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     18#define paramtypes (RealSpaceMatrix)
    1819#define paramtokens ("center-in-box")
    1920#define paramdescriptions ("symmetric matrix of new domain")
    2021#undef paramdefaults
    2122#define paramreferences (cell_size)
     23#define paramvalids \
     24(RealSpaceMatrixSymmetricValidator() && RealSpaceMatrixInvertibleValidator())
    2225
    2326#define statetypes (std::string)(std::vector< boost::shared_ptr<Vector> >)
  • src/Actions/WorldAction/CenterOnEdgeAction.def

    r5ffa05 rbd81f9  
    99#include "LinearAlgebra/Vector.hpp"
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#undef paramtypes
    1517#undef paramtokens
     
    1719#undef paramdefaults
    1820#undef paramreferences
     21#undef paramvalids
    1922
    2023#define statetypes (std::string)(Vector)(Vector)
  • src/Actions/WorldAction/ChangeBoxAction.cpp

    r5ffa05 rbd81f9  
    5050  oa << matrix;
    5151
    52   World::getInstance().setDomain(params.cell_size.getM()); // this is needed as only this function is OBSERVEd.
     52  World::getInstance().setDomain(params.cell_size.get()); // this is needed as only this function is OBSERVEd.
    5353
    5454  // give final box size
     
    8282
    8383Action::state_ptr WorldChangeBoxAction::performRedo(Action::state_ptr _state){
    84   World::getInstance().setDomain(params.cell_size.getM()); // this is needed as only this function is OBSERVEd.
     84  World::getInstance().setDomain(params.cell_size.get()); // this is needed as only this function is OBSERVEd.
    8585
    8686  // give final box size
  • src/Actions/WorldAction/ChangeBoxAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "Actions/Values.hpp"
    10 #include "Box.hpp"
     9#include "LinearAlgebra/RealSpaceMatrix.hpp"
     10
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.hpp"
     13#include "Parameters/Validators/Specific/RealSpaceMatrixInvertibleValidator.hpp"
    1114
    1215// i.e. there is an integer with variable name Z that can be found in
    1316// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    15 #define paramtypes (Box)
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     18#define paramtypes (RealSpaceMatrix)
    1619#define paramtokens ("change-box")
    1720#define paramdescriptions ("symmetrc matrix of the new simulation domain")
    1821#undef paramdefaults
    1922#define paramreferences (cell_size)
     23#define paramvalids \
     24(RealSpaceMatrixSymmetricValidator() && RealSpaceMatrixInvertibleValidator())
    2025
    2126#define statetypes (std::string)
  • src/Actions/WorldAction/InputAction.cpp

    r5ffa05 rbd81f9  
    4646  FormatParserStorage &parsers = FormatParserStorage::getInstance();
    4747
    48   LOG(0, "Config file given " << params.filename << ".");
     48  LOG(0, "Config file given " << params.filename.get() << ".");
    4949  // using the filename as prefix for all parsers
    5050  std::string FilenameSuffix;
    5151  std::string FilenamePrefix;
    52   if (params.filename.has_filename()) {
     52  if (params.filename.get().has_filename()) {
    5353    // get suffix
    5454#if BOOST_VERSION >= 104600
    55     FilenameSuffix = params.filename.extension().string().substr(1); // remove the prefixed "."
    56     FilenamePrefix = params.filename.stem().string();
     55    FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "."
     56    FilenamePrefix = params.filename.get().stem().string();
    5757#else
    58     FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "."
    59     FilenamePrefix = params.filename.stem();
     58    FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "."
     59    FilenamePrefix = params.filename.get().stem();
    6060#endif
    6161    LOG(1, "Setting config file name prefix to " << FilenamePrefix << ".");
     
    6767
    6868  // parsing file if present
    69   if (!boost::filesystem::exists(params.filename)) {
    70     LOG(1, "Specified config file " << params.filename << " not found.");
     69  if (!boost::filesystem::exists(params.filename.get())) {
     70    LOG(1, "Specified config file " << params.filename.get() << " not found.");
    7171    // DONT FAIL: it's just empty and we use the name. // return Action::failure;
    7272    // nonetheless, add to output formats
     
    7676
    7777    // parse the file
    78     test.open(params.filename);
     78    test.open(params.filename.get());
    7979    parsers.load(test, FilenameSuffix);
    8080    parsers.setOutputFormat( parsers.getTypeFromSuffix(FilenameSuffix) );
  • src/Actions/WorldAction/InputAction.def

    r5ffa05 rbd81f9  
    99#include <boost/filesystem.hpp>
    1010
     11#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (boost::filesystem::path)
    1517#define paramtokens ("input")
     
    1719#undef paramdefaults
    1820#define paramreferences (filename)
     21#define paramvalids \
     22(ParserFileValidator())
    1923
    2024#undef statetypes
  • src/Actions/WorldAction/OutputAction.cpp

    r5ffa05 rbd81f9  
    3939/** =========== define the function ====================== */
    4040Action::state_ptr WorldOutputAction::performCall() {
    41   LOG(1, "Storing world to file " << params.filename << ".");
     41  LOG(1, "Storing world to file " << params.filename.get() << ".");
    4242
    4343  // extract suffix
    4444  std::string FilenameSuffix;
    4545  std::string FilenamePrefix;
    46   if (params.filename.has_filename()) {
     46  if (params.filename.get().has_filename()) {
    4747    // get suffix
    4848#if BOOST_VERSION >= 104600
    49     FilenameSuffix = params.filename.extension().string().substr(1); // remove the prefixed "."
    50     FilenamePrefix = params.filename.stem().string();
     49    FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "."
     50    FilenamePrefix = params.filename.get().stem().string();
    5151#else
    52     FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "."
    53     FilenamePrefix = params.filename.stem();
     52    FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "."
     53    FilenamePrefix = params.filename.get().stem();
    5454#endif
    5555  } else {
     
    6161  // parse the file
    6262  boost::filesystem::ofstream output;
    63   output.open(params.filename);
     63  output.open(params.filename.get());
    6464  if (!output.fail()) {
    6565    FormatParserStorage::getInstance().saveWorld(output, FilenameSuffix);
    6666  } else {
    67     ELOG(1, "Could not open file " << params.filename << ".");
     67    ELOG(1, "Could not open file " << params.filename.get() << ".");
    6868  }
    6969  output.close();
  • src/Actions/WorldAction/OutputAction.def

    r5ffa05 rbd81f9  
    99#
    1010
     11#include "Parameters/Validators/Ops_Validator.hpp"
     12#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
     13#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     14
    1115// i.e. there is an integer with variable name Z that can be found in
    1216// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1418#define paramtypes (boost::filesystem::path)
    1519#define paramtokens ("output")
     
    1721#undef paramdefaults
    1822#define paramreferences (filename)
     23#define paramvalids \
     24(!FilePresentValidator() && ParserFileValidator())
    1925
    2026#undef statetypes
  • src/Actions/WorldAction/RepeatBoxAction.cpp

    r5ffa05 rbd81f9  
    4545/** =========== define the function ====================== */
    4646
    47 void repeatMoleculesinDomain(Vector Repeater, const std::vector<molecule *> &AllMolecules)
     47void repeatMoleculesinDomain(
     48    std::vector< unsigned int > Repeater,
     49    const std::vector<molecule *> &AllMolecules)
    4850{
    4951  LOG(0, "STATUS: Repeating box " << Repeater << " times for (x,y,z) axis.");
     
    5355  RealSpaceMatrix newM = M;
    5456  Vector x,y;
    55   int n[NDIM];
     57  unsigned int n[NDIM];
    5658  RealSpaceMatrix repMat;
    57   for (int axis = 0; axis < NDIM; axis++) {
     59  for (unsigned int axis = 0; axis < NDIM; axis++) {
    5860    Repeater[axis] = floor(Repeater[axis]);
    5961    if (Repeater[axis] < 1) {
     
    109111  WorldRepeatBoxState *undostate = new WorldRepeatBoxState(olddomain, oldmolecules, params);
    110112
    111   repeatMoleculesinDomain(params.Repeater, AllMolecules);
     113  repeatMoleculesinDomain(params.Repeater.get(), AllMolecules);
    112114
    113115  // give final box size
     
    151153      ++iter)
    152154    originalmolecules.push_back(*iter);
    153   repeatMoleculesinDomain(state->params.Repeater, originalmolecules);
     155  repeatMoleculesinDomain(state->params.Repeater.get(), originalmolecules);
    154156
    155157  // give final box size
  • src/Actions/WorldAction/RepeatBoxAction.def

    r5ffa05 rbd81f9  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "Actions/Values.hpp"
    109#include "LinearAlgebra/RealSpaceMatrix.hpp"
    11 #include "LinearAlgebra/Vector.hpp"
    1210#include <set>
     11#include <vector>
    1312
    1413class molecule;
    1514
     15#include "LinearAlgebra/defs.hpp"
     16#include "Parameters/Validators/DummyValidator.hpp"
     17#include "Parameters/Validators/STLVectorValidator.hpp"
     18
    1619// i.e. there is an integer with variable name Z that can be found in
    1720// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    18 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    19 #define paramtypes (Vector)
     21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     22#define paramtypes (std::vector< unsigned int >)
    2023#define paramtokens ("repeat-box")
    2124#define paramdescriptions ("number of copies to create per axis")
    2225#undef paramdefaults
    2326#define paramreferences (Repeater)
     27#define paramvalids \
     28(STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM))
    2429
    2530#define statetypes (RealSpaceMatrix)(std::set< molecule *>)
  • src/Actions/WorldAction/ScaleBoxAction.cpp

    r5ffa05 rbd81f9  
    4444  // scale atoms
    4545  for (int i=0;i<NDIM;i++)
    46     x[i] = params.Scaler[i];
     46    x[i] = params.Scaler.get()[i];
    4747  std::vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
    4848  for(std::vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
     
    5454  RealSpaceMatrix scale;
    5555  for (int i=0;i<NDIM;i++) {
    56     scale.at(i,i) = params.Scaler[i];
     56    scale.at(i,i) = params.Scaler.get()[i];
    5757  }
    5858  M *= scale;
     
    7474  double x[NDIM];
    7575  for (int i=0;i<NDIM;i++)
    76     x[i] = 1./state->params.Scaler[i];
     76    x[i] = 1./state->params.Scaler.get()[i];
    7777  vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
    7878  for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
     
    8484  RealSpaceMatrix scale;
    8585  for (int i=0;i<NDIM;i++) {
    86     scale.at(i,i) = 1./state->params.Scaler[i];
     86    scale.at(i,i) = 1./state->params.Scaler.get()[i];
    8787  }
    8888  M *= scale;
     
    101101  double x[NDIM];
    102102  for (int i=0;i<NDIM;i++)
    103     x[i] = state->params.Scaler[i];
     103    x[i] = state->params.Scaler.get()[i];
    104104  vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
    105105  for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
     
    111111  RealSpaceMatrix scale;
    112112  for (int i=0;i<NDIM;i++) {
    113     scale.at(i,i) = state->params.Scaler[i];
     113    scale.at(i,i) = state->params.Scaler.get()[i];
    114114  }
    115115  M *= scale;
  • src/Actions/WorldAction/ScaleBoxAction.def

    r5ffa05 rbd81f9  
    1010#include "LinearAlgebra/Vector.hpp"
    1111
     12#include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp"
     13
    1214// i.e. there is an integer with variable name Z that can be found in
    1315// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     16// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1517#define paramtypes (Vector)
    1618#define paramtokens ("scale-box")
     
    1820#undef paramdefaults
    1921#define paramreferences (Scaler)
     22#define paramvalids \
     23(VectorPositiveComponentsValidator())
    2024
    2125#undef statetypes
  • src/Actions/WorldAction/SetBoundaryConditionsAction.cpp

    r5ffa05 rbd81f9  
    5252
    5353  // set conditions
    54   World::getInstance().getDomain().setConditions(params.newconditions);
     54  World::getInstance().getDomain().setConditions(params.newconditions.get());
    5555
    5656  LOG(0, "STATUS: Boundary conditions are now " << World::getInstance().getDomain().getConditionNames() << ".");
     
    7272
    7373  // set again conditions
    74   World::getInstance().getDomain().setConditions(state->params.newconditions);
     74  World::getInstance().getDomain().setConditions(state->params.newconditions.get());
    7575
    7676  LOG(0, "STATUS: Boundary conditions are again " << World::getInstance().getDomain().getConditionNames() << ".");
  • src/Actions/WorldAction/SetBoundaryConditionsAction.def

    r5ffa05 rbd81f9  
    1010#include <string>
    1111
     12#include "Parameters/Validators/STLVectorValidator.hpp"
     13#include "Parameters/Validators/Specific/BoundaryConditionValidator.hpp"
     14
    1215// i.e. there is an integer with variable name Z that can be found in
    1316// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    15 #define paramtypes (std::string)
     17// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     18#define paramtypes (std::vector< std::string >)
    1619#define paramtokens ("set-boundary-conditions")
    1720#define paramdescriptions ("new boundary conditions as list of three strings, e.g. 'wrap wrap ignore'")
    1821#undef paramdefaults
    1922#define paramreferences (newconditions)
     23#define paramvalids \
     24(STLVectorValidator< std::vector< std::string > >(NDIM, NDIM, BoundaryConditionValidator()))
    2025
    2126#define statetypes (std::string)
  • src/Actions/WorldAction/SetDefaultNameAction.cpp

    r5ffa05 rbd81f9  
    4040  WorldSetDefaultNameState *UndoState = new WorldSetDefaultNameState(Worldsdefaultname, params);
    4141
    42   World::getInstance().setDefaultName(params.newname);
     42  World::getInstance().setDefaultName(params.newname.get());
    4343  LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << ".");
    4444  return Action::state_ptr(UndoState);
     
    5757  WorldSetDefaultNameState *state = assert_cast<WorldSetDefaultNameState*>(_state.get());
    5858
    59   World::getInstance().setDefaultName(state->params.newname);
     59  World::getInstance().setDefaultName(state->params.newname.get());
    6060  LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << ".");
    6161
  • src/Actions/WorldAction/SetDefaultNameAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1416#define paramtypes (std::string)
    1517#define paramtokens ("default-molname")
     
    1719#undef paramdefaults
    1820#define paramreferences (newname)
     21#define paramvalids \
     22(DummyValidator< std::string >())
    1923
    2024#define statetypes (std::string)
  • src/Actions/WorldAction/SetWorldTimeAction.cpp

    r5ffa05 rbd81f9  
    4141  WorldSetWorldTimeState *UndoState = new WorldSetWorldTimeState(oldtime, params);
    4242
    43   WorldTime::getInstance().setTime(params.newtime);
     43  WorldTime::getInstance().setTime(params.newtime.get());
    4444  LOG(0, "Current time step is now: " << WorldTime::getTime() << ".");
    4545  return Action::state_ptr(UndoState);
     
    5858  WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get());
    5959
    60   WorldTime::getInstance().setTime(state->params.newtime);
     60  WorldTime::getInstance().setTime(state->params.newtime.get());
    6161  LOG(0, "Current time step is now: " << WorldTime::getTime() << ".");
    6262
  • src/Actions/WorldAction/SetWorldTimeAction.def

    r5ffa05 rbd81f9  
    99
    1010
     11#include "Parameters/Validators/DummyValidator.hpp"
     12
    1113// i.e. there is an integer with variable name Z that can be found in
    1214// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    14 #define paramtypes (int)
     15// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
     16#define paramtypes (unsigned int)
    1517#define paramtokens ("set-world-time")
    1618#define paramdescriptions ("new time step")
    17 #define paramdefaults ("0")
     19#define paramdefaults (PARAM_DEFAULT(0))
    1820#define paramreferences (newtime)
     21#define paramvalids \
     22(DummyValidator< unsigned int >())
    1923
    20 #define statetypes (int)
     24#define statetypes (unsigned int)
    2125#define statereferences (oldtime)
    2226
  • src/Actions/unittests/Makefile.am

    r5ffa05 rbd81f9  
    3131ActionRegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    3232        ../Actions/unittests/ActionRegistryUnitTest.cpp \
    33         ../Actions/unittests/ActionRegistryUnitTest.hpp
     33        ../Actions/unittests/ActionRegistryUnitTest.hpp \
     34        ../Parameters/unittests/stubs/ActionNameValidatorStub.cpp \
     35        ../Parameters/unittests/stubs/BoxLengthValidatorStub.cpp \
     36        ../Parameters/unittests/stubs/BoxVectorValidatorStub.cpp \
     37        ../Parameters/unittests/stubs/TimeStepPresentValidatorStub.cpp
    3438ActionRegistryUnitTest_LDADD = ${ACTIONLIBS}
    3539
     
    3741        ../Actions/unittests/ActionSequenceUnitTest.cpp \
    3842        ../Actions/unittests/ActionSequenceUnitTest.hpp \
    39         ../Actions/unittests/stubs/DummyUI.hpp
     43        ../Actions/unittests/stubs/DummyUI.hpp \
     44        ../Parameters/unittests/stubs/ActionNameValidatorStub.cpp \
     45        ../Parameters/unittests/stubs/BoxLengthValidatorStub.cpp \
     46        ../Parameters/unittests/stubs/BoxVectorValidatorStub.cpp \
     47        ../Parameters/unittests/stubs/TimeStepPresentValidatorStub.cpp
    4048ActionSequenceUnitTest_LDADD = \
    4149        ${ACTIONLIBS} \
  • src/Actions/unittests/stubs/DummyUI.hpp

    r5ffa05 rbd81f9  
    1414#endif
    1515
     16#include "Parameters/Parameter.hpp"
    1617#include "UIElements/UIFactory.hpp"
    1718#include "UIElements/Dialog.hpp"
     
    2425
    2526  virtual void queryEmpty(const char *, std::string = ""){}
    26   virtual void queryBoolean(const char *, std::string = ""){}
    27   virtual void queryInt(const char *, std::string = ""){}
    28   virtual void queryInts(const char *, std::string = ""){}
    29   virtual void queryUnsignedInt(const char *, std::string = ""){}
    30   virtual void queryUnsignedInts(const char *, std::string = ""){}
    31   virtual void queryString(const char*, std::string = ""){}
    32   virtual void queryStrings(const char*, std::string = ""){}
    33   virtual void queryDouble(const char*, std::string = ""){}
    34   virtual void queryDoubles(const char*, std::string = ""){}
    35   virtual void queryAtom(const char*,std::string = ""){}
    36   virtual void queryAtoms(const char*,std::string = ""){}
    37   virtual void queryMolecule(const char*,std::string = ""){}
    38   virtual void queryMolecules(const char*,std::string = ""){}
    39   virtual void queryVector(const char*,bool, std::string = ""){}
    40   virtual void queryVectors(const char*,bool, std::string = ""){}
    41   virtual void queryBox(const char*, std::string = ""){}
    42   virtual void queryElement(const char*, std::string = ""){}
    43   virtual void queryElements(const char*, std::string = ""){}
    44   virtual void queryFile(const char*, std::string = ""){}
    45   virtual void queryFiles(const char*, std::string = ""){}
    46   virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = ""){}
     27  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = ""){}
     28  virtual void queryInt(Parameter<int> &, const char *, std::string = ""){}
     29  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = ""){}
     30  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = ""){}
     31  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = ""){}
     32  virtual void queryString(Parameter<std::string> &, const char*, std::string = ""){}
     33  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = ""){}
     34  virtual void queryDouble(Parameter<double> &, const char*, std::string = ""){}
     35  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = ""){}
     36  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = ""){}
     37  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = ""){}
     38  virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = ""){}
     39  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = ""){}
     40  virtual void queryVector(Parameter<Vector> &, const char*,bool, std::string = ""){}
     41  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool, std::string = ""){}
     42  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = ""){}
     43  virtual void queryElement(Parameter<const element *> &, const char*, std::string = ""){}
     44  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = ""){}
     45  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = ""){}
     46  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> >&, const char*, std::string = ""){}
     47  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = ""){}
    4748};
    4849
  • src/Box.cpp

    r5ffa05 rbd81f9  
    365365}
    366366
     367void Box::setConditions(const std::vector< std::string >& _conditions)
     368{
     369  OBSERVE;
     370  NOTIFY(BoundaryConditionsChanged);
     371  conditions.set(_conditions);
     372}
     373
    367374const std::vector<std::pair<Plane,Plane> >  Box::getBoundingPlanes() const
    368375{
  • src/Box.hpp

    r5ffa05 rbd81f9  
    134134  void setConditions(const BoundaryConditions::Conditions_t & _conditions);
    135135  void setConditions(const std::string & _conditions);
     136  void setConditions(const std::vector< std::string >& _conditions);
    136137
    137138  const std::vector<std::pair<Plane,Plane> > getBoundingPlanes() const;
  • src/Box_BoundaryConditions.cpp

    r5ffa05 rbd81f9  
    107107}
    108108
     109void BoundaryConditions::BCContainer::set(const std::vector< std::string > &_conditions)
     110{
     111  BoundaryConditions::Conditions_t newconditions;
     112  for (std::vector< std::string >::const_iterator iter = _conditions.begin();
     113      iter != _conditions.end(); ++iter)
     114    newconditions.push_back(getEnum(*iter));
     115  set(newconditions);
     116}
     117
    109118void BoundaryConditions::BCContainer::set(size_t index, const BoundaryConditions::BoundaryCondition_t _condition)
    110119{
     
    118127}
    119128
     129void BoundaryConditions::BCContainer::set(size_t index, const std::string &_condition)
     130{
     131  set(index, getEnum(_condition));
     132}
     133
    120134/** Converter from enum to string.
    121135 *
     
    156170  for (BoundaryConditions::BCContainer::const_iterator iter = t.begin(); iter != t.end(); ++iter) {
    157171    if (iter != t.begin())
    158       out << ", ";
     172      out << " ";
    159173    out << t.getName(*iter);
    160174  }
     
    179193  typedef boost::tokenizer< boost::char_separator<char> > tokens;
    180194  BoundaryConditions::Conditions_t conditions;
    181   boost::char_separator<char> commasep(",");
     195  boost::char_separator<char> commasep(", ");
    182196  // it is imperative to copy the content of the stringbuffer, otherwise we'll
    183197  // get strange bug where 'Wrap' != 'Wrap' and so on.
  • src/Box_BoundaryConditions.hpp

    r5ffa05 rbd81f9  
    2323
    2424class Box_BoundaryConditionsTest;
     25class BoundaryConditionValidator;
    2526
    2627namespace BoundaryConditions {
     
    4647    //!> grant unit test access to private members
    4748    friend class ::Box_BoundaryConditionsTest;
     49    friend class ::BoundaryConditionValidator;
    4850  public:
    4951
     
    5557    const BoundaryCondition_t get(size_t index) const;
    5658    void set(const Conditions_t &_conditions);
     59    void set(const std::vector< std::string > &_conditions);
    5760    void set(size_t index, const BoundaryCondition_t _condition);
     61    void set(size_t index, const std::string &_conditions);
    5862
    5963    // converter
  • src/Filling/Inserter/SurfaceInserter.cpp

    r5ffa05 rbd81f9  
    3636SurfaceInserter::SurfaceInserter(const Shape & _s, const Vector &_alignedAxis) :
    3737    shape(_s),
    38     alignedAxis(_alignedAxis)
     38    alignedAxis(_alignedAxis.getNormalized())
    3939{}
    4040
  • src/Filling/Mesh/CubeMesh.cpp

    r5ffa05 rbd81f9  
    4141CubeMesh::CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M)
    4242{
    43   RealSpaceMatrix partition;
    44   int n[NDIM];
    45 
    4643#ifndef NDEBUG
    4744  for (size_t i=0;i<NDIM;++i) {
     
    4946        "CubeMesh::CubeMesh() - offset coordinates must be in [0,1) but offset["
    5047        +toString(i)+"] is "+toString(offset[i])+".");
    51     ASSERT(counts[i] != 0.,
    52         "CubeMesh::CubeMesh() - counts["+toString(i)+"] must be != "+toString(counts[i])+".");
     48    ASSERT(counts[i] == (int)counts[i],
     49        "CubeMesh::CubeMesh() - counts["+toString(i)+"] must be integer: != "+toString(counts[i])+".");
    5350  }
    5451#endif
     52
     53  std::vector< unsigned int> size_counts;
     54  for (size_t i=0;i<NDIM;++i) {
     55    size_counts.push_back( (int)counts[i] );
     56  }
     57  init(size_counts, offset, M);
     58}
     59
     60/** Constructor for class CubeMesh.
     61 *
     62 * Here, we generate nodes homogeneously distributed over a cuboid.
     63 *
     64 * \a offset shifts the coordinates, e.g. if counts = 2, we would set nodes at
     65 * 0 and 0.5 with offset = 0 and 0.4999... and 0.9999.. with offset = 0.999...
     66 *
     67 * @param counts number of points per axis
     68 * @param offset offset Vector (coordinates in [0,1))
     69 * @param M matrix to transform the default cuboid from (0,0,0) to (1,1,1).
     70 */
     71CubeMesh::CubeMesh(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M)
     72{
     73  ASSERT(counts.size() == 3,
     74      "CubeMesh::CubeMesh() - counts does not have three but "
     75      +toString(counts.size())+" entries.");
     76
     77  init(counts, offset, M);
     78}
     79
     80void CubeMesh::init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M)
     81{
     82  RealSpaceMatrix partition;
    5583
    5684  partition.setZero();
     
    5987  LOG(1, "INFO: partition is " << partition << ".");
    6088
    61 
    6289  // go over [0,1]^3 filler grid
     90  int n[NDIM];
    6391  for (n[0] = 0; n[0] < counts[0]; n[0]++)
    6492    for (n[1] = 0; n[1] < counts[1]; n[1]++)
  • src/Filling/Mesh/CubeMesh.hpp

    r5ffa05 rbd81f9  
    2525public:
    2626  CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M);
     27  CubeMesh(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M);
    2728  virtual ~CubeMesh();
    2829
     30  void init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M);
    2931};
    3032
  • src/Makefile.am

    r5ffa05 rbd81f9  
    2424
    2525include LinkedCell/Makefile.am
     26include Parameters/Makefile.am
    2627include Parser/Makefile.am
    2728include RandomNumbers/Makefile.am
     
    287288        Actions/pyMoleCuilder.cpp
    288289pyMoleCuilder_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} -I$(PYTHON_INCLUDE_DIR)
    289 pyMoleCuilder_la_LDFLAGS = -module -avoid-version -shared
     290pyMoleCuilder_la_LDFLAGS = -module -avoid-version -shared $(BOOST_PYTHON_LDFLAGS)
    290291pyMoleCuilder_la_LIBADD = \
    291292        libMolecuilderUI.la \
    292         $(BOOST_PYTHON_LDFLAGS) $(BOOST_PYTHON_LIBS) \
     293        $(BOOST_PYTHON_LIBS) \
    293294        ${CodePatterns_LIBS} \
    294295        -l$(PYTHON_LIB)
  • src/Parser/FormatParser_Parameters.cpp

    r5ffa05 rbd81f9  
    2929#include "CodePatterns/Log.hpp"
    3030
    31 #include "Parameters/Parameter.hpp"
     31#include "Parameters/ParameterAsString.hpp"
    3232#include "FormatParser_Parameters.hpp"
    3333
     
    8787 * @param instance parameter to add
    8888 */
    89 void FormatParser_Parameters::appendParameter(Parameter *instance)
     89void FormatParser_Parameters::appendParameter(ParameterAsString *instance)
    9090{
    9191  storage->registerInstance(instance);
     
    109109 * @return pointer to instance with this \a _name
    110110 */
    111 Parameter *FormatParser_Parameters::getParameter(const std::string &_name) const
     111ParameterAsString *FormatParser_Parameters::getParameter(const std::string &_name) const
    112112{
    113113  return storage->getByName(_name);
     
    129129      iter != params.storage->getEndIter();
    130130      ++iter)
    131     if (!iter->second->get().empty())
    132       output << iter->first <<  "=" << iter->second->get() << ";";
     131    if (!iter->second->getAsString().empty())
     132      output << iter->first <<  "=" << iter->second->getAsString() << ";";
    133133  ost << output.str();
    134134  return ost;
     
    187187          +key+"' with value "+valuestream.str()+"!");
    188188      if (params.haveParameter(key)) {
    189         Parameter *instance = params.getParameter(key);
    190         instance->set(valuestream.str());
     189        ParameterAsString *instance = params.getParameter(key);
     190        instance->setAsString(valuestream.str());
    191191      }
    192192    } else {
  • src/Parser/FormatParser_Parameters.hpp

    r5ffa05 rbd81f9  
    2020#include "Parser/Parameters/ParameterStorage.hpp"
    2121
    22 class Parameter;
     22class ParameterAsString;
    2323
    2424/** This class is an interface to the internal parameters of any FormatParser.
     
    4141
    4242  // accessing parameters in storage
    43   void appendParameter(Parameter *instance);
     43  void appendParameter(ParameterAsString *instance);
    4444  bool haveParameter(const std::string &_name) const;
    45   Parameter *getParameter(const std::string &_name) const;
     45  ParameterAsString *getParameter(const std::string &_name) const;
    4646
    4747protected:
  • src/Parser/Makefile.am

    r5ffa05 rbd81f9  
    5757
    5858PARSERPARAMETERSSOURCE = \
    59         Parser/Parameters/ParameterStorage.cpp \
    60         Parser/Parameters/StringParameter.cpp
     59        Parser/Parameters/ParameterStorage.cpp
    6160
    6261PARSERPARAMETERSHEADER = \
    6362        Parser/Parameters/ParameterStorage.hpp \
    64         Parser/Parameters/ContinuousParameter.hpp \
    65         Parser/Parameters/ContinuousParameter_impl.hpp \
    66         Parser/Parameters/ContinuousValue.hpp \
    67         Parser/Parameters/ContinuousValue_impl.hpp \
    68         Parser/Parameters/DiscreteParameter.hpp \
    69         Parser/Parameters/DiscreteParameter_impl.hpp \
    70         Parser/Parameters/DiscreteValue.hpp \
    71         Parser/Parameters/DiscreteValue_impl.hpp \
    72         Parser/Parameters/Parameter.hpp \
    73         Parser/Parameters/StringParameter.hpp \
    74         Parser/Parameters/ValueInterface.hpp
     63        Parameters/Parameter.hpp \
     64        Parameters/Parameter_impl.hpp \
     65        Parameters/ParameterAsString.hpp \
     66        Parameters/ParameterInterface.hpp \
     67        Parameters/Validators/DiscreteValidator.hpp \
     68        Parameters/Validators/DiscreteValidator_impl.hpp \
     69        Parameters/Validators/Ops_Validator.hpp \
     70        Parameters/Validators/Ops_Validator_impl.hpp \
     71        Parameters/Validators/RangeValidator.hpp \
     72        Parameters/Validators/RangeValidator_impl.hpp \
     73        Parameters/Validators/Validator.hpp \
     74        Parameters/Value.hpp \
     75        Parameters/Value_impl.hpp \
     76        Parameters/ValueAsString.hpp \
     77        Parameters/ValueInterface.hpp
    7578
    7679PUGIXMLSOURCE = \
  • src/Parser/MpqcParser_Parameters.cpp

    r5ffa05 rbd81f9  
    2727#include "MpqcParser_Parameters.hpp"
    2828
    29 #include "Parser/Parameters/ContinuousParameter.hpp"
    30 #include "Parser/Parameters/DiscreteParameter.hpp"
    31 #include "Parser/Parameters/StringParameter.hpp"
     29#include "Parameters/Parameter.hpp"
    3230
    3331template <>
    34 const std::string ContinuousValue<bool>::get() const
     32const std::string Value<bool>::getAsString() const throw(ParameterValueException)
    3533{
    36   ASSERT(ValueSet,
    37       "ContinuousValue<bool>::get() - requesting unset value.");
     34  if(!ValueSet)
     35    throw ParameterValueException();
    3836  if (value)
    3937    return std::string("yes");
     
    4341
    4442template <>
    45 void ContinuousValue<bool>::set(const std::string _value)
     43void Value<bool>::setAsString(const std::string _value) throw(ParameterException)
    4644{
    4745  if (_value == std::string("yes")) {
    48     setValue(true);
     46    set(true);
    4947  } else if (_value == std::string("no")) {
    50     setValue(false);
     48    set(false);
    5149  } else {
    52     ASSERT(0,
    53         "void ContinuousValue<bool>::set() - value "+_value+" is neither yes or no.");
     50    throw ParameterValueException();
    5451  }
    5552}
     
    9289    ValidTheories[MBPT2_R12]="MBPT2_R12";
    9390    appendParameter(
    94         new DiscreteParameter<std::string>(
     91        new Parameter<std::string>(
    9592            ParamNames[theoryParam],
    9693            ValidTheories,
     
    105102    ValidIntegrationMethods[IntegralCints] = "IntegralCints";
    106103    appendParameter(
    107         new DiscreteParameter<std::string>(
     104        new Parameter<std::string>(
    108105            ParamNames[integrationParam],
    109106            ValidIntegrationMethods,
     
    113110  // add all continuous parameters
    114111  {
    115     appendParameter(new ContinuousParameter<bool>(ParamNames[hessianParam], false));
    116     appendParameter(new ContinuousParameter<bool>(ParamNames[savestateParam], false));
    117     appendParameter(new ContinuousParameter<bool>(ParamNames[do_gradientParam], true));
    118     appendParameter(new ContinuousParameter<int>(ParamNames[maxiterParam], 1000));
    119     appendParameter(new ContinuousParameter<int>(ParamNames[memoryParam], 16000000));
    120     appendParameter(new StringParameter(ParamNames[stdapproxParam], "A'"));
    121     appendParameter(new ContinuousParameter<int>(ParamNames[nfzcParam], 1));
    122     appendParameter(new StringParameter(ParamNames[basisParam], "3-21G"));
    123     appendParameter(new StringParameter(ParamNames[aux_basisParam], "aug-cc-pVDZ"));
     112    appendParameter(new Parameter<bool>(ParamNames[hessianParam], false));
     113    appendParameter(new Parameter<bool>(ParamNames[savestateParam], false));
     114    appendParameter(new Parameter<bool>(ParamNames[do_gradientParam], true));
     115    appendParameter(new Parameter<int>(ParamNames[maxiterParam], 1000));
     116    appendParameter(new Parameter<int>(ParamNames[memoryParam], 16000000));
     117    appendParameter(new Parameter<std::string>(ParamNames[stdapproxParam], "A'"));
     118    appendParameter(new Parameter<int>(ParamNames[nfzcParam], 1));
     119    appendParameter(new Parameter<std::string>(ParamNames[basisParam], "3-21G"));
     120    appendParameter(new Parameter<std::string>(ParamNames[aux_basisParam], "aug-cc-pVDZ"));
    124121  }
    125122}
     
    135132const std::string MpqcParser_Parameters::getParameter(const enum Parameters param) const
    136133{
    137   return FormatParser_Parameters::getParameter(ParamNames[param])->get();
     134  return FormatParser_Parameters::getParameter(ParamNames[param])->getAsString();
    138135}
    139136
     
    146143{
    147144  const std::string &name = getParameterName(param);
    148   FormatParser_Parameters::getParameter(name)->set(_value);
     145  FormatParser_Parameters::getParameter(name)->setAsString(_value);
    149146}
    150147
  • src/Parser/MpqcParser_Parameters.hpp

    r5ffa05 rbd81f9  
    2323#include "Parser/FormatParser_Parameters.hpp"
    2424
    25 #include "Parser/Parameters/ContinuousParameter.hpp"
     25#include "Parameters/Parameter.hpp"
     26#include "Parameters/Value.hpp"
    2627
    2728// specialization for bool (we want "yes/no" not "1/0")
    28 template <> const std::string ContinuousValue<bool>::get() const;
    29 template <> void ContinuousValue<bool>::set(const std::string _value);
     29template <> const std::string Value<bool>::getAsString() const throw(ParameterValueException);
     30template <> void Value<bool>::setAsString(const std::string _value) throw(ParameterException);
    3031
    3132class MpqcParser;
  • src/Parser/Parameters/ParameterStorage.cpp

    r5ffa05 rbd81f9  
    3737{
    3838  for (const_iterator iter = _storage.getBeginIter(); iter != _storage.getEndIter(); ++iter) {
    39     Parameter *instance = (iter->second)->clone();
     39    ParameterAsString *instance = (iter->second)->clone();
    4040    registerInstance(instance);
    4141  }
     
    4949}
    5050
    51 CONSTRUCT_REGISTRY(Parameter)
     51CONSTRUCT_REGISTRY(ParameterAsString)
  • src/Parser/Parameters/ParameterStorage.hpp

    r5ffa05 rbd81f9  
    1616#include "CodePatterns/Registry.hpp"
    1717
    18 #include "Parameter.hpp"
     18#include "Parameters/ParameterAsString.hpp"
    1919
    2020/** Parameter Registry.
     
    2323 *
    2424 */
    25 class ParameterStorage : public Registry<Parameter>
     25class ParameterStorage : public Registry<ParameterAsString>
    2626{
    2727public:
  • src/Parser/Parameters/unittests/Makefile.am

    r5ffa05 rbd81f9  
    44
    55PARSERPARAMETERSTESTSSOURCES = \
    6         ../Parser/Parameters/unittests/ContinuousValueUnitTest.cpp \
    7         ../Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp \
    8         ../Parser/Parameters/unittests/DiscreteValueUnitTest.cpp \
    9         ../Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp \
    106        ../Parser/Parameters/unittests/ParameterStorageUnitTest.cpp \
    117        ../Parser/Parameters/unittests/StringParameterUnitTest.cpp
    128
    139PARSERPARAMETERSTESTSHEADERS = \
    14         ../Parser/Parameters/unittests/ContinuousValueUnitTest.hpp \
    15         ../Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp \
    16         ../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp \
    17         ../Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp \
    1810        ../Parser/Parameters/unittests/ParameterStorageUnitTest.hpp \
    1911        ../Parser/Parameters/unittests/StringParameterUnitTest.hpp
    2012
    2113PARSERPARAMETERSTESTS = \
    22         ContinuousValueUnitTest \
    23         ContinuousParameterUnitTest \
    24         DiscreteValueUnitTest \
    25         DiscreteParameterUnitTest \
    2614        ParameterStorageUnitTest \
    2715        StringParameterUnitTest
     
    3119noinst_PROGRAMS += $(PARSERPARAMETERSTESTS)
    3220
    33 PARSERPARAMETERSLIBS =
     21PARSERPARAMETERSLIBS = \
     22        $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
     23        ${CodePatterns_LIBS}
    3424
    35 
    36 ContinuousValueUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    37         ../Parser/Parameters/unittests/ContinuousValueUnitTest.cpp \
    38         ../Parser/Parameters/unittests/ContinuousValueUnitTest.hpp \
    39         ../Parser/Parameters/ContinuousValue.hpp \
    40         ../Parser/Parameters/ContinuousValue_impl.hpp \
    41         ../Parser/Parameters/ValueInterface.hpp
    42 ContinuousValueUnitTest_LDADD = \
    43         $(PARSERPARAMETERSLIBS)
    44  
    45 ContinuousParameterUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    46         ../Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp \
    47         ../Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp \
    48         ../Parser/Parameters/ContinuousValue.hpp \
    49         ../Parser/Parameters/ContinuousValue_impl.hpp \
    50         ../Parser/Parameters/ContinuousParameter.hpp \
    51         ../Parser/Parameters/ContinuousParameter_impl.hpp \
    52         ../Parser/Parameters/Parameter.hpp \
    53         ../Parser/Parameters/ValueInterface.hpp
    54 ContinuousParameterUnitTest_LDADD = \
    55         $(PARSERPARAMETERSLIBS)
    56  
    57 DiscreteValueUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    58         ../Parser/Parameters/unittests/DiscreteValueUnitTest.cpp \
    59         ../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp \
    60         ../Parser/Parameters/DiscreteValue.hpp \
    61         ../Parser/Parameters/DiscreteValue_impl.hpp \
    62         ../Parser/Parameters/ValueInterface.hpp
    63 DiscreteValueUnitTest_LDADD = \
    64         $(PARSERPARAMETERSLIBS)
    65 
    66 DiscreteParameterUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    67         ../Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp \
    68         ../Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp \
    69         ../Parser/Parameters/DiscreteValue.hpp \
    70         ../Parser/Parameters/DiscreteValue_impl.hpp \
    71         ../Parser/Parameters/DiscreteParameter.hpp \
    72         ../Parser/Parameters/DiscreteParameter_impl.hpp \
    73         ../Parser/Parameters/Parameter.hpp \
    74         ../Parser/Parameters/ValueInterface.hpp
    75 DiscreteParameterUnitTest_LDADD = \
    76         $(PARSERPARAMETERSLIBS)
    7725
    7826ParameterStorageUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
     
    8129        ../Parser/Parameters/ParameterStorage.cpp \
    8230        ../Parser/Parameters/ParameterStorage.hpp \
    83         ../Parser/Parameters/ContinuousValue.hpp \
    84         ../Parser/Parameters/ContinuousValue_impl.hpp \
    85         ../Parser/Parameters/DiscreteValue.hpp \
    86         ../Parser/Parameters/DiscreteValue_impl.hpp \
    87         ../Parser/Parameters/ValueInterface.hpp
     31        ../Parameters/Parameter.hpp \
     32        ../Parameters/Validators/DummyValidator.hpp \
     33        ../Parameters/Validators/RangeValidator.hpp \
     34        ../Parameters/Validators/RangeValidator_impl.hpp \
     35        ../Parameters/Validators/Validator.hpp \
     36        ../Parameters/Value.hpp \
     37        ../Parameters/Value_impl.hpp \
     38        ../Parameters/ValueInterface.hpp
    8839ParameterStorageUnitTest_LDADD = \
    89         $(CodePatterns_LIBS) \
    9040        $(PARSERPARAMETERSLIBS)
    9141
     
    9343        ../Parser/Parameters/unittests/StringParameterUnitTest.cpp \
    9444        ../Parser/Parameters/unittests/StringParameterUnitTest.hpp \
    95         ../Parser/Parameters/StringParameter.cpp \
    96         ../Parser/Parameters/StringParameter.hpp \
    97         ../Parser/Parameters/Parameter.hpp \
    98         ../Parser/Parameters/ValueInterface.hpp
     45        ../Parameters/StreamOperators.hpp \
     46        ../Parameters/Validators/DiscreteValidator.hpp \
     47        ../Parameters/Validators/DiscreteValidator_impl.hpp \
     48        ../Parameters/Validators/DummyValidator.hpp \
     49        ../Parameters/Validators/RangeValidator.hpp \
     50        ../Parameters/Validators/RangeValidator_impl.hpp \
     51        ../Parameters/Validators/Validator.hpp \
     52        ../Parameters/Value.hpp \
     53        ../Parameters/Value_impl.hpp \
     54        ../Parameters/ValueInterface.hpp
    9955StringParameterUnitTest_LDADD = \
    10056        $(PARSERPARAMETERSLIBS)
  • src/Parser/Parameters/unittests/ParameterStorageUnitTest.cpp

    r5ffa05 rbd81f9  
    2727
    2828#include "Parser/Parameters/ParameterStorage.hpp"
    29 #include "Parser/Parameters/ContinuousParameter.hpp"
    30 #include "Parser/Parameters/DiscreteParameter.hpp"
     29#include "Parameters/Parameter.hpp"
    3130
    3231#ifdef HAVE_TESTRUNNER
     
    5352    ValidValues.push_back(i);
    5453  range<double> ValidRange(1., 4.);
    55   Parameter *intParam = new DiscreteParameter<int>("intParam", ValidValues);
    56   Parameter *doubleParam = new ContinuousParameter<double>("doubleParam", ValidRange);
     54  ParameterAsString *intParam = new Parameter<int>("intParam", ValidValues);
     55  ParameterAsString *doubleParam = new Parameter<double>("doubleParam", ValidRange);
    5756  // note: delete is done by registry in tearDown ...
    5857
  • src/Parser/Parameters/unittests/StringParameterUnitTest.cpp

    r5ffa05 rbd81f9  
    2424#include <cppunit/ui/text/TestRunner.h>
    2525
    26 #include "Parser/Parameters/StringParameter.hpp"
     26#include "Parameters/Parameter.hpp"
    2727
    2828#include "CodePatterns/Assert.hpp"
     
    5454{
    5555  // create instance
    56   StringParameter test("stringParam");
    57   StringParameter samenamedsamevalued("stringParam");
    58   StringParameter samenamedelsevalued("stringParam");
    59   StringParameter elsenamedsamevalued("string2Param");
    60   StringParameter elsenamedelsevalued("string2Param");
     56  Parameter<std::string> test("stringParam");
     57  Parameter<std::string> samenamedsamevalued("stringParam");
     58  Parameter<std::string> samenamedelsevalued("stringParam");
     59  Parameter<std::string> elsenamedsamevalued("string2Param");
     60  Parameter<std::string> elsenamedelsevalued("string2Param");
    6161  test.set(std::string("1"));
    6262  samenamedsamevalued.set(std::string("1"));
     
    7777{
    7878  // create instance
    79   StringParameter test("intParam");
    80 
    81   // check that we throw because of unset parameter
    82 #ifndef NDEBUG
    83   std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
    84   CPPUNIT_ASSERT_THROW(test.clone(), Assert::AssertionFailure);
    85 #endif
     79  Parameter<std::string> test("intParam");
    8680
    8781  // set parameter
     
    9084  // is returned as Parameter but we can compare only in true class as
    9185  // Parameter may also be a DiscreteParameter where comparison is nonsense
    92   StringParameter *instance = dynamic_cast< StringParameter *> (test.clone());
     86  Parameter<std::string> *instance = dynamic_cast< Parameter<std::string> *> (test.clone());
    9387
    9488  // different places in memory
  • src/Parser/Psi3Parser_Parameters.cpp

    r5ffa05 rbd81f9  
    2929#include "Psi3Parser_Parameters.hpp"
    3030
    31 #include "Parser/Parameters/ContinuousParameter.hpp"
    32 #include "Parser/Parameters/DiscreteParameter.hpp"
    33 #include "Parser/Parameters/StringParameter.hpp"
    34 
    35 // TODO: ContinuousValue<bool>::get() must be defined inline otherwise we get multiple definition of virtual thunk compilation errors
     31#include "Parameters/Parameter.hpp"
     32
     33// TODO: Value<bool>::getAsString() must be defined inline otherwise we get multiple definition of virtual thunk compilation errors
    3634template <>
    37 inline const std::string ContinuousValue<bool>::get() const
    38 {
    39   ASSERT(ValueSet,
    40       "ContinuousValue<bool>::get() - requesting unset value.");
     35inline const std::string Value<bool>::getAsString() const throw(ParameterValueException)
     36{
     37  if(!ValueSet)
     38    throw ParameterValueException();
    4139  if (value)
    4240    return std::string("yes");
     
    4543}
    4644
    47 // TODO: ContinuousValue<bool>::set must be defined inline otherwise we get multiple definition of virtual thunk compilation errors
     45// TODO: Value<bool>::setAsString must be defined inline otherwise we get multiple definition of virtual thunk compilation errors
    4846template <>
    49 inline void ContinuousValue<bool>::set(const std::string _value)
     47inline void Value<bool>::setAsString(const std::string _value) throw(ParameterException)
    5048{
    5149  if (_value == std::string("yes")) {
    52     setValue(true);
     50    set(true);
    5351  } else if (_value == std::string("no")) {
    54     setValue(false);
     52    set(false);
    5553  } else {
    56     ASSERT(0,
    57         "void ContinuousValue<bool>::set() - value "+_value+" is neither yes or no.");
     54    throw ParameterValueException();
    5855  }
    5956}
     
    103100    ValidFreezeCore[LARGE]="large";
    104101    appendParameter(
    105         new DiscreteParameter<std::string>(
     102        new Parameter<std::string>(
    106103            ParamNames[freeze_coreParam],
    107104            ValidFreezeCore,
     
    116113    ValidUnits[bohr]="bohr";
    117114    appendParameter(
    118         new DiscreteParameter<std::string>(
     115        new Parameter<std::string>(
    119116            ParamNames[unitsParam],
    120117            ValidUnits,
     
    128125    ValidDerivativeType[NONE]="none";
    129126    appendParameter(
    130         new DiscreteParameter<std::string>(
     127        new Parameter<std::string>(
    131128            ParamNames[dertypeParam],
    132129            ValidDerivativeType,
     
    142139    ValidUniqueAxis[Z]="z";
    143140    appendParameter(
    144         new DiscreteParameter<std::string>(
     141        new Parameter<std::string>(
    145142            ParamNames[unique_axisParam],
    146143            ValidUniqueAxis,
     
    160157    ValidJobtypes[RESPONSE]="response";
    161158    appendParameter(
    162         new DiscreteParameter<std::string>(
     159        new Parameter<std::string>(
    163160            ParamNames[jobtypeParam],
    164161            ValidJobtypes,
     
    184181    ValidWavefunction[ZAPTN]="zaptn";
    185182    appendParameter(
    186         new DiscreteParameter<std::string>(
     183        new Parameter<std::string>(
    187184            ParamNames[wavefunctionParam],
    188185            ValidWavefunction,
     
    199196    ValidReference[TWOCON]="twocon";
    200197    appendParameter(
    201         new DiscreteParameter<std::string>(
     198        new Parameter<std::string>(
    202199            ParamNames[referenceParam],
    203200            ValidReference,
     
    207204  // add all continuous parameters
    208205  {
    209     appendParameter(new StringParameter(ParamNames[labelParam], std::string("unknown job")));
    210     appendParameter(new ContinuousParameter<int>(ParamNames[maxiterParam], 80));
    211     appendParameter(new StringParameter(ParamNames[basisParam], std::string("cc-pVTZ")));
    212     appendParameter(new StringParameter(ParamNames[originParam], std::string("(0.0\t0.0\t0.0)"))); // TODO: this should be a vector
    213     appendParameter(new ContinuousParameter<int>(ParamNames[multiplicityParam], 1));
    214     appendParameter(new ContinuousParameter<int>(ParamNames[chargeParam], 0));
    215     appendParameter(new StringParameter(ParamNames[soccParam], std::string("()")));
    216     appendParameter(new StringParameter(ParamNames[doccParam], std::string("()")));
    217     appendParameter(new StringParameter(ParamNames[subgroupParam], std::string("")));
     206    appendParameter(new Parameter<string>(ParamNames[labelParam], std::string("unknown job")));
     207    appendParameter(new Parameter<int>(ParamNames[maxiterParam], 80));
     208    appendParameter(new Parameter<string>(ParamNames[basisParam], std::string("cc-pVTZ")));
     209    appendParameter(new Parameter<string>(ParamNames[originParam], std::string("(0.0\t0.0\t0.0)"))); // TODO: this should be a vector
     210    appendParameter(new Parameter<int>(ParamNames[multiplicityParam], 1));
     211    appendParameter(new Parameter<int>(ParamNames[chargeParam], 0));
     212    appendParameter(new Parameter<string>(ParamNames[soccParam], std::string("()")));
     213    appendParameter(new Parameter<string>(ParamNames[doccParam], std::string("()")));
     214    appendParameter(new Parameter<string>(ParamNames[subgroupParam], std::string("")));
    218215 }
    219216}
     
    229226const std::string Psi3Parser_Parameters::getParameter(const enum Parameters param) const
    230227{
    231   return FormatParser_Parameters::getParameter(ParamNames[param])->get();
     228  return FormatParser_Parameters::getParameter(ParamNames[param])->getAsString();
    232229}
    233230
     
    240237{
    241238  const std::string &name = getParameterName(param);
    242   FormatParser_Parameters::getParameter(name)->set(_value);
     239  FormatParser_Parameters::getParameter(name)->setAsString(_value);
    243240}
    244241
  • src/Parser/Psi3Parser_Parameters.hpp

    r5ffa05 rbd81f9  
    2222#include "Parser/FormatParser_Parameters.hpp"
    2323
    24 #include "Parser/Parameters/ContinuousParameter.hpp"
     24#include "Parameters/Parameter.hpp"
     25#include "Parameters/Value.hpp"
    2526
    2627// specialization for bool (we want "yes/no" not "1/0")
    27 template <> inline const std::string ContinuousValue<bool>::get() const;
    28 template <> inline void ContinuousValue<bool>::set(const std::string _value);
     28template <> inline const std::string Value<bool>::getAsString() const throw(ParameterValueException);
     29template <> inline void Value<bool>::setAsString(const std::string _value) throw(ParameterException);
    2930
    3031class Psi3Parser;
  • src/Parser/TremoloParser.cpp

    r5ffa05 rbd81f9  
    4141
    4242#include <algorithm>
     43#include <boost/lambda/lambda.hpp>
    4344#include <boost/lexical_cast.hpp>
    4445#include <boost/tokenizer.hpp>
     
    4748#include <map>
    4849#include <sstream>
     50#include <string>
    4951#include <vector>
     52
     53#include <boost/assign/list_of.hpp> // for 'map_list_of()'
     54#include <boost/assert.hpp>
    5055
    5156// declare specialized static variables
     
    5459const ParserTypes FormatParserTrait<tremolo>::type = tremolo;
    5560
     61// static instances
     62std::map<std::string, TremoloKey::atomDataKey> FormatParser<tremolo>::knownKeys =
     63    boost::assign::map_list_of("x",TremoloKey::x)
     64    ("u",TremoloKey::u)
     65    ("F",TremoloKey::F)
     66    ("stress",TremoloKey::stress)
     67    ("Id",TremoloKey::Id)
     68    ("neighbors",TremoloKey::neighbors)
     69    ("imprData",TremoloKey::imprData)
     70    ("GroupMeasureTypeNo",TremoloKey::GroupMeasureTypeNo)
     71    ("type",TremoloKey::type)
     72    ("extType",TremoloKey::extType)
     73    ("name",TremoloKey::name)
     74    ("resName",TremoloKey::resName)
     75    ("chainID",TremoloKey::chainID)
     76    ("resSeq",TremoloKey::resSeq)
     77    ("occupancy",TremoloKey::occupancy)
     78    ("tempFactor",TremoloKey::tempFactor)
     79    ("segID",TremoloKey::segID)
     80    ("Charge",TremoloKey::Charge)
     81    ("charge",TremoloKey::charge)
     82    ("GrpTypeNo",TremoloKey::GrpTypeNo)
     83    ("torsion",TremoloKey::torsion)
     84    (" ",TremoloKey::noKey); // with this we can detect invalid keys
     85
    5686/**
    5787 * Constructor.
     
    6090  FormatParser_common(NULL)
    6191{
    62   knownKeys["x"] = TremoloKey::x;
    63   knownKeys["u"] = TremoloKey::u;
    64   knownKeys["F"] = TremoloKey::F;
    65   knownKeys["stress"] = TremoloKey::stress;
    66   knownKeys["Id"] = TremoloKey::Id;
    67   knownKeys["neighbors"] = TremoloKey::neighbors;
    68   knownKeys["imprData"] = TremoloKey::imprData;
    69   knownKeys["GroupMeasureTypeNo"] = TremoloKey::GroupMeasureTypeNo;
    70   knownKeys["type"] = TremoloKey::type;
    71   knownKeys["extType"] = TremoloKey::extType;
    72   knownKeys["name"] = TremoloKey::name;
    73   knownKeys["resName"] = TremoloKey::resName;
    74   knownKeys["chainID"] = TremoloKey::chainID;
    75   knownKeys["resSeq"] = TremoloKey::resSeq;
    76   knownKeys["occupancy"] = TremoloKey::occupancy;
    77   knownKeys["tempFactor"] = TremoloKey::tempFactor;
    78   knownKeys["segID"] = TremoloKey::segID;
    79   knownKeys["Charge"] = TremoloKey::Charge;
    80   knownKeys["charge"] = TremoloKey::charge;
    81   knownKeys["GrpTypeNo"] = TremoloKey::GrpTypeNo;
    82   knownKeys["torsion"] = TremoloKey::torsion;
    83   knownKeys[" "] = TremoloKey::noKey; // with this we can detect invalid keys
    84 
    8592  createKnownTypesByIdentity();
    8693
     
    9299}
    93100
     101
    94102/**
    95103 * Destructor.
     
    99107  usedFields_save.clear();
    100108  additionalAtomData.clear();
    101   knownKeys.clear();
    102109}
    103110
     
    182189}
    183190
     191struct usedFieldsWeakComparator
     192{
     193  /** Special comparator regards "neighbors=4" and "neighbors=2" as equal
     194   *
     195   * \note This one is used for making usedFields unique, i.e. throwing out the "smaller"
     196   * neighbors.
     197   */
     198  bool operator()(const std::string &a, const std::string &b) const
     199  {
     200    // only compare up to first equality sign
     201    return (a.substr(0, a.find_first_of('=')) == b.substr(0, b.find_first_of('=')));
     202  }
     203};
     204
     205struct usedFieldsSpecialOrderer
     206{
     207  /** Special string comparator that regards "neighbors=4" < "neighbors=2" as true and
     208   * the other way round as false.
     209   *
     210   * Here, we implement the operator "\a < \b" in a special way to allow the
     211   * above.
     212   *
     213   * \note This one is used for sorting usedFields in preparation for making it unique.
     214   */
     215  bool operator()(const std::string &a, const std::string &b) const
     216  {
     217    // only compare up to first equality sign
     218    size_t a_equality = a.find_first_of('=');
     219    size_t b_equality = b.find_first_of('=');
     220    // if key before equality is not equal, return whether it is smaller or not
     221    if (a.substr(0, a_equality) != b.substr(0, b_equality)) {
     222      return a.substr(0, a_equality) < b.substr(0, b_equality);
     223    } else { // now we know that the key before equality is the same in either string
     224      // if one of them has no equality, the one with equality must go before
     225      if ((a_equality != std::string::npos) && (b_equality == std::string::npos))
     226        return true;
     227      if ((a_equality == std::string::npos) && (b_equality != std::string::npos))
     228        return false;
     229      // if both don't have equality (and the token before is equal), it is not "<" but "=="
     230      if ((a_equality == std::string::npos) && (b_equality == std::string::npos))
     231        return false;
     232      // if now both have equality sign, the larger value after it, must come first
     233      return a.substr(a_equality, std::string::npos) > b.substr(b_equality, std::string::npos);
     234    }
     235  }
     236};
     237
    184238/** Helper function to make \given fields unique while preserving the order of first appearance.
    185239 *
     
    191245 * @param fields usedFields to make unique while preserving order of appearance
    192246 */
    193 void FormatParser< tremolo >::makeUsedFieldsUnique(usedFields_t &fields)
     247void FormatParser< tremolo >::makeUsedFieldsUnique(usedFields_t &fields) const
    194248{
    195249  // std::unique only removes if predecessor is equal, not over whole range, hence do it manually
    196   usedFields_t temp_fields(usedFields_save);
    197   std::sort(temp_fields.begin(), temp_fields.end());
     250  usedFields_t temp_fields(fields);
     251  usedFieldsSpecialOrderer SpecialOrderer;
     252  usedFieldsWeakComparator WeakComparator;
     253  std::sort(temp_fields.begin(), temp_fields.end(), SpecialOrderer);
    198254  usedFields_t::iterator it =
    199       std::unique(temp_fields.begin(), temp_fields.end()); // skips all duplicates in the vector
     255      std::unique(temp_fields.begin(), temp_fields.end(), WeakComparator);
    200256  temp_fields.erase(it, temp_fields.end());
    201   usedFields_t usedfields(usedFields_save);
    202   usedFields_save.clear();
    203   usedFields_save.reserve(temp_fields.size());
     257  usedFields_t usedfields(fields);
     258  fields.clear();
     259  fields.reserve(temp_fields.size());
    204260  // now go through each usedFields entry, check if in temp_fields and remove there on first occurence
    205261  for (usedFields_t::const_iterator iter = usedfields.begin();
     
    208264        std::find(temp_fields.begin(), temp_fields.end(), *iter);
    209265    if (uniqueiter != temp_fields.end()) {
    210       usedFields_save.push_back(*iter);
     266      fields.push_back(*iter);
    211267      // add only once to ATOMDATA
    212268      temp_fields.erase(uniqueiter);
     
    441497    if (knownKeys[keyword.substr(0, keyword.find("="))] == TremoloKey::noKey) {
    442498      // TODO: throw exception about unknown key
    443       cout << "Unknown key: " << keyword << " is not part of the tremolo format specification." << endl;
     499      cout << "Unknown key: " << keyword.substr(0, keyword.find("=")) << " is not part of the tremolo format specification." << endl;
     500      throw IllegalParserKeyException();
    444501      break;
    445502    }
     
    449506}
    450507
     508/**
     509 * Tests whether the keys from the ATOMDATA line can be read correctly.
     510 *
     511 * \param line to parse the keys from
     512 */
     513bool FormatParser< tremolo >::testParseAtomDataKeysLine(
     514    const std::string &line) {
     515  std::string keyword;
     516  std::stringstream lineStream;
     517
     518  // check string after ATOMDATA
     519  const std::string AtomData("ATOMDATA");
     520  const size_t AtomDataOffset = line.find(AtomData, 0);
     521  if (AtomDataOffset == std::string::npos)
     522    lineStream << line;
     523  else
     524    lineStream << line.substr(AtomDataOffset + AtomData.length());
     525  while (lineStream.good()) {
     526    lineStream >> keyword;
     527    //LOG(2, "DEBUG: Checking key " << keyword.substr(0, keyword.find("=")) << ".");
     528    if (knownKeys[keyword.substr(0, keyword.find("="))] == TremoloKey::noKey)
     529      return false;
     530  }
     531  //LOG(1, "INFO: " << fields);
     532  return true;
     533}
     534
     535std::string FormatParser< tremolo >::getAtomData() const
     536{
     537  std::stringstream output;
     538  std::for_each(usedFields_save.begin(), usedFields_save.end(),
     539      output << boost::lambda::_1 << " ");
     540  const std::string returnstring(output.str());
     541  return returnstring.substr(0, returnstring.find_last_of(" "));
     542}
     543
     544/** Appends the properties per atom to print to .data file by parsing line from
     545 *  \a atomdata_string.
     546 *
     547 *  We just call \sa  FormatParser< tremolo >::parseAtomDataKeysLine().
     548 *
     549 * @param atomdata_string line to parse with space-separated values
     550 */
     551void FormatParser< tremolo >::setAtomData(const std::string &atomdata_string)
     552{
     553  parseAtomDataKeysLine(atomdata_string, 0, usedFields_save);
     554}
     555
    451556/** Sets the properties per atom to print to .data file by parsing line from
    452557 *  \a atomdata_string.
     
    457562 * @param atomdata_string line to parse with space-separated values
    458563 */
    459 void FormatParser< tremolo >::setAtomData(const std::string &atomdata_string)
     564void FormatParser< tremolo >::resetAtomData(const std::string &atomdata_string)
    460565{
    461566  usedFields_save.clear();
  • src/Parser/TremoloParser.hpp

    r5ffa05 rbd81f9  
    2727
    2828class molecule;
     29class AtomDataValidator;
    2930
    3031// declaration of specialized FormatParserTrait
     
    4647class FormatParser< tremolo >  : virtual public FormatParserInterface, public FormatParser_common
    4748{
     49  friend class AtomDataValidator;
    4850public:
    4951  FormatParser();
     
    5153  void load(std::istream* file);
    5254  void save(std::ostream* file, const std::vector<atom *> &atoms);
     55  std::string getAtomData() const;
    5356  void setAtomData(const std::string &atomdata_string);
     57  void resetAtomData(const std::string &atomdata_string);
    5458
    5559private:
     
    9296  void readAtomDataLine(const std::string &line, molecule *newmol);
    9397  void parseAtomDataKeysLine(const std::string &line, const int offset, usedFields_t &fields);
     98  static bool testParseAtomDataKeysLine(const std::string &line);
    9499  void readNeighbors(std::stringstream* line, const int numberOfNeighbors, const int atomId);
    95100  void processNeighborInformation(const std::vector<atomId_t> &atoms);
     
    103108  void save_BoxLine(std::ostream* file) const;
    104109  void distributeContinuousIds(const std::vector<atom *> &AtomList);
    105   void makeUsedFieldsUnique(usedFields_t &fields);
     110  void makeUsedFieldsUnique(usedFields_t &fields) const;
    106111
    107112  /**
    108113   * Map to associate the known keys with numbers.
    109114   */
    110   std::map<std::string, TremoloKey::atomDataKey> knownKeys;
     115  static std::map<std::string, TremoloKey::atomDataKey> knownKeys;
    111116
    112117  /**
  • src/Parser/unittests/ParserTremoloUnitTest.cpp

    r5ffa05 rbd81f9  
    2323#include <cppunit/extensions/TestFactoryRegistry.h>
    2424#include <cppunit/ui/text/TestRunner.h>
     25
     26#include "CodePatterns/Log.hpp"
    2527
    2628#include "Atom/atom.hpp"
     
    9193  World::getInstance();
    9294
     95  setVerbosity(5);
     96
    9397  parser = new FormatParser<tremolo>();
    9498
     
    139143  // Invalid key in Atomdata line
    140144  input << Tremolo_invalidkey;
    141   parser->load(&input);
     145  CPPUNIT_ASSERT_THROW( parser->load(&input), IllegalParserKeyException);
    142146  //TODO: prove invalidity
    143147  input.clear();
     148}
     149
     150void ParserTremoloUnitTest::getsetAtomDataTest() {
     151  stringstream input;
     152  input << Tremolo_Atomdata1;
     153  parser->load(&input);
     154
     155  CPPUNIT_ASSERT_EQUAL( std::string("Id name type x=3"), parser->getAtomData() );
     156
     157  // overwrite keys
     158  const std::string fewkeys("Id type x=3 neighbors=2");
     159  parser->resetAtomData(fewkeys);
     160  CPPUNIT_ASSERT_EQUAL( fewkeys, parser->getAtomData() );
     161
     162  // add some keys
     163  const std::string morekeys("charge");
     164  parser->setAtomData(morekeys);
     165  CPPUNIT_ASSERT_EQUAL( fewkeys+std::string(" ")+morekeys, parser->getAtomData() );
     166
     167  // add similar key
     168  const std::string otherkey("neighbors=4");
     169  parser->setAtomData(otherkey);
     170  CPPUNIT_ASSERT( fewkeys+std::string(" ")+morekeys != parser->getAtomData() );
    144171}
    145172
  • src/Parser/unittests/ParserTremoloUnitTest.hpp

    r5ffa05 rbd81f9  
    2222  CPPUNIT_TEST_SUITE( ParserTremoloUnitTest ) ;
    2323  CPPUNIT_TEST ( readTremoloPreliminaryCommentsTest );
     24  CPPUNIT_TEST ( getsetAtomDataTest );
    2425  CPPUNIT_TEST ( readTremoloCoordinatesTest );
    2526  CPPUNIT_TEST ( readTremoloVelocityTest );
     
    3536
    3637  void readTremoloPreliminaryCommentsTest();
     38  void getsetAtomDataTest();
    3739  void readTremoloCoordinatesTest();
    3840  void readTremoloVelocityTest();
  • src/RandomNumbers/RandomNumberDistributionFactory.hpp

    r5ffa05 rbd81f9  
    2929
    3030class RandomNumberDistributionFactoryUnitTest;
     31class RandomNumberDistributionNameValidator;
    3132namespace MoleCuilder {
    3233  class CommandSetRandomNumbersDistributionAction;
     
    4849  friend class Singleton<RandomNumberDistributionFactory>;
    4950  friend class RandomNumberDistributionFactoryTest;
     51  friend class RandomNumberDistributionNameValidator;
    5052  friend class MoleCuilder::CommandSetRandomNumbersDistributionAction;
    5153
  • src/RandomNumbers/RandomNumberEngineFactory.hpp

    r5ffa05 rbd81f9  
    2929
    3030class RandomNumberEngineFactoryUnitTest;
     31class RandomNumberEngineNameValidator;
    3132namespace MoleCuilder {
    3233  class CommandSetRandomNumbersEngineAction;
     
    4849  friend class Singleton<RandomNumberEngineFactory>;
    4950  friend class RandomNumberEngineFactoryTest;
     51  friend class RandomNumberEngineNameValidator;
    5052  friend class MoleCuilder::CommandSetRandomNumbersEngineAction;
    5153
  • src/UIElements/CommandLineUI/CommandLineDialog.cpp

    r5ffa05 rbd81f9  
    4040}
    4141
    42 void CommandLineDialog::queryInt(const char* title, std::string _description){
    43   registerQuery(new IntCommandLineQuery(title, _description));
     42void CommandLineDialog::queryInt(Parameter<int> &param, const char* title, std::string _description){
     43  registerQuery(new IntCommandLineQuery(param, title, _description));
    4444}
    4545
    46 void CommandLineDialog::queryInts(const char* title, std::string _description){
    47   registerQuery(new IntsCommandLineQuery(title, _description));
     46void CommandLineDialog::queryInts(Parameter<std::vector<int> > &param, const char* title, std::string _description){
     47  registerQuery(new IntsCommandLineQuery(param, title, _description));
    4848}
    4949
    50 void CommandLineDialog::queryUnsignedInt(const char* title, std::string _description){
    51   registerQuery(new UnsignedIntCommandLineQuery(title, _description));
     50void CommandLineDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char* title, std::string _description){
     51  registerQuery(new UnsignedIntCommandLineQuery(param, title, _description));
    5252}
    5353
    54 void CommandLineDialog::queryUnsignedInts(const char* title, std::string _description){
    55   registerQuery(new UnsignedIntsCommandLineQuery(title, _description));
     54void CommandLineDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char* title, std::string _description){
     55  registerQuery(new UnsignedIntsCommandLineQuery(param, title, _description));
    5656}
    5757
    58 void CommandLineDialog::queryBoolean(const char* title, std::string _description){
    59   registerQuery(new BooleanCommandLineQuery(title, _description));
     58void CommandLineDialog::queryBoolean(Parameter<bool> &param, const char* title, std::string _description){
     59  registerQuery(new BooleanCommandLineQuery(param, title, _description));
    6060}
    6161
    62 void CommandLineDialog::queryDouble(const char* title, std::string _description){
    63   registerQuery(new DoubleCommandLineQuery(title, _description));
     62void CommandLineDialog::queryDouble(Parameter<double> &param, const char* title, std::string _description){
     63  registerQuery(new DoubleCommandLineQuery(param, title, _description));
    6464}
    6565
    66 void CommandLineDialog::queryDoubles(const char* title, std::string _description){
    67   registerQuery(new DoublesCommandLineQuery(title, _description));
     66void CommandLineDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title, std::string _description){
     67  registerQuery(new DoublesCommandLineQuery(param, title, _description));
    6868}
    6969
    70 void CommandLineDialog::queryString(const char* title, std::string _description){
    71   registerQuery(new StringCommandLineQuery(title, _description));
     70void CommandLineDialog::queryString(Parameter<std::string> &param, const char* title, std::string _description){
     71  registerQuery(new StringCommandLineQuery(param, title, _description));
    7272}
    7373
    74 void CommandLineDialog::queryStrings(const char* title, std::string _description){
    75   registerQuery(new StringsCommandLineQuery(title, _description));
     74void CommandLineDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title, std::string _description){
     75  registerQuery(new StringsCommandLineQuery(param, title, _description));
    7676}
    7777
    78 void CommandLineDialog::queryAtom(const char* title, std::string _description) {
    79   registerQuery(new AtomCommandLineQuery(title, _description));
     78void CommandLineDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string _description) {
     79  registerQuery(new AtomCommandLineQuery(param, title, _description));
    8080}
    8181
    82 void CommandLineDialog::queryAtoms(const char* title, std::string _description) {
    83   registerQuery(new AtomsCommandLineQuery(title, _description));
     82void CommandLineDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string _description) {
     83  registerQuery(new AtomsCommandLineQuery(param, title, _description));
    8484}
    8585
    86 void CommandLineDialog::queryMolecule(const char* title, std::string _description) {
    87   registerQuery(new MoleculeCommandLineQuery(title, _description));
     86void CommandLineDialog::queryMolecule(Parameter<const molecule *> &param, const char* title, std::string _description) {
     87  registerQuery(new MoleculeCommandLineQuery(param, title, _description));
    8888}
    8989
    90 void CommandLineDialog::queryMolecules(const char* title, std::string _description) {
    91   registerQuery(new MoleculesCommandLineQuery(title, _description));
     90void CommandLineDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char* title, std::string _description) {
     91  registerQuery(new MoleculesCommandLineQuery(param, title, _description));
    9292}
    9393
    94 void CommandLineDialog::queryVector(const char* title, bool check, std::string _description) {
    95   registerQuery(new VectorCommandLineQuery(title,check, _description));
     94void CommandLineDialog::queryVector(Parameter<Vector> &param, const char* title, bool check, std::string _description) {
     95  registerQuery(new VectorCommandLineQuery(param, title,check, _description));
    9696}
    9797
    98 void CommandLineDialog::queryVectors(const char* title, bool check, std::string _description) {
    99   registerQuery(new VectorsCommandLineQuery(title,check, _description));
     98void CommandLineDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check, std::string _description) {
     99  registerQuery(new VectorsCommandLineQuery(param, title,check, _description));
    100100}
    101101
    102 void CommandLineDialog::queryBox(const char* title, std::string _description) {
    103   registerQuery(new BoxCommandLineQuery(title,_description));
     102void CommandLineDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string _description) {
     103  registerQuery(new RealSpaceMatrixCommandLineQuery(param, title,_description));
    104104}
    105105
    106 void CommandLineDialog::queryElement(const char* title, std::string _description){
    107   registerQuery(new ElementCommandLineQuery(title, _description));
     106void CommandLineDialog::queryElement(Parameter<const element *> &param, const char* title, std::string _description){
     107  registerQuery(new ElementCommandLineQuery(param, title, _description));
    108108}
    109109
    110 void CommandLineDialog::queryElements(const char* title, std::string _description){
    111   registerQuery(new ElementsCommandLineQuery(title, _description));
     110void CommandLineDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string _description){
     111  registerQuery(new ElementsCommandLineQuery(param, title, _description));
    112112}
    113113
    114 void CommandLineDialog::queryFile(const char* title, std::string _description){
    115   registerQuery(new FileCommandLineQuery(title, _description));
     114void CommandLineDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string _description){
     115  registerQuery(new FileCommandLineQuery(param, title, _description));
    116116}
    117117
    118 void CommandLineDialog::queryFiles(const char* title, std::string _description){
    119   registerQuery(new FilesCommandLineQuery(title, _description));
     118void CommandLineDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > &param, const char* title, std::string _description){
     119  registerQuery(new FilesCommandLineQuery(param, title, _description));
    120120}
    121121
    122 void CommandLineDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string _description){
    123   registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(title, _description));
     122void CommandLineDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string _description){
     123  registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(param, title, _description));
    124124}
    125125
  • src/UIElements/CommandLineUI/CommandLineDialog.hpp

    r5ffa05 rbd81f9  
    3434
    3535  virtual void queryEmpty(const char *, std::string = "");
    36   virtual void queryInt(const char *, std::string = "");
    37   virtual void queryInts(const char *, std::string = "");
    38   virtual void queryUnsignedInt(const char *, std::string = "");
    39   virtual void queryUnsignedInts(const char *, std::string = "");
    40   virtual void queryBoolean(const char *, std::string = "");
    41   virtual void queryString(const char*, std::string = "");
    42   virtual void queryStrings(const char*, std::string = "");
    43   virtual void queryDouble(const char*, std::string = "");
    44   virtual void queryDoubles(const char*, std::string = "");
    45   virtual void queryAtom(const char*, std::string = "");
    46   virtual void queryAtoms(const char*, std::string = "");
    47   virtual void queryMolecule(const char*, std::string = "");
    48   virtual void queryMolecules(const char*, std::string = "");
    49   virtual void queryVector(const char*, bool, std::string = "");
    50   virtual void queryVectors(const char*, bool, std::string = "");
    51   virtual void queryBox(const char*, std::string = "");
    52   virtual void queryElement(const char*, std::string = "");
    53   virtual void queryElements(const char*, std::string = "");
    54   virtual void queryFile(const char*, std::string = "");
    55   virtual void queryFiles(const char*, std::string = "");
    56   virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
    57 protected:
     36  virtual void queryInt(Parameter<int> &, const char *, std::string = "");
     37  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "");
     38  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "");
     39  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "");
     40  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
     41  virtual void queryString(Parameter<std::string> &, const char*, std::string = "");
     42  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "");
     43  virtual void queryDouble(Parameter<double> &, const char*, std::string = "");
     44  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "");
     45  virtual void queryAtom(Parameter<const atom *> &, const char*, std::string = "");
     46  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*, std::string = "");
     47  virtual void queryMolecule(Parameter<const molecule *> &, const char*, std::string = "");
     48  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*, std::string = "");
     49  virtual void queryVector(Parameter<Vector> &, const char*, bool, std::string = "");
     50  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*, bool, std::string = "");
     51  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
     52  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "");
     53  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "");
     54  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "");
     55  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> > &, const char*, std::string = "");
     56  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "");
    5857  // specialized stuff for command line queries
    5958  // all placed into Query/CommandLineQuery.hpp
     
    6261  class AtomsCommandLineQuery;
    6362  class BooleanCommandLineQuery;
    64   class BoxCommandLineQuery;
    6563  class DoubleCommandLineQuery;
    6664  class DoublesCommandLineQuery;
     
    7472  class MoleculeCommandLineQuery;
    7573  class MoleculesCommandLineQuery;
     74  class RealSpaceMatrixCommandLineQuery;
    7675  class StringCommandLineQuery;
    7776  class StringsCommandLineQuery;
  • src/UIElements/CommandLineUI/CommandLineParser.cpp

    r5ffa05 rbd81f9  
    193193        ;
    194194      break;
    195     case TypeEnumContainer::BoxType:
    196       OptionList->add_options()
    197         (currentOption->getKeyAndShortForm().c_str(),
    198 //            currentOption->hasDefaultValue() ?
    199 //                  po::value < BoxValue >()->default_value(boost::lexical_cast<BoxValue>(currentOption->getDefaultValue().c_str())) :
    200                   po::value < BoxValue >(),
    201                   currentOption->getDescription().c_str())
    202         ;
    203       break;
    204195    case TypeEnumContainer::FileType:
    205196      OptionList->add_options()
     
    370361                  po::value < std::string >()->default_value(boost::lexical_cast< std::string >(currentOption->getDefaultValue().c_str())) :
    371362                  po::value < std::string >(),
     363                  currentOption->getDescription().c_str())
     364        ;
     365      break;
     366    case TypeEnumContainer::RealSpaceMatrixType:
     367      OptionList->add_options()
     368        (currentOption->getKeyAndShortForm().c_str(),
     369//            currentOption->hasDefaultValue() ?
     370//                  po::value < RealSpaceMatrixValue >()->default_value(boost::lexical_cast<BoxValue>(currentOption->getDefaultValue().c_str())) :
     371                  po::value < RealSpaceMatrixValue >(),
    372372                  currentOption->getDescription().c_str())
    373373        ;
  • src/UIElements/CommandLineUI/CommandLineParser_validate.cpp

    r5ffa05 rbd81f9  
    8484}
    8585
    86 void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int)
     86void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int)
    8787{
    88   BoxValue BV;
     88  RealSpaceMatrixValue RSMV;
    8989  std::vector<std::string> components;
    9090
     
    129129  }
    130130  for (size_t i=0;i<(NDIM*(NDIM+1))/2; ++i)
    131     BV.matrix[i] = boost::lexical_cast<double>(components.at(i));
    132   v = boost::any(BoxValue(BV));
     131    RSMV.matrix[i] = boost::lexical_cast<double>(components.at(i));
     132  v = boost::any(RealSpaceMatrixValue(RSMV));
    133133}
    134134
  • src/UIElements/CommandLineUI/CommandLineParser_validate.hpp

    r5ffa05 rbd81f9  
    2222#include <boost/lexical_cast.hpp>
    2323
    24 class BoxValue;
     24class RealSpaceMatrixValue;
    2525class VectorValue;
    2626
    2727void validate(boost::any& v, const std::vector<std::string>& values, VectorValue *, int);
    28 void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int);
     28void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int);
    2929void validate(boost::any& v, const std::vector<std::string>& values, boost::filesystem::path *, int);
    3030
  • src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    3333using namespace std;
    3434
    35 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(std::string title, std::string _description) :
    36     Dialog::AtomQuery(title, _description)
     35CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
     36    Dialog::AtomQuery(param, title, _description)
    3737{}
    3838
     
    4343  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4444    IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>();
    45     tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));
     45    tmp.set(World::getInstance().getAtom(AtomById(IdxOfAtom)));
    4646    return true;
    4747  } else {
  • src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2828#include "World.hpp"
    2929
    30 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(std::string title, std::string _description) :
    31     Dialog::AtomsQuery(title, _description)
     30CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
     31    Dialog::AtomsQuery(param, title, _description)
    3232{}
    3333
     
    3838  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    3939    IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
     40    std::vector<const atom *> temp_atoms;
    4041    for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) {
    4142      temp = World::getInstance().getAtom(AtomById(*iter));
    4243      if (temp)
    43         tmp.push_back(temp);
     44        temp_atoms.push_back(temp);
    4445    }
     46    tmp.set(temp_atoms);
    4547    return true;
    4648  } else {
  • src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::BooleanQuery(title, _description)
     27CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(Parameter<bool> &param, std::string title, std::string _description) :
     28    Dialog::BooleanQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::BooleanCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<bool>());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp

    r5ffa05 rbd81f9  
    2626class CommandLineDialog::IntCommandLineQuery : public Dialog::IntQuery {
    2727public:
    28   IntCommandLineQuery(std::string title, std::string _description = "");
     28  IntCommandLineQuery(Parameter<int> &param, std::string title, std::string _description = "");
    2929  virtual ~IntCommandLineQuery();
    3030  virtual bool handle();
     
    3333class CommandLineDialog::IntsCommandLineQuery : public Dialog::IntsQuery {
    3434public:
    35   IntsCommandLineQuery(std::string title, std::string _description = "");
     35  IntsCommandLineQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description = "");
    3636  virtual ~IntsCommandLineQuery();
    3737  virtual bool handle();
     
    4040class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::UnsignedIntQuery {
    4141public:
    42   UnsignedIntCommandLineQuery(std::string title, std::string _description = "");
     42  UnsignedIntCommandLineQuery(Parameter<unsigned int> &param, std::string title, std::string _description = "");
    4343  virtual ~UnsignedIntCommandLineQuery();
    4444  virtual bool handle();
     
    4747class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::UnsignedIntsQuery {
    4848public:
    49   UnsignedIntsCommandLineQuery(std::string title, std::string _description = "");
     49  UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description = "");
    5050  virtual ~UnsignedIntsCommandLineQuery();
    5151  virtual bool handle();
     
    5454class CommandLineDialog::BooleanCommandLineQuery : public Dialog::BooleanQuery {
    5555public:
    56   BooleanCommandLineQuery(std::string title, std::string _description = "");
     56  BooleanCommandLineQuery(Parameter<bool> &param, std::string title, std::string _description = "");
    5757  virtual ~BooleanCommandLineQuery();
    5858  virtual bool handle();
     
    6161class CommandLineDialog::DoubleCommandLineQuery : public Dialog::DoubleQuery {
    6262public:
    63   DoubleCommandLineQuery(std::string title, std::string _description = "");
     63  DoubleCommandLineQuery(Parameter<double> &param, std::string title, std::string _description = "");
    6464  virtual ~DoubleCommandLineQuery();
    6565  virtual bool handle();
     
    6868class CommandLineDialog::DoublesCommandLineQuery : public Dialog::DoublesQuery {
    6969public:
    70   DoublesCommandLineQuery(std::string title, std::string _description = "");
     70  DoublesCommandLineQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description = "");
    7171  virtual ~DoublesCommandLineQuery();
    7272  virtual bool handle();
     
    7575class CommandLineDialog::StringCommandLineQuery : public Dialog::StringQuery {
    7676public:
    77   StringCommandLineQuery(std::string title, std::string _description = "");
     77  StringCommandLineQuery(Parameter<std::string> &param, std::string title, std::string _description = "");
    7878  virtual ~StringCommandLineQuery();
    7979  virtual bool handle();
     
    8282class CommandLineDialog::StringsCommandLineQuery : public Dialog::StringsQuery {
    8383public:
    84   StringsCommandLineQuery(std::string title, std::string _description = "");
     84  StringsCommandLineQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description = "");
    8585  virtual ~StringsCommandLineQuery();
    8686  virtual bool handle();
     
    8989class CommandLineDialog::AtomCommandLineQuery : public Dialog::AtomQuery {
    9090public:
    91   AtomCommandLineQuery(std::string title, std::string _description = "");
     91  AtomCommandLineQuery(Parameter<const atom *> &param, std::string title, std::string _description = "");
    9292  virtual ~AtomCommandLineQuery();
    9393  virtual bool handle();
     
    9696class CommandLineDialog::AtomsCommandLineQuery : public Dialog::AtomsQuery {
    9797public:
    98   AtomsCommandLineQuery(std::string title, std::string _description = "");
     98  AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description = "");
    9999  virtual ~AtomsCommandLineQuery();
    100100  virtual bool handle();
     
    103103class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::MoleculeQuery {
    104104public:
    105   MoleculeCommandLineQuery(std::string title, std::string _description = "");
     105  MoleculeCommandLineQuery(Parameter<const molecule *> &param, std::string title, std::string _description = "");
    106106  virtual ~MoleculeCommandLineQuery();
    107107  virtual bool handle();
     
    110110class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::MoleculesQuery {
    111111public:
    112   MoleculesCommandLineQuery(std::string title, std::string _description = "");
     112  MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description = "");
    113113  virtual ~MoleculesCommandLineQuery();
    114114  virtual bool handle();
     
    117117class CommandLineDialog::VectorCommandLineQuery : public Dialog::VectorQuery {
    118118public:
    119   VectorCommandLineQuery(std::string title,bool _check, std::string _description = "");
     119  VectorCommandLineQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description = "");
    120120  virtual ~VectorCommandLineQuery();
    121121  virtual bool handle();
     
    124124class CommandLineDialog::VectorsCommandLineQuery : public Dialog::VectorsQuery {
    125125public:
    126   VectorsCommandLineQuery(std::string title,bool _check, std::string _description = "");
     126  VectorsCommandLineQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description = "");
    127127  virtual ~VectorsCommandLineQuery();
    128128  virtual bool handle();
    129129};
    130130
    131 class CommandLineDialog::BoxCommandLineQuery : public Dialog::BoxQuery {
     131class CommandLineDialog::RealSpaceMatrixCommandLineQuery : public Dialog::RealSpaceMatrixQuery {
    132132public:
    133   BoxCommandLineQuery(std::string title, std::string _description = "");
    134   virtual ~BoxCommandLineQuery();
     133  RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description = "");
     134  virtual ~RealSpaceMatrixCommandLineQuery();
    135135  virtual bool handle();
    136136};
     
    138138class CommandLineDialog::ElementCommandLineQuery : public Dialog::ElementQuery {
    139139public:
    140   ElementCommandLineQuery(std::string title, std::string _description = "");
     140  ElementCommandLineQuery(Parameter<const element *> &param, std::string title, std::string _description = "");
    141141  virtual ~ElementCommandLineQuery();
    142142  virtual bool handle();
     
    145145class CommandLineDialog::ElementsCommandLineQuery : public Dialog::ElementsQuery {
    146146public:
    147   ElementsCommandLineQuery(std::string title, std::string _description = "");
     147  ElementsCommandLineQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description = "");
    148148  virtual ~ElementsCommandLineQuery();
    149149  virtual bool handle();
     
    152152class CommandLineDialog::FileCommandLineQuery : public Dialog::FileQuery {
    153153public:
    154   FileCommandLineQuery(std::string title, std::string _description = "");
     154  FileCommandLineQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description = "");
    155155  virtual ~FileCommandLineQuery();
    156156  virtual bool handle();
     
    159159class CommandLineDialog::FilesCommandLineQuery : public Dialog::FilesQuery {
    160160public:
    161   FilesCommandLineQuery(std::string title, std::string _description = "");
     161  FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = "");
    162162  virtual ~FilesCommandLineQuery();
    163163  virtual bool handle();
     
    166166class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
    167167public:
    168   RandomNumberDistribution_ParametersCommandLineQuery(std::string title, std::string _description = "");
     168  RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description = "");
    169169  virtual ~RandomNumberDistribution_ParametersCommandLineQuery();
    170170  virtual bool handle();
  • src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2626
    2727
    28 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(std::string title, std::string _description) :
    29     Dialog::DoubleQuery(title, _description)
     28CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(Parameter<double> &param, std::string title, std::string _description) :
     29    Dialog::DoubleQuery(param, title, _description)
    3030{}
    3131
     
    3434bool CommandLineDialog::DoubleCommandLineQuery::handle() {
    3535  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    36     tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();
     36    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<double>());
    3737    return true;
    3838  } else {
  • src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::DoublesQuery(title, _description)
     27CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
     28    Dialog::DoublesQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::DoublesCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2828#include "World.hpp"
    2929
    30 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(std::string title, std::string _description) :
    31     Dialog::ElementQuery(title, _description)
     30CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(Parameter<const element*> &param, std::string title, std::string _description) :
     31    Dialog::ElementQuery(param, title, _description)
    3232{}
    3333
     
    4040  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4141    int Z = CommandLineParser::getInstance().vm[getTitle()].as< int >();
    42     tmp = periode->FindElement(Z);
    43     ASSERT(tmp != NULL, "Invalid element specified in ElementCommandLineQuery");
     42    tmp.set(periode->FindElement(Z));
     43    ASSERT(tmp.get() != NULL, "Invalid element specified in ElementCommandLineQuery");
    4444    return true;
    4545  } else {
  • src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2828#include "World.hpp"
    2929
    30 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(std::string title, std::string _description) :
    31     Dialog::ElementsQuery(title, _description)
     30CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(Parameter<std::vector<const element*> > &param, std::string title, std::string _description) :
     31    Dialog::ElementsQuery(param, title, _description)
    3232{}
    3333
     
    4040  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4141    vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
     42    vector<const element *> temp_elements;
    4243    for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) {
    4344      temp = periode->FindElement(*ZRunner);
    4445      ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery");
    45       tmp.push_back(temp);
     46      temp_elements.push_back(temp);
    4647    }
     48    tmp.set(temp_elements);
    4749    return true;
    4850  } else {
  • src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::FileQuery(title, _description)
     27CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
     28    Dialog::FileQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::FileCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::FilesQuery(title, _description)
     27CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
     28    Dialog::FilesQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::FilesCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<boost::filesystem::path> >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<boost::filesystem::path> >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::IntQuery(title, _description)
     27CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(Parameter<int> &param, std::string title, std::string _description) :
     28    Dialog::IntQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::IntCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<int>());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::IntsQuery(title, _description)
     27CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description) :
     28    Dialog::IntsQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::IntsCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2828#include "CodePatterns/Verbose.hpp"
    2929
    30 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(std::string title, std::string _description) :
    31     Dialog::MoleculeQuery(title, _description)
     30CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
     31    Dialog::MoleculeQuery(param, title, _description)
    3232{}
    3333
     
    3838  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    3939    IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>();
    40     tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));
     40    tmp.set(World::getInstance().getMolecule(MoleculeById(IdxOfMol)));
    4141    return true;
    4242  } else {
  • src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2929#include "World.hpp"
    3030
    31 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(std::string title, std::string _description) :
    32     Dialog::MoleculesQuery(title, _description)
     31CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
     32    Dialog::MoleculesQuery(param, title, _description)
    3333{}
    3434
     
    3939  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4040    IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
     41    std::vector<const molecule *> temp_molecules;
    4142    for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) {
    4243      temp = World::getInstance().getMolecule(MoleculeById(*iter));
    4344      if (temp)
    44         tmp.push_back(temp);
     45        temp_molecules.push_back(temp);
    4546    }
     47    tmp.set(temp_molecules);
    4648    return true;
    4749  } else {
  • src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    3131#include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
    3232
    33 CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(std::string title, std::string _description) :
    34     Dialog::RandomNumberDistribution_ParametersQuery(title, _description)
     33CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
     34    Dialog::RandomNumberDistribution_ParametersQuery(param, title, _description)
    3535{}
    3636
     
    4242    std::stringstream text(stringtext);
    4343//    LOG(1, "INFO: Parameter set from CommandLine is '" << text.str() << "'");
    44     text >> tmp;
     44    RandomNumberDistribution_Parameters temp_params;
     45    text >> temp_params;
     46    tmp.set(temp_params);
    4547    return true;
    4648  } else {
  • src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::StringQuery(title, _description)
     27CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(Parameter<std::string> &param, std::string title, std::string _description) :
     28    Dialog::StringQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::StringCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<string>());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::StringsQuery(title, _description)
     27CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description) :
     28    Dialog::StringsQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::StringsCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::UnsignedIntQuery(title, _description)
     27CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(Parameter<unsigned int> &param, std::string title, std::string _description) :
     28    Dialog::UnsignedIntQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::UnsignedIntCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/Verbose.hpp"
    2626
    27 CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(std::string title, std::string _description) :
    28     Dialog::UnsignedIntsQuery(title, _description)
     27CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description) :
     28    Dialog::UnsignedIntsQuery(param, title, _description)
    2929{}
    3030
     
    3333bool CommandLineDialog::UnsignedIntsCommandLineQuery::handle() {
    3434  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    35     tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >();
     35    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >());
    3636    return true;
    3737  } else {
  • src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2929#include "World.hpp"
    3030
    31 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(std::string title, bool _check, std::string _description) :
    32     Dialog::VectorQuery(title,_check, _description)
     31CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(Parameter<Vector> &param, std::string title, bool _check, std::string _description) :
     32    Dialog::VectorQuery(param, title,_check, _description)
    3333{}
    3434
     
    4040  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4141    temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >();
    42     tmp = temp.toVector();
    43     if ((check) && (!World::getInstance().getDomain().isValid(tmp))) {
    44       ELOG(1, "Vector " << tmp << " would be outside of box domain.");
     42    Vector temp_vector = temp.toVector();
     43    if ((check) && (!World::getInstance().getDomain().isValid(temp_vector))) {
     44      ELOG(1, "Vector " << temp_vector << " would be outside of box domain.");
    4545      return false;
    4646    }
     47    tmp.set(temp_vector);
    4748    return true;
    4849  } else {
  • src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp

    r5ffa05 rbd81f9  
    2929#include "World.hpp"
    3030
    31 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(std::string title, bool _check, std::string _description) :
    32     Dialog::VectorsQuery(title,_check, _description)
     31CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check, std::string _description) :
     32    Dialog::VectorsQuery(param, title,_check, _description)
    3333{}
    3434
     
    4040  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4141    temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >();
     42    std::vector<Vector> temp_vectors;
    4243    for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) {
    4344      temp = (*iter).toVector();
    4445      if ((!check) || (World::getInstance().getDomain().isValid(temp)))
    45         tmp.push_back(temp);
     46        temp_vectors.push_back(temp);
    4647      else
    4748        ELOG(1, "Vector " << temp << " would be outside of box domain.");
    4849    }
     50    tmp.set(temp_vectors);
    4951    return true;
    5052  } else {
  • src/UIElements/CommandLineUI/TypeEnumContainer.cpp

    r5ffa05 rbd81f9  
    3131
    3232#include "Atom/atom.hpp"
    33 #include "Box.hpp"
    3433#include "LinearAlgebra/BoxVector.hpp"
     34#include "LinearAlgebra/RealSpaceMatrix.hpp"
    3535#include "LinearAlgebra/Vector.hpp"
    3636#include "Element/element.hpp"
     
    4545  TypeEnumMap[&typeid(void)] = NoneType;
    4646  TypeEnumMap[&typeid(bool)] = BooleanType;
    47   TypeEnumMap[&typeid(Box)] = BoxType;
     47  TypeEnumMap[&typeid(RealSpaceMatrix)] = RealSpaceMatrixType;
    4848  TypeEnumMap[&typeid(BoxVector)] = VectorType;
    4949  TypeEnumMap[&typeid(Vector)] = VectorType;
  • src/UIElements/CommandLineUI/TypeEnumContainer.hpp

    r5ffa05 rbd81f9  
    2828  enum EnumOfTypes { NoneType,
    2929        BooleanType,
    30         BoxType,
    3130        FileType,
    3231        ListOfFilesType,
     
    4746        ElementType,
    4847        ListOfElementsType,
    49         RandomNumberDistribution_ParametersType
     48        RandomNumberDistribution_ParametersType,
     49        RealSpaceMatrixType
    5050  };
    5151
  • src/UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistencyUnitTest.cpp

    r5ffa05 rbd81f9  
    2828#include "Actions/ActionTrait.hpp"
    2929#include "UIElements/CommandLineUI/CommandLineParser.hpp"
     30#include "World.hpp"
     31#include "WorldTime.hpp"
    3032
    3133#include "CommandLineParser_ActionRegistry_ConsistencyUnitTest.hpp"
     
    4547void CommandLineParser_ActionRegistry_ConsistencyTest::setUp()
    4648{
    47   AR = ActionRegistry::getPointer();
     49  CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer());
    4850  CLP = CommandLineParser::getPointer();
    4951};
     
    5456  CommandLineParser::purgeInstance();
    5557  ActionRegistry::purgeInstance();
     58  // these come about because of the validators accessing them instantiated
     59  // by ActionRegistry. In ActionRegistryUnitTest we used stubs for them but
     60  // here we care whether default values are actually valid.
     61  World::purgeInstance();
     62  WorldTime::purgeInstance();
    5663};
    5764
  • src/UIElements/Dialog.cpp

    r5ffa05 rbd81f9  
    2626#include "CodePatterns/Verbose.hpp"
    2727
     28#include "Parameters/ParameterExceptions.hpp"
     29
    2830class Atom;
    29 class Box;
    3031class element;
    3132class RealSpaceMatrix;
     
    6566  bool retval = true;
    6667  for(iter=queries.begin(); iter!=queries.end(); iter++){
    67     retval &= (*iter)->handle();
     68    try {
     69      retval &= (*iter)->handle();
     70    } catch (ParameterException &e) {
     71      if( const std::string *name=boost::get_error_info<ParameterName>(e) )
     72        ELOG(1, "The following parameter value is not valid: " << *name << ".");
     73      retval = false;
     74      break;
     75    }
    6876    // if any query fails (is canceled), we can end the handling process
    6977    if(!retval) {
     
    7886  list<Query*>::iterator iter;
    7987  for(iter=queries.begin(); iter!=queries.end(); iter++) {
    80     (*iter)->setResult();
     88    try {
     89      (*iter)->setResult();
     90    } catch (ParameterException &e) {
     91      if( const std::string *name=boost::get_error_info<ParameterName>(e) )
     92        ELOG(1, "The following parameter value is not valid: " << *name << ".");
     93      break;
     94    }
    8195  }
    8296}
     
    86100}
    87101
    88 template <> void Dialog::query<void *>(const char *token, std::string description)
     102template <> void Dialog::query<void *>(Parameter<void *> &param, const char *token, std::string description)
    89103{
    90104  queryEmpty(token, description);
    91105}
    92106
    93 template <> void Dialog::query<bool>(const char *token, std::string description)
    94 {
    95   queryBoolean(token, description);
    96 }
    97 
    98 template <> void Dialog::query<int>(const char *token, std::string description)
    99 {
    100   queryInt(token, description);
    101 }
    102 
    103 template <> void Dialog::query< std::vector<int> >(const char *token, std::string description)
    104 {
    105   queryInts(token, description);
    106 }
    107 
    108 template <> void Dialog::query<unsigned int>(const char *token, std::string description)
    109 {
    110   queryUnsignedInt(token, description);
    111 }
    112 
    113 template <> void Dialog::query< std::vector<unsigned int> >(const char *token, std::string description)
    114 {
    115   queryUnsignedInts(token, description);
    116 }
    117 
    118 template <> void Dialog::query<double>(const char *token, std::string description)
    119 {
    120   queryDouble(token, description);
    121 }
    122 
    123 template <> void Dialog::query< std::vector<double> >(const char *token, std::string description)
    124 {
    125   queryDoubles(token, description);
    126 }
    127 
    128 template <> void Dialog::query<std::string>(const char *token, std::string description)
    129 {
    130   queryString(token, description);
    131 }
    132 
    133 template <> void Dialog::query< std::vector<std::string> >(const char *token, std::string description)
    134 {
    135   queryStrings(token, description);
    136 }
    137 
    138 template <> void Dialog::query<const atom *>(const char *token, std::string description)
    139 {
    140   queryAtom(token, description);
    141 }
    142 
    143 template <> void Dialog::query< std::vector<const atom *> >(const char *token, std::string description)
    144 {
    145   queryAtoms(token, description);
    146 }
    147 
    148 template <> void Dialog::query<const molecule *>(const char *token, std::string description)
    149 {
    150   queryMolecule(token, description);
    151 }
    152 
    153 template <> void Dialog::query< std::vector<const molecule *> >(const char *token, std::string description)
    154 {
    155   queryMolecules(token, description);
    156 }
    157 
    158 template <> void Dialog::query<Vector>(const char *token, std::string description)
    159 {
    160   queryVector(token, false, description);
    161 }
    162 
    163 template <> void Dialog::query< std::vector<Vector> >(const char *token, std::string description)
    164 {
    165   queryVectors(token, false, description);
    166 }
    167 
    168 template <> void Dialog::query<BoxVector>(const char *token, std::string description)
    169 {
    170   queryVector(token, true, description);
    171 }
    172 
    173 template <> void Dialog::query< std::vector<BoxVector> >(const char *token, std::string description)
    174 {
    175   queryVectors(token, true, description);
    176 }
    177 
    178 template <> void Dialog::query<Box>(const char *token, std::string description)
    179 {
    180   queryBox(token, description);
    181 }
    182 
    183 template <> void Dialog::query<const element *>(const char *token, std::string description)
    184 {
    185   queryElement(token, description);
    186 }
    187 
    188 template <> void Dialog::query< std::vector<const element *> >(const char *token, std::string description)
    189 {
    190   queryElements(token, description);
    191 }
    192 
    193 template <> void Dialog::query< boost::filesystem::path >(const char *token, std::string description)
    194 {
    195   queryFile(token, description);
    196 }
    197 
    198 template <> void Dialog::query< std::vector<boost::filesystem::path> >(const char *token, std::string description)
    199 {
    200   queryFiles(token, description);
    201 }
    202 
    203 template <> void Dialog::query< RandomNumberDistribution_Parameters >(const char *token, std::string description)
    204 {
    205   queryRandomNumberDistribution_Parameters(token, description);
     107template <> void Dialog::query<bool>(Parameter<bool> &param, const char *token, std::string description)
     108{
     109  queryBoolean(param, token, description);
     110}
     111
     112template <> void Dialog::query<int>(Parameter<int> &param, const char *token, std::string description)
     113{
     114  queryInt(param, token, description);
     115}
     116
     117template <> void Dialog::query< std::vector<int> >(Parameter<std::vector<int> > &param, const char *token, std::string description)
     118{
     119  queryInts(param, token, description);
     120}
     121
     122template <> void Dialog::query<unsigned int>(Parameter<unsigned int> &param, const char *token, std::string description)
     123{
     124  queryUnsignedInt(param, token, description);
     125}
     126
     127template <> void Dialog::query< std::vector<unsigned int> >(Parameter<std::vector<unsigned int> > &param, const char *token, std::string description)
     128{
     129  queryUnsignedInts(param, token, description);
     130}
     131
     132template <> void Dialog::query<double>(Parameter<double> &param, const char *token, std::string description)
     133{
     134  queryDouble(param, token, description);
     135}
     136
     137template <> void Dialog::query< std::vector<double> >(Parameter<std::vector<double> > &param, const char *token, std::string description)
     138{
     139  queryDoubles(param, token, description);
     140}
     141
     142template <> void Dialog::query<std::string>(Parameter<std::string> &param, const char *token, std::string description)
     143{
     144  queryString(param, token, description);
     145}
     146
     147template <> void Dialog::query< std::vector<std::string> >(Parameter<std::vector<std::string> > &param, const char *token, std::string description)
     148{
     149  queryStrings(param, token, description);
     150}
     151
     152template <> void Dialog::query<const atom *>(Parameter<const atom *> &param, const char *token, std::string description)
     153{
     154  queryAtom(param, token, description);
     155}
     156
     157template <> void Dialog::query< std::vector<const atom *> >(Parameter<std::vector<const atom *> > &param, const char *token, std::string description)
     158{
     159  queryAtoms(param, token, description);
     160}
     161
     162template <> void Dialog::query<const molecule *>(Parameter<const molecule *> &param, const char *token, std::string description)
     163{
     164  queryMolecule(param, token, description);
     165}
     166
     167template <> void Dialog::query< std::vector<const molecule *> >(Parameter<std::vector<const molecule *> > &param, const char *token, std::string description)
     168{
     169  queryMolecules(param, token, description);
     170}
     171
     172template <> void Dialog::query<Vector>(Parameter<Vector> &param, const char *token, std::string description)
     173{
     174  queryVector(param, token, false, description);
     175}
     176
     177template <> void Dialog::query< std::vector<Vector> >(Parameter<std::vector<Vector> > &param, const char *token, std::string description)
     178{
     179  queryVectors(param, token, false, description);
     180}
     181
     182template <> void Dialog::query<BoxVector>(Parameter<BoxVector> &param, const char *token, std::string description)
     183{
     184  ASSERT(0, "TODO: query<BoxVector>");
     185  //queryVector(param, token, true, description);
     186}
     187
     188template <> void Dialog::query< std::vector<BoxVector> >(Parameter<std::vector<BoxVector> > &param, const char *token, std::string description)
     189{
     190  ASSERT(0, "TODO: query<vector<BoxVector> >");
     191  //queryVectors(param, token, true, description);
     192}
     193
     194template <> void Dialog::query<RealSpaceMatrix>(Parameter<RealSpaceMatrix> &param, const char *token, std::string description)
     195{
     196  queryRealSpaceMatrix(param, token, description);
     197}
     198
     199template <> void Dialog::query<const element *>(Parameter<const element *> &param, const char *token, std::string description)
     200{
     201  queryElement(param, token, description);
     202}
     203
     204template <> void Dialog::query< std::vector<const element *> >(Parameter<std::vector<const element *> > &param, const char *token, std::string description)
     205{
     206  queryElements(param, token, description);
     207}
     208
     209template <> void Dialog::query< boost::filesystem::path >(Parameter<boost::filesystem::path> &param, const char *token, std::string description)
     210{
     211  queryFile(param, token, description);
     212}
     213
     214template <> void Dialog::query< std::vector<boost::filesystem::path> >(Parameter<std::vector< boost::filesystem::path> > &param, const char *token, std::string description)
     215{
     216  queryFiles(param, token, description);
     217}
     218
     219template <> void Dialog::query< RandomNumberDistribution_Parameters >(Parameter<RandomNumberDistribution_Parameters> &param, const char *token, std::string description)
     220{
     221  queryRandomNumberDistribution_Parameters(param, token, description);
    206222}
    207223
  • src/UIElements/Dialog.hpp

    r5ffa05 rbd81f9  
    2020
    2121#include <boost/filesystem.hpp>
    22 #include "Box.hpp"
     22#include "LinearAlgebra/RealSpaceMatrix.hpp"
    2323#include "LinearAlgebra/Vector.hpp"
    2424#include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
     25#include "Parameters/Parameter.hpp"
    2526
    2627class atom;
    27 class Box;
     28class RealSpaceMatrix;
    2829class element;
    2930class molecule;
     
    155156  virtual ~Dialog();
    156157
    157   template <class T> void query(const char *, std::string = "");
     158  template <class T> void query(Parameter<T> &, const char *, std::string = "");
    158159
    159160  virtual void queryEmpty(const char *, std::string = "")=0;
    160   virtual void queryBoolean(const char *, std::string = "")=0;
    161   virtual void queryInt(const char *, std::string = "")=0;
    162   virtual void queryInts(const char *, std::string = "")=0;
    163   virtual void queryUnsignedInt(const char *, std::string = "")=0;
    164   virtual void queryUnsignedInts(const char *, std::string = "")=0;
    165   virtual void queryDouble(const char*, std::string = "")=0;
    166   virtual void queryDoubles(const char*, std::string = "")=0;
    167   virtual void queryString(const char*, std::string = "")=0;
    168   virtual void queryStrings(const char*, std::string = "")=0;
    169   virtual void queryAtom(const char*,std::string = "")=0;
    170   virtual void queryAtoms(const char*,std::string = "")=0;
    171   virtual void queryMolecule(const char*, std::string = "")=0;
    172   virtual void queryMolecules(const char*, std::string = "")=0;
    173   virtual void queryVector(const char*,bool, std::string = "")=0;
    174   virtual void queryVectors(const char*,bool, std::string = "")=0;
    175   virtual void queryBox(const char*, std::string = "")=0;
    176   virtual void queryElement(const char*, std::string = "")=0;
    177   virtual void queryElements(const char*, std::string = "")=0;
    178   virtual void queryFile(const char*, std::string = "")=0;
    179   virtual void queryFiles(const char*, std::string = "")=0;
    180   virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "")=0;
     161  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "")=0;
     162  virtual void queryInt(Parameter<int> &, const char *, std::string = "")=0;
     163  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "")=0;
     164  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "")=0;
     165  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "")=0;
     166  virtual void queryDouble(Parameter<double> &, const char*, std::string = "")=0;
     167  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "")=0;
     168  virtual void queryString(Parameter<std::string> &, const char*, std::string = "")=0;
     169  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "")=0;
     170  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "")=0;
     171  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "")=0;
     172  virtual void queryMolecule(Parameter<const molecule *> &, const char*, std::string = "")=0;
     173  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*, std::string = "")=0;
     174  virtual void queryVector(Parameter<Vector> &, const char*,bool, std::string = "")=0;
     175  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool, std::string = "")=0;
     176  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "")=0;
     177  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "")=0;
     178  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "")=0;
     179  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "")=0;
     180  virtual void queryFiles(Parameter< std::vector<boost::filesystem::path> > &, const char*, std::string = "")=0;
     181  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "")=0;
    181182
    182183  virtual bool display();
     
    265266  class BooleanQuery : public Query {
    266267  public:
    267     BooleanQuery(std::string title, std::string _description = "");
     268    BooleanQuery(Parameter<bool> &param, std::string title, std::string _description = "");
    268269    virtual ~BooleanQuery();
    269270    virtual bool handle()=0;
    270271    virtual void setResult();
    271272  protected:
    272     bool tmp;
     273    Parameter<bool> &tmp;
    273274  };
    274275
    275276  class IntQuery : public Query {
    276277  public:
    277     IntQuery(std::string title, std::string _description = "");
     278    IntQuery(Parameter<int> &param, std::string title, std::string _description = "");
    278279    virtual ~IntQuery();
    279280    virtual bool handle()=0;
    280281    virtual void setResult();
    281282  protected:
    282     int tmp;
     283    Parameter<int> &tmp;
    283284  };
    284285
    285286  class IntsQuery : public Query {
    286287  public:
    287     IntsQuery(std::string title, std::string _description = "");
     288    IntsQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = "");
    288289    virtual ~IntsQuery();
    289290    virtual bool handle()=0;
     
    291292  protected:
    292293    int temp;
    293     std::vector<int> tmp;
     294    Parameter<std::vector<int> > &tmp;
    294295  };
    295296
    296297  class UnsignedIntQuery : public Query {
    297298  public:
    298     UnsignedIntQuery(std::string title, std::string _description = "");
     299    UnsignedIntQuery(Parameter<unsigned int> &, std::string title, std::string _description = "");
    299300    virtual ~UnsignedIntQuery();
    300301    virtual bool handle()=0;
    301302    virtual void setResult();
    302303  protected:
    303     unsigned int tmp;
     304    Parameter<unsigned int> &tmp;
    304305  };
    305306
    306307  class UnsignedIntsQuery : public Query {
    307308  public:
    308     UnsignedIntsQuery(std::string title, std::string _description = "");
     309    UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = "");
    309310    virtual ~UnsignedIntsQuery();
    310311    virtual bool handle()=0;
     
    312313  protected:
    313314    unsigned int temp;
    314     std::vector<unsigned int> tmp;
     315    Parameter<std::vector<unsigned int> > &tmp;
    315316  };
    316317
    317318  class DoubleQuery : public Query {
    318319  public:
    319     DoubleQuery(std::string title, std::string _description = "");
     320    DoubleQuery(Parameter<double> &, std::string title, std::string _description = "");
    320321    virtual ~DoubleQuery();
    321322    virtual bool handle()=0;
    322323    virtual void setResult();
    323324  protected:
    324     double tmp;
     325    Parameter<double> &tmp;
    325326  };
    326327
    327328  class DoublesQuery : public Query {
    328329  public:
    329     DoublesQuery(std::string title, std::string _description = "");
     330    DoublesQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = "");
    330331    virtual ~DoublesQuery();
    331332    virtual bool handle()=0;
     
    333334  protected:
    334335    double temp;
    335     std::vector<double> tmp;
     336    Parameter<std::vector<double> > &tmp;
    336337  };
    337338
    338339  class StringQuery : public Query {
    339340  public:
    340     StringQuery(std::string title, std::string _description = "");
     341    StringQuery(Parameter<std::string> &param, std::string title, std::string _description = "");
    341342    virtual ~StringQuery();
    342343    virtual bool handle()=0;
    343344    virtual void setResult();
    344345  protected:
    345     std::string tmp;
     346    Parameter<std::string> &tmp;
    346347  };
    347348
    348349  class StringsQuery : public Query {
    349350  public:
    350     StringsQuery(std::string title, std::string _description = "");
     351    StringsQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description = "");
    351352    virtual ~StringsQuery();
    352353    virtual bool handle()=0;
     
    354355  protected:
    355356    std::string temp;
    356     std::vector<std::string> tmp;
     357    Parameter<std::vector<std::string> > &tmp;
    357358  };
    358359
    359360  class MoleculeQuery : public Query {
    360361  public:
    361     MoleculeQuery(std::string title, std::string _description = "");
     362    MoleculeQuery(Parameter<const molecule *> &param, std::string title, std::string _description = "");
    362363    virtual ~MoleculeQuery();
    363364    virtual bool handle()=0;
    364365    virtual void setResult();
    365366  protected:
    366     const molecule *tmp;
     367    Parameter<const molecule *> &tmp;
    367368  };
    368369
    369370  class MoleculesQuery : public Query {
    370371  public:
    371     MoleculesQuery(std::string title, std::string _description = "");
     372    MoleculesQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description = "");
    372373    virtual ~MoleculesQuery();
    373374    virtual bool handle()=0;
     
    375376  protected:
    376377    const molecule * temp;
    377     std::vector<const molecule *> tmp;
     378    Parameter<std::vector<const molecule *> > &tmp;
    378379  };
    379380
    380381  class AtomQuery : public Query {
    381382  public:
    382     AtomQuery(std::string title, std::string _description = "");
     383    AtomQuery(Parameter<const atom *> &param, std::string title, std::string _description = "");
    383384    virtual ~AtomQuery();
    384385    virtual bool handle()=0;
    385386    virtual void setResult();
    386387  protected:
    387     const atom *tmp;
     388    Parameter<const atom *> &tmp;
    388389  };
    389390
    390391  class AtomsQuery : public Query {
    391392  public:
    392     AtomsQuery(std::string title, std::string _description = "");
     393    AtomsQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description = "");
    393394    virtual ~AtomsQuery();
    394395    virtual bool handle()=0;
     
    396397  protected:
    397398    const atom *temp;
    398     std::vector<const atom *> tmp;
     399    Parameter<std::vector<const atom *> > &tmp;
    399400  };
    400401
    401402  class VectorQuery : public Query {
    402403  public:
    403       VectorQuery(std::string title,bool _check, std::string _description = "");
     404      VectorQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description = "");
    404405      virtual ~VectorQuery();
    405406      virtual bool handle()=0;
    406407      virtual void setResult();
    407408    protected:
    408       Vector tmp;
     409      Parameter<Vector> &tmp;
    409410      bool check;
    410411  };
     
    412413  class VectorsQuery : public Query {
    413414  public:
    414       VectorsQuery(std::string title,bool _check, std::string _description = "");
     415      VectorsQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description = "");
    415416      virtual ~VectorsQuery();
    416417      virtual bool handle()=0;
     
    418419    protected:
    419420      Vector temp;
    420       std::vector<Vector> tmp;
     421      Parameter<std::vector<Vector> > &tmp;
    421422      bool check;
    422423  };
    423424
    424   class BoxQuery : public Query {
    425   public:
    426       BoxQuery(std::string title, std::string _description = "");
    427       virtual ~BoxQuery();
     425  class RealSpaceMatrixQuery : public Query {
     426  public:
     427      RealSpaceMatrixQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description = "");
     428      virtual ~RealSpaceMatrixQuery();
    428429      virtual bool handle()=0;
    429430      virtual void setResult();
    430431    protected:
    431       Box tmp;
     432      Parameter<RealSpaceMatrix> &tmp;
    432433  };
    433434
    434435  class ElementQuery : public Query {
    435436  public:
    436     ElementQuery(std::string title, std::string _description = "");
     437    ElementQuery(Parameter<const element*> &param, std::string title, std::string _description = "");
    437438    virtual ~ElementQuery();
    438439    virtual bool handle()=0;
    439440    virtual void setResult();
    440441  protected:
    441     const element * tmp;
     442    Parameter<const element *> &tmp;
    442443  };
    443444
    444445  class ElementsQuery : public Query {
    445446  public:
    446     ElementsQuery(std::string title, std::string _description = "");
     447    ElementsQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description = "");
    447448    virtual ~ElementsQuery();
    448449    virtual bool handle()=0;
     
    450451  protected:
    451452    const element *temp;
    452     std::vector<const element *> tmp;
     453    Parameter<std::vector<const element *> > &tmp;
    453454  };
    454455
    455456  class FileQuery : public Query {
    456457  public:
    457     FileQuery(std::string title, std::string _description = "");
     458    FileQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description = "");
    458459    virtual ~FileQuery();
    459460    virtual bool handle()=0;
    460461    virtual void setResult();
    461462  protected:
    462     boost::filesystem::path tmp;
     463    Parameter<boost::filesystem::path> &tmp;
    463464  };
    464465
    465466  class FilesQuery : public Query {
    466467  public:
    467     FilesQuery(std::string title, std::string _description = "");
     468    FilesQuery(Parameter<std::vector<boost::filesystem::path> > &param, std::string title, std::string _description = "");
    468469    virtual ~FilesQuery();
    469470    virtual bool handle()=0;
    470471    virtual void setResult();
    471472  protected:
    472     std::vector<boost::filesystem::path> tmp;
     473    Parameter<std::vector<boost::filesystem::path> > &tmp;
    473474  };
    474475
    475476  class RandomNumberDistribution_ParametersQuery : public Query {
    476477  public:
    477     RandomNumberDistribution_ParametersQuery(std::string title, std::string _description = "");
     478    RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description = "");
    478479    virtual ~RandomNumberDistribution_ParametersQuery();
    479480    virtual bool handle()=0;
    480481    virtual void setResult();
    481482  protected:
    482     RandomNumberDistribution_Parameters tmp;
     483    Parameter<RandomNumberDistribution_Parameters> &tmp;
    483484  };
    484485
  • src/UIElements/Makefile.am

    r5ffa05 rbd81f9  
    55  UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp \
    66  UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp \
    7   UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp \
    87  UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp \
    98  UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp \
     
    1716  UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp \
    1817  UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp \
     18  UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp \
    1919  UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp \
    2020  UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp \
     
    7575  UIElements/TextUI/Query/AtomTextQuery.cpp \
    7676  UIElements/TextUI/Query/BooleanTextQuery.cpp \
    77   UIElements/TextUI/Query/BoxTextQuery.cpp \
    7877  UIElements/TextUI/Query/DoubleTextQuery.cpp \
    7978  UIElements/TextUI/Query/DoublesTextQuery.cpp \
     
    8786  UIElements/TextUI/Query/MoleculesTextQuery.cpp \
    8887  UIElements/TextUI/Query/MoleculeTextQuery.cpp \
     88  UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp \
    8989  UIElements/TextUI/Query/StringTextQuery.cpp \
    9090  UIElements/TextUI/Query/StringsTextQuery.cpp \
     
    125125  UIElements/Query/AtomsQuery.cpp \
    126126  UIElements/Query/BooleanQuery.cpp \
    127   UIElements/Query/BoxQuery.cpp \
    128127  UIElements/Query/DoubleQuery.cpp \
    129128  UIElements/Query/DoublesQuery.cpp \
     
    139138  UIElements/Query/Query.cpp \
    140139  UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp \
     140  UIElements/Query/RealSpaceMatrixQuery.cpp \
    141141  UIElements/Query/StringQuery.cpp \
    142142  UIElements/Query/StringsQuery.cpp \
     
    161161  UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp \
    162162  UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp \
    163   UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp \
    164163  UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp \
    165164  UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp \
     
    175174  UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp \
    176175  UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp \
     176  UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp \
    177177  UIElements/Qt4/Query/AtomQtQuery.cpp \
    178178  UIElements/Qt4/Query/AtomsQtQuery.cpp \
    179179  UIElements/Qt4/Query/BooleanQtQuery.cpp \
    180   UIElements/Qt4/Query/BoxQtQuery.cpp \
    181180  UIElements/Qt4/Query/DoubleQtQuery.cpp \
    182181  UIElements/Qt4/Query/DoublesQtQuery.cpp \
     
    190189  UIElements/Qt4/Query/MoleculeQtQuery.cpp \
    191190  UIElements/Qt4/Query/MoleculesQtQuery.cpp \
     191  UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp \
    192192  UIElements/Qt4/Query/StringQtQuery.cpp \
    193193  UIElements/Qt4/Query/StringsQtQuery.cpp \
     
    219219  UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp \
    220220  UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp \
    221   UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp \
    222221  UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp \
    223222  UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp \
     
    229228  UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp \
    230229  UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp \
     230  UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp \
    231231  UIElements/Qt4/Pipe/StringQtQueryPipe.hpp \
    232232  UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp \
     
    269269        $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
    270270        $(BOOST_RANDOM_LDFLAGS) \
     271        $(BOOST_SERIALIZATION_LDFLAGS)
    271272        $(BOOST_SYSTEM_LDFLAGS) \
    272273        $(BOOST_THREAD_LDFLAGS)
     
    284285        libMolecuilderFragmentation.la \
    285286        libMolecuilderParser.la \
     287        libMolecuilderParameters.la \
    286288        libMolecuilderShapes.la \
    287289        libMolecuilderLinkedCell.la \
     
    297299libMolecuilderUI_la_LIBADD += \
    298300        ${CodePatterns_LIBS} \
    299         $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
    300         $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIBS) \
    301         $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
    302         $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
     301        $(BOOST_SERIALIZATION_LIBS) \
     302        $(BOOST_PROGRAM_OPTIONS_LIBS) \
     303        $(BOOST_FILESYSTEM_LIBS) \
     304        $(BOOST_SYSTEM_LIBS) \
     305        $(BOOST_THREAD_LIBS)
    303306
    304307nobase_libMolecuilderUI_la_include_HEADERS = ${UIHEADER}
  • src/UIElements/Menu/Menu.cpp

    r5ffa05 rbd81f9  
    106106void Menu::populateActions()
    107107{
    108   // go through all actions and add those beloning to this menu
     108  // go through all actions and add those belonging to this menu
    109109  ActionRegistry &AR = ActionRegistry::getInstance();
    110110  for (ActionRegistry::const_iterator iter = AR.getBeginIter();
  • src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp

    r5ffa05 rbd81f9  
    2626#include "Actions/ActionRegistry.hpp"
    2727#include "Actions/ActionTrait.hpp"
     28#include "World.hpp"
     29#include "WorldTime.hpp"
    2830
    2931#include "MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp"
     
    4345void MenuDescription_ActionRegistry_ConsistencyTest::setUp()
    4446{
    45   AR = ActionRegistry::getPointer();
     47  CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer());
    4648};
    4749
     
    5052{
    5153  ActionRegistry::purgeInstance();
     54  // these come about because of the validators accessing them instantiated
     55  // by ActionRegistry. In ActionRegistryUnitTest we used stubs for them but
     56  // here we care whether default values are actually valid.
     57  World::purgeInstance();
     58  WorldTime::purgeInstance();
    5259};
    5360
  • src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 AtomQtQueryPipe::AtomQtQueryPipe(const atom **_content, QtDialog *_dialog, QComboBox *_theBox) :
     30AtomQtQueryPipe::AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3131  content(_content),
    3232  dialog(_dialog),
     
    4040  QVariant data = theBox->itemData(newIndex);
    4141  int idx = data.toInt();
    42   (*content) = World::getInstance().getAtom(AtomById(idx));
     42  content.set(World::getInstance().getAtom(AtomById(idx)));
    4343  dialog->update();
    4444}
  • src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2526  Q_OBJECT
    2627public:
    27   AtomQtQueryPipe(const atom **_content, QtDialog *_dialog, QComboBox *_theBox);
     28  AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox);
    2829  virtual ~AtomQtQueryPipe();
    2930
     
    3233
    3334private:
    34   const atom **content;
     35  Parameter<const atom *> &content;
    3536  QtDialog *dialog;
    3637  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    3030
    3131
    32 AtomsQtQueryPipe::AtomsQtQueryPipe(std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList) :
     32AtomsQtQueryPipe::AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList) :
    3333  content(_content),
    3434  dialog(_dialog),
     
    4141void AtomsQtQueryPipe::update() {
    4242  // clear target and put all atoms therein
    43   (*content).clear();
     43  std::vector<const atom *> temp_atoms;
    4444  for (std::set<const atom *>::iterator iter = currentList.begin(); iter != currentList.end(); ++iter)
    45     (*content).push_back(*iter);
     45    temp_atoms.push_back(*iter);
     46  content.set(temp_atoms);
    4647  dialog->update();
    4748}
     
    5354    atom *Walker = World::getInstance().getAtom(AtomById(index));
    5455    if (Walker) {
    55       (*content).push_back(Walker);
    5656      currentList.insert(Walker);
    5757      if (lookup.find(index) != lookup.end())
  • src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2930  Q_OBJECT
    3031public:
    31   AtomsQtQueryPipe(std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList);
     32  AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList);
    3233  virtual ~AtomsQtQueryPipe();
    3334
     
    3839
    3940private:
    40   std::vector<const atom *>*content;
     41  Parameter<std::vector<const atom *> > &content;
    4142  std::map<int, const atom *> lookup;
    4243  std::set<const atom *> currentList;
  • src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2525#include "CodePatterns/MemDebug.hpp"
    2626
    27 BooleanQtQueryPipe::BooleanQtQueryPipe(bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :
     27BooleanQtQueryPipe::BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :
    2828  content(_content),
    2929  dialog(_dialog),
     
    3535
    3636void BooleanQtQueryPipe::update(int state) {
    37   (*content) = (state == Qt::Checked);
     37  content.set(state == Qt::Checked);
    3838  dialog->update();
    3939}
  • src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2324  Q_OBJECT
    2425public:
    25   BooleanQtQueryPipe(bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);
     26  BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);
    2627  virtual ~BooleanQtQueryPipe();
    2728
     
    3031
    3132private:
    32   bool *content;
     33  Parameter<bool> &content;
    3334  QtDialog *dialog;
    3435  QCheckBox *booleanCheckBox;
  • src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2323#include "CodePatterns/MemDebug.hpp"
    2424
    25 DoubleQtQueryPipe::DoubleQtQueryPipe(double *_content, QtDialog *_dialog) :
     25DoubleQtQueryPipe::DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog) :
    2626  content(_content),
    2727  dialog(_dialog)
     
    3232
    3333void DoubleQtQueryPipe::update(double newDbl) {
    34   (*content) = newDbl;
     34  content.set(newDbl);
    3535  dialog->update();
    3636}
  • src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2223  Q_OBJECT
    2324public:
    24   DoubleQtQueryPipe(double *_content, QtDialog *_dialog);
     25  DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog);
    2526  virtual ~DoubleQtQueryPipe();
    2627
     
    2930
    3031private:
    31   double *content;
     32  Parameter<double> &content;
    3233  QtDialog *dialog;
    3334
  • src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2929
    3030
    31 ElementQtQueryPipe::ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox) :
     31ElementQtQueryPipe::ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3232  content(_content),
    3333  dialog(_dialog),
     
    4141  QVariant data = theBox->itemData(newIndex);
    4242  int idx = data.toInt();
    43   *content = World::getInstance().getPeriode()->FindElement(idx);
     43  content.set(World::getInstance().getPeriode()->FindElement(idx));
    4444  dialog->update();
    4545}
  • src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2526  Q_OBJECT
    2627public:
    27   ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox);
     28  ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox);
    2829  virtual ~ElementQtQueryPipe();
    2930
     
    3233
    3334private:
    34   const element **content;
     35  Parameter<const element *> &content;
    3536  QtDialog *dialog;
    3637  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 ElementsQtQueryPipe::ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
     33ElementsQtQueryPipe::ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3434  content(_content),
    3535  dialog(_dialog),
     
    4444  int idx = data.toInt();
    4545  const element *elemental = World::getInstance().getPeriode()->FindElement(idx);
     46  std::vector<const element *> temp_elements;
    4647  if(elemental)
    47     (*content).push_back(elemental);
     48    temp_elements.push_back(elemental);
     49  content.set(temp_elements);
    4850  dialog->update();
    4951}
  • src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2829  Q_OBJECT
    2930public:
    30   ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox);
     31  ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox);
    3132  virtual ~ElementsQtQueryPipe();
    3233
     
    3536
    3637private:
    37   std::vector<const element *>*content;
     38  Parameter<std::vector<const element *> > &content;
    3839  QtDialog *dialog;
    3940  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    3131#include "UIElements/Qt4/QtDialog.hpp"
    3232
    33 FileQtQueryPipe::FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
     33FileQtQueryPipe::FileQtQueryPipe(Parameter<boost::filesystem::path> &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
    3434  content(_content),
    3535  dialog(_dialog),
     
    4949  QStringList ListOfFilenames = theFileDialog->selectedFiles();
    5050  std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl;
    51   (*content) = ListOfFilenames.at(0).toStdString();
    52   filenameLineEdit->setText(QString::fromStdString((*content).string()));
     51  content.set(ListOfFilenames.at(0).toStdString());
     52  filenameLineEdit->setText(QString::fromStdString(content.get().string()));
    5353  dialog->update();
    5454}
  • src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2728  Q_OBJECT
    2829public:
    29   FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
     30  FileQtQueryPipe(Parameter<boost::filesystem::path> &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
    3031  virtual ~FileQtQueryPipe();
    3132
     
    3536
    3637private:
    37   boost::filesystem::path *content;
     38  Parameter<boost::filesystem::path> &content;
    3839  QtDialog *dialog;
    3940  QLineEdit *filenameLineEdit;
  • src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2424
    2525
    26 IntQtQueryPipe::IntQtQueryPipe(int *_content, QtDialog *_dialog) :
     26IntQtQueryPipe::IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog) :
    2727  content(_content),
    2828  dialog(_dialog)
     
    3333
    3434void IntQtQueryPipe::update(int newInt) {
    35   (*content) = newInt;
     35  content.set(newInt);
    3636  dialog->update();
    3737}
  • src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2223  Q_OBJECT
    2324public:
    24   IntQtQueryPipe(int *_content, QtDialog *_dialog);
     25  IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog);
    2526  virtual ~IntQtQueryPipe();
    2627
     
    2930
    3031private:
    31   int *content;
     32  Parameter<int> &content;
    3233  QtDialog *dialog;
    3334
  • src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2929
    3030
    31 MoleculeQtQueryPipe::MoleculeQtQueryPipe(const molecule **_content, QtDialog *_dialog, QComboBox *_theBox) :
     31MoleculeQtQueryPipe::MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3232  content(_content),
    3333  dialog(_dialog),
     
    4141  QVariant data = theBox->itemData(newIndex);
    4242  int idx = data.toInt();
    43   (*content) = World::getInstance().getMolecule(MoleculeById(idx));
     43  content.set(World::getInstance().getMolecule(MoleculeById(idx)));
    4444  dialog->update();
    4545}
  • src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2526  Q_OBJECT
    2627public:
    27   MoleculeQtQueryPipe(const molecule **_content, QtDialog *_dialog, QComboBox *_theBox);
     28  MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox);
    2829  virtual ~MoleculeQtQueryPipe();
    2930
     
    3233
    3334private:
    34   const molecule **content;
     35  Parameter<const molecule *> &content;
    3536  QtDialog *dialog;
    3637  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 MoleculesQtQueryPipe::MoleculesQtQueryPipe(std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
     33MoleculesQtQueryPipe::MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3434  content(_content),
    3535  dialog(_dialog),
     
    4444  int idx = data.toInt();
    4545  molecule *mol = World::getInstance().getMolecule(MoleculeById(idx));
     46  std::vector<const molecule *> temp_mols;
    4647  if (mol)
    47     (*content).push_back(mol);
     48    temp_mols.push_back(mol);
     49  content.set(temp_mols);
    4850  dialog->update();
    4951}
  • src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2728  Q_OBJECT
    2829public:
    29   MoleculesQtQueryPipe(std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox);
     30  MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox);
    3031  virtual ~MoleculesQtQueryPipe();
    3132
     
    3435
    3536private:
    36   std::vector<const molecule *>*content;
     37  Parameter<std::vector<const molecule *> > &content;
    3738  QtDialog *dialog;
    3839  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include "QtQueryPipe.hpp"
    1819
     
    2324
    2425
    25 template<typename T> QtQueryListPipe<T>::QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
     26template<typename T> QtQueryListPipe<T>::QtQueryListPipe(Parameter<std::vector<T> > &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
    2627  content(_content),
    2728  dialog(_dialog),
  • src/UIElements/Qt4/Pipe/QtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1919// since MOC doesn't like nested classes
    2020
     21#include "Parameters/Parameter.hpp"
    2122#include <Qt/qwidget.h>
    2223
     
    3334template<typename T> class QtQueryListPipe : public QWidget {
    3435  public:
    35     QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
     36    QtQueryListPipe(Parameter<std::vector<T> > &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
    3637    virtual ~QtQueryListPipe();
    3738    void AddInteger();
     
    4445    void RemoveRow(int row);
    4546
    46     std::vector<T> *content;
     47    Parameter<std::vector<T> > &content;
    4748    QtDialog *dialog;
    4849    QLineEdit *inputBox;
  • src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    3030class RandomNumberDistribution_Parameters;
    3131
    32 RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox) :
     32RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox) :
    3333  content(_content),
    3434  dialog(_dialog),
  • src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2526  Q_OBJECT
    2627public:
    27   RandomNumberDistribution_ParametersQtQueryPipe(const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox);
     28  RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox);
    2829  virtual ~RandomNumberDistribution_ParametersQtQueryPipe();
    2930
     
    3233
    3334private:
    34   const RandomNumberDistribution_Parameters *content;
     35  Parameter<RandomNumberDistribution_Parameters> &content;
    3536  QtDialog *dialog;
    3637  QTextEdit *theBox;
  • src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2626
    2727
    28 StringQtQueryPipe::StringQtQueryPipe(std::string *_content, QtDialog *_dialog) :
     28StringQtQueryPipe::StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog) :
    2929  content(_content),
    3030  dialog(_dialog)
     
    3535
    3636void StringQtQueryPipe::update(const QString& newText) {
    37   content->assign(newText.toStdString());
     37  content.set(newText.toStdString());
    3838  dialog->update();
    3939}
  • src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2425  Q_OBJECT
    2526public:
    26   StringQtQueryPipe(std::string *_content, QtDialog *_dialog);
     27  StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog);
    2728  virtual ~StringQtQueryPipe();
    2829
     
    3132
    3233private:
    33   std::string *content;
     34  Parameter<std::string> &content;
    3435  QtDialog *dialog;
    3536
  • src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2424
    2525
    26 UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(unsigned int *_content, QtDialog *_dialog) :
     26UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog) :
    2727  content(_content),
    2828  dialog(_dialog)
     
    3333
    3434void UnsignedIntQtQueryPipe::update(unsigned int newUnsignedInt) {
    35   (*content) = newUnsignedInt;
     35  content.set(newUnsignedInt);
    3636  dialog->update();
    3737}
  • src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2223  Q_OBJECT
    2324public:
    24   UnsignedIntQtQueryPipe(unsigned int *_content, QtDialog *_dialog);
     25  UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog);
    2526  virtual ~UnsignedIntQtQueryPipe();
    2627
     
    2930
    3031private:
    31   unsigned int *content;
     32  Parameter<unsigned int> &content;
    3233  QtDialog *dialog;
    3334
  • src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2626
    2727
    28 VectorQtQueryPipe::VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox) :
     28VectorQtQueryPipe::VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox) :
    2929  content(_content),
    3030  dialog(_dialog),
     
    3636
    3737void VectorQtQueryPipe::updateX(double newDouble) {
    38   (*content)[0] = newDouble;
     38  Vector v = content.get();
     39  v[0] = newDouble;
     40  content.set(v);
    3941  dialog->update();
    4042}
    4143
    4244void VectorQtQueryPipe::updateY(double newDouble) {
    43   (*content)[1] = newDouble;
     45  Vector v = content.get();
     46  v[1] = newDouble;
     47  content.set(v);
    4448  dialog->update();
    4549}
    4650
    4751void VectorQtQueryPipe::updateZ(double newDouble) {
    48   (*content)[2] = newDouble;
     52  Vector v = content.get();
     53  v[2] = newDouble;
     54  content.set(v);
    4955  dialog->update();
    5056}
  • src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2526  Q_OBJECT
    2627public:
    27   VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox);
     28  VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox);
    2829  virtual ~VectorQtQueryPipe();
    2930
     
    3435
    3536private:
    36   Vector *content;
     37  Parameter<Vector> &content;
    3738  QtDialog *dialog;
    3839  QComboBox *theBox;
  • src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 VectorsQtQueryPipe::VectorsQtQueryPipe(std::vector<Vector> *_content, QtDialog *_dialog, QComboBox *_theBox) :
     30VectorsQtQueryPipe::VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
    3131  content(_content),
    3232  dialog(_dialog),
  • src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include <Qt/qwidget.h>
    1819
     
    2728  Q_OBJECT
    2829public:
    29   VectorsQtQueryPipe(std::vector<Vector>*_content, QtDialog *_dialog, QComboBox *_theBox);
     30  VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox);
    3031  virtual ~VectorsQtQueryPipe();
    3132
     
    3435
    3536private:
    36   std::vector<Vector> *content;
     37  Parameter<std::vector<Vector> > &content;
    3738  QtDialog *dialog;
    3839  QComboBox *theBox;
  • src/UIElements/Qt4/QtDialog.cpp

    r5ffa05 rbd81f9  
    8080}
    8181
    82 void QtDialog::queryBoolean(const char* title,string)
     82void QtDialog::queryBoolean(Parameter<bool> &param, const char* title,string)
    8383{
    84   registerQuery(new BooleanQtQuery(title,inputLayout,this));
     84  registerQuery(new BooleanQtQuery(param,title,inputLayout,this));
    8585}
    8686
    87 void QtDialog::queryAtom(const char* title, std::string)
     87void QtDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string)
    8888{
    89   registerQuery(new AtomQtQuery(title,inputLayout,this));
     89  registerQuery(new AtomQtQuery(param,title,inputLayout,this));
    9090}
    9191
    92 void QtDialog::queryAtoms(const char* title, std::string)
     92void QtDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string)
    9393{
    94   registerQuery(new AtomsQtQuery(title,inputLayout,this));
     94  registerQuery(new AtomsQtQuery(param,title,inputLayout,this));
    9595}
    9696
    97 void QtDialog::queryBox(const char* title, std::string)
     97void QtDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string)
    9898{
    99   registerQuery(new BoxQtQuery(title,inputLayout,this));
     99  registerQuery(new RealSpaceMatrixQtQuery(param,title,inputLayout,this));
    100100}
    101101
    102 void QtDialog::queryInt(const char *title,string)
     102void QtDialog::queryInt(Parameter<int> &param, const char *title,string)
    103103{
    104   registerQuery(new IntQtQuery(title,inputLayout,this));
     104  registerQuery(new IntQtQuery(param,title,inputLayout,this));
    105105}
    106106
    107 void QtDialog::queryInts(const char *title,string)
     107void QtDialog::queryInts(Parameter<std::vector<int> > &param, const char *title,string)
    108108{
    109   registerQuery(new IntsQtQuery(title,inputLayout,this));
     109  registerQuery(new IntsQtQuery(param,title,inputLayout,this));
    110110}
    111111
    112 void QtDialog::queryUnsignedInt(const char *title,string)
     112void QtDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char *title,string)
    113113{
    114   registerQuery(new UnsignedIntQtQuery(title,inputLayout,this));
     114  registerQuery(new UnsignedIntQtQuery(param,title,inputLayout,this));
    115115}
    116116
    117 void QtDialog::queryUnsignedInts(const char *title,string)
     117void QtDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char *title,string)
    118118{
    119   registerQuery(new UnsignedIntsQtQuery(title,inputLayout,this));
     119  registerQuery(new UnsignedIntsQtQuery(param,title,inputLayout,this));
    120120}
    121121
    122 void QtDialog::queryDouble(const char* title,string)
     122void QtDialog::queryDouble(Parameter<double> &param, const char* title,string)
    123123{
    124   registerQuery(new DoubleQtQuery(title,inputLayout,this));
     124  registerQuery(new DoubleQtQuery(param,title,inputLayout,this));
    125125}
    126126
    127 void QtDialog::queryDoubles(const char* title,string)
     127void QtDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title,string)
    128128{
    129   registerQuery(new DoublesQtQuery(title,inputLayout,this));
     129  registerQuery(new DoublesQtQuery(param,title,inputLayout,this));
    130130}
    131131
    132 void QtDialog::queryString(const char* title,string)
     132void QtDialog::queryString(Parameter<std::string> &param, const char* title,string)
    133133{
    134   registerQuery(new StringQtQuery(title,inputLayout,this));
     134  registerQuery(new StringQtQuery(param,title,inputLayout,this));
    135135}
    136136
    137 void QtDialog::queryStrings(const char* title,string)
     137void QtDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title,string)
    138138{
    139   registerQuery(new StringsQtQuery(title,inputLayout,this));
     139  registerQuery(new StringsQtQuery(param, title,inputLayout,this));
    140140}
    141141
    142 void QtDialog::queryMolecule(const char *title,string)
     142void QtDialog::queryMolecule(Parameter<const molecule *> &param, const char *title,string)
    143143{
    144   registerQuery(new MoleculeQtQuery(title,inputLayout,this));
     144  registerQuery(new MoleculeQtQuery(param,title,inputLayout,this));
    145145}
    146146
    147 void QtDialog::queryMolecules(const char *title,string)
     147void QtDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char *title,string)
    148148{
    149   registerQuery(new MoleculesQtQuery(title,inputLayout,this));
     149  registerQuery(new MoleculesQtQuery(param, title,inputLayout,this));
    150150}
    151151
    152 void QtDialog::queryVector(const char* title, bool check,string)
     152void QtDialog::queryVector(Parameter<Vector> &param, const char* title, bool check,string)
    153153{
    154   registerQuery(new VectorQtQuery(title,check,inputLayout,this));
     154  registerQuery(new VectorQtQuery(param,title,check,inputLayout,this));
    155155}
    156156
    157 void QtDialog::queryVectors(const char* title, bool check,string)
     157void QtDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check,string)
    158158{
    159   registerQuery(new VectorsQtQuery(title,check,inputLayout,this));
     159  registerQuery(new VectorsQtQuery(param, title,check,inputLayout,this));
    160160}
    161161
    162 void QtDialog::queryElement(const char* title, std::string)
     162void QtDialog::queryElement(Parameter<const element *> &param, const char* title, std::string)
    163163{
    164   registerQuery(new ElementQtQuery(title,inputLayout,this));
     164  registerQuery(new ElementQtQuery(param,title,inputLayout,this));
    165165}
    166166
    167 void QtDialog::queryElements(const char* title, std::string)
     167void QtDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string)
    168168{
    169   registerQuery(new ElementsQtQuery(title,inputLayout,this));
     169  registerQuery(new ElementsQtQuery(param,title,inputLayout,this));
    170170}
    171171
    172 void QtDialog::queryFile(const char* title, std::string)
     172void QtDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string)
    173173{
    174   registerQuery(new FileQtQuery(title,inputLayout,this));
     174  registerQuery(new FileQtQuery(param,title,inputLayout,this));
    175175}
    176176
    177 void QtDialog::queryFiles(const char* title, std::string)
     177void QtDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> >&param, const char* title, std::string)
    178178{
    179   registerQuery(new FilesQtQuery(title,inputLayout,this));
     179  registerQuery(new FilesQtQuery(param, title,inputLayout,this));
    180180}
    181181
    182 void QtDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string)
     182void QtDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string)
    183183{
    184   registerQuery(new RandomNumberDistribution_ParametersQtQuery(title,inputLayout,this));
     184  registerQuery(new RandomNumberDistribution_ParametersQtQuery(param,title,inputLayout,this));
    185185}
    186186
  • src/UIElements/Qt4/QtDialog.hpp

    r5ffa05 rbd81f9  
    1515
    1616
     17#include "Parameters/Parameter.hpp"
    1718#include "UIElements/Dialog.hpp"
    1819#include <QtGui/QDialog>
     
    3334
    3435  virtual void queryEmpty(const char*, std::string);
    35   virtual void queryBoolean(const char *, std::string = "");
    36   virtual void queryInt(const char *,std::string = "");
    37   virtual void queryInts(const char *,std::string = "");
    38   virtual void queryUnsignedInt(const char *,std::string = "");
    39   virtual void queryUnsignedInts(const char *,std::string = "");
    40   virtual void queryDouble(const char*,std::string = "");
    41   virtual void queryDoubles(const char*,std::string = "");
    42   virtual void queryString(const char*,std::string = "");
    43   virtual void queryStrings(const char*,std::string = "");
    44   virtual void queryAtom(const char*,std::string = "");
    45   virtual void queryAtoms(const char*,std::string = "");
    46   virtual void queryMolecule(const char*,std::string = "");
    47   virtual void queryMolecules(const char*,std::string = "");
    48   virtual void queryVector(const char*,bool,std::string = "");
    49   virtual void queryVectors(const char*,bool,std::string = "");
    50   virtual void queryBox(const char*, std::string = "");
    51   virtual void queryElement(const char*,std::string = "");
    52   virtual void queryElements(const char*,std::string = "");
    53   virtual void queryFile(const char*,std::string = "");
    54   virtual void queryFiles(const char*,std::string = "");
    55   virtual void queryRandomNumberDistribution_Parameters(const char*,std::string = "");
     36  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
     37  virtual void queryInt(Parameter<int> &, const char *,std::string = "");
     38  virtual void queryInts(Parameter<std::vector<int> > &, const char *,std::string = "");
     39  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *,std::string = "");
     40  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *,std::string = "");
     41  virtual void queryDouble(Parameter<double> &, const char*,std::string = "");
     42  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*,std::string = "");
     43  virtual void queryString(Parameter<std::string> &, const char*,std::string = "");
     44  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*,std::string = "");
     45  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "");
     46  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "");
     47  virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = "");
     48  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = "");
     49  virtual void queryVector(Parameter<Vector> &, const char*,bool,std::string = "");
     50  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool,std::string = "");
     51  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
     52  virtual void queryElement(Parameter<const element *> &, const char*,std::string = "");
     53  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*,std::string = "");
     54  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*,std::string = "");
     55  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> > &, const char*,std::string = "");
     56  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*,std::string = "");
    5657
    5758  virtual bool display();
     
    6364  class AtomsQtQuery;
    6465  class BooleanQtQuery;
    65   class BoxQtQuery;
     66  class RealSpaceMatrixQtQuery;
    6667  class DoubleQtQuery;
    6768  class DoublesQtQuery;
  • src/UIElements/Qt4/Query/AtomQtQuery.cpp

    r5ffa05 rbd81f9  
    3030#include "World.hpp"
    3131
    32 QtDialog::AtomQtQuery::AtomQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::AtomQuery(_title),
     32QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::AtomQuery(param, _title),
    3434    parent(_parent)
    3535{
     
    4646  thisLayout->addWidget(inputBox);
    4747
    48   pipe = new AtomQtQueryPipe(&tmp,_dialog, inputBox);
     48  pipe = new AtomQtQueryPipe(tmp,_dialog, inputBox);
    4949  pipe->update(inputBox->currentIndex());
    5050  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/AtomsQtQuery.cpp

    r5ffa05 rbd81f9  
    3333
    3434
    35 QtDialog::AtomsQtQuery::AtomsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    36     Dialog::AtomsQuery(_title),
     35QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     36    Dialog::AtomsQuery(param, _title),
    3737    parent(_parent)
    3838{
     
    6767  thisHLayout->addLayout(thisV2Layout);
    6868
    69   pipe = new AtomsQtQueryPipe(&tmp,_dialog,inputList);
     69  pipe = new AtomsQtQueryPipe(tmp,_dialog,inputList);
    7070  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    7171  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add()));
  • src/UIElements/Qt4/Query/BooleanQtQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 QtDialog::BooleanQtQuery::BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    31     Dialog::BooleanQuery(_title),
     30QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     31    Dialog::BooleanQuery(param, _title),
    3232    parent(_parent)
    3333{
     34  if (!param.isSet())
     35    param.set(false);
    3436  thisLayout = new QHBoxLayout();
    3537  titleLabel = new QLabel(QString(getTitle().c_str()),_dialog);
    3638  booleanCheckBox = new QCheckBox(QString(getTitle().c_str()), _dialog);
     39  booleanCheckBox->setCheckState(param.get() ? Qt::Checked : Qt::Unchecked);
    3740
    3841  parent->addLayout(thisLayout);
     
    4043  thisLayout->addWidget(booleanCheckBox);
    4144
    42   pipe = new BooleanQtQueryPipe(&tmp,_dialog,booleanCheckBox);
     45  pipe = new BooleanQtQueryPipe(tmp,_dialog,booleanCheckBox);
    4346  connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int)));
    4447}
  • src/UIElements/Qt4/Query/DoubleQtQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 QtDialog::DoubleQtQuery::DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
    31     Dialog::DoubleQuery(title),
     30QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     31    Dialog::DoubleQuery(param, title),
    3232    parent(_parent)
    3333{
     34  if (!param.isSet())
     35    param.set(0.0);
    3436  thisLayout = new QHBoxLayout();
    3537  titleLabel = new QLabel(QString(getTitle().c_str()));
    3638  inputBox = new QDoubleSpinBox();
    37   inputBox->setValue(0);
     39  inputBox->setValue(param.get());
    3840  inputBox->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
    3941  inputBox->setDecimals(3);
     
    4244  thisLayout->addWidget(inputBox);
    4345
    44   pipe = new DoubleQtQueryPipe(&tmp,_dialog);
     46  pipe = new DoubleQtQueryPipe(tmp,_dialog);
    4547  pipe->update(inputBox->value());
    4648  connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
  • src/UIElements/Qt4/Query/DoublesQtQuery.cpp

    r5ffa05 rbd81f9  
    3030
    3131
    32 QtDialog::DoublesQtQuery::DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::DoublesQuery(title),
     32QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::DoublesQuery(param, title),
    3434    parent(_parent)
    3535{
     
    6060  thisHLayout->addLayout(thisV2Layout);
    6161
    62   pipe = new QtQueryListPipe<double>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     62  pipe = new QtQueryListPipe<double>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6363  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6464  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
  • src/UIElements/Qt4/Query/ElementQtQuery.cpp

    r5ffa05 rbd81f9  
    3131#include "World.hpp"
    3232
    33 QtDialog::ElementQtQuery::ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    34     Dialog::ElementQuery(_title),
     33QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     34    Dialog::ElementQuery(param, _title),
    3535    parent(_parent)
    3636{
     
    5151  thisLayout->addWidget(inputBox);
    5252
    53   pipe = new ElementQtQueryPipe(&tmp,_dialog,inputBox);
     53  pipe = new ElementQtQueryPipe(tmp,_dialog,inputBox);
    5454  pipe->update(inputBox->currentIndex());
    5555  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/ElementsQtQuery.cpp

    r5ffa05 rbd81f9  
    3232
    3333
    34 QtDialog::ElementsQtQuery::ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    35     Dialog::ElementsQuery(_title),
     34QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     35    Dialog::ElementsQuery(param, _title),
    3636    parent(_parent)
    3737{
     
    5252  thisLayout->addWidget(inputBox);
    5353
    54   pipe = new ElementsQtQueryPipe(&tmp,_dialog,inputBox);
     54  pipe = new ElementsQtQueryPipe(tmp,_dialog,inputBox);
    5555  pipe->update(inputBox->currentIndex());
    5656  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/FileQtQuery.cpp

    r5ffa05 rbd81f9  
    2929
    3030
    31 QtDialog::FileQtQuery::FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    32     Dialog::FileQuery(_title),
     31QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     32    Dialog::FileQuery(param, _title),
    3333    parent(_parent)
    3434{
     
    4343  filedialogButton = new QPushButton("&Choose", _dialog);
    4444
    45   pipe = new FileQtQueryPipe(&tmp,_dialog,filenameLineEdit,filedialogButton);
     45  pipe = new FileQtQueryPipe(tmp,_dialog,filenameLineEdit,filedialogButton);
    4646
    4747  thisLayout = new QHBoxLayout();
  • src/UIElements/Qt4/Query/FilesQtQuery.cpp

    r5ffa05 rbd81f9  
    2626#include "CodePatterns/MemDebug.hpp"
    2727
     28#include <boost/filesystem/path.hpp>
     29
    2830#include "UIElements/Qt4/Query/QtQuery.hpp"
    2931#include "UIElements/Qt4/Pipe/QtQueryListPipe.hpp"
    3032
    3133
    32 QtDialog::FilesQtQuery::FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    33     Dialog::FilesQuery(_title),
     34QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     35    Dialog::FilesQuery(param, _title),
    3436    parent(_parent)
    3537{
     
    6062  thisHLayout->addLayout(thisV2Layout);
    6163
    62   pipe = new QtQueryListPipe<boost::filesystem::path>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     64  pipe = new QtQueryListPipe<boost::filesystem::path>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6365  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6466  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
  • src/UIElements/Qt4/Query/IntQtQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 QtDialog::IntQtQuery::IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    31     Dialog::IntQuery(_title),
     30QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     31    Dialog::IntQuery(param, _title),
    3232    parent(_parent)
    3333{
     34  if (!param.isSet())
     35    param.set(0);
    3436  thisLayout = new QHBoxLayout();
    3537  titleLabel = new QLabel(QString(getTitle().c_str()));
    3638  inputBox = new QSpinBox();
    37   inputBox->setValue(0);
     39  inputBox->setValue(param.get());
    3840  parent->addLayout(thisLayout);
    3941  thisLayout->addWidget(titleLabel);
    4042  thisLayout->addWidget(inputBox);
    4143
    42   pipe = new IntQtQueryPipe(&tmp,_dialog);
     44  pipe = new IntQtQueryPipe(tmp,_dialog);
    4345  pipe->update(inputBox->value());
    4446  connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/IntsQtQuery.cpp

    r5ffa05 rbd81f9  
    3030
    3131
    32 QtDialog::IntsQtQuery::IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::IntsQuery(_title),
     32QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::IntsQuery(param, _title),
    3434    parent(_parent)
    3535{
     
    6060  thisHLayout->addLayout(thisV2Layout);
    6161
    62   pipe = new QtQueryListPipe<int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     62  pipe = new QtQueryListPipe<int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6363  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6464  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
  • src/UIElements/Qt4/Query/MoleculeQtQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 QtDialog::MoleculeQtQuery::MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
    34     Dialog::MoleculeQuery(_title),
     33QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     34    Dialog::MoleculeQuery(param, _title),
    3535    parent(_parent)
    3636{
     
    5151  thisLayout->addWidget(inputBox);
    5252
    53   pipe = new MoleculeQtQueryPipe(&tmp,_dialog,inputBox);
     53  pipe = new MoleculeQtQueryPipe(tmp,_dialog,inputBox);
    5454  pipe->update(inputBox->currentIndex());
    5555  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/MoleculesQtQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 QtDialog::MoleculesQtQuery::MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
    34     Dialog::MoleculesQuery(_title),
     33QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     34    Dialog::MoleculesQuery(param, _title),
    3535    parent(_parent)
    3636{
     
    5151  thisLayout->addWidget(inputBox);
    5252
    53   pipe = new MoleculesQtQueryPipe(&tmp,_dialog,inputBox);
     53  pipe = new MoleculesQtQueryPipe(tmp,_dialog,inputBox);
    5454  pipe->update(inputBox->currentIndex());
    5555  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
  • src/UIElements/Qt4/Query/QtQuery.hpp

    r5ffa05 rbd81f9  
    1616
    1717#include "Qt4/QtDialog.hpp"
     18#include "Parameters/Parameter.hpp"
    1819
    1920class QHBoxLayout;
     
    3637class AtomsQtQueryPipe;
    3738class BooleanQtQueryPipe;
    38 class BoxQtQueryPipe;
     39class RealSpaceMatrixQtQueryPipe;
    3940class DoubleQtQueryPipe;
    4041class DoublesQtQueryPipe;
     
    4344class EmptyQtQueryPipe;
    4445class FileQtQueryPipe;
     46class FilesQtQueryPipe;
    4547class IntQtQueryPipe;
    4648class MoleculeQtQueryPipe;
     
    5658class QtDialog::AtomQtQuery : public Dialog::AtomQuery {
    5759public:
    58   AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     60  AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    5961  virtual ~AtomQtQuery();
    6062  virtual bool handle();
     
    7072class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery {
    7173public:
    72   AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     74  AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    7375  virtual ~AtomsQtQuery();
    7476  virtual bool handle();
     
    8587class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery {
    8688public:
    87   BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     89  BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
    8890  virtual ~BooleanQtQuery();
    8991  virtual bool handle();
     
    9799};
    98100
    99 class QtDialog::BoxQtQuery : public Dialog::BoxQuery {
    100 public:
    101   BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    102   virtual ~BoxQtQuery();
     101class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery {
     102public:
     103  RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     104  virtual ~RealSpaceMatrixQtQuery();
    103105  virtual bool handle();
    104106private:
     
    108110  QTableWidget *inputTable;
    109111
    110   BoxQtQueryPipe *pipe;
     112  RealSpaceMatrixQtQueryPipe *pipe;
    111113};
    112114
    113115class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery {
    114116public:
    115   DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     117  DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
    116118  virtual ~DoubleQtQuery();
    117119  virtual bool handle();
     
    127129class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery {
    128130public:
    129   DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     131  DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
    130132  virtual ~DoublesQtQuery();
    131133  virtual bool handle();
     
    141143class QtDialog::ElementQtQuery : public Dialog::ElementQuery {
    142144public:
    143   ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     145  ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
    144146  virtual ~ElementQtQuery();
    145147  virtual bool handle();
     
    155157class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery {
    156158public:
    157   ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     159  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
    158160  virtual ~ElementsQtQuery();
    159161  virtual bool handle();
     
    182184class QtDialog::FileQtQuery : public Dialog::FileQuery {
    183185public:
    184   FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     186  FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
    185187  virtual ~FileQtQuery();
    186188  virtual bool handle();
     
    197199class QtDialog::FilesQtQuery : public Dialog::FilesQuery {
    198200public:
    199   FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     201  FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
    200202  virtual ~FilesQtQuery();
    201203  virtual bool handle();
     
    214216class QtDialog::IntQtQuery : public Dialog::IntQuery {
    215217public:
    216   IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     218  IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
    217219  virtual ~IntQtQuery();
    218220  virtual bool handle();
     
    228230class QtDialog::IntsQtQuery : public Dialog::IntsQuery {
    229231public:
    230   IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     232  IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
    231233  virtual ~IntsQtQuery();
    232234  virtual bool handle();
     
    245247class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery {
    246248public:
    247   MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     249  MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    248250  virtual ~MoleculeQtQuery();
    249251  virtual bool handle();
     
    259261class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery {
    260262public:
    261   MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     263  MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    262264  virtual ~MoleculesQtQuery();
    263265  virtual bool handle();
     
    273275class QtDialog::StringQtQuery : public Dialog::StringQuery {
    274276public:
    275   StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     277  StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    276278  virtual ~StringQtQuery();
    277279  virtual bool handle();
     
    287289class QtDialog::StringsQtQuery : public Dialog::StringsQuery {
    288290public:
    289   StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     291  StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    290292  virtual ~StringsQtQuery();
    291293  virtual bool handle();
     
    301303class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery {
    302304public:
    303   UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     305  UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
    304306  virtual ~UnsignedIntQtQuery();
    305307  virtual bool handle();
     
    315317class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery {
    316318public:
    317   UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     319  UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
    318320  virtual ~UnsignedIntsQtQuery();
    319321  virtual bool handle();
     
    333335class QtDialog::VectorQtQuery : public Dialog::VectorQuery {
    334336public:
    335   VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
     337  VectorQtQuery(Parameter<Vector> &, std::string title,bool _check,QBoxLayout *,QtDialog *);
    336338  virtual ~VectorQtQuery();
    337339  virtual bool handle();
     
    352354class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery {
    353355public:
    354   VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
     356  VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check,QBoxLayout *,QtDialog *);
    355357  virtual ~VectorsQtQuery();
    356358  virtual bool handle();
     
    369371class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
    370372public:
    371   RandomNumberDistribution_ParametersQtQuery(std::string title,QBoxLayout *,QtDialog *);
     373  RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *);
    372374  virtual ~RandomNumberDistribution_ParametersQtQuery();
    373375  virtual bool handle();
  • src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp

    r5ffa05 rbd81f9  
    3131#include "World.hpp"
    3232
    33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    34     Dialog::RandomNumberDistribution_ParametersQuery(_title),
     33QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     34    Dialog::RandomNumberDistribution_ParametersQuery(param, _title),
    3535    parent(_parent)
    3636{
     
    5050  okButton = new QPushButton(tr("Ok"));
    5151
    52   pipe = new RandomNumberDistribution_ParametersQtQueryPipe(&tmp,_dialog, inputBox);
     52  pipe = new RandomNumberDistribution_ParametersQtQueryPipe(tmp,_dialog, inputBox);
    5353  connect(okButton,SIGNAL(clicked()),pipe,SLOT(update()));
    5454}
  • src/UIElements/Qt4/Query/StringQtQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 QtDialog::StringQtQuery::StringQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    31     Dialog::StringQuery(_title),
     30QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     31    Dialog::StringQuery(param, _title),
    3232    parent(_parent)
    3333{
     34  if (!param.isSet())
     35    param.set("");
    3436  thisLayout = new QHBoxLayout();
    3537  titleLabel = new QLabel(QString(getTitle().c_str()));
     
    3941  thisLayout->addWidget(inputBox);
    4042
    41   pipe = new StringQtQueryPipe(&tmp,_dialog);
     43  pipe = new StringQtQueryPipe(tmp,_dialog);
    4244  pipe->update(inputBox->text());
    4345  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
     
    5254bool QtDialog::StringQtQuery::handle()
    5355{
    54   return tmp!="";
     56  return tmp.get() != "";
    5557}
    5658
  • src/UIElements/Qt4/Query/StringsQtQuery.cpp

    r5ffa05 rbd81f9  
    3030
    3131
    32 QtDialog::StringsQtQuery::StringsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::StringsQuery(_title),
     32QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::StringsQuery(param, _title),
    3434    parent(_parent)
    3535{
     
    6060  thisHLayout->addLayout(thisV2Layout);
    6161
    62   pipe = new QtQueryListPipe<std::string>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     62  pipe = new QtQueryListPipe<std::string>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6363  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6464  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
     
    7676  // dissect by ","
    7777  std::string::iterator olditer = temp.begin();
     78  std::vector<std::string> temp_strings;
    7879  for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
    7980    if (*iter == ' ') {
    80       tmp.push_back(std::string(iter, olditer));
     81      temp_strings.push_back(std::string(iter, olditer));
    8182      olditer = iter;
    8283    }
    8384  }
    8485  if (olditer != temp.begin())  // insert last part also
    85     tmp.push_back(std::string(olditer, temp.end()));
     86    temp_strings.push_back(std::string(olditer, temp.end()));
     87  tmp.set(temp_strings);
    8688
    8789  return temp!="";
  • src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    31     Dialog::UnsignedIntQuery(_title),
     30QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     31    Dialog::UnsignedIntQuery(param, _title),
    3232    parent(_parent)
    3333{
     34  if (!param.isSet())
     35    param.set(0);
    3436  thisLayout = new QHBoxLayout();
    3537  titleLabel = new QLabel(QString(getTitle().c_str()));
    3638  inputBox = new QSpinBox();
    37   inputBox->setValue(0);
     39  inputBox->setValue(param.get());
    3840  parent->addLayout(thisLayout);
    3941  thisLayout->addWidget(titleLabel);
    4042  thisLayout->addWidget(inputBox);
    4143
    42   pipe = new UnsignedIntQtQueryPipe(&tmp,_dialog);
     44  pipe = new UnsignedIntQtQueryPipe(tmp,_dialog);
    4345  pipe->update(inputBox->value());
    4446  connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int)));
  • src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp

    r5ffa05 rbd81f9  
    3030
    3131
    32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::UnsignedIntsQuery(_title),
     32QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::UnsignedIntsQuery(param, _title),
    3434    parent(_parent)
    3535{
     
    6060  thisHLayout->addLayout(thisV2Layout);
    6161
    62   pipe = new QtQueryListPipe<unsigned int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     62  pipe = new QtQueryListPipe<unsigned int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6363  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6464  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
  • src/UIElements/Qt4/Query/VectorQtQuery.cpp

    r5ffa05 rbd81f9  
    2929
    3030
    31 QtDialog::VectorQtQuery::VectorQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
    32     Dialog::VectorQuery(title,_check),
     31QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
     32    Dialog::VectorQuery(param, title,_check),
    3333    parent(_parent)
    3434{
     35  if (!param.isSet())
     36    param.set(Vector(0,0,0));
    3537  mainLayout= new QHBoxLayout();
    3638  titleLabel = new QLabel(QString(getTitle().c_str()));
     
    4547  coordInputX = new QDoubleSpinBox();
    4648  coordInputX->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
     49  coordInputX->setValue(param.get()[0]);
    4750//  coordInputX->setRange(0,M.at(i,i));
    4851  coordInputX->setDecimals(3);
     
    5053  coordInputY = new QDoubleSpinBox();
    5154  coordInputY->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
     55  coordInputY->setValue(param.get()[1]);
    5256//  coordInputY->setRange(0,M.at(i,i));
    5357  coordInputY->setDecimals(3);
     
    5559  coordInputZ = new QDoubleSpinBox();
    5660  coordInputZ->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
     61  coordInputZ->setValue(param.get()[2]);
    5762//  coordInputZ->setRange(0,M.at(i,i));
    5863  coordInputZ->setDecimals(3);
    5964  coordLayout->addWidget(coordInputZ);
    60   pipe = new VectorQtQueryPipe(&(tmp),_dialog,inputBox);
     65  pipe = new VectorQtQueryPipe(tmp,_dialog,inputBox);
    6166  //pipe->update(coordInput->value());
    6267  connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double)));
  • src/UIElements/Qt4/Query/VectorsQtQuery.cpp

    r5ffa05 rbd81f9  
    2929
    3030
    31 QtDialog::VectorsQtQuery::VectorsQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
    32     Dialog::VectorsQuery(title,_check),
     31QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
     32    Dialog::VectorsQuery(param, title,_check),
    3333    parent(_parent)
    3434{
     
    4747  coordInput->setDecimals(3);
    4848  coordLayout->addWidget(coordInput);
    49   pipe = new VectorsQtQueryPipe(&(tmp),_dialog,inputBox);
     49  pipe = new VectorsQtQueryPipe(tmp,_dialog,inputBox);
    5050  //pipe->update(coordInput->value());
    5151  connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
  • src/UIElements/Query/AtomQuery.cpp

    r5ffa05 rbd81f9  
    2323
    2424// Atom Queries
    25 Dialog::AtomQuery::AtomQuery(std::string title, std::string _description) :
     25Dialog::AtomQuery::AtomQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
    2626    Query(title, _description),
    27     tmp(0)
     27    tmp(param)
    2828{}
    2929
     
    3131
    3232void Dialog::AtomQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     33  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3434}
    3535
  • src/UIElements/Query/AtomsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Atoms Queries
    26 Dialog::AtomsQuery::AtomsQuery(std::string title, std::string _description) :
     26Dialog::AtomsQuery::AtomsQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
    2727    Query(title, _description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::AtomsQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/BooleanQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Bool Queries
    26 Dialog::BooleanQuery::BooleanQuery(std::string title,std::string description) :
     26Dialog::BooleanQuery::BooleanQuery(Parameter<bool> &param, std::string title,std::string description) :
    2727    Query(title, description),
    28     tmp(false)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::BooleanQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/DoubleQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Double Queries
    26 Dialog::DoubleQuery::DoubleQuery(std::string title, std::string _description) :
     26Dialog::DoubleQuery::DoubleQuery(Parameter<double> &param, std::string title, std::string _description) :
    2727    Query(title, _description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::DoubleQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/DoublesQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Doubles Queries
    26 Dialog::DoublesQuery::DoublesQuery(std::string title, std::string _description) :
    27     Query(title, _description)
     26Dialog::DoublesQuery::DoublesQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
     27    Query(title, _description),
     28    tmp(param)
    2829{}
    2930
     
    3132
    3233void Dialog::DoublesQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/ElementQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Element Queries
    26 Dialog::ElementQuery::ElementQuery(std::string title, std::string _description) :
    27   Query(title, _description)
     26Dialog::ElementQuery::ElementQuery(Parameter<const element *> &param, std::string title, std::string _description) :
     27  Query(title, _description),
     28  tmp(param)
    2829  {}
    2930
     
    3132
    3233void Dialog::ElementQuery::setResult(){
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/ElementsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Elements Queries
    26 Dialog::ElementsQuery::ElementsQuery(std::string title, std::string _description) :
    27   Query(title, _description)
     26Dialog::ElementsQuery::ElementsQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description) :
     27  Query(title, _description),
     28  tmp(param)
    2829  {}
    2930
     
    3132
    3233void Dialog::ElementsQuery::setResult(){
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/FileQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// File Queries
    26 Dialog::FileQuery::FileQuery(std::string title, std::string _description) :
    27   Query(title, _description)
     26Dialog::FileQuery::FileQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
     27  Query(title, _description),
     28  tmp(param)
    2829  {}
    2930
     
    3132
    3233void Dialog::FileQuery::setResult(){
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/FilesQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// File Queries
    26 Dialog::FilesQuery::FilesQuery(std::string title, std::string _description) :
    27   Query(title, _description)
     26Dialog::FilesQuery::FilesQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
     27  Query(title, _description),
     28  tmp(param)
    2829  {}
    2930
     
    3132
    3233void Dialog::FilesQuery::setResult(){
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/IntQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Int Queries
    26 Dialog::IntQuery::IntQuery(std::string title, std::string description) :
     26Dialog::IntQuery::IntQuery(Parameter<int> &param, std::string title, std::string description) :
    2727    Query(title, description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::IntQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/IntsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Ints Queries
    26 Dialog::IntsQuery::IntsQuery(std::string title, std::string description) :
    27     Query(title, description)
     26Dialog::IntsQuery::IntsQuery(Parameter<std::vector<int> > &param, std::string title, std::string description) :
     27    Query(title, description),
     28    tmp(param)
    2829{}
    2930
     
    3132
    3233void Dialog::IntsQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/MoleculeQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Molecule Queries
    26 Dialog::MoleculeQuery::MoleculeQuery(std::string title, std::string _description) :
     26Dialog::MoleculeQuery::MoleculeQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
    2727    Query(title, _description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::MoleculeQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/MoleculesQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Molecules Queries
    26 Dialog::MoleculesQuery::MoleculesQuery(std::string title, std::string _description) :
     26Dialog::MoleculesQuery::MoleculesQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
    2727    Query(title, _description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::MoleculesQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp

    r5ffa05 rbd81f9  
    2323
    2424// RandomNumberDistribution_Parameters Queries
    25 Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(std::string title, std::string _description) :
    26     Query(title, _description)
     25Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
     26    Query(title, _description),
     27    tmp(param)
    2728{}
    2829
     
    3031
    3132void Dialog::RandomNumberDistribution_ParametersQuery::setResult() {
    32   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     33  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3334}
    3435
  • src/UIElements/Query/StringQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// String Queries
    26 Dialog::StringQuery::StringQuery(std::string title,std::string _description) :
    27     Query(title, _description)
     26Dialog::StringQuery::StringQuery(Parameter<std::string> &param, std::string title,std::string _description) :
     27    Query(title, _description),
     28    tmp(param)
    2829{}
    2930
     
    3132
    3233void Dialog::StringQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/StringsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Strings Queries
    26 Dialog::StringsQuery::StringsQuery(std::string title,std::string _description) :
    27     Query(title, _description)
     26Dialog::StringsQuery::StringsQuery(Parameter<std::vector<std::string> > &param, std::string title,std::string _description) :
     27    Query(title, _description),
     28    tmp(param)
    2829{}
    2930
     
    3132
    3233void Dialog::StringsQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/UnsignedIntQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// UnsignedInt Queries
    26 Dialog::UnsignedIntQuery::UnsignedIntQuery(std::string title, std::string description) :
     26Dialog::UnsignedIntQuery::UnsignedIntQuery(Parameter<unsigned int> &param, std::string title, std::string description) :
    2727    Query(title, description),
    28     tmp(0)
     28    tmp(param)
    2929{}
    3030
     
    3232
    3333void Dialog::UnsignedIntQuery::setResult() {
    34   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3535}
    3636
  • src/UIElements/Query/UnsignedIntsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// UnsignedInts Queries
    26 Dialog::UnsignedIntsQuery::UnsignedIntsQuery(std::string title, std::string description) :
    27     Query(title, description)
     26Dialog::UnsignedIntsQuery::UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string description) :
     27    Query(title, description),
     28    tmp(param)
    2829{}
    2930
     
    3132
    3233void Dialog::UnsignedIntsQuery::setResult() {
    33   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     34  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3435}
    3536
  • src/UIElements/Query/VectorQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Vector Queries
    26 Dialog::VectorQuery::VectorQuery(std::string title,bool _check, std::string _description) :
     26Dialog::VectorQuery::VectorQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description) :
    2727  Query(title, _description),
     28  tmp(param),
    2829  check(_check)
    2930{}
     
    3334
    3435void Dialog::VectorQuery::setResult() {
    35   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     36  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3637}
    3738
  • src/UIElements/Query/VectorsQuery.cpp

    r5ffa05 rbd81f9  
    2424
    2525// Vectors Queries
    26 Dialog::VectorsQuery::VectorsQuery(std::string title,bool _check, std::string _description) :
     26Dialog::VectorsQuery::VectorsQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description) :
    2727  Query(title, _description),
     28  tmp(param),
    2829  check(_check)
    2930{}
     
    3334
    3435void Dialog::VectorsQuery::setResult() {
    35   ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
     36  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
    3637}
    3738
  • src/UIElements/TextUI/Query/AtomTextQuery.cpp

    r5ffa05 rbd81f9  
    3030#include "World.hpp"
    3131
    32 TextDialog::AtomTextQuery::AtomTextQuery(std::string title, std::string _description) :
    33     Dialog::AtomQuery(title,_description)
     32TextDialog::AtomTextQuery::AtomTextQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
     33    Dialog::AtomQuery(param, title,_description)
    3434{}
    3535
     
    5151    }
    5252
    53     tmp = World::getInstance().getAtom(AtomById(idxOfAtom));
    54     if(!tmp && idxOfAtom!=-1){
     53    const atom * temp_atom = World::getInstance().getAtom(AtomById(idxOfAtom));
     54    if(!temp_atom && idxOfAtom!=-1){
    5555      std::cout << "Invalid Atom Index" << idxOfAtom << std::endl;
    5656      badInput = true;
    5757    }
     58    tmp.set(temp_atom);
    5859
    5960  } while(badInput);
  • src/UIElements/TextUI/Query/AtomsTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::AtomsTextQuery::AtomsTextQuery(std::string title, std::string _description) :
    34     Dialog::AtomsQuery(title,_description)
     33TextDialog::AtomsTextQuery::AtomsTextQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
     34    Dialog::AtomsQuery(param, title,_description)
    3535{}
    3636
     
    4444  // dissect by " "
    4545  std::string::iterator olditer = line.begin();
     46  std::vector<const atom *> temp_atoms;
    4647  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
    4748    if (*iter == ' ') {
     
    5354        break;
    5455      }
    55       tmp.push_back(temp);
     56      temp_atoms.push_back(temp);
    5657      olditer = iter;
    5758    }
     
    6364    if(!temp && idxOfAtom!=-1) {
    6465      std::cout << "Invalid Atom Index" << idxOfAtom << std::endl;
    65       tmp.push_back(temp);
     66      temp_atoms.push_back(temp);
    6667    }
    6768  }
     69  tmp.set(temp_atoms);
    6870
    6971  return (idxOfAtom!=-1);
  • src/UIElements/TextUI/Query/BooleanTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::BooleanTextQuery::BooleanTextQuery(std::string title, std::string _description) :
    31     Dialog::BooleanQuery(title,_description)
     30TextDialog::BooleanTextQuery::BooleanTextQuery(Parameter<bool> &param, std::string title, std::string _description) :
     31    Dialog::BooleanQuery(param, title,_description)
    3232{}
    3333
     
    4242    std::cin >> input;
    4343    if ((input == 'y' ) || (input == 'Y')) {
    44       tmp = true;
     44      tmp.set(true);
    4545    } else if ((input == 'n' ) || (input == 'N')) {
    46       tmp = false;
     46      tmp.set(false);
    4747    } else {
    4848      badInput=true;
  • src/UIElements/TextUI/Query/DoubleTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::DoubleTextQuery::DoubleTextQuery(std::string title, std::string _description) :
    31     Dialog::DoubleQuery(title,_description)
     30TextDialog::DoubleTextQuery::DoubleTextQuery(Parameter<double> &param, std::string title, std::string _description) :
     31    Dialog::DoubleQuery(param, title,_description)
    3232{}
    3333
     
    3838  do{
    3939    badInput = false;
    40     std::cout << getDescription() << ": ";
    41     std::cin >> tmp;
     40    std::cout << getDescription() << ": ";\
     41    double temp_double;
     42    std::cin >> temp_double;
    4243    if(std::cin.fail()){
    4344      badInput = true;
     
    4647      std::cout << "Input was not a number!" << std::endl;
    4748    }
     49    tmp.set(temp_double);
    4850  }while(badInput);
    4951  std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
  • src/UIElements/TextUI/Query/DoublesTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::DoublesTextQuery::DoublesTextQuery(std::string title, std::string _description) :
    31     Dialog::DoublesQuery(title,_description)
     30TextDialog::DoublesTextQuery::DoublesTextQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
     31    Dialog::DoublesQuery(param, title,_description)
    3232{}
    3333
     
    4040  // dissect by " "
    4141  std::string::iterator olditer = line.begin();
     42  std::vector<double> temp_doubles;
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
    4344    if (*iter == ' ') {
    4445      std::istringstream stream(std::string(iter, olditer));
    4546      stream >> temp;
    46       tmp.push_back(temp);
     47      temp_doubles.push_back(temp);
    4748      olditer = iter;
    4849    }
     
    5152    std::istringstream stream(std::string(olditer, line.end()));
    5253    stream >> temp;
    53     tmp.push_back(temp);
     54    temp_doubles.push_back(temp);
    5455  }
     56  tmp.set(temp_doubles);
    5557
    5658  return true;
  • src/UIElements/TextUI/Query/ElementTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::ElementTextQuery::ElementTextQuery(std::string title, std::string _description) :
    34     Dialog::ElementQuery(title,_description)
     33TextDialog::ElementTextQuery::ElementTextQuery(Parameter<const element *> &param, std::string title, std::string _description) :
     34    Dialog::ElementQuery(param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/ElementsTextQuery.cpp

    r5ffa05 rbd81f9  
    3535
    3636
    37 TextDialog::ElementsTextQuery::ElementsTextQuery(std::string title, std::string _description) :
    38     Dialog::ElementsQuery(title,_description)
     37TextDialog::ElementsTextQuery::ElementsTextQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description) :
     38    Dialog::ElementsQuery(param, title,_description)
    3939{}
    4040
     
    5050  // dissect by " "
    5151  std::string::iterator olditer = line.begin();
     52  std::vector<const element *> temp_elements;
    5253  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
    5354    if (*iter == ' ') {
     
    6465        break;
    6566      }
    66       tmp.push_back(temp);
     67      temp_elements.push_back(temp);
    6768      olditer = iter;
    6869    }
     
    7980    if(!temp && Z!=-1) {
    8081      std::cout << "Invalid Element" << shorthand << std::endl;
    81       tmp.push_back(temp);
     82      temp_elements.push_back(temp);
    8283    }
    8384  }
     85  tmp.set(temp_elements);
    8486
    8587  return (Z!=-1);
  • src/UIElements/TextUI/Query/FileTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::FileTextQuery::FileTextQuery(std::string title, std::string _description) :
    34     Dialog::FileQuery(title,_description)
     33TextDialog::FileTextQuery::FileTextQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
     34    Dialog::FileQuery(param, title,_description)
    3535{}
    3636
     
    4848      std::cin.clear();
    4949      std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    50       std::cout << "Input was not a number!" << std::endl;
     50      std::cout << "Input was not a file!" << std::endl;
    5151      continue;
    5252    }
    5353  } while(badInput);
    5454  std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    55   tmp = tempstring;
     55  tmp.set(tempstring);
    5656  return true;
    5757}
  • src/UIElements/TextUI/Query/FilesTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::FilesTextQuery::FilesTextQuery(std::string title, std::string _description) :
    34     Dialog::FilesQuery(title,_description)
     33TextDialog::FilesTextQuery::FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
     34    Dialog::FilesQuery(param, title,_description)
    3535{}
    3636
     
    3838
    3939bool TextDialog::FilesTextQuery::handle() {
    40   std::string tempstring;
    41   boost::filesystem::path tempfile;
    42   do{
    43     std::cout << getDescription() << ": ";
     40  std::vector<boost::filesystem::path> tempfiles;
     41  bool badInput = false;
     42  bool continueflag = true;
     43  do {
     44    std::string tempstring;
     45    do{
     46      badInput = false;
     47      std::cout << getDescription() << ": ";
     48      std::cin >> tempstring;
     49      if(std::cin.fail()){
     50        badInput = true;
     51        std::cin.clear();
     52        std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     53        std::cout << "Input was not a valid file!" << std::endl;
     54        continue;
     55      }
     56    } while(badInput);
     57    boost::filesystem::path tempfile;
     58    tempfile = tempstring;
     59    std::cout << "Enter another file [y/n]? ";
    4460    std::cin >> tempstring;
    45     if (std::cin.fail()) {
    46       std::cin.clear();
    47       std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    48       std::cout << "Input was not a valid string!" << std::endl;
    49       continue;
    50     }
    51     tempfile = tempstring;
    52     if (boost::filesystem::exists(tempfile)) {
    53       tmp.push_back(tempfile);
    54     } else {
    55       ELOG(1, "File " << tempstring << " cannot be found.");
    56       tempstring = std::string();
    57     }
    58   } while(tempstring != std::string());
     61    if (tempstring != "y")
     62      continueflag = false;
     63    tempfiles.push_back(tempfile);
     64  } while(continueflag);
    5965  std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    60   return !tmp.empty();
     66  tmp.set(tempfiles);
     67  return true;
    6168}
    6269
  • src/UIElements/TextUI/Query/IntTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::IntTextQuery::IntTextQuery(std::string title, std::string _description) :
    31     Dialog::IntQuery(title,_description)
     30TextDialog::IntTextQuery::IntTextQuery(Parameter<int> &param, std::string title, std::string _description) :
     31    Dialog::IntQuery(param, title,_description)
    3232{}
    3333
     
    3939    badInput = false;
    4040    std::cout << getDescription() << ": ";
    41     std::cin >> tmp;
     41    int temp_int;
     42    std::cin >> temp_int;
     43    tmp.set(temp_int);
    4244    if(std::cin.fail()){
    4345      badInput=true;
  • src/UIElements/TextUI/Query/IntsTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::IntsTextQuery::IntsTextQuery(std::string title, std::string _description) :
    31     Dialog::IntsQuery(title,_description)
     30TextDialog::IntsTextQuery::IntsTextQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description) :
     31    Dialog::IntsQuery(param, title,_description)
    3232{}
    3333
     
    3939  getline(std::cin,line);
    4040  // dissect by " "
     41  std::vector<int> temp_int;
    4142  std::string::iterator olditer = line.begin();
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     
    4445      std::istringstream stream(std::string(iter, olditer));
    4546      stream >> temp;
    46       tmp.push_back(temp);
     47      temp_int.push_back(temp);
    4748      olditer = iter;
    4849    }
     
    5152    std::istringstream stream(std::string(olditer, line.end()));
    5253    stream >> temp;
    53     tmp.push_back(temp);
     54    temp_int.push_back(temp);
    5455  }
     56  tmp.set(temp_int);
    5557
    5658  return true;
  • src/UIElements/TextUI/Query/MoleculeTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::MoleculeTextQuery::MoleculeTextQuery(std::string title, std::string _description) :
    34     Dialog::MoleculeQuery(title,_description)
     33TextDialog::MoleculeTextQuery::MoleculeTextQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
     34    Dialog::MoleculeQuery(param, title,_description)
    3535{}
    3636
     
    5252    }
    5353
    54     tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
    55     if(!tmp && idxOfMol!=-1){
     54    const molecule *temp_mol = World::getInstance().getMolecule(MoleculeById(idxOfMol));
     55    if(!temp_mol && idxOfMol!=-1){
    5656      std::cout << "Invalid Molecule Index" << std::endl;
    5757      badInput = true;
    5858    }
     59    tmp.set(temp_mol);
    5960
    6061  } while(badInput);
  • src/UIElements/TextUI/Query/MoleculesTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::MoleculesTextQuery::MoleculesTextQuery(std::string title, std::string _description) :
    34     Dialog::MoleculesQuery(title,_description)
     33TextDialog::MoleculesTextQuery::MoleculesTextQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
     34    Dialog::MoleculesQuery(param, title,_description)
    3535{}
    3636
     
    4343  getline(std::cin,line);
    4444  // dissect by " "
     45  std::vector<const molecule *> temp_mols;
    4546  std::string::iterator olditer = line.begin();
    4647  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     
    5354        break;
    5455      }
    55       tmp.push_back(temp);
     56      temp_mols.push_back(temp);
    5657      olditer = iter;
    5758    }
     
    6364    if(!temp && idxOfMol!=-1){
    6465      std::cout << "Invalid Molecule Index" << idxOfMol << std::endl;
    65       tmp.push_back(temp);
     66      temp_mols.push_back(temp);
    6667    }
    6768  }
     69  tmp.set(temp_mols);
    6870
    6971  return (idxOfMol!=-1);
  • src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp

    r5ffa05 rbd81f9  
    3030#include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
    3131
    32 TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(std::string title, std::string _description) :
    33     Dialog::RandomNumberDistribution_ParametersQuery(title,_description)
     32TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
     33    Dialog::RandomNumberDistribution_ParametersQuery(param, title,_description)
    3434{}
    3535
     
    4343    std::cout << "Please enter parameters as follows: 'p=0.5;'";
    4444    std::cout << "Empty line terminates." << std::endl;
    45     std::cin >> tmp;
     45    RandomNumberDistribution_Parameters temp_params;
     46    std::cin >> temp_params;
     47    tmp.set(temp_params);
    4648    if(std::cin.fail()){
    4749      badInput = true;
  • src/UIElements/TextUI/Query/StringTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::StringTextQuery::StringTextQuery(std::string title, std::string _description) :
    31     Dialog::StringQuery(title,_description)
     30TextDialog::StringTextQuery::StringTextQuery(Parameter<std::string> &param, std::string title, std::string _description) :
     31    Dialog::StringQuery(param, title,_description)
    3232{}
    3333
     
    3636bool TextDialog::StringTextQuery::handle() {
    3737  std::cout << getDescription() << ": ";
    38   getline(std::cin,tmp);
     38  std::string temp_string;
     39  getline(std::cin,temp_string);
     40  tmp.set(temp_string);
    3941  return true;
    4042}
  • src/UIElements/TextUI/Query/StringsTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::StringsTextQuery::StringsTextQuery(std::string title, std::string _description) :
    31     Dialog::StringsQuery(title,_description)
     30TextDialog::StringsTextQuery::StringsTextQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description) :
     31    Dialog::StringsQuery(param, title,_description)
    3232{}
    3333
     
    3838  getline(std::cin,temp);
    3939  // dissect by " "
     40  std::vector<std::string> temp_strings;
    4041  std::string::iterator olditer = temp.begin();
    4142  for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
    4243    if (*iter == ' ') {
    43       tmp.push_back(std::string(iter, olditer));
     44      temp_strings.push_back(std::string(iter, olditer));
    4445      olditer = iter;
    4546    }
    4647  }
    4748  if (olditer != temp.begin())  // insert last part also
    48     tmp.push_back(std::string(olditer, temp.end()));
     49    temp_strings.push_back(std::string(olditer, temp.end()));
     50  tmp.set(temp_strings);
    4951
    5052  return true;
  • src/UIElements/TextUI/Query/TextQuery.hpp

    r5ffa05 rbd81f9  
    1919class TextDialog::AtomTextQuery : public Dialog::AtomQuery {
    2020public:
    21   AtomTextQuery(std::string title, std::string _description = NULL);
     21  AtomTextQuery(Parameter<const atom *> &, std::string title, std::string _description = NULL);
    2222  virtual ~AtomTextQuery();
    2323  virtual bool handle();
     
    2626class TextDialog::AtomsTextQuery : public Dialog::AtomsQuery {
    2727public:
    28   AtomsTextQuery(std::string title, std::string _description = NULL);
     28  AtomsTextQuery(Parameter<std::vector<const atom *> > &, std::string title, std::string _description = NULL);
    2929  virtual ~AtomsTextQuery();
    3030  virtual bool handle();
     
    3333class TextDialog::BooleanTextQuery : public Dialog::BooleanQuery {
    3434public:
    35   BooleanTextQuery(std::string title, std::string _description = NULL);
     35  BooleanTextQuery(Parameter<bool> &, std::string title, std::string _description = NULL);
    3636  virtual ~BooleanTextQuery();
    3737  virtual bool handle();
    3838};
    3939
    40 class TextDialog::BoxTextQuery : public Dialog::BoxQuery {
     40class TextDialog::RealSpaceMatrixTextQuery : public Dialog::RealSpaceMatrixQuery {
    4141public:
    42   BoxTextQuery(std::string title, std::string _description = NULL);
    43   virtual ~BoxTextQuery();
     42  RealSpaceMatrixTextQuery(Parameter<RealSpaceMatrix> &, std::string title, std::string _description = NULL);
     43  virtual ~RealSpaceMatrixTextQuery();
    4444  virtual bool handle();
    4545};
     
    4747class TextDialog::DoubleTextQuery : public Dialog::DoubleQuery {
    4848public:
    49   DoubleTextQuery(std::string title, std::string _description = NULL);
     49  DoubleTextQuery(Parameter<double> &, std::string title, std::string _description = NULL);
    5050  virtual ~DoubleTextQuery();
    5151  virtual bool handle();
     
    5454class TextDialog::DoublesTextQuery : public Dialog::DoublesQuery {
    5555public:
    56   DoublesTextQuery(std::string title, std::string _description = NULL);
     56  DoublesTextQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = NULL);
    5757  virtual ~DoublesTextQuery();
    5858  virtual bool handle();
     
    6161class TextDialog::ElementTextQuery : public Dialog::ElementQuery {
    6262public:
    63   ElementTextQuery(std::string title, std::string _description = NULL);
     63  ElementTextQuery(Parameter<const element *> &, std::string title, std::string _description = NULL);
    6464  virtual ~ElementTextQuery();
    6565  virtual bool handle();
     
    6868class TextDialog::ElementsTextQuery : public Dialog::ElementsQuery {
    6969public:
    70   ElementsTextQuery(std::string title, std::string _description = NULL);
     70  ElementsTextQuery(Parameter<std::vector<const element *> > &, std::string title, std::string _description = NULL);
    7171  virtual ~ElementsTextQuery();
    7272  virtual bool handle();
     
    8282class TextDialog::FileTextQuery : public Dialog::FileQuery {
    8383public:
    84   FileTextQuery(std::string title, std::string _description = NULL);
     84  FileTextQuery(Parameter<boost::filesystem::path> &, std::string title, std::string _description = NULL);
    8585  virtual ~FileTextQuery();
    8686  virtual bool handle();
     
    8989class TextDialog::FilesTextQuery : public Dialog::FilesQuery {
    9090public:
    91   FilesTextQuery(std::string title, std::string _description = NULL);
     91  FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = NULL);
    9292  virtual ~FilesTextQuery();
    9393  virtual bool handle();
     
    9696class TextDialog::IntTextQuery : public Dialog::IntQuery {
    9797public:
    98   IntTextQuery(std::string title, std::string _description = NULL);
     98  IntTextQuery(Parameter<int> &, std::string title, std::string _description = NULL);
    9999  virtual ~IntTextQuery();
    100100  virtual bool handle();
     
    103103class TextDialog::IntsTextQuery : public Dialog::IntsQuery {
    104104public:
    105   IntsTextQuery(std::string title, std::string _description = NULL);
     105  IntsTextQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = NULL);
    106106  virtual ~IntsTextQuery();
    107107  virtual bool handle();
     
    110110class TextDialog::MoleculeTextQuery : public Dialog::MoleculeQuery {
    111111public:
    112   MoleculeTextQuery(std::string title, std::string _description = NULL);
     112  MoleculeTextQuery(Parameter<const molecule *> &, std::string title, std::string _description = NULL);
    113113  virtual ~MoleculeTextQuery();
    114114  virtual bool handle();
     
    117117class TextDialog::MoleculesTextQuery : public Dialog::MoleculesQuery {
    118118public:
    119   MoleculesTextQuery(std::string title, std::string _description = NULL);
     119  MoleculesTextQuery(Parameter<std::vector<const molecule *> > &, std::string title, std::string _description = NULL);
    120120  virtual ~MoleculesTextQuery();
    121121  virtual bool handle();
     
    124124class TextDialog::StringTextQuery : public Dialog::StringQuery {
    125125public:
    126   StringTextQuery(std::string title, std::string _description = NULL);
     126  StringTextQuery(Parameter<std::string> &, std::string title, std::string _description = NULL);
    127127  virtual ~StringTextQuery();
    128128  virtual bool handle();
     
    131131class TextDialog::StringsTextQuery : public Dialog::StringsQuery {
    132132public:
    133   StringsTextQuery(std::string title, std::string _description = NULL);
     133  StringsTextQuery(Parameter<std::vector<std::string> > &, std::string title, std::string _description = NULL);
    134134  virtual ~StringsTextQuery();
    135135  virtual bool handle();
     
    138138class TextDialog::UnsignedIntTextQuery : public Dialog::UnsignedIntQuery {
    139139public:
    140   UnsignedIntTextQuery(std::string title, std::string _description = NULL);
     140  UnsignedIntTextQuery(Parameter<unsigned int> &, std::string title, std::string _description = NULL);
    141141  virtual ~UnsignedIntTextQuery();
    142142  virtual bool handle();
     
    145145class TextDialog::UnsignedIntsTextQuery : public Dialog::UnsignedIntsQuery {
    146146public:
    147   UnsignedIntsTextQuery(std::string title, std::string _description = NULL);
     147  UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = NULL);
    148148  virtual ~UnsignedIntsTextQuery();
    149149  virtual bool handle();
     
    152152class TextDialog::VectorTextQuery : public Dialog::VectorQuery {
    153153public:
    154   VectorTextQuery(std::string title,bool _check, std::string _description = NULL);
     154  VectorTextQuery(Parameter<Vector> &, std::string title,bool _check, std::string _description = NULL);
    155155  virtual ~VectorTextQuery();
    156156  virtual bool handle();
     
    159159class TextDialog::VectorsTextQuery : public Dialog::VectorsQuery {
    160160public:
    161   VectorsTextQuery(std::string title,bool _check, std::string _description = NULL);
     161  VectorsTextQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check, std::string _description = NULL);
    162162  virtual ~VectorsTextQuery();
    163163  virtual bool handle();
     
    166166class TextDialog::RandomNumberDistribution_ParametersTextQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
    167167public:
    168   RandomNumberDistribution_ParametersTextQuery(std::string title, std::string _description = NULL);
     168  RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title, std::string _description = NULL);
    169169  virtual ~RandomNumberDistribution_ParametersTextQuery();
    170170  virtual bool handle();
  • src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(std::string title, std::string _description) :
    31     Dialog::UnsignedIntQuery(title,_description)
     30TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(Parameter<unsigned int> &param, std::string title, std::string _description) :
     31    Dialog::UnsignedIntQuery(param, title,_description)
    3232{}
    3333
     
    3939    badInput = false;
    4040    std::cout << getDescription() << ": ";
    41     std::cin >> tmp;
     41    unsigned int temp_uint;
     42    std::cin >> temp_uint;
    4243    if(std::cin.fail()){
    4344      badInput=true;
     
    4647      std::cout << "Input was not a number!" << std::endl;
    4748    }
     49    tmp.set(temp_uint);
    4850  } while(badInput);
    4951  // clear the input buffer of anything still in the line
  • src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp

    r5ffa05 rbd81f9  
    2828
    2929
    30 TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(std::string title, std::string _description) :
    31     Dialog::UnsignedIntsQuery(title,_description)
     30TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description) :
     31    Dialog::UnsignedIntsQuery(param, title,_description)
    3232{}
    3333
     
    3939  getline(std::cin,line);
    4040  // dissect by " "
     41  std::vector<unsigned int> temp_uints;
    4142  std::string::iterator olditer = line.begin();
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     
    4445      std::istringstream stream(std::string(iter, olditer));
    4546      stream >> temp;
    46       tmp.push_back(temp);
     47      temp_uints.push_back(temp);
    4748      olditer = iter;
    4849    }
     
    5152    std::istringstream stream(std::string(olditer, line.end()));
    5253    stream >> temp;
    53     tmp.push_back(temp);
     54    temp_uints.push_back(temp);
    5455  }
     56  tmp.set(temp_uints);
    5557
    5658  return true;
  • src/UIElements/TextUI/Query/VectorTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::VectorTextQuery::VectorTextQuery(std::string title, bool _check, std::string _description) :
    34     Dialog::VectorQuery(title,_check,_description)
     33TextDialog::VectorTextQuery::VectorTextQuery(Parameter<Vector> &param, std::string title, bool _check, std::string _description) :
     34    Dialog::VectorQuery(param, title,_check,_description)
    3535{}
    3636
     
    4848  getline(std::cin,line);
    4949
     50  Vector temp_vector;
     51
    5052  // dissect by ","
    5153  double coord = 0.;
     
    5658      std::istringstream stream(std::string(iter, olditer));
    5759      stream >> coord;
    58       tmp[counter++] = coord;
     60      temp_vector[counter++] = coord;
    5961      olditer = iter;
    6062    }
     
    6365    std::istringstream stream(std::string(olditer, line.end()));
    6466    stream >> coord;
    65     tmp[counter++] = coord;
     67    temp_vector[counter++] = coord;
    6668  }
     69  tmp.set(temp_vector);
    6770
    6871  // check vector
    69   return World::getInstance().getDomain().isValid(tmp);
     72  return World::getInstance().getDomain().isValid(temp_vector);
    7073}
    7174
  • src/UIElements/TextUI/Query/VectorsTextQuery.cpp

    r5ffa05 rbd81f9  
    3131
    3232
    33 TextDialog::VectorsTextQuery::VectorsTextQuery(std::string title, bool _check, std::string _description) :
    34     Dialog::VectorsQuery(title,_check,_description)
     33TextDialog::VectorsTextQuery::VectorsTextQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check, std::string _description) :
     34    Dialog::VectorsQuery(param, title,_check,_description)
    3535{}
    3636
     
    5050  // dissect by ","
    5151  double coord = 0.;
     52  std::vector<Vector> temp_vectors;
    5253  std::string::iterator olditerspace = line.begin();
    5354  std::string::iterator olditercomma = line.begin();
     
    7273      }
    7374      if (World::getInstance().getDomain().isValid(temp))
    74         tmp.push_back(temp);
     75        temp_vectors.push_back(temp);
    7576      olditerspace = vectoriter;
    7677    }
    7778  }
     79  tmp.set(temp_vectors);
    7880
    7981  return true;
  • src/UIElements/TextUI/TextDialog.cpp

    r5ffa05 rbd81f9  
    3838}
    3939
    40 void TextDialog::queryBoolean(const char* title, std::string description){
    41   registerQuery(new BooleanTextQuery(title,description));
     40void TextDialog::queryBoolean(Parameter<bool> &param, const char* title, std::string description){
     41  registerQuery(new BooleanTextQuery(param, title,description));
    4242}
    4343
    44 void TextDialog::queryInt(const char* title, std::string description){
    45   registerQuery(new IntTextQuery(title,description));
     44void TextDialog::queryInt(Parameter<int> &param, const char* title, std::string description){
     45  registerQuery(new IntTextQuery(param, title,description));
    4646}
    4747
    48 void TextDialog::queryInts(const char* title, std::string description){
    49   registerQuery(new IntsTextQuery(title,description));
     48void TextDialog::queryInts(Parameter<std::vector<int> > &param, const char* title, std::string description){
     49  registerQuery(new IntsTextQuery(param, title,description));
    5050}
    5151
    52 void TextDialog::queryUnsignedInt(const char* title, std::string description){
    53   registerQuery(new UnsignedIntTextQuery(title,description));
     52void TextDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char* title, std::string description){
     53  registerQuery(new UnsignedIntTextQuery(param, title,description));
    5454}
    5555
    56 void TextDialog::queryUnsignedInts(const char* title, std::string description){
    57   registerQuery(new UnsignedIntsTextQuery(title,description));
     56void TextDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char* title, std::string description){
     57  registerQuery(new UnsignedIntsTextQuery(param, title,description));
    5858}
    5959
    60 void TextDialog::queryDouble(const char* title, std::string description){
    61   registerQuery(new DoubleTextQuery(title,description));
     60void TextDialog::queryDouble(Parameter<double> &param, const char* title, std::string description){
     61  registerQuery(new DoubleTextQuery(param, title,description));
    6262}
    6363
    64 void TextDialog::queryDoubles(const char* title, std::string description){
    65   registerQuery(new DoublesTextQuery(title,description));
     64void TextDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title, std::string description){
     65  registerQuery(new DoublesTextQuery(param, title,description));
    6666}
    6767
    68 void TextDialog::queryString(const char* title, std::string description){
    69   registerQuery(new StringTextQuery(title,description));
     68void TextDialog::queryString(Parameter<std::string> &param, const char* title, std::string description){
     69  registerQuery(new StringTextQuery(param, title,description));
    7070}
    7171
    72 void TextDialog::queryStrings(const char* title, std::string description){
    73   registerQuery(new StringsTextQuery(title,description));
     72void TextDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title, std::string description){
     73  registerQuery(new StringsTextQuery(param, title,description));
    7474}
    7575
    76 void TextDialog::queryAtom(const char* title, std::string description) {
    77   registerQuery(new AtomTextQuery(title,description));
     76void TextDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string description) {
     77  registerQuery(new AtomTextQuery(param, title,description));
    7878}
    7979
    80 void TextDialog::queryAtoms(const char* title, std::string description) {
    81   registerQuery(new AtomsTextQuery(title,description));
     80void TextDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string description) {
     81  registerQuery(new AtomsTextQuery(param, title,description));
    8282}
    8383
    84 void TextDialog::queryMolecule(const char* title, std::string description) {
    85   registerQuery(new MoleculeTextQuery(title,description));
     84void TextDialog::queryMolecule(Parameter<const molecule *> &param, const char* title, std::string description) {
     85  registerQuery(new MoleculeTextQuery(param, title,description));
    8686}
    8787
    88 void TextDialog::queryMolecules(const char* title, std::string description) {
    89   registerQuery(new MoleculesTextQuery(title,description));
     88void TextDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char* title, std::string description) {
     89  registerQuery(new MoleculesTextQuery(param, title,description));
    9090}
    9191
    92 void TextDialog::queryVector(const char* title, bool check, std::string description) {
    93   registerQuery(new VectorTextQuery(title,check,description));
     92void TextDialog::queryVector(Parameter<Vector> &param, const char* title, bool check, std::string description) {
     93  registerQuery(new VectorTextQuery(param, title,check,description));
    9494}
    9595
    96 void TextDialog::queryVectors(const char* title, bool check, std::string description) {
    97   registerQuery(new VectorsTextQuery(title,check,description));
     96void TextDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check, std::string description) {
     97  registerQuery(new VectorsTextQuery(param, title,check,description));
    9898}
    9999
    100 void TextDialog::queryBox(const char* title, std::string description) {
    101   registerQuery(new BoxTextQuery(title,description));
     100void TextDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string description) {
     101  registerQuery(new RealSpaceMatrixTextQuery(param, title,description));
    102102}
    103103
    104 void TextDialog::queryElement(const char* title, std::string description){
    105   registerQuery(new ElementTextQuery(title,description));
     104void TextDialog::queryElement(Parameter<const element *> &param, const char* title, std::string description){
     105  registerQuery(new ElementTextQuery(param, title,description));
    106106}
    107107
    108 void TextDialog::queryElements(const char* title, std::string description){
    109   registerQuery(new ElementsTextQuery(title,description));
     108void TextDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string description){
     109  registerQuery(new ElementsTextQuery(param, title,description));
    110110}
    111111
    112 void TextDialog::queryFile(const char* title, std::string description){
    113   registerQuery(new FileTextQuery(title,description));
     112void TextDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string description){
     113  registerQuery(new FileTextQuery(param, title,description));
    114114}
    115115
    116 void TextDialog::queryFiles(const char* title, std::string description){
    117   registerQuery(new FilesTextQuery(title,description));
     116void TextDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > &param, const char* title, std::string description){
     117  registerQuery(new FilesTextQuery(param, title,description));
    118118}
    119119
    120 void TextDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string description){
    121   registerQuery(new RandomNumberDistribution_ParametersTextQuery(title,description));
     120void TextDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string description){
     121  registerQuery(new RandomNumberDistribution_ParametersTextQuery(param, title,description));
    122122}
    123123
  • src/UIElements/TextUI/TextDialog.hpp

    r5ffa05 rbd81f9  
    2222class element;
    2323class molecule;
     24class RealSpaceMatrix;
    2425class Vector;
    2526
     
    3132
    3233  virtual void queryEmpty(const char *, std::string = "");
    33   virtual void queryBoolean(const char *, std::string = "");
    34   virtual void queryInt(const char *, std::string = "");
    35   virtual void queryInts(const char *, std::string = "");
    36   virtual void queryUnsignedInt(const char *, std::string = "");
    37   virtual void queryUnsignedInts(const char *, std::string = "");
    38   virtual void queryString(const char*, std::string = "");
    39   virtual void queryStrings(const char*, std::string = "");
    40   virtual void queryDouble(const char*, std::string = "");
    41   virtual void queryDoubles(const char*, std::string = "");
    42   virtual void queryAtom(const char*,std::string = "");
    43   virtual void queryAtoms(const char*,std::string = "");
    44   virtual void queryMolecule(const char*,std::string = "");
    45   virtual void queryMolecules(const char*,std::string = "");
    46   virtual void queryVector(const char*,bool, std::string = "");
    47   virtual void queryVectors(const char*,bool, std::string = "");
    48   virtual void queryBox(const char*, std::string = "");
    49   virtual void queryElement(const char*, std::string = "");
    50   virtual void queryElements(const char*, std::string = "");
    51   virtual void queryFile(const char*, std::string = "");
    52   virtual void queryFiles(const char*, std::string = "");
    53   virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
     34  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
     35  virtual void queryInt(Parameter<int> &, const char *, std::string = "");
     36  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "");
     37  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "");
     38  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "");
     39  virtual void queryString(Parameter<std::string> &, const char*, std::string = "");
     40  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "");
     41  virtual void queryDouble(Parameter<double> &, const char*, std::string = "");
     42  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "");
     43  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "");
     44  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "");
     45  virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = "");
     46  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = "");
     47  virtual void queryVector(Parameter<Vector> &, const char*,bool, std::string = "");
     48  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool, std::string = "");
     49  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
     50  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "");
     51  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "");
     52  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "");
     53  virtual void queryFiles(Parameter<std::vector<boost::filesystem::path> > &, const char*, std::string = "");
     54  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "");
    5455
    5556protected:
     
    6061  class AtomsTextQuery;
    6162  class BooleanTextQuery;
    62   class BoxTextQuery;
    6363  class DoubleTextQuery;
    6464  class DoublesTextQuery;
     
    7272  class MoleculeTextQuery;
    7373  class MoleculesTextQuery;
     74  class RealSpaceMatrixTextQuery;
    7475  class StringTextQuery;
    7576  class StringsTextQuery;
  • src/World.cpp

    r5ffa05 rbd81f9  
    505505  const molecule *mol = _mol;
    506506  void (World::*func)(const atom*) = &World::unselectAtom; // needed for type resolution of overloaded function
    507   for_each(mol->begin(),mol->end(),bind1st(mem_fun(func),this)); // func is unsselect... see above
     507  for_each(mol->begin(),mol->end(),bind1st(mem_fun(func),this)); // func is unselect... see above
    508508}
    509509
  • src/World.hpp

    r5ffa05 rbd81f9  
    290290   * Unless you are calling this method from inside an atom don't fiddle with the third parameter.
    291291   *
    292    * Return value indicates wether the change could be done or not.
     292   * Return value indicates whether the change could be done or not.
    293293   */
    294294  bool changeAtomId(atomId_t oldId, atomId_t newId, atom* target=0);
     
    296296  /**
    297297   * used when changing an molecule Id.
    298    * Unless you are calling this method from inside an moleucle don't fiddle with the third parameter.
    299    *
    300    * Return value indicates wether the change could be done or not.
     298   * Unless you are calling this method from inside an molecule don't fiddle with the third parameter.
     299   *
     300   * Return value indicates whether the change could be done or not.
    301301   */
    302302  bool changeMoleculeId(moleculeId_t oldId, moleculeId_t newId, molecule* target=0);
  • src/molecule_geometry.cpp

    r5ffa05 rbd81f9  
    274274  // obtain first column, eigenvector to biggest eigenvalue
    275275  Vector BiggestEigenvector(InertiaTensor.column(Eigenvalues.SmallestComponent()));
    276   Vector DesiredAxis(Axis);
     276  Vector DesiredAxis(Axis.getNormalized());
    277277
    278278  // Creation Line that is the rotation axis
  • src/unittests/Box_BoundaryConditionsUnitTest.cpp

    r5ffa05 rbd81f9  
    102102  std::stringstream outstream;
    103103  outstream << *bc;
    104   CPPUNIT_ASSERT( outstream.str() == std::string("Wrap, Wrap, Wrap"));
     104  CPPUNIT_ASSERT( outstream.str() == std::string("Wrap Wrap Wrap"));
    105105}
    106106
     
    132132{
    133133  // set by string
    134   std::stringstream inputstream(" Bounce, Wrap, Ignore");
    135   CPPUNIT_ASSERT_NO_THROW( inputstream >> *bc );
     134  std::stringstream inputstream(" Bounce,Wrap,Ignore");
     135  std::stringstream otherinputstream(" Bounce Wrap Ignore");
     136  std::stringstream anotherinputstream(" Bounce, Wrap, Ignore");
    136137
    137138  // check
     139  CPPUNIT_ASSERT_NO_THROW( inputstream >> *bc );
     140  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
     141  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
     142  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Ignore, bc->get(2) );
     143
     144  // check
     145  CPPUNIT_ASSERT_NO_THROW( otherinputstream >> *bc );
     146  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
     147  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
     148  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Ignore, bc->get(2) );
     149
     150  // check
     151  CPPUNIT_ASSERT_NO_THROW( anotherinputstream >> *bc );
    138152  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
    139153  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
  • src/unittests/Makefile.am

    r5ffa05 rbd81f9  
    2121
    2222include ../../src/LinkedCell/unittests/Makefile.am
     23include ../../src/Parameters/unittests/Makefile.am
    2324include ../../src/Parser/unittests/Makefile.am
    2425include ../../src/RandomNumbers/unittests/Makefile.am
     
    8586        ${LINKEDCELLTESTSSOURCES} \
    8687        ${LINEARALGEBRATESTSSOURCES} \
     88        ${PARAMETERTESTSSOURCES} \
    8789        ${PARSERTESTSSOURCES} \
    8890        ${RANDOMNUMBERTESTSSOURCES} \
     
    110112        ${LINKEDCELLTESTHEADERS} \
    111113        ${LINEARALGEBRATESTSHEADERS} \
     114        ${PARAMETERTESTSHEADERS} \
    112115        ${PARSERTESTSHEADERS} \
    113116        ${RANDOMNUMBERTESTSHEADERS} \
  • tests/Fragmentations/Fragmenting/1_2-dimethoxyethane/testsuite-fragmenting-1_2-dimethoxyethane-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz" --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethoxyethane/testsuite-fragmenting-1_2-dimethoxyethane-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethoxyethane/testsuite-fragmenting-1_2-dimethoxyethane-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethoxyethane/testsuite-fragmenting-1_2-dimethoxyethane-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethylbenzene/testsuite-fragmenting-1_2-dimethylbenzene-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethylbenzene/testsuite-fragmenting-1_2-dimethylbenzene-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethylbenzene/testsuite-fragmenting-1_2-dimethylbenzene-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/1_2-dimethylbenzene/testsuite-fragmenting-1_2-dimethylbenzene-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/N_N-dimethylacetamide/testsuite-fragmenting-N_N-dimethylacetamide-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order1.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 1 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order2.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 2 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order3.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 3 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order4.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 4 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order5.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 5 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order6.at

    r5ffa05 rbd81f9  
    1414AT_CHECK([chmod u+w $file], 0)
    1515
    16 AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types "mpqc pcp xyz"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 -f $FILENAME --order 6 --distance $DISTANCE  --output-types mpqc pcp xyz], 0, [stdout], [stderr])
    1717AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore])
    1818AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore])
  • tests/Python/AllActions/options.dat

    r5ffa05 rbd81f9  
    126126random-number-engine-parameters "seed=2;"
    127127repeat-box      "1 1 1"
     128reset   1
    128129rotate-around-origin    "180."
    129130rotate-around-origin    "20."
  • tests/regression/Analysis/PairCorrelation-RangeTest/testsuite-analysis-pair-correlation-range-test.at

    r5ffa05 rbd81f9  
    55
    66AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/pre/test.conf .], 0)
    7 AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions "Wrap,Wrap,Wrap" --pair-correlation --elements 1 8 --output-file output-5.csv --bin-output-file bin_output-5.csv --bin-start 0 --bin-end 5], 0, [stdout], [stderr])
     7AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions Wrap Wrap Wrap --pair-correlation --elements 1 8 --output-file output-5.csv --bin-output-file bin_output-5.csv --bin-start 0 --bin-end 5], 0, [stdout], [stderr])
    88#AT_CHECK([file=output-5.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-5.csv], 0, [ignore], [ignore])
    99AT_CHECK([file=bin_output-5.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/bin_output-5.csv], 0, [ignore], [ignore])
    1010
    1111AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/pre/test.conf .], 0)
    12 AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions "Wrap,Wrap,Wrap" --pair-correlation --elements 1 8 --output-file output-10.csv --bin-output-file bin_output-10.csv --bin-start 5 --bin-end 10], 0, [stdout], [stderr])
     12AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions Wrap Wrap Wrap --pair-correlation --elements 1 8 --output-file output-10.csv --bin-output-file bin_output-10.csv --bin-start 5 --bin-end 10], 0, [stdout], [stderr])
    1313#AT_CHECK([file=output-10.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-10.csv], 0, [ignore], [ignore])
    1414AT_CHECK([file=bin_output-10.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/bin_output-10.csv], 0, [ignore], [ignore])
    1515
    1616AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/pre/test.conf .], 0)
    17 AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions "Wrap,Wrap,Wrap" --pair-correlation --elements 1 8 --output-file output-20.csv --bin-output-file bin_output-20.csv --bin-start 10 --bin-end 20], 0, [stdout], [stderr])
     17AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions Wrap Wrap Wrap --pair-correlation --elements 1 8 --output-file output-20.csv --bin-output-file bin_output-20.csv --bin-start 10 --bin-end 20], 0, [stdout], [stderr])
    1818#AT_CHECK([file=output-20.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-20.csv], 0, [ignore], [ignore])
    1919AT_CHECK([file=bin_output-20.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/bin_output-20.csv], 0, [ignore], [ignore])
  • tests/regression/Analysis/PairCorrelation/testsuite-analysis-pair-correlation.at

    r5ffa05 rbd81f9  
    55
    66AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation/pre/test.conf .], 0)
    7 AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions "Wrap,Wrap,Wrap" --pair-correlation --elements 1 8 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
     7AT_CHECK([../../molecuilder -i test.conf  -v 3 --set-boundary-conditions Wrap Wrap Wrap --pair-correlation --elements 1 8 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
    88AT_CHECK([fgrep "Begin of PairCorrelation" stdout], 0, [ignore], [ignore])
    99#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation/post/output.csv], 0, [ignore], [ignore])
  • tests/regression/Analysis/SurfaceCorrelation/testsuite-analysis-surface-correlation.at

    r5ffa05 rbd81f9  
    55
    66AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/SurfaceCorrelation/pre/test.conf .], 0)
    7 AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-all-molecules --unselect-molecules-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20 --molecule-by-id 0], 0, [stdout], [stderr])
     7AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --unselect-all-molecules --select-all-molecules --unselect-molecules-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20], 0, [stdout], [stderr])
    88AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore])
    99#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/SurfaceCorrelation/post/output.csv], 0, [ignore], [ignore])
  • tests/regression/Atoms/Add/testsuite-atoms-add.at

    r5ffa05 rbd81f9  
    3636AT_SETUP([Atoms - adding outside boundary fails])
    3737AT_KEYWORDS([atoms boundary add-atom])
     38AT_XFAIL_IF([/bin/true])
    3839
    3940AT_CHECK([../../molecuilder -i test2.conf -o mpqc pcp xyz tremolo pdb --set-boundary-conditions "Ignore,Ignore,Ignore" -a 1 --domain-position "0., 0., -1."], 134, [ignore], [ignore])
  • tests/regression/Domain/RepeatBox/testsuite-domain-repeat-box.at

    r5ffa05 rbd81f9  
    77AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    88AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    9 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 1"], 0, [stdout], [stderr])
     9AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 1], 0, [stdout], [stderr])
    1010AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    1111AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    1616AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    1717AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    18 AT_CHECK([../../molecuilder -i $file -o xyz -d "2, 1, 1"], 0, [stdout], [stderr])
     18AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1], 0, [stdout], [stderr])
    1919AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    2020AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    2525AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    2626AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    27 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 2, 1"], 0, [stdout], [stderr])
     27AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 2 1], 0, [stdout], [stderr])
    2828AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    2929AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    3434AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    3535AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    36 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 2"], 0, [stdout], [stderr])
     36AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 2], 0, [stdout], [stderr])
    3737AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    3838AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    4343AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
    4444AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    45 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d "2, 2, 2"], 0, [stdout], [stderr])
     45AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d 2 2 2], 0, [stdout], [stderr])
    4646AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    4747AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/$file], 0, [ignore], [ignore])
     
    5656AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    5757AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    58 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 1" --undo], 0, [stdout], [stderr])
     58AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 1 --undo], 0, [stdout], [stderr])
    5959AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore])
    6060AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    6565AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    6666AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    67 AT_CHECK([../../molecuilder -i $file -o xyz -d "2, 1, 1" --undo], 0, [stdout], [stderr])
     67AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1 --undo], 0, [stdout], [stderr])
    6868AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore])
    6969AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    7474AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    7575AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    76 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 2, 1" --undo], 0, [stdout], [stderr])
     76AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 2 1 --undo], 0, [stdout], [stderr])
    7777AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore])
    7878AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    8383AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    8484AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    85 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 2" --undo], 0, [stdout], [stderr])
     85AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 2 --undo], 0, [stdout], [stderr])
    8686AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore])
    8787AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    9292AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
    9393AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    94 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials  -i $file  -o tremolo -d "2, 2, 2" --undo], 0, [stdout], [stderr])
     94AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials  -i $file  -o tremolo -d 2 2 2 --undo], 0, [stdout], [stderr])
    9595AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    9696AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/$file], 0, [ignore], [ignore])
     
    105105AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    106106AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    107 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 1" --undo --redo], 0, [stdout], [stderr])
     107AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 1 --undo --redo], 0, [stdout], [stderr])
    108108AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore])
    109109AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    114114AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    115115AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    116 AT_CHECK([../../molecuilder -i $file -o xyz -d "2, 1, 1" --undo --redo], 0, [stdout], [stderr])
     116AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1 --undo --redo], 0, [stdout], [stderr])
    117117AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore])
    118118AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    123123AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    124124AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    125 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 2, 1" --undo --redo], 0, [stdout], [stderr])
     125AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 2 1 --undo --redo], 0, [stdout], [stderr])
    126126AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore])
    127127AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    132132AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0)
    133133AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    134 AT_CHECK([../../molecuilder -i $file  -o xyz -d "1, 1, 2" --undo --redo], 0, [stdout], [stderr])
     134AT_CHECK([../../molecuilder -i $file  -o xyz -d 1 1 2 --undo --redo], 0, [stdout], [stderr])
    135135AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore])
    136136AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore])
     
    141141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
    142142AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    143 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d "2, 2, 2" --undo --redo], 0, [stdout], [stderr])
     143AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d 2 2 2 --undo --redo], 0, [stdout], [stderr])
    144144AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
    145145AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/$file], 0, [ignore], [ignore])
  • tests/regression/Domain/SetBoundaryConditions/testsuite-domain-set-boundary-conditions.at

    r5ffa05 rbd81f9  
    44AT_KEYWORDS([domain set-boundary-conditions])
    55
    6 BC="Wrap, Wrap, Wrap"
    7 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC"], 0, [stdout], [stderr])
     6BC="Wrap Wrap Wrap"
     7AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr])
    88AT_CHECK([fgrep "Boundary conditions are now ${BC}" stdout], 0, [ignore], [ignore])
    9 BC="Bounce, Bounce, Bounce"
    10 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC"], 0, [stdout], [stderr])
     9BC="Bounce Bounce Bounce"
     10AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr])
    1111AT_CHECK([fgrep "Boundary conditions are now ${BC}" stdout], 0, [ignore], [ignore])
    12 BC="Ignore, Ignore, Ignore"
    13 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC"], 0, [stdout], [stderr])
     12BC="Ignore Ignore Ignore"
     13AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr])
    1414AT_CHECK([fgrep "Boundary conditions are now ${BC}" stdout], 0, [ignore], [ignore])
    15 BC="Wrap, Bounce, Ignore"
    16 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC"], 0, [stdout], [stderr])
     15BC="Wrap Bounce Ignore"
     16AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr])
    1717AT_CHECK([fgrep "Boundary conditions are now ${BC}" stdout], 0, [ignore], [ignore])
    1818
     
    2323AT_KEYWORDS([domain set-boundary-conditions undo])
    2424
    25 Check_BC="Wrap, Wrap, Wrap"
    26 BC="Wrap, Wrap, Wrap"
    27 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo], 0, [stdout], [stderr])
     25Check_BC="Wrap Wrap Wrap"
     26BC="Wrap Wrap Wrap"
     27AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr])
    2828AT_CHECK([fgrep "Boundary conditions are set back to ${Check_BC}" stdout], 0, [ignore], [ignore])
    29 BC="Bounce, Bounce, Bounce"
    30 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo], 0, [stdout], [stderr])
     29BC="Bounce Bounce Bounce"
     30AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr])
    3131AT_CHECK([fgrep "Boundary conditions are set back to ${Check_BC}" stdout], 0, [ignore], [ignore])
    32 BC="Ignore, Ignore, Ignore"
    33 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo], 0, [stdout], [stderr])
     32BC="Ignore Ignore Ignore"
     33AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr])
    3434AT_CHECK([fgrep "Boundary conditions are set back to ${Check_BC}" stdout], 0, [ignore], [ignore])
    35 BC="Wrap, Bounce, Ignore"
    36 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo], 0, [stdout], [stderr])
     35BC="Wrap Bounce Ignore"
     36AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr])
    3737AT_CHECK([fgrep "Boundary conditions are set back to ${Check_BC}" stdout], 0, [ignore], [ignore])
    3838
     
    4343AT_KEYWORDS([domain set-boundary-conditions redo])
    4444
    45 BC="Wrap, Wrap, Wrap"
    46 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo --redo], 0, [stdout], [stderr])
     45BC="Wrap Wrap Wrap"
     46AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo --redo], 0, [stdout], [stderr])
    4747AT_CHECK([fgrep "Boundary conditions are again ${BC}" stdout], 0, [ignore], [ignore])
    48 BC="Bounce, Bounce, Bounce"
    49 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo --redo], 0, [stdout], [stderr])
     48BC="Bounce Bounce Bounce"
     49AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo --redo], 0, [stdout], [stderr])
    5050AT_CHECK([fgrep "Boundary conditions are again ${BC}" stdout], 0, [ignore], [ignore])
    51 BC="Ignore, Ignore, Ignore"
    52 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo --redo], 0, [stdout], [stderr])
     51BC="Ignore Ignore Ignore"
     52AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo --redo], 0, [stdout], [stderr])
    5353AT_CHECK([fgrep "Boundary conditions are again ${BC}" stdout], 0, [ignore], [ignore])
    54 BC="Wrap, Bounce, Ignore"
    55 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC" --undo --redo], 0, [stdout], [stderr])
     54BC="Wrap Bounce Ignore"
     55AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo --redo], 0, [stdout], [stderr])
    5656AT_CHECK([fgrep "Boundary conditions are again ${BC}" stdout], 0, [ignore], [ignore])
    5757
  • tests/regression/Filling/RegularGrid/testsuite-molecules-fill-regular-grid-with-surface.at

    r5ffa05 rbd81f9  
    88AT_CHECK([chmod u+w $file], 0)
    99# check that specifying radius but selecting no atoms is wrong
    10 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,7,11" --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5], 5, [stdout], [stderr])
     10AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 7 11 --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5], 5, [stdout], [stderr])
    1111
    1212AT_CLEANUP
     
    1818AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0)
    1919AT_CHECK([chmod u+w $file], 0)
    20 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,7,11" --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5], 0, [stdout], [stderr])
     20AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 7 11 --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5], 0, [stdout], [stderr])
    2121AT_CHECK([grep "366 out of 385 returned true from predicate" stdout], 0, [ignore], [ignore])
    2222AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore])
     
    3131AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0)
    3232AT_CHECK([chmod u+w $file], 0)
    33 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,7,11" --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5 --undo], 0, [stdout], [stderr])
     33AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 7 11 --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5 --undo], 0, [stdout], [stderr])
    3434AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/double_sles-undo.data], 0, [ignore], [ignore])
    3535
     
    4343AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0)
    4444AT_CHECK([chmod u+w $file], 0)
    45 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,7,11" --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5 --undo --redo], 0, [stdout], [stderr])
     45AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file --select-all-atoms -B "14.199,0,21.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 7 11 --mesh-offset "0.5,0.5,0.5" --tesselation-radius 10 --min-distance .5 --undo --redo], 0, [stdout], [stderr])
    4646AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore])
    4747
  • tests/regression/Filling/RegularGrid/testsuite-molecules-fill-regular-grid.at

    r5ffa05 rbd81f9  
    77AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0)
    88AT_CHECK([chmod u+w $file], 0)
    9 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,5,11" --mesh-offset "0.5,0.5,0.5" --min-distance 3.1], 0, [stdout], [stderr])
     9AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 5 11 --mesh-offset "0.5,0.5,0.5" --min-distance 3.1], 0, [stdout], [stderr])
    1010AT_CHECK([grep "222 out of 275 returned true from predicate" stdout], 0, [ignore], [ignore])
    1111AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore])
     
    2020AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0)
    2121AT_CHECK([chmod u+w $file], 0)
    22 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,5,11" --mesh-offset "0.5,0.5,0.5" --min-distance 3.1 --undo], 0, [stdout], [stderr])
     22AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 5 11 --mesh-offset "0.5,0.5,0.5" --min-distance 3.1 --undo], 0, [stdout], [stderr])
    2323AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/single_sles-undo.data], 0, [ignore], [ignore])
    2424
     
    3232AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0)
    3333AT_CHECK([chmod u+w $file], 0)
    34 AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size "5,5,11" --mesh-offset "0.5,0.5,0.5" --min-distance 3.1 --undo --redo], 0, [stdout], [stderr])
     34AT_CHECK([../../molecuilder --parse-tremolo-potentials ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/sles.potentials -i $file -B "14.199,0,16.6216,0,0,33.9159" --load ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/water.data --select-molecule-by-order -1 --fill-regular-grid --mesh-size 5 5 11 --mesh-offset "0.5,0.5,0.5" --min-distance 3.1 --undo --redo], 0, [stdout], [stderr])
    3535AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore])
    3636
  • tests/regression/Graph/SubgraphDissection-BoundaryConditions/testsuite-graph-subgraph-dissection_boundary-conditions.at

    r5ffa05 rbd81f9  
    77AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    88AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    9 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Wrap, Wrap, Wrap" -v 3 -I], 0, [stdout], [stderr])
     9AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Wrap Wrap Wrap -v 3 -I], 0, [stdout], [stderr])
    1010AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    1111file=water-bounced.xyz
    1212AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    1313AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    14 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Wrap, Wrap, Wrap" -v 3 -I], 0, [stdout], [stderr])
     14AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Wrap Wrap Wrap -v 3 -I], 0, [stdout], [stderr])
    1515AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    1616file=water-wrapped.xyz
    1717AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    1818AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    19 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Wrap, Wrap, Wrap" -v 3 -I], 0, [stdout], [stderr])
     19AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Wrap Wrap Wrap -v 3 -I], 0, [stdout], [stderr])
    2020AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    2121
     
    2828AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    2929AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    30 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Bounce, Bounce, Bounce" -v 3 -I], 0, [stdout], [stderr])
     30AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Bounce Bounce Bounce -v 3 -I], 0, [stdout], [stderr])
    3131AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    3232file=water-bounced.xyz
    3333AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    3434AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    35 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Bounce, Bounce, Bounce" -v 3 -I], 0, [stdout], [stderr])
     35AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Bounce Bounce Bounce -v 3 -I], 0, [stdout], [stderr])
    3636AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    3737file=water-wrapped.xyz
    3838AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    3939AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    40 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Bounce, Bounce, Bounce" -v 3 -I], 0, [stdout], [stderr])
     40AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Bounce Bounce Bounce -v 3 -I], 0, [stdout], [stderr])
    4141AT_CHECK([fgrep "I scanned 2 molecules." stdout], 0, [ignore], [ignore])
    4242
     
    4949AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    5050AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    51 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Ignore, Ignore, Ignore" -v 3 -I], 0, [stdout], [stderr])
     51AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Ignore Ignore Ignore -v 3 -I], 0, [stdout], [stderr])
    5252AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    5353file=water-bounced.xyz
    5454AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    5555AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    56 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Ignore, Ignore, Ignore" -v 3 -I], 0, [stdout], [stderr])
     56AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Ignore Ignore Ignore -v 3 -I], 0, [stdout], [stderr])
    5757AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore])
    5858file=water-wrapped.xyz
    5959AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0)
    6060AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    61 AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions "Ignore, Ignore, Ignore" -v 3 -I], 0, [stdout], [stderr])
     61AT_CHECK([../../molecuilder -i $file -B "5,0,5,0,0,5" --set-boundary-conditions Ignore Ignore Ignore -v 3 -I], 0, [stdout], [stderr])
    6262AT_CHECK([fgrep "I scanned 2 molecules." stdout], 0, [ignore], [ignore])
    6363
  • tests/regression/Makefile.am

    r5ffa05 rbd81f9  
    127127        $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-basis.at \
    128128        $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-maxiterations.at \
     129        $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-none.at \
    129130        $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-theory.at \
    130131        $(srcdir)/Parser/SetParameters/Psi3/testsuite-parser-set-parameters-psi3-reference.at \
     
    134135        $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-load-multiply.at \
    135136        $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-save.at \
     137        $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-save-unique_usedfields.at \
    136138        $(srcdir)/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at \
    137139        $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials.at \
    138140        $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-load.at \
    139141        $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-save.at \
     142        $(srcdir)/Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-resetatomdata.at \
    140143        $(srcdir)/Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at \
    141144        $(srcdir)/Parser/Xyz/testsuite-parser-xyz-empty.at \
  • tests/regression/Molecules/Copy/testsuite-molecules-copy-molecule.at

    r5ffa05 rbd81f9  
    77AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0)
    88AT_CHECK([chmod u+w $file], 0)
    9 AT_CHECK([../../molecuilder -i $file  --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr])
     9AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10"], 0, [stdout], [stderr])
    1010AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-copy.xyz], 0, [ignore], [ignore])
    1111
     
    1414AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0)
    1515AT_CHECK([chmod u+w $file], 0)
    16 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr])
     16AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10"], 0, [stdout], [stderr])
    1717AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore])
    1818
     
    2626AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0)
    2727AT_CHECK([chmod u+w $file], 0)
    28 AT_CHECK([../../molecuilder -i $file  --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr])
     28AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo], 0, [stdout], [stderr])
    2929AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-undo.xyz], 0, [ignore], [ignore])
    3030
     
    3333AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0)
    3434AT_CHECK([chmod u+w $file], 0)
    35 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr])
     35AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo], 0, [stdout], [stderr])
    3636AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.data], 0, [ignore], [ignore])
    3737
     
    4545AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0)
    4646AT_CHECK([chmod u+w $file], 0)
    47 AT_CHECK([../../molecuilder -i $file  --copy-molecule 0 --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
     47AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
    4848AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-copy.xyz], 0, [ignore], [ignore])
    4949
     
    5252AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0)
    5353AT_CHECK([chmod u+w $file], 0)
    54 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
     54AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
    5555AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore])
    5656
  • tests/regression/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc.at

    r5ffa05 rbd81f9  
    44AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory])
    55
    6 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G;maxiter=499;theory=CLKS;"], 0, [stdout], [ignore])
     6AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G" "maxiter=499" "theory=CLKS"], 0, [stdout], [ignore])
    77AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore])
    88
     
    1414AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory undo])
    1515
    16 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G;maxiter=499;theory=CLKS;" --undo], 0, [stdout], [ignore])
     16AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G" "maxiter=499" "theory=CLKS" --undo], 0, [stdout], [ignore])
    1717AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore])
    1818
     
    2323AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory redo])
    2424
    25 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G;maxiter=499;theory=CLKS;" --undo --redo], 0, [stdout], [ignore])
     25AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in -v 1 --set-parser-parameters "mpqc" --parser-parameters "basis = 4-31G" "maxiter=499" "theory=CLKS" --undo --redo], 0, [stdout], [ignore])
    2626AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore])
    2727
  • tests/regression/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-save.at

    r5ffa05 rbd81f9  
    44AT_KEYWORDS([parser tremolo save parse-tremolo-potentials])
    55
     6AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Potentials/pre/argon.potentials .], 0, [ignore], [ignore])
    67AT_CHECK([../../molecuilder -v 2 --parse-tremolo-potentials argon.potentials -i test.data -l ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Potentials/pre/test.xyz], 0, [ignore], [ignore])
    78AT_CHECK([file=test.data; diff -w -I '#.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Potentials/post/test.data], 0, [ignore], [ignore])
  • tests/regression/Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at

    r5ffa05 rbd81f9  
    11### parsing tremolo
    22
    3 AT_SETUP([Parser - set tremolo's atomdata])
     3AT_SETUP([Parser - reset tremolo's atomdata])
    44AT_KEYWORDS([parser tremolo set-tremolo-atomdata])
    55
     
    88AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    99AT_CHECK([../../molecuilder -i argon.data --set-tremolo-atomdata "type x=3"], 0, [stdout], [ignore])
    10 AT_CHECK([file=argon.data; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/argon.data], 0, [ignore], [ignore])
     10AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/argon.data], 0, [ignore], [ignore])
    1111
    1212AT_CLEANUP
     13
     14AT_SETUP([Parser - reset tremolo's atomdata with Undo])
     15AT_KEYWORDS([parser tremolo set-tremolo-atomdata undo])
     16
     17file=argon.data
     18AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/pre/argon.data $file], 0, [ignore], [ignore])
     19AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
     20AT_CHECK([../../molecuilder -i argon.data --set-tremolo-atomdata "type x=3" --undo], 0, [stdout], [ignore])
     21AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/undo.data], 0, [ignore], [ignore])
     22
     23AT_CLEANUP
     24
     25AT_SETUP([Parser - reset tremolo's atomdata with Redo])
     26AT_KEYWORDS([parser tremolo set-tremolo-atomdata redo])
     27
     28file=argon.data
     29AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/pre/argon.data $file], 0, [ignore], [ignore])
     30AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
     31AT_CHECK([../../molecuilder -i argon.data --set-tremolo-atomdata "type x=3" --undo --redo], 0, [stdout], [ignore])
     32AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/argon.data], 0, [ignore], [ignore])
     33
     34AT_CLEANUP
  • tests/regression/Parser/testsuite-parser.at

    r5ffa05 rbd81f9  
    1010# set mpqc basis, theory and maxiter
    1111m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc.at])
     12m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-none.at])
    1213m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-basis.at])
    1314m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-maxiterations.at])
     
    4950m4_include([Parser/Tremolo/testsuite-parser-tremolo-load-multiply.at])
    5051m4_include([Parser/Tremolo/testsuite-parser-tremolo-save.at])
     52m4_include([Parser/Tremolo/testsuite-parser-tremolo-save-unique_usedfields.at])
    5153
    5254# parsing tremolo with .potentials
     
    5759# setting tremolo's atomdata line
    5860m4_include([Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at])
     61m4_include([Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-resetatomdata.at])
    5962
    6063# writing and exttypes file
  • tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at

    r5ffa05 rbd81f9  
    3535AT_KEYWORDS([selection molecule select-molecules-by-formula undo])
    3636
     37comparisonfile=empty.xyz
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    3839srcfile=mix.xyz
    3940testfile=test.xyz
    40 targetfile=empty.xyz
     41targetfile=empty1.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    4647srcfile=mix.xyz
    4748testfile=test.xyz
    48 targetfile=empty.xyz
     49targetfile=empty2.xyz
    4950AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    5051AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
    51 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     52AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    5253
    5354regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    5455srcfile=mix.xyz
    5556testfile=test.xyz
    56 targetfile=empty.xyz
     57targetfile=empty3.xyz
    5758AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    5859AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
    59 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     60AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    6061
    6162AT_CLEANUP
  • tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-unselect-molecules-by-formula.at

    r5ffa05 rbd81f9  
    3535AT_KEYWORDS([unselection molecule unselect-molecules-by-formula undo])
    3636
     37comparisonfile=mix.xyz
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    3839srcfile=mix.xyz
    3940testfile=test.xyz
    40 targetfile=mix.xyz
     41targetfile=mix1.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    4647srcfile=mix.xyz
    4748testfile=test.xyz
    48 targetfile=mix.xyz
     49targetfile=mix2.xyz
    4950AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    5051AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
    51 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     52AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    5253
    5354regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
    5455srcfile=mix.xyz
    5556testfile=test.xyz
    56 targetfile=mix.xyz
     57targetfile=mix3.xyz
    5758AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    5859AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
    59 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     60AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    6061
    6162AT_CLEANUP
  • tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-select-molecule-by-order-backward.at

    r5ffa05 rbd81f9  
    2727AT_KEYWORDS([selection molecule select-molecule-by-order undo])
    2828
     29comparisonfile=empty.xyz
    2930regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3031srcfile=twowater.xyz
    3132testfile=test.xyz
    32 targetfile=empty.xyz
     33targetfile=empty1.xyz
    3334AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    3435AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -2 --undo -s $targetfile], 0, [stdout], [stderr])
    35 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    3637
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3839srcfile=twowater.xyz
    3940testfile=test.xyz
    40 targetfile=empty.xyz
     41targetfile=empty2.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -1 --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546AT_CLEANUP
  • tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-select-molecule-by-order-forward.at

    r5ffa05 rbd81f9  
    2727AT_KEYWORDS([selection molecule select-molecule-by-order undo])
    2828
     29comparisonfile=empty.xyz
    2930regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3031srcfile=twowater.xyz
    3132testfile=test.xyz
    32 targetfile=empty.xyz
     33targetfile=empty1.xyz
    3334AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    3435AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 1 --undo -s $targetfile], 0, [stdout], [stderr])
    35 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    3637
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3839srcfile=twowater.xyz
    3940testfile=test.xyz
    40 targetfile=empty.xyz
     41targetfile=empty2.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 2 --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546AT_CLEANUP
  • tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-unselect-molecule-by-order-backward.at

    r5ffa05 rbd81f9  
    2727AT_KEYWORDS([unselection molecule unselect-molecule-by-order undo])
    2828
     29comparisonfile=twowater.xyz
    2930regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3031srcfile=twowater.xyz
    3132testfile=test.xyz
    32 targetfile=twowater.xyz
     33targetfile=twowater1.xyz
    3334AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    3435AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 --undo -s $targetfile], 0, [stdout], [stderr])
    35 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    3637
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3839srcfile=twowater.xyz
    3940testfile=test.xyz
    40 targetfile=twowater.xyz
     41targetfile=twowater2.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546AT_CLEANUP
  • tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-unselect-molecule-by-order-forward.at

    r5ffa05 rbd81f9  
    2727AT_KEYWORDS([unselection molecule unselect-molecule-by-order undo])
    2828
     29comparisonfile=twowater.xyz
    2930regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3031srcfile=twowater.xyz
    3132testfile=test.xyz
    32 targetfile=twowater.xyz
     33targetfile=twowater1.xyz
    3334AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    3435AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 1 --undo -s $targetfile], 0, [stdout], [stderr])
    35 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    3637
    3738regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
    3839srcfile=twowater.xyz
    3940testfile=test.xyz
    40 targetfile=twowater.xyz
     41targetfile=twowater2.xyz
    4142AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
    4243AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 2 --undo -s $targetfile], 0, [stdout], [stderr])
    43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
     44AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
    4445
    4546AT_CLEANUP
Note: See TracChangeset for help on using the changeset viewer.