Changes in / [5ffa05:bd81f9]
- Files:
-
- 93 added
- 26 deleted
- 456 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r5ffa05 rbd81f9 3 3 4 4 AC_PREREQ(2.59) 5 AC_INIT(MoleCuilder, 1.2. 4, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])5 AC_INIT(MoleCuilder, 1.2.5, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/]) 6 6 AC_CONFIG_AUX_DIR([build-aux]) 7 7 AC_CONFIG_SRCDIR([src/builder.cpp]) … … 87 87 # refer to the libtool manual, section "Updating library version information": 88 88 # 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])89 AC_SUBST([MOLECUILDER_SO_VERSION], [9:0:0]) 90 AC_SUBST([MOLECUILDER_API_VERSION], [1.2.5]) 91 91 92 92 dnl this macro is used to get the arguments supplied -
src/Actions/Action.cpp
r5ffa05 rbd81f9 174 174 Dialog* dialog = createDialog(); 175 175 if (dialog->hasQueries()) { 176 dialog->display(); 176 if (!dialog->display()) 177 // dialog error or aborted -> throw exception 178 throw ActionFailureException() << ActionNameString(getName()); 177 179 } 178 180 delete(dialog); … … 181 183 // try { 182 184 startTimer(); 183 getParametersfromValueStorage();185 //getParametersfromValueStorage(); 184 186 state = performCall(); 185 187 endTimer(); -
src/Actions/Action.hpp
r5ffa05 rbd81f9 17 17 #include <boost/shared_ptr.hpp> 18 18 19 #include <boost/preprocessor/list/adt.hpp> 20 19 21 /** Used in .def files in paramdefaults define to set that no default value exists. 20 * We define NO DEFAULT here, as it is used in .def files and needs to be present22 * We define NOPARAM_DEFAULT here, as it is used in .def files and needs to be present 21 23 * before these are included. 22 24 */ 23 #define NO DEFAULT ""25 #define NOPARAM_DEFAULT BOOST_PP_NIL 24 26 25 27 // forward declaration … … 185 187 186 188 /** 187 * This method is called by the Histor , when a redo is performed. It is189 * This method is called by the History, when a redo is performed. It is 188 190 * provided with the corresponding state produced by the undo method and 189 191 * needs to produce a State that can then be used for another undo. … … 192 194 193 195 /** 194 * This special state can be used to indicate that the Action was successful l196 * This special state can be used to indicate that the Action was successful 195 197 * without providing a special state. Use this if your Action does not need 196 * a special lized state.198 * a specialized state. 197 199 */ 198 200 static state_ptr success; … … 200 202 /** 201 203 * This special state can be returned, to indicate that the action could not do it's 202 * work, was ab borted by the user etc. If you return this state make sure to transactionize204 * work, was aborted by the user etc. If you return this state make sure to transactionize 203 205 * your Actions and unroll the complete transaction before this is returned. 204 206 */ … … 227 229 * necessary ActionParameters by retrieving the values from ValueStorage. 228 230 */ 229 virtual void getParametersfromValueStorage()=0;231 //virtual void getParametersfromValueStorage()=0; 230 232 231 233 /** … … 268 270 * It is implementing a memento pattern. The base class is completely empty, 269 271 * since no general state internals can be given. The Action performing 270 * the Undo should downcast to the ap ropriate type.272 * the Undo should downcast to the appropriate type. 271 273 */ 272 274 class ActionState{ -
src/Actions/ActionRegistry.cpp
r5ffa05 rbd81f9 34 34 using namespace MoleCuilder; 35 35 36 // static entities 37 bool ActionRegistry::completely_instatiated = false; 38 36 39 /** Constructor for class ActionRegistry. 37 40 */ … … 40 43 //std::cout << "ActionRegistry::ActionRegistry() called, instance is " << this << "." << std::endl; 41 44 fillRegistry(); 45 completely_instatiated = true; 42 46 } 43 47 -
src/Actions/ActionRegistry.hpp
r5ffa05 rbd81f9 48 48 int getLastPosition(const std::string &MenuName) const; 49 49 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 50 57 private: 51 58 ActionRegistry(); … … 53 60 54 61 void fillRegistry(); 62 63 //!> this tells whether ActionRegistry has been completed instantiated. 64 static bool completely_instatiated; 55 65 }; 56 66 -
src/Actions/Action_impl_header.hpp
r5ffa05 rbd81f9 14 14 #include <boost/preprocessor/comparison/equal.hpp> 15 15 #include <boost/preprocessor/comparison/not_equal.hpp> 16 #include <boost/preprocessor/control/expr_if.hpp> 16 17 #include <boost/preprocessor/control/if.hpp> 17 18 #include <boost/preprocessor/debug/assert.hpp> 18 19 #include <boost/preprocessor/iteration/local.hpp> 20 #include <boost/preprocessor/list/adt.hpp> 19 21 #include <boost/preprocessor/punctuation/comma_if.hpp> 22 #include <boost/preprocessor/punctuation/paren.hpp> 20 23 #include <boost/preprocessor/repetition/repeat.hpp> 21 24 #include <boost/preprocessor/seq/elem.hpp> … … 31 34 #include "Actions/ValueStorage.hpp" 32 35 36 #include "Parameters/Parameter.hpp" 37 33 38 // some derived names: if CATEGORY is not given, we don't prefix with it 34 39 #ifdef CATEGORY … … 47 52 #define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes) 48 53 #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) 49 65 50 66 // check user has given name and category … … 77 93 #endif 78 94 79 // check if paramdefaults is given, otherwise fill list with NO DEFAULT95 // check if paramdefaults is given, otherwise fill list with NOPARAM_DEFAULT 80 96 // this does not work: paramdefaults has to be completely defined before 81 97 // being used within option_print (used as an array there and not as 82 98 // some function call still to be expanded) 83 //#define paramdefaults (NO DEFAULT)99 //#define paramdefaults (NOPARAM_DEFAULT) 84 100 //#define tempvalue(z,n,value) 85 // BOOST_PP_CAT(value,(NO DEFAULT))101 // BOOST_PP_CAT(value,(NOPARAM_DEFAULT)) 86 102 //BOOST_PP_REPEAT(tempvalue, MAXPARAMTYPES, paramdefaults) 87 103 //#undef tempvalue … … 95 111 #endif 96 112 97 // print a list of type ref followed by a separator, i.e. " inti;"113 // print a list of type ref followed by a separator, i.e. "Parameter<int> i;" 98 114 #define type_print(z,n,TYPELIST, VARLIST, separator) \ 115 Parameter < \ 99 116 BOOST_PP_SEQ_ELEM(n, TYPELIST) \ 100 BOOST_PP_SEQ_ELEM(n, VARLIST)\ 117 > \ 118 BOOST_PP_SEQ_ELEM(n, VARLIST) \ 101 119 separator 102 120 … … 108 126 109 127 // prints Options.insert 110 #ifdef paramdefaults111 128 #define option_print(z,n,unused, unused2) \ 112 129 tester = Options. insert (\ … … 116 133 BOOST_PP_SEQ_ELEM(n, paramtokens), \ 117 134 &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 )\ 120 143 )\ 121 144 ); \ 122 145 ASSERT(tester.second, "ActionTrait<ACTION>::ActionTrait<ACTION>() option token present twice!"); 123 #else124 #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 #endif137 146 138 147 namespace MoleCuilder { … … 205 214 206 215 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); 207 220 #if defined paramtypes && defined paramreferences 208 221 #define BOOST_PP_LOCAL_MACRO(n) type_print(~, n, paramtypes, paramreferences, ;) … … 219 232 220 233 private: 221 virtual void getParametersfromValueStorage();234 //virtual void getParametersfromValueStorage(); 222 235 virtual Action::state_ptr performCall(); 223 236 virtual Action::state_ptr performUndo(Action::state_ptr); … … 227 240 } 228 241 242 #undef paramvalids 229 243 #undef paramtypes 230 244 #undef paramtokens … … 233 247 #undef paramdefaults 234 248 #undef MAXPARAMTYPES 249 #undef MAXPARAMDEFAULTS 235 250 #undef statetypes 236 251 #undef statereferences 237 252 #undef MAXSTATETYPES 253 #undef PARAM_DEFAULT 238 254 239 255 #undef option_print 256 #undef sequencer 240 257 #undef type_print 241 258 #undef type_list -
src/Actions/Action_impl_pre.hpp
r5ffa05 rbd81f9 37 37 #include <boost/preprocessor/comparison/equal.hpp> 38 38 #include <boost/preprocessor/comparison/not_equal.hpp> 39 #include <boost/preprocessor/control/expr_if.hpp> 39 40 #include <boost/preprocessor/control/if.hpp> 40 41 #include <boost/preprocessor/debug/assert.hpp> 41 42 #include <boost/preprocessor/iteration/local.hpp> 43 #include <boost/preprocessor/list/adt.hpp> 42 44 #include <boost/preprocessor/punctuation/comma_if.hpp> 43 45 #include <boost/preprocessor/repetition/repeat.hpp> … … 48 50 #include <boost/preprocessor/seq/transform.hpp> 49 51 52 #include "Parameters/Parameter.hpp" 53 54 50 55 // some derived names: if CATEGORY is not given, we don't prefix with it 51 56 #ifdef CATEGORY … … 73 78 #define MAXSTATETYPES BOOST_PP_SEQ_SIZE(statetypes) 74 79 #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) 75 91 76 92 // check user has given name and category … … 118 134 dialog->query<\ 119 135 BOOST_PP_SEQ_ELEM(n, paramtypes)\ 120 >(\ 136 >( params. \ 137 BOOST_PP_SEQ_ELEM(n, paramreferences)\ 138 ,\ 121 139 BOOST_PP_SEQ_ELEM(n, paramtokens)\ 122 140 , Traits.getDescription()\ 123 141 ); 124 142 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 125 166 // 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)\ 132 172 ); 133 173 134 174 // 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) \ 143 180 ); 144 181 … … 206 243 } 207 244 245 // =========== parameter constructor =========== 246 ACTION::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 255 ACTION::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 208 264 // =========== fill a dialog =========== 209 265 Dialog* ACTION::fillDialog(Dialog *dialog) { … … 226 282 // =========== command for calling action directly =========== 227 283 void COMMAND( 228 #if defined paramtypes && defined paramreferences 284 #if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0) 229 285 #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences) 230 286 #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMTYPES-1) … … 233 289 ) 234 290 { 235 A ction *ToCall = ActionRegistry::getInstance().getActionByName( TOKEN); //->clone(params);291 ACTION *ToCall = dynamic_cast<ACTION*>(ActionRegistry::getInstance().getActionByName( TOKEN )); //->clone(params); 236 292 //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.) 239 295 #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMTYPES-1) 240 296 #include BOOST_PP_LOCAL_ITERATE() … … 244 300 245 301 void BOOST_PP_CAT( COMMAND, _stringargs)( 246 #if defined paramtypes && defined paramreferences 302 #if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0) 247 303 #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_TRANSFORM( type2string, , paramtypes), paramreferences) 248 304 #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMTYPES-1) … … 250 306 #endif 251 307 ) { 252 A ction *ToCall = ActionRegistry::getInstance().getActionByName( TOKEN); //->clone(params);308 ACTION *ToCall = dynamic_cast<ACTION*>(ActionRegistry::getInstance().getActionByName( TOKEN )); //->clone(params); 253 309 //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. ) 256 312 #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMTYPES-1) 257 313 #include BOOST_PP_LOCAL_ITERATE() … … 260 316 }; 261 317 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 #endif269 };270 271 318 } 272 319 273 320 // free up defines 321 #undef paramvalids 274 322 #undef paramtypes 275 323 #undef paramtokens 276 324 #undef paramreferences 325 #undef paramdescriptions 326 #undef paramdefaults 277 327 #undef MAXPARAMTYPES 328 #undef MAXPARAMDEFAULTS 278 329 #undef statetypes 279 330 #undef statereferences 280 331 #undef MAXSTATETYPES 332 #undef PARAM_DEFAULT 281 333 282 334 #undef type2string … … 286 338 #undef type_list 287 339 #undef dialog_print 340 #undef sequencer 341 #undef valid_print 342 #undef validcopy_print 288 343 #undef value_print 289 344 #undef valuetype_print -
src/Actions/Action_impl_python.hpp
r5ffa05 rbd81f9 18 18 #include <boost/preprocessor/facilities/expand.hpp> 19 19 #include <boost/preprocessor/iteration/local.hpp> 20 #include <boost/preprocessor/list/adt.hpp> 20 21 #include <boost/preprocessor/punctuation/comma_if.hpp> 21 22 #define NODEFAULT "" 22 #include <boost/preprocessor/punctuation/paren.hpp> 23 23 24 24 // some derived names: if CATEGORY is not given, we don't prefix with it … … 32 32 #define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters) 33 33 #endif 34 35 // for paramdefaults entries 36 #define PARAM_DEFAULT(x) \ 37 (x, BOOST_PP_NIL) 34 38 35 39 // check if no lists given … … 61 65 BOOST_PP_SEQ_ELEM(n, STRINGLIST) \ 62 66 ) \ 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 ) 64 75 65 76 // print a list of comma-separated list, i.e. (,)arg("Action") … … 142 153 #undef PARAMS 143 154 #undef MAXPARAMTYPES 155 #undef PARAM_DEFAULT 144 156 145 157 #undef help_print -
src/Actions/Action_impl_undef.hpp
r5ffa05 rbd81f9 11 11 #endif 12 12 13 #undef paramvalids 13 14 #undef paramtypes 14 15 #undef paramtokens 16 #undef paramreferences 15 17 #undef paramdescriptions 16 18 #undef paramdefaults 17 #undef paramreferences18 19 19 20 #undef statetypes -
src/Actions/AnalysisAction/CalculateBoundingBoxAction.def
r5ffa05 rbd81f9 10 10 typedef std::vector<double> doubleVec; 11 11 12 #include "Parameters/Validators/DummyValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #undef paramtypes 16 18 #undef paramreferences … … 18 20 #undef paramdescriptions 19 21 #undef paramdefaults 22 #undef paramvalids 20 23 21 24 // Reaction cannot be undone, hence no state -
src/Actions/AnalysisAction/CalculateCellVolumeAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramreferences … … 16 18 #undef paramdescriptions 17 19 #undef paramdefaults 20 #undef paramvalids 18 21 19 22 // Reaction cannot be undone, hence no state -
src/Actions/AnalysisAction/CalculateMolarMassAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramreferences … … 16 18 #undef paramdescriptions 17 19 #undef paramdefaults 20 #undef paramvalids 18 21 19 22 // Reaction cannot be undone, hence no state -
src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp
r5ffa05 rbd81f9 56 56 57 57 // 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()); 60 60 World::getInstance().clearMoleculeSelection(); // TODO: This should be done in setTime or where molecules are re-done 61 61 World::getInstance().selectAllMolecules(MoleculeByFormula(DipoleFormula)); … … 71 71 +toString(DipoleFormula)+" selects no atoms."); 72 72 range<size_t> timesteps = getMaximumTrajectoryBounds(atoms); 73 ASSERT(params.timestepzero < timesteps.first,73 ASSERT(params.timestepzero.get() < timesteps.first, 74 74 "AnalysisDipoleAngularCorrelationAction::performCall() - time step zero " 75 +toString(params.timestepzero )+" is beyond trajectory range ("75 +toString(params.timestepzero.get())+" is beyond trajectory range (" 76 76 +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) { 78 78 // calculate dipoles relative to zero orientation 79 79 DipoleAngularCorrelationMap *correlationmap = NULL; … … 87 87 // output correlation map 88 88 ofstream output; 89 std::string filename = params.outputname. string()+"."+stepname+".dat";89 std::string filename = params.outputname.get().string()+"."+stepname+".dat"; 90 90 output.open(filename.c_str()); 91 91 OutputCorrelationMap<DipoleAngularCorrelationMap>(&output, correlationmap, OutputDipoleAngularCorrelation_Header, OutputDipoleAngularCorrelation_Value); … … 93 93 94 94 // 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() ); 96 96 97 97 // free correlation map … … 100 100 // output binned map 101 101 ofstream binoutput; 102 std::string binfilename = params.binoutputname. string()+"."+stepname+".dat";102 std::string binfilename = params.binoutputname.get().string()+"."+stepname+".dat"; 103 103 binoutput.open(binfilename.c_str()); 104 104 OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value ); -
src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def
r5ffa05 rbd81f9 10 10 #include <vector> 11 11 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 12 19 // i.e. there is an integer with variable name Z that can be found in 13 20 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value21 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 22 #define paramtypes (std::string)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(unsigned int) 16 23 #define paramreferences (DipoleFormula)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(timestepzero) 17 24 #define paramtokens ("dipole-angular-correlation")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("time-step-zero") 18 25 #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()) 20 35 21 36 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/DipoleCorrelationAction.cpp
r5ffa05 rbd81f9 48 48 49 49 // 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()); 52 52 DipoleCorrelationMap *correlationmap = NULL; 53 53 std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules(); 54 54 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."); 56 56 correlationmap = DipoleCorrelation(molecules); 57 57 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() ); 59 59 OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value ); 60 60 delete(binmap); -
src/Actions/AnalysisAction/DipoleCorrelationAction.def
r5ffa05 rbd81f9 10 10 #include <vector> 11 11 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 12 17 // i.e. there is an integer with variable name Z that can be found in 13 18 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value19 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 20 #define paramtypes (double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool) 16 21 #define paramreferences (BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic) 17 22 #define paramtokens ("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic") 18 23 #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>()) 20 32 21 33 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/MolecularVolumeAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramreferences … … 16 18 #undef paramdescriptions 17 19 #undef paramdefaults 20 #undef paramvalids 18 21 19 22 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/PairCorrelationAction.cpp
r5ffa05 rbd81f9 44 44 /** =========== define the function ====================== */ 45 45 Action::state_ptr AnalysisPairCorrelationAction::performCall() { 46 int ranges[3] = {1, 1, 1};47 46 ofstream output; 48 47 ofstream binoutput; … … 51 50 52 51 // 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()); 55 54 PairCorrelationMap *correlationmap = NULL; 56 ASSERT(params.elements. size() == 2,55 ASSERT(params.elements.get().size() == 2, 57 56 "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(); 59 58 const World::AtomComposite atoms_first = World::getInstance().getAllAtoms(AtomByType(*(elemiter++))); 60 59 const World::AtomComposite atoms_second = World::getInstance().getAllAtoms(AtomByType(*(elemiter++))); 61 ASSERT(elemiter == params.elements. end(),60 ASSERT(elemiter == params.elements.get().end(), 62 61 "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.) { 65 64 // find max distance within box from diagonal 66 65 const RealSpaceMatrix &M = World::getInstance().getDomain().getM(); … … 69 68 correlationmap = PairCorrelation(atoms_first, atoms_second, max_distance); 70 69 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() ); 72 71 OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value ); 73 72 delete(binmap); -
src/Actions/AnalysisAction/PairCorrelationAction.def
r5ffa05 rbd81f9 11 11 class element; 12 12 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 13 22 // i.e. there is an integer with variable name Z that can be found in 14 23 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value24 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 25 #define paramtypes (std::vector<const element *>)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool) 17 26 #define paramreferences (elements)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic) 18 27 #define paramtokens ("elements")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic") 19 28 #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>()) 21 38 22 39 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/PointCorrelationAction.cpp
r5ffa05 rbd81f9 50 50 51 51 // 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; 55 55 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) 57 57 cout << "element is " << (*iter)->getSymbol() << endl; 58 58 std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules(); 59 if (params.periodic )60 correlationmap = PeriodicCorrelationToPoint(molecules, params.elements , ¶ms.Point, ranges);59 if (params.periodic.get()) 60 correlationmap = PeriodicCorrelationToPoint(molecules, params.elements.get(), ¶ms.Point.get(), ranges); 61 61 else 62 correlationmap = CorrelationToPoint(molecules, params.elements , ¶ms.Point);62 correlationmap = CorrelationToPoint(molecules, params.elements.get(), ¶ms.Point.get()); 63 63 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() ); 65 65 OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value ); 66 66 delete(binmap); -
src/Actions/AnalysisAction/PointCorrelationAction.def
r5ffa05 rbd81f9 13 13 class element; 14 14 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 15 23 // i.e. there is an integer with variable name Z that can be found in 16 24 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 17 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value25 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 18 26 #define paramtypes (std::vector<const element *>)(Vector)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool) 19 27 #define paramreferences (elements)(Point)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic) 20 28 #define paramtokens ("elements")("position")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic") 21 29 #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>()) 23 40 24 41 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/PrincipalAxisSystemAction.def
r5ffa05 rbd81f9 10 10 // all includes and forward declarations necessary for non-integral types below 11 11 12 #include "Parameters/Validators/DummyValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #undef paramtypes 16 18 #undef paramreferences … … 18 20 #undef paramdescriptions 19 21 #undef paramdefaults 22 #undef paramvalids 20 23 21 24 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp
r5ffa05 rbd81f9 53 53 54 54 // 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; 59 62 const double radius = 4.; 60 63 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(); 64 67 else 65 68 LCWidth = 2.*radius; 66 69 } 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")); 67 76 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 72 83 std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules(); 73 84 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);77 85 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); 80 88 else 81 surfacemap = CorrelationToSurface( molecules, params.elements , TesselStruct, LCList);89 surfacemap = CorrelationToSurface( molecules, params.elements.get(), TesselStruct, LCList); 82 90 delete LCList; 83 91 OutputCorrelationMap<CorrelationToSurfaceMap>(&output, surfacemap, OutputCorrelationToSurface_Header, OutputCorrelationToSurface_Value); … … 89 97 ELOG(1, "Linked Cell width is smaller than the found range of values! Bins can only be correct up to: " << radius << "."); 90 98 } 91 binmap = BinData( surfacemap, params.BinWidth , params.BinStart, params.BinEnd);99 binmap = BinData( surfacemap, params.BinWidth.get(), params.BinStart.get(), params.BinEnd.get() ); 92 100 OutputCorrelationMap<BinPairMap> ( &binoutput, binmap, OutputCorrelation_Header, OutputCorrelation_Value ); 93 101 delete TesselStruct; // surfacemap contains refs to triangles! delete here, not earlier! -
src/Actions/AnalysisAction/SurfaceCorrelationAction.def
r5ffa05 rbd81f9 12 12 class molecule; 13 13 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 14 21 // i.e. there is an integer with variable name Z that can be found in 15 22 // 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>()) 22 37 23 38 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/AtomAction/AddAction.cpp
r5ffa05 rbd81f9 43 43 // execute action 44 44 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()); 47 47 LOG(1, "Adding new atom with element " << first->getType()->getName() << " at " << (first->getPosition()) << "."); 48 48 // TODO: remove when all of World's atoms are stored. … … 68 68 69 69 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() << "."); 73 73 // TODO: remove when all of World's atoms are stored. 74 74 std::vector<molecule *> molecules = World::getInstance().getAllMolecules(); -
src/Actions/AtomAction/AddAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include "LinearAlgebra/ BoxVector.hpp"9 #include "LinearAlgebra/Vector.hpp" 10 10 #include "World.hpp" 11 11 class element; 12 12 13 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 14 #include "Parameters/Validators/Specific/ElementValidator.hpp" 15 13 16 // i.e. there is an integer with variable name Z that can be found in 14 17 // 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) 17 21 #define paramtokens ("add-atom")("domain-position") 18 22 #define paramdescriptions ("element of new atom")("position within current domain") 19 23 #define paramreferences (elemental)(position) 20 #define paramdefaults (NODEFAULT)(NODEFAULT) 24 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT) 25 #define paramvalids \ 26 (ElementValidator()) \ 27 (BoxVectorValidator()) 21 28 22 29 #define statetypes (const atomId_t) -
src/Actions/AtomAction/ChangeElementAction.cpp
r5ffa05 rbd81f9 54 54 for (World::AtomSelectionIterator iter = World::getInstance().beginAtomSelection(); iter != World::getInstance().endAtomSelection(); ++iter) { 55 55 first = iter->second; 56 LOG(1, "Changing atom " << *first << " to element " << *params.elemental << ".");56 LOG(1, "Changing atom " << *first << " to element " << *params.elemental.get() << "."); 57 57 mol = first->getMolecule(); 58 58 first->removeFromMolecule(); // remove atom 59 first->setType(params.elemental );59 first->setType(params.elemental.get()); 60 60 mol->AddAtom(first); // add atom to ensure correctness of formula 61 61 } … … 88 88 mol = first->getMolecule(); 89 89 first->removeFromMolecule(); // remove atom 90 first->setType(state->params.elemental );90 first->setType(state->params.elemental.get()); 91 91 mol->AddAtom(first); // add atom to ensure correctness of formula 92 92 } -
src/Actions/AtomAction/ChangeElementAction.def
r5ffa05 rbd81f9 10 10 typedef std::map<int, const element *> ElementMap; 11 11 12 #include "Parameters/Validators/Specific/ElementValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #define paramtypes (const element *) 16 18 #define paramtokens ("change-element") … … 18 20 #undef paramdefaults 19 21 #define paramreferences (elemental) 22 #define paramvalids \ 23 (ElementValidator()) 20 24 21 25 #define statetypes (ElementMap) -
src/Actions/AtomAction/RemoveAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::vector<AtomicInfo>) -
src/Actions/AtomAction/RotateAroundOriginByAngleAction.cpp
r5ffa05 rbd81f9 44 44 45 45 // check whether Axis is valid 46 if (params.Axis. IsZero())46 if (params.Axis.get().IsZero()) 47 47 return Action::failure; 48 48 49 49 // convert from degrees to radian 50 params.angle *=M_PI/180.;50 double radian = params.angle.get() * M_PI/180.; 51 51 52 52 // 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()); 54 54 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() << "."); 56 56 // TODO: use AtomSet::rotate? 57 57 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)); 59 59 } 60 60 LOG(0, "done."); … … 65 65 AtomRotateAroundOriginByAngleState *state = assert_cast<AtomRotateAroundOriginByAngleState*>(_state.get()); 66 66 67 // convert from degrees to radian 68 double radian = params.angle.get() * M_PI/180.; 69 67 70 // 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()); 69 72 70 73 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)); 72 75 } 73 76 … … 78 81 AtomRotateAroundOriginByAngleState *state = assert_cast<AtomRotateAroundOriginByAngleState*>(_state.get()); 79 82 83 // convert from degrees to radian 84 double radian = params.angle.get() * M_PI/180.; 85 80 86 // 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()); 82 88 83 89 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)); 85 91 } 86 92 -
src/Actions/AtomAction/RotateAroundOriginByAngleAction.def
r5ffa05 rbd81f9 9 9 #include "LinearAlgebra/Vector.hpp" 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 #include "Parameters/Validators/Specific/RotationAngleValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 17 #define paramtypes (double)(Vector) 15 18 #define paramtokens ("rotate-around-origin")("position") … … 17 20 #undef paramdefaults 18 21 #define paramreferences (angle)(Axis) 22 #define paramvalids \ 23 (RotationAngleValidator())\ 24 (DummyValidator< Vector> ()) 19 25 20 26 #define statetypes (std::vector<atom*>) -
src/Actions/AtomAction/SaveSelectedAtomsAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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() << "."); 41 41 42 42 // extract suffix 43 43 std::string FilenameSuffix; 44 44 std::string FilenamePrefix; 45 if (params.filename. has_filename()) {45 if (params.filename.get().has_filename()) { 46 46 // get suffix 47 47 #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(); 50 50 #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(); 53 53 #endif 54 54 } else { … … 60 60 // parse the file 61 61 boost::filesystem::ofstream output; 62 output.open(params.filename );62 output.open(params.filename.get()); 63 63 if (!output.fail()) { 64 64 FormatParserStorage::getInstance().saveSelectedAtoms(output, FilenameSuffix); 65 65 } else { 66 ELOG(1, "Could not open file " << params.filename << ".");66 ELOG(1, "Could not open file " << params.filename.get() << "."); 67 67 } 68 68 output.close(); -
src/Actions/AtomAction/SaveSelectedAtomsAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 18 #define paramtypes (boost::filesystem::path) 15 19 #define paramtokens ("save-selected-atoms") … … 17 21 #undef paramdefaults 18 22 #define paramreferences (filename) 23 #define paramvalids \ 24 (!FilePresentValidator() && ParserFileValidator()) 19 25 20 26 #undef statetypes -
src/Actions/AtomAction/TranslateAction.cpp
r5ffa05 rbd81f9 44 44 // TODO: use AtomSet::translate 45 45 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()) 48 48 (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition())); 49 49 } … … 57 57 58 58 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()) 61 61 (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition())); 62 62 } … … 70 70 71 71 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()) 74 74 (*iter)->setPosition(domain.enforceBoundaryConditions((*iter)->getPosition())); 75 75 } -
src/Actions/AtomAction/TranslateAction.def
r5ffa05 rbd81f9 10 10 #include "LinearAlgebra/Vector.hpp" 11 11 12 #include "Parameters/Validators/DummyValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #define paramtypes (Vector)(bool) 16 18 #define paramtokens ("translate-atoms")("periodic") 17 19 #define paramdescriptions ("translation vector")("system is constraint to periodic boundary conditions") 18 20 #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 >()) 20 25 21 26 #define statetypes (std::vector<atom*>) -
src/Actions/CommandAction/BondLengthTableAction.cpp
r5ffa05 rbd81f9 43 43 ostringstream usage; 44 44 45 LOG(0, "Using " << params.BondGraphFileName << " as bond length table.");45 LOG(0, "Using " << params.BondGraphFileName.get() << " as bond length table."); 46 46 BondGraph *&BG = World::getInstance().getBondGraph(); 47 47 … … 57 57 58 58 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()); 62 62 if ((input.good()) && (BG->LoadBondLengthTable(input))) { 63 63 LOG(0, "Bond length table parsed successfully."); … … 96 96 BondGraph *&BG = World::getInstance().getBondGraph(); 97 97 BG->CleanupBondLengthTable(); 98 std::ifstream input(state->params.BondGraphFileName. string().c_str());98 std::ifstream input(state->params.BondGraphFileName.get().string().c_str()); 99 99 if ((input.good()) && (BG->LoadBondLengthTable(input))) { 100 100 LOG(0, "Bond length table parsed successfully."); -
src/Actions/CommandAction/BondLengthTableAction.def
r5ffa05 rbd81f9 10 10 #include "Graph/BondGraph.hpp" 11 11 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #define paramtypes (boost::filesystem::path) 16 18 #define paramtokens ("bond-table") … … 18 20 #undef paramdefaults 19 21 #define paramreferences (BondGraphFileName) 22 #define paramvalids \ 23 (FilePresentValidator()) 20 24 21 25 #define statetypes (std::string) -
src/Actions/CommandAction/ElementDbAction.cpp
r5ffa05 rbd81f9 60 60 // TODO: Make databasepath a std::string 61 61 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()); 63 63 64 64 // load table … … 96 96 // TODO: Make databasepath a std::string 97 97 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()); 99 99 100 100 // load table -
src/Actions/CommandAction/ElementDbAction.def
r5ffa05 rbd81f9 9 9 #include <sstream> 10 10 11 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (boost::filesystem::path) 15 17 #define paramtokens ("element-db") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (databasepath) 21 #define paramvalids \ 22 (FilePresentValidator()) 19 23 20 24 #define statetypes (std::string) -
src/Actions/CommandAction/FastParsingAction.cpp
r5ffa05 rbd81f9 40 40 bool oldvalue = configuration->FastParsing; 41 41 42 configuration->FastParsing = params.fastparsing ;42 configuration->FastParsing = params.fastparsing.get(); 43 43 if (configuration->FastParsing) 44 44 LOG(0, "I won't parse trajectories."); … … 65 65 66 66 config *configuration = World::getInstance().getConfig(); 67 configuration->FastParsing = state->params.fastparsing ;67 configuration->FastParsing = state->params.fastparsing.get(); 68 68 if (configuration->FastParsing) 69 69 LOG(0, "I won't parse trajectories."); -
src/Actions/CommandAction/FastParsingAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (bool) 15 17 #define paramtokens ("fastparsing") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (fastparsing) 21 #define paramvalids \ 22 (DummyValidator< bool >()) 19 23 20 24 #define statetypes (bool) -
src/Actions/CommandAction/HelpAction.cpp
r5ffa05 rbd81f9 63 63 std::cout << std::endl; 64 64 // print list of actions or its options 65 if (params.actionname == "none") {65 if (params.actionname.get() == std::string("none")) { 66 66 // print list of all Actions 67 67 std::cout << "Here is a list of all available Actions:" << std::endl; … … 75 75 } else { 76 76 // 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()); 79 79 // else give description of Action and its option value if present 80 80 std::cout << instance->help(); … … 82 82 std::cout << std::endl; 83 83 } 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() << "."); 85 85 return Action::failure; 86 86 } -
src/Actions/CommandAction/HelpAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include <string> 10 #include <vector> 9 11 12 #include "Parameters/Validators/DiscreteValidator.hpp" 13 #include "Parameters/Validators/Ops_Validator.hpp" 14 #include "Parameters/Validators/Specific/ActionNameValidator.hpp" 10 15 11 16 // i.e. there is an integer with variable name Z that can be found in 12 17 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value18 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 19 #define paramtypes (std::string) 15 20 #define paramtokens ("actionname") 16 21 #define paramdescriptions ("Name of an action whose option list is then given") 17 #define paramdefaults ( "none")22 #define paramdefaults (PARAM_DEFAULT(std::string("none"))) 18 23 #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! 19 29 20 30 #undef statetypes -
src/Actions/CommandAction/VerboseAction.cpp
r5ffa05 rbd81f9 35 35 /** =========== define the function ====================== */ 36 36 Action::state_ptr CommandVerboseAction::performCall() { 37 int oldverbosity = getVerbosity();37 unsigned int oldverbosity = getVerbosity(); 38 38 39 if (oldverbosity != params.verbosity ) {39 if (oldverbosity != params.verbosity.get()) { 40 40 // prepare undo state 41 41 CommandVerboseState *UndoState = new CommandVerboseState(oldverbosity, params); 42 42 // 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() << "."); 45 45 return Action::state_ptr(UndoState); 46 46 } else { … … 53 53 CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get()); 54 54 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 << "."); 56 56 setVerbosity(state->oldverbosity); 57 57 … … 62 62 CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get()); 63 63 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()); 66 66 67 67 return Action::state_ptr(_state); -
src/Actions/CommandAction/VerboseAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #define paramtypes ( int)15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 #define paramtypes (unsigned int) 15 17 #define paramtokens ("verbose") 16 18 #define paramdescriptions ("set verbosity level") 17 19 #undef paramdefaults 18 20 #define paramreferences (verbosity) 21 #define paramvalids \ 22 (DummyValidator< unsigned int >()) 19 23 20 #define statetypes ( int)24 #define statetypes (unsigned int) 21 25 #define statereferences (oldverbosity) 22 26 -
src/Actions/CommandAction/VersionAction.def
r5ffa05 rbd81f9 9 9 #include "version.h" 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #undef statetypes -
src/Actions/CommandAction/WarrantyAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #undef statetypes -
src/Actions/FillAction/FillRegularGridAction.cpp
r5ffa05 rbd81f9 82 82 LinkedCell_deprecated * LC = NULL; 83 83 Tesselation * TesselStruct = NULL; 84 if (params.SphereRadius != 0.) {84 if (params.SphereRadius.get() != 0.) { 85 85 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() 87 87 << " != 0, but have not select any molecules."); 88 88 return Action::failure; … … 92 92 93 93 // create tesselation 94 LC = new LinkedCell_deprecated(cloud, 2.*params.SphereRadius );94 LC = new LinkedCell_deprecated(cloud, 2.*params.SphereRadius.get()); 95 95 TesselStruct = new Tesselation; 96 (*TesselStruct)(cloud, params.SphereRadius );96 (*TesselStruct)(cloud, params.SphereRadius.get()); 97 97 98 98 // and create predicate … … 106 106 FillPredicate *voidnode_predicate = new FillPredicate( 107 107 IsVoidNode_FillPredicate( 108 Sphere(zeroVec, params.mindistance )108 Sphere(zeroVec, params.mindistance.get()) 109 109 ) 110 110 ); … … 112 112 if (surface_predicate != NULL) 113 113 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()); 115 115 Inserter *inserter = new Inserter( 116 116 Inserter::impl_ptr( 117 117 new RandomInserter( 118 params.RandAtomDisplacement ,119 params.RandMoleculeDisplacement ,120 params.DoRotate )118 params.RandAtomDisplacement.get(), 119 params.RandMoleculeDisplacement.get(), 120 params.DoRotate.get()) 121 121 ) 122 122 ); -
src/Actions/FillAction/FillRegularGridAction.def
r5ffa05 rbd81f9 12 12 #include "types.hpp" 13 13 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 14 20 // i.e. there is an integer with variable name Z that can be found in 15 21 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 16 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 #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) 18 24 #define paramtokens ("mesh-size")("mesh-offset")("min-distance")("tesselation-radius")("random-atom-displacement")("random-molecule-displacement")("DoRotate") 19 25 #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 (NO DEFAULT)("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)) 21 27 #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 >()) 22 36 23 37 #define statetypes (std::vector<AtomicInfo>)(std::vector<BondInfo>)(std::vector<AtomicInfo>)(std::vector<Vector>) -
src/Actions/FillAction/FillSphericalSurfaceAction.cpp
r5ffa05 rbd81f9 71 71 Vector sum = zeroVec; 72 72 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; 74 74 sum += helper; 75 75 } … … 89 89 FillPredicate *voidnode_predicate = new FillPredicate( 90 90 IsVoidNode_FillPredicate( 91 Sphere(zeroVec, params.mindistance )91 Sphere(zeroVec, params.mindistance.get()) 92 92 ) 93 93 ); 94 Shape s = Sphere(params.center , params.radius);94 Shape s = Sphere(params.center.get(), params.radius.get()); 95 95 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()); 97 97 Mesh *mesh = new MeshAdaptor(func); 98 98 Inserter *inserter = new Inserter( 99 Inserter::impl_ptr(new SurfaceInserter(s, params.AlignedAxis )));99 Inserter::impl_ptr(new SurfaceInserter(s, params.AlignedAxis.get()))); 100 100 101 101 // fill -
src/Actions/FillAction/FillSphericalSurfaceAction.def
r5ffa05 rbd81f9 12 12 #include "types.hpp" 13 13 14 #include "Parameters/Validators/DummyValidator.hpp" 15 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" 16 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 17 14 18 // i.e. there is an integer with variable name Z that can be found in 15 19 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 16 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 #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) 18 22 #define paramtokens ("center")("radius")("count")("min-distance")("Alignment-Axis") 19 23 #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) 21 25 #define paramreferences (center)(radius)(N)(mindistance)(AlignedAxis) 26 #define paramvalids \ 27 (BoxVectorValidator()) \ 28 (BoxLengthValidator()) \ 29 (DummyValidator< unsigned int >()) \ 30 (BoxLengthValidator()) \ 31 (DummyValidator< Vector >()) 22 32 23 33 #define statetypes (std::vector<AtomicInfo>)(std::vector<BondInfo>)(std::vector<AtomicInfo>)(std::vector<Vector>) -
src/Actions/FragmentationAction/FragmentationAction.cpp
r5ffa05 rbd81f9 45 45 46 46 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); 51 51 52 52 DepthFirstSearchAnalysis DFS; … … 54 54 mol = iter->second; 55 55 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() << "."); 57 57 start = clock(); 58 58 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); 62 62 } 63 63 World::getInstance().setExitFlag(ExitFlag); -
src/Actions/FragmentationAction/FragmentationAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include <boost/assign.hpp> 9 10 #include <string> 10 11 #include <vector> 11 12 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 12 19 // i.e. there is an integer with variable name Z that can be found in 13 20 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 #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>) 16 23 #define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("output-types") 17 24 #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 (NO DEFAULT)(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")))) 19 26 #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())) 20 33 21 34 #undef statetypes -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r5ffa05 rbd81f9 267 267 268 268 // 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()); 270 271 { 271 272 io_service.reset(); … … 276 277 { 277 278 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) { 280 281 const std::string &filename = (*iter).string(); 281 282 if (boost::filesystem::exists(filename)) { … … 283 284 LOG(1, "INFO: Creating MPQCCommandJob with filename'" 284 285 +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); 286 287 } else { 287 288 ELOG(1, "Fragment job "+filename+" does not exist."); … … 290 291 } 291 292 controller.addJobs(jobs); 292 controller.sendJobs(params.host , params.port);293 controller.sendJobs(params.host.get(), params.port.get()); 293 294 } 294 295 { … … 299 300 // Phase Three: calculate result 300 301 size_t NoCalculatedResults = 0; 301 while (NoCalculatedResults != params.jobfiles.size()) {302 while (NoCalculatedResults != jobfiles.size()) { 302 303 // wait a bit 303 304 boost::asio::deadline_timer timer(io_service); … … 305 306 timer.wait(); 306 307 // then request status 307 controller.checkResults(params.host , params.port);308 controller.checkResults(params.host.get(), params.port.get()); 308 309 { 309 310 io_service.reset(); … … 316 317 } 317 318 // Phase Three: get result 318 controller.receiveResults(params.host , params.port);319 controller.receiveResults(params.host.get(), params.port.get()); 319 320 { 320 321 io_service.reset(); … … 324 325 // Final phase: print result 325 326 { 326 LOG(1, "INFO: Parsing fragment files from " << params.path << ".");327 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << "."); 327 328 std::vector<FragmentResult::ptr> results = controller.getReceivedResults(); 328 329 printReceivedMPQCResults( 329 330 results, 330 params.path ,331 getNoAtomsFromAdjacencyFile(params.path ));331 params.path.get(), 332 getNoAtomsFromAdjacencyFile(params.path.get())); 332 333 } 333 334 size_t Exitflag = controller.getExitflag(); -
src/Actions/FragmentationAction/FragmentationAutomationAction.def
r5ffa05 rbd81f9 11 11 #include <vector> 12 12 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 13 19 // i.e. there is an integer with variable name Z that can be found in 14 20 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value21 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 22 #define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path) 17 23 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable") 18 24 #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 (NO DEFAULT)(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) 20 26 #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 >()) 21 33 22 34 #undef statetypes -
src/Actions/GraphAction/CreateAdjacencyAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #undef statetypes -
src/Actions/GraphAction/DepthFirstSearchAction.cpp
r5ffa05 rbd81f9 55 55 LocalBackEdgeStack = new std::deque<bond *>; // no need to have it Subgraphs->Leaf->BondCount size 56 56 DFS.PickLocalBackEdges(ListOfAtoms, LocalBackEdgeStack); 57 CyclicStructureAnalysis CycleAnalysis(params.DoSaturation ? DoSaturate : DontSaturate);57 CyclicStructureAnalysis CycleAnalysis(params.DoSaturation.get() ? DoSaturate : DontSaturate); 58 58 CycleAnalysis(LocalBackEdgeStack); 59 59 delete(LocalBackEdgeStack); -
src/Actions/GraphAction/DepthFirstSearchAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (bool) 15 17 #define paramtokens ("DoSaturate") 16 18 #define paramdescriptions ("whether to treat hydrogen special or not") 17 #define paramdefaults ( "1")19 #define paramdefaults (PARAM_DEFAULT(true)) 18 20 #define paramreferences (DoSaturation) 21 #define paramvalids \ 22 (DummyValidator< bool >()) 19 23 20 24 #undef statetypes -
src/Actions/GraphAction/SubgraphDissectionAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (MolAtomList) -
src/Actions/MoleculeAction/BondFileAction.cpp
r5ffa05 rbd81f9 43 43 if(World::getInstance().countSelectedMolecules() == 1) { 44 44 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()); 49 49 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()); 51 51 input.close(); 52 52 mol->getBondCount(); -
src/Actions/MoleculeAction/BondFileAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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) 15 18 #define paramtokens ("bond-file")("skiplines")("offset") 16 19 #define paramdescriptions ("name of the bond file")("number of header lines to skip")("offset to add to each id") 17 #define paramdefaults (NO DEFAULT)("1")("0")20 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(1))(PARAM_DEFAULT(0)) 18 21 #define paramreferences (bondfile)(skiplines)(id_offset) 22 #define paramvalids \ 23 (FilePresentValidator()) \ 24 (DummyValidator< unsigned int >()) \ 25 (DummyValidator< unsigned int >()) 19 26 20 27 #undef statetypes -
src/Actions/MoleculeAction/ChangeNameAction.cpp
r5ffa05 rbd81f9 40 40 mol = World::getInstance().beginMoleculeSelection()->second; 41 41 string oldName = mol->getName(); 42 mol->setName(params.name );42 mol->setName(params.name.get()); 43 43 return Action::state_ptr(new MoleculeChangeNameState(mol,params)); 44 44 } else … … 50 50 51 51 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); 54 54 55 55 return Action::state_ptr(_state); -
src/Actions/MoleculeAction/ChangeNameAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (std::string) 15 17 #define paramtokens ("change-molname") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (name) 21 #define paramvalids \ 22 (DummyValidator< std::string >()) 19 23 20 24 #define statetypes (molecule*) -
src/Actions/MoleculeAction/CopyAction.cpp
r5ffa05 rbd81f9 20 20 #include "CodePatterns/MemDebug.hpp" 21 21 22 #include "Actions/UndoRedoHelpers.hpp" 22 23 #include "CodePatterns/Log.hpp" 23 24 #include "CodePatterns/Verbose.hpp" … … 31 32 #include <fstream> 32 33 #include <string> 34 #include <vector> 33 35 34 36 #include "Actions/MoleculeAction/CopyAction.hpp" … … 40 42 #include "Action_impl_pre.hpp" 41 43 /** =========== define the function ====================== */ 42 Action::state_ptr MoleculeCopyAction::performCall() { 43 molecule *copy = NULL; 44 Action::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 } 44 57 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)); 53 59 } 54 60 … … 56 62 MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get()); 57 63 58 state->copy->removeAtomsinMolecule(); 59 World::getInstance().destroyMolecule(state->copy); 64 RemoveMoleculesWithAtomsByIds(state->copies); 60 65 61 66 return Action::state_ptr(_state); … … 63 68 64 69 Action::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(); 75 71 } 76 72 -
src/Actions/MoleculeAction/CopyAction.def
r5ffa05 rbd81f9 7 7 8 8 // 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" 10 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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") 17 19 #undef paramdefaults 18 #define paramreferences (mol)(position) 20 #define paramreferences (position) 21 #define paramvalids \ 22 (BoxVectorValidator()) 19 23 20 #define statetypes ( molecule *)21 #define statereferences (cop y)24 #define statetypes (const std::vector<moleculeId_t>) 25 #define statereferences (copies) 22 26 23 27 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
r5ffa05 rbd81f9 46 46 /** =========== define the function ====================== */ 47 47 Action::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!"); 50 50 return Action::failure; 51 51 } 52 52 53 53 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() << "."); 60 60 // construct water molecule 61 61 std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules(); 62 62 // 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()); 64 64 ifstream input; 65 input.open(params.fillername. string().c_str());65 input.open(params.fillername.get().string().c_str()); 66 66 ParserTypes type = FormatParserStorage::getInstance().getTypeFromSuffix(FilenameSuffix); 67 67 FormatParserInterface &parser = FormatParserStorage::getInstance().get(type); … … 72 72 ASSERT(filler != NULL, 73 73 "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()); 75 75 World::AtomComposite Set = filler->getAtomSet(); 76 76 World::getInstance().getBondGraph()->CreateAdjacency(Set); … … 79 79 double distance[NDIM]; 80 80 for (int i=0;i<NDIM;i++) 81 distance[i] = params.distances [i];81 distance[i] = params.distances.get()[i]; 82 82 FillVoidWithMolecule( 83 83 filler, 84 84 *(World::getInstance().getConfig()), 85 85 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()); 91 91 92 92 // generate list of newly created molecules -
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 #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" 11 18 12 19 // i.e. there is an integer with variable name Z that can be found in 13 20 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value21 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 22 #define paramtypes (boost::filesystem::path)(Vector)(double)(double)(double)(double)(bool) 16 23 #define paramtokens ("fill-void")("distances")("distance-to-molecule")("random-atom-displacement")("random-molecule-displacement")("distance-to-boundary")("DoRotate") 17 24 #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 (NO DEFAULT)(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)) 19 26 #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 >()) 20 35 21 36 #define statetypes (std::vector<molecule *>) -
src/Actions/MoleculeAction/FillWithMoleculeAction.cpp
r5ffa05 rbd81f9 46 46 47 47 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() << "."); 54 54 // construct water molecule 55 55 std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules(); 56 56 // 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()); 58 58 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() 60 60 << " of suffix " << FilenameSuffix << "."); 61 input.open(params.fillername. string().c_str());61 input.open(params.fillername.get().string().c_str()); 62 62 FormatParserStorage::getInstance().load(input, FilenameSuffix); 63 63 input.close(); … … 67 67 ASSERT(filler != NULL, 68 68 "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()); 70 70 World::AtomComposite Set = filler->getAtomSet(); 71 71 LOG(1, "INFO: The filler molecules has " << Set.size() << " atoms."); … … 78 78 double distance[NDIM]; 79 79 for (int i=0;i<NDIM;i++) 80 distance[i] = params.distances [i];80 distance[i] = params.distances.get()[i]; 81 81 FillBoxWithMolecule( 82 82 World::getInstance().getMolecules(), 83 83 filler, *(World::getInstance().getConfig()), 84 params.MaxDistance ,84 params.MaxDistance.get(), 85 85 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()); 90 90 for (molecule::iterator iter = filler->begin(); !filler->empty(); iter = filler->begin()) { 91 91 atom *Walker = *iter; -
src/Actions/MoleculeAction/FillWithMoleculeAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include <boost/assign.hpp> 9 10 #include <boost/filesystem/path.hpp> 11 #include <vector> 10 12 #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" 12 21 13 22 // i.e. there is an integer with variable name Z that can be found in 14 23 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value24 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 25 #define paramtypes (boost::filesystem::path)(Vector)(double)(double)(double)(double)(bool) 17 26 #define paramtokens ("fill-molecule")("distances")("distance-to-molecule")("random-atom-displacement")("random-molecule-displacement")("MaxDistance")("DoRotate") 18 27 #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 (NO DEFAULT)(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)) 20 29 #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 >()) 21 38 22 39 #define statetypes (std::vector<molecule *>) -
src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp
r5ffa05 rbd81f9 43 43 /** =========== define the function ====================== */ 44 44 Action::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."); 47 47 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()); 50 50 LOG(0, "STATUS: done." << endl); 51 51 -
src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 #include "Parameters/Validators/GenericValidators.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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) 15 18 #define paramtokens ("start-step")("interpolation-steps")("end-step")("id-mapping") 16 19 #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") 17 20 #undef paramdefaults 18 21 #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 >()) 19 27 20 28 #undef statetypes -
src/Actions/MoleculeAction/LoadAction.cpp
r5ffa05 rbd81f9 44 44 Action::state_ptr MoleculeLoadAction::performCall() { 45 45 // 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."); 48 48 return Action::failure; 49 49 } else { … … 53 53 std::string FilenameSuffix; 54 54 std::string FilenamePrefix; 55 if (params.filename. has_filename()) {55 if (params.filename.get().has_filename()) { 56 56 // get suffix 57 57 #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(); 60 60 #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(); 63 63 #endif 64 64 } else { … … 79 79 // parse the file 80 80 boost::filesystem::ifstream input; 81 input.open(params.filename );81 input.open(params.filename.get()); 82 82 FormatParserStorage::getInstance().load(input, FilenameSuffix); 83 83 input.close(); … … 125 125 // parse the file 126 126 boost::filesystem::ifstream input; 127 input.open(state->params.filename );127 input.open(state->params.filename.get()); 128 128 FormatParserStorage::getInstance().load(input, state->FilenameSuffix); 129 129 input.close(); -
src/Actions/MoleculeAction/LoadAction.def
r5ffa05 rbd81f9 11 11 #include <boost/shared_ptr.hpp> 12 12 13 #include "Parameters/Validators/Ops_Validator.hpp" 14 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 15 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 16 13 17 // i.e. there is an integer with variable name Z that can be found in 14 18 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value19 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 20 #define paramtypes (boost::filesystem::path) 17 21 #define paramtokens ("load") … … 19 23 #undef paramdefaults 20 24 #define paramreferences (filename) 25 #define paramvalids \ 26 (FilePresentValidator() && ParserFileValidator()) 21 27 22 28 #define statetypes (moleculeId_t)(std::string)(std::string)(boost::shared_ptr<FormatParser_Parameters>) -
src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp
r5ffa05 rbd81f9 48 48 BOOST_FOREACH(molecule *mol, selectedMolecules) { 49 49 // check whether Axis is valid 50 if (params.Axis. IsZero())50 if (params.Axis.get().IsZero()) 51 51 return Action::failure; 52 52 53 53 // convert from degrees to radian 54 params.angle *= M_PI/180.;54 params.angle.set(params.angle.get() * M_PI/180.); 55 55 56 56 // Creation Line that is the rotation axis 57 57 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 58 58 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 59 Line RotationAxis(*CenterOfGravity, params.Axis );59 Line RotationAxis(*CenterOfGravity, params.Axis.get()); 60 60 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 << "."); 62 62 63 63 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())); 65 65 } 66 66 LOG(0, "done."); … … 76 76 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 77 77 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 78 Line RotationAxis(*CenterOfGravity, state->params.Axis );78 Line RotationAxis(*CenterOfGravity, state->params.Axis.get()); 79 79 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 << "."); 81 81 82 82 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())); 84 84 } 85 85 } … … 94 94 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 95 95 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 96 Line RotationAxis(*CenterOfGravity, state->params.Axis );96 Line RotationAxis(*CenterOfGravity, state->params.Axis.get()); 97 97 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 << "."); 99 99 100 100 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())); 102 102 } 103 103 } -
src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.def
r5ffa05 rbd81f9 10 10 class Vector; 11 11 12 #include "Parameters/Validators/DummyValidator.hpp" 13 #include "Parameters/Validators/Specific/RotationAngleValidator.hpp" 14 12 15 // i.e. there is an integer with variable name Z that can be found in 13 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 18 #define paramtypes (double)(Vector) 16 19 #define paramtokens ("rotate-around-self")("axis") … … 18 21 #undef paramdefaults 19 22 #define paramreferences (angle)(Axis) 23 #define paramvalids \ 24 (RotationAngleValidator()) \ 25 (DummyValidator< Vector >()) 20 26 21 27 #define statetypes (std::vector<molecule*>) -
src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp
r5ffa05 rbd81f9 49 49 RealSpaceMatrix InertiaTensor = mol->getInertiaTensor(); 50 50 51 mol->RotateToPrincipalAxisSystem( params.Axis);51 mol->RotateToPrincipalAxisSystem(const_cast<Vector &>(params.Axis.get())); 52 52 53 53 // summing anew for debugging (resulting matrix has to be diagonal!) -
src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.def
r5ffa05 rbd81f9 12 12 class MoleculeListClass; 13 13 14 #include "Parameters/Validators/DummyValidator.hpp" 15 14 16 // i.e. there is an integer with variable name Z that can be found in 15 17 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 16 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value18 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 17 19 #define paramtypes (Vector) 18 20 #define paramtokens ("rotate-to-principal-axis-system") … … 20 22 #undef paramdefaults 21 23 #define paramreferences (Axis) 24 #define paramvalids \ 25 (DummyValidator< Vector >()) 22 26 23 27 #undef statetypes -
src/Actions/MoleculeAction/SaveAdjacencyAction.cpp
r5ffa05 rbd81f9 42 42 for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) { 43 43 mol = iter->second; 44 LOG(0, "Storing adjacency to path " << params.adjacencyfile << ".");44 LOG(0, "Storing adjacency to path " << params.adjacencyfile.get() << "."); 45 45 // TODO: sollte stream nicht filename benutzen, besser fuer unit test 46 46 #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()); 48 48 #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()); 50 50 #endif 51 51 } -
src/Actions/MoleculeAction/SaveAdjacencyAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 17 #define paramtypes (boost::filesystem::path) 15 18 #define paramtokens ("save-adjacency") … … 17 20 #undef paramdefaults 18 21 #define paramreferences (adjacencyfile) 22 #define paramvalids \ 23 (!FilePresentValidator()) 19 24 20 25 #undef statetypes -
src/Actions/MoleculeAction/SaveBondsAction.cpp
r5ffa05 rbd81f9 42 42 for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) { 43 43 mol = iter->second; 44 LOG(0, "Storing bonds to path " << params.bondsfile << ".");44 LOG(0, "Storing bonds to path " << params.bondsfile.get() << "."); 45 45 // TODO: sollte stream, nicht filenamen direkt nutzen, besser fuer unit tests 46 46 #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()); 48 48 #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()); 50 50 #endif 51 51 } -
src/Actions/MoleculeAction/SaveBondsAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 17 #define paramtypes (boost::filesystem::path) 15 18 #define paramtokens ("save-bonds") … … 17 20 #undef paramdefaults 18 21 #define paramreferences (bondsfile) 22 #define paramvalids \ 23 (!FilePresentValidator()) 19 24 20 25 #undef statetypes -
src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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() << "."); 41 41 42 42 // extract suffix 43 43 std::string FilenameSuffix; 44 44 std::string FilenamePrefix; 45 if (params.filename. has_filename()) {45 if (params.filename.get().has_filename()) { 46 46 // get suffix 47 47 #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(); 50 50 #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(); 53 53 #endif 54 54 } else { … … 60 60 // parse the file 61 61 boost::filesystem::ofstream output; 62 output.open(params.filename );62 output.open(params.filename.get()); 63 63 if (!output.fail()) { 64 64 FormatParserStorage::getInstance().saveSelectedMolecules(output, FilenameSuffix); 65 65 } else { 66 ELOG(1, "Could not open file " << params.filename << ".");66 ELOG(1, "Could not open file " << params.filename.get() << "."); 67 67 } 68 68 output.close(); -
src/Actions/MoleculeAction/SaveSelectedMoleculesAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 18 #define paramtypes (boost::filesystem::path) 15 19 #define paramtokens ("save-selected-molecules") … … 17 21 #undef paramdefaults 18 22 #define paramreferences (filename) 23 #define paramvalids \ 24 (!FilePresentValidator() && ParserFileValidator()) 19 25 20 26 #undef statetypes -
src/Actions/MoleculeAction/SaveTemperatureAction.cpp
r5ffa05 rbd81f9 42 42 /** =========== define the function ====================== */ 43 43 Action::state_ptr MoleculeSaveTemperatureAction::performCall() { 44 LOG(1, "Storing temperatures in " << params.temperaturefile << ".");44 LOG(1, "Storing temperatures in " << params.temperaturefile.get() << "."); 45 45 ofstream output; 46 output.open(params.temperaturefile. string().c_str(), ios::trunc);46 output.open(params.temperaturefile.get().string().c_str(), ios::trunc); 47 47 AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms()); 48 48 const size_t MDSteps = set.getMaxTrajectorySize(); -
src/Actions/MoleculeAction/SaveTemperatureAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 17 #define paramtypes (boost::filesystem::path) 15 18 #define paramtokens ("save-temperature") … … 17 20 #undef paramdefaults 18 21 #define paramreferences (temperaturefile) 22 #define paramvalids \ 23 (!FilePresentValidator()) 19 24 20 25 #undef statetypes -
src/Actions/MoleculeAction/SuspendInWaterAction.cpp
r5ffa05 rbd81f9 44 44 mol = iter->second; 45 45 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) { 47 47 ELOG(1, "Density must be greater than 1.0g/cm^3!"); 48 48 } else { 49 PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density ); // if volume == 0, will calculate from ConvexEnvelope49 PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density.get()); // if volume == 0, will calculate from ConvexEnvelope 50 50 } 51 51 } -
src/Actions/MoleculeAction/SuspendInWaterAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/GenericValidators.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (double) 15 17 #define paramtokens ("suspend-in-water") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (density) 21 #define paramvalids \ 22 (PositiveValidator< double >()) 19 23 20 24 #undef statetypes -
src/Actions/MoleculeAction/VerletIntegrationAction.cpp
r5ffa05 rbd81f9 45 45 // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test 46 46 char outputname[MAXSTRINGSIZE]; 47 strcpy(outputname, params.forcesfile. string().c_str());47 strcpy(outputname, params.forcesfile.get().string().c_str()); 48 48 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."); 53 53 else 54 LOG(2, "File " << params.forcesfile << " found and parsed.");54 LOG(2, "File " << params.forcesfile.get() << " found and parsed."); 55 55 } 56 56 -
src/Actions/MoleculeAction/VerletIntegrationAction.def
r5ffa05 rbd81f9 9 9 class MoleculeListClass; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 #include "Parameters/Validators/GenericValidators.hpp" 13 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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) 15 19 #define paramtokens ("verlet-integration")("deltat")("MDSteps")("keep-fixed-CenterOfMass") 16 20 #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") 17 21 #undef paramdefaults 18 22 #define paramreferences (forcesfile)(Deltat)(MDSteps)(FixedCenterOfMass) 23 #define paramvalids \ 24 (FilePresentValidator()) \ 25 (PositiveValidator< double >()) \ 26 (NotZeroValidator< unsigned int >()) \ 27 (DummyValidator< bool >()) 19 28 20 29 #undef statetypes -
src/Actions/ParserAction/ParseTremoloPotentialsAction.cpp
r5ffa05 rbd81f9 42 42 FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>(); 43 43 // 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."); 46 46 // DONT FAIL: it's just empty we re-create default id-mapping 47 47 parser.createKnownTypesByIdentity(); … … 51 51 52 52 // parse the file 53 test.open(params.filename );53 test.open(params.filename.get()); 54 54 parser.parseKnownTypes(test); 55 55 test.close(); -
src/Actions/ParserAction/ParseTremoloPotentialsAction.def
r5ffa05 rbd81f9 9 9 #include <boost/filesystem.hpp> 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 #include "Parameters/Validators/Specific/FileSuffixValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 18 #define paramtypes (boost::filesystem::path) 15 19 #define paramtokens ("parse-tremolo-potentials") … … 17 21 #undef paramdefaults 18 22 #define paramreferences (filename) 23 #define paramvalids \ 24 (FilePresentValidator() && FileSuffixValidator("potentials")) 19 25 20 26 #undef statetypes -
src/Actions/ParserAction/SaveSelectedAtomsAsExtTypesAction.cpp
r5ffa05 rbd81f9 40 40 /** =========== define the function ====================== */ 41 41 Action::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."); 44 44 45 45 return Action::failure; … … 47 47 const FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>(); 48 48 49 LOG(1, "Creating exttypes file " << params.filename << " ... ");49 LOG(1, "Creating exttypes file " << params.filename.get() << " ... "); 50 50 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()); 53 53 test.close(); 54 54 -
src/Actions/ParserAction/SaveSelectedAtomsAsExtTypesAction.def
r5ffa05 rbd81f9 9 9 #include <boost/filesystem.hpp> 10 10 11 #include "Parameters/Validators/Specific/FileSuffixValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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) 15 17 #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") 17 19 #undef paramdefaults 18 20 #define paramreferences (id)(filename) 21 #define paramvalids \ 22 (DummyValidator< unsigned int >()) \ 23 (FileSuffixValidator("exttypes")) 19 24 20 25 #undef statetypes -
src/Actions/ParserAction/SetOutputFormatsAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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) { 42 42 if (!FormatParserStorage::getInstance().add(*iter)) { 43 43 ELOG(1, "Unknown parser format in ParserSetOutputFormatsAction: '" << *iter << "'"); -
src/Actions/ParserAction/SetOutputFormatsAction.def
r5ffa05 rbd81f9 9 9 #include <vector> 10 10 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 11 16 // i.e. there is an integer with variable name Z that can be found in 12 17 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value18 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 19 #define paramtypes (std::vector<std::string>) 15 20 #define paramtokens ("set-output") … … 17 22 #undef paramdefaults 18 23 #define paramreferences (FormatList) 24 #define paramvalids \ 25 (STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator()) && UniqueValidator< std::vector<std::string> >()) 19 26 20 27 #undef statetypes -
src/Actions/ParserAction/SetParserParametersAction.cpp
r5ffa05 rbd81f9 27 27 #include "Actions/ValueStorage.hpp" 28 28 29 #include <algorithm> 29 30 #include <iostream> 30 31 #include <string> … … 40 41 Action::state_ptr ParserSetParserParametersAction::performCall() { 41 42 // get parser 42 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(params.parsername );43 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(params.parsername.get()); 43 44 FormatParser_Parameters *parameters = FormatParserStorage::getInstance().get(type).parameters; 44 45 ASSERT(parameters != NULL, … … 50 51 51 52 // 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 << ";"); 53 56 newparamstream >> *parameters; 54 57 … … 59 62 ParserSetParserParametersState *state = assert_cast<ParserSetParserParametersState*>(_state.get()); 60 63 61 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername );64 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername.get()); 62 65 FormatParser_Parameters *parser = FormatParserStorage::getInstance().get(type).parameters; 63 66 std::stringstream oldparamstream(state->oldparams); … … 70 73 ParserSetParserParametersState *state = assert_cast<ParserSetParserParametersState*>(_state.get()); 71 74 72 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername );75 ParserTypes type = FormatParserStorage::getInstance().getTypeFromName(state->params.parsername.get()); 73 76 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 << ";"); 75 80 newparamstream >> *parser; 76 81 -
src/Actions/ParserAction/SetParserParametersAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include <vector> 10 #include <string> 9 11 12 #include "Parameters/Validators/STLVectorValidator.hpp" 13 #include "Parameters/Validators/Specific/KeyValueValidator.hpp" 14 #include "Parameters/Validators/Specific/ParserTypeValidator.hpp" 10 15 11 16 // i.e. there is an integer with variable name Z that can be found in 12 17 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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>) 15 20 #define paramtokens ("set-parser-parameters")("parser-parameters") 16 21 #define paramdescriptions ("name of the parser to change")("parameter (key = value;)") 17 #define paramdefaults (NO DEFAULT)(NODEFAULT)22 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT) 18 23 #define paramreferences (parsername)(newparams) 24 #define paramvalids \ 25 (ParserTypeValidator())\ 26 (STLVectorValidator< std::vector<std::string> >(1, 99, KeyValueValidator())) 19 27 20 28 #define statetypes (std::string) -
src/Actions/ParserAction/SetTremoloAtomdataAction.cpp
r5ffa05 rbd81f9 41 41 FormatParser<tremolo> &parser = FormatParserStorage::getInstance().getParser<tremolo>(); 42 42 43 LOG(1, "Setting Tremolo's ATOMDATA to: '" << params.atomdata_string << "'");43 LOG(1, "Setting Tremolo's ATOMDATA to: '" << params.atomdata_string.get() << "'"); 44 44 45 parser.setAtomData(params.atomdata_string);45 const std::string old_atomdata = parser.getAtomData(); 46 46 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)); 48 53 } 49 54 50 55 Action::state_ptr ParserSetTremoloAtomdataAction::performUndo(Action::state_ptr _state) { 51 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());56 ParserSetTremoloAtomdataState *state = assert_cast<ParserSetTremoloAtomdataState*>(_state.get()); 52 57 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); 58 63 } 59 64 60 65 Action::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); 62 76 } 63 77 64 78 bool ParserSetTremoloAtomdataAction::canUndo() { 65 return false;79 return true; 66 80 } 67 81 68 82 bool ParserSetTremoloAtomdataAction::shouldUndo() { 69 return false;83 return true; 70 84 } 71 85 /** =========== end of function ====================== */ -
src/Actions/ParserAction/SetTremoloAtomdataAction.def
r5ffa05 rbd81f9 9 9 #include <boost/filesystem.hpp> 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 #include "Parameters/Validators/Specific/AtomDataValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // 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>()) 19 25 20 # undef statetypes21 # undef statereferences26 #define statetypes (std::string) 27 #define statereferences (old_atomdata) 22 28 23 29 // some defines for all the names, you may use ACTION, STATE and PARAMS -
src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.cpp
r5ffa05 rbd81f9 47 47 48 48 // set the new default 49 RandomNumberDistributionFactory::getInstance().setCurrentType(params.distribution_type );49 RandomNumberDistributionFactory::getInstance().setCurrentType(params.distribution_type.get()); 50 50 LOG(0, "STATUS: Distribution of random number generator is now: " 51 51 << RandomNumberDistributionFactory::getInstance().getCurrentTypeName()); … … 55 55 RandomNumberDistributionFactory::getInstance().getPrototype().getParameterSet(); 56 56 // set each parameter (that is not -1); 57 if (!params.parameters.isDefault()) { 57 { 58 std::stringstream input(params.parameters.get()); 58 59 RandomNumberDistribution_Parameters *currentparameters = 59 60 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 } 63 66 delete currentparameters; 64 67 } … … 71 74 } 72 75 76 std::stringstream output; 77 output << *oldparameters; 73 78 CommandSetRandomNumbersDistributionState *newstate = 74 new CommandSetRandomNumbersDistributionState(oldtype, *oldparameters,params);79 new CommandSetRandomNumbersDistributionState(oldtype,output.str(),params); 75 80 delete oldparameters; 76 81 return Action::state_ptr(newstate); … … 94 99 95 100 // 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; 99 111 } 100 112 … … 106 118 } 107 119 120 std::stringstream output; 121 output << *newparameters; 108 122 CommandSetRandomNumbersDistributionState *newstate = 109 new CommandSetRandomNumbersDistributionState(newtype, *newparameters,params);123 new CommandSetRandomNumbersDistributionState(newtype,output.str(),params); 110 124 delete newparameters; 111 125 return Action::state_ptr(newstate); -
src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.def
r5ffa05 rbd81f9 7 7 8 8 // 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" 10 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #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) 15 18 #define paramtokens ("set-random-number-distribution")("random-number-distribution-parameters") 16 19 #define paramdescriptions ("name of the distribution from boost::random")("parameter set for requested distribution") 17 #define paramdefaults (NO DEFAULT)("p=-1")20 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(std::string("p=-1"))) 18 21 #define paramreferences (distribution_type)(parameters) 22 #define paramvalids \ 23 (RandomNumberDistributionNameValidator()) \ 24 (KeyValueValidator()) 19 25 20 #define statetypes (std::string)( RandomNumberDistribution_Parameters)26 #define statetypes (std::string)(std::string) 21 27 #define statereferences (old_distribution_type)(old_parameters) 22 28 -
src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.cpp
r5ffa05 rbd81f9 47 47 48 48 // set the new default 49 RandomNumberEngineFactory::getInstance().setCurrentType(params.engine_type );49 RandomNumberEngineFactory::getInstance().setCurrentType(params.engine_type.get()); 50 50 LOG(0, "STATUS: Engine of random number generator is now: " 51 51 << RandomNumberEngineFactory::getInstance().getCurrentTypeName()); … … 56 56 // set each parameter (that is not -1); 57 57 { 58 std::stringstream input(params.parameters );58 std::stringstream input(params.parameters.get()); 59 59 RandomNumberEngine_Parameters *currentparameters = 60 60 RandomNumberEngineFactory::getInstance().getPrototype().getParameterSet(); -
src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/Specific/RandomNumberValidators.hpp" 11 #include "Parameters/Validators/Specific/KeyValueValidator.hpp" 12 10 13 // i.e. there is an integer with variable name Z that can be found in 11 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 16 #define paramtypes (std::string)(std::string) 14 17 #define paramtokens ("set-random-number-engine")("random-number-engine-parameters") 15 18 #define paramdescriptions ("name of the pseudo-random engine from boost::random")("seed of the pseudo-random number sequence") 16 #define paramdefaults (NO DEFAULT)("seed=-1")19 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(std::string("seed=-1"))) 17 20 #define paramreferences (engine_type)(parameters) 21 #define paramvalids \ 22 (RandomNumberEngineNameValidator()) \ 23 (KeyValueValidator()) 18 24 19 25 #define statetypes (std::string)(std::string) -
src/Actions/RedoAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramreferences -
src/Actions/SelectionAction/Atoms/AllAtomsAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp
r5ffa05 rbd81f9 47 47 RealSpaceMatrix RotationMatrix; 48 48 49 RotationMatrix.setRotation(params.Xangle , params.Yangle, params.Zangle);49 RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get()); 50 50 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()); 53 53 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s)); 54 54 World::getInstance().selectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.def
r5ffa05 rbd81f9 11 11 class atom; 12 12 13 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 14 #include "Parameters/Validators/Specific/RotationAngleValidator.hpp" 15 #include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp" 16 13 17 // i.e. there is an integer with variable name Z that can be found in 14 18 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value19 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 20 #define paramtypes (Vector)(Vector)(double)(double)(double) 17 21 #define paramtokens ("select-atoms-inside-cuboid")("position")("angle-x")("angle-y")("angle-z") 18 22 #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 (NO DEFAULT)(NODEFAULT)("0.")("0.")("0.")23 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.)) 20 24 #define paramreferences (extension)(position)(Xangle)(Yangle)(Zangle) 25 #define paramvalids \ 26 (VectorPositiveComponentsValidator()) \ 27 (BoxVectorValidator()) \ 28 (RotationAngleValidator()) \ 29 (RotationAngleValidator()) \ 30 (RotationAngleValidator()) 21 31 22 32 #define statetypes (std::vector<atom*>)(Shape) -
src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp
r5ffa05 rbd81f9 44 44 /** =========== define the function ====================== */ 45 45 Action::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()); 48 48 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s)); 49 49 World::getInstance().selectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.def
r5ffa05 rbd81f9 10 10 class Shape; 11 11 12 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" 13 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 14 12 15 // i.e. there is an integer with variable name Z that can be found in 13 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 18 #define paramtypes (double)(Vector) 16 19 #define paramtokens ("select-atoms-inside-sphere")("position") … … 18 21 #undef paramdefaults 19 22 #define paramreferences (radius)(position) 23 #define paramvalids \ 24 (BoxLengthValidator()) \ 25 (BoxVectorValidator()) 20 26 21 27 #define statetypes (std::vector<atom*>)(Shape) -
src/Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp
r5ffa05 rbd81f9 41 41 /** =========== define the function ====================== */ 42 42 Action::state_ptr SelectionAtomByElementAction::performCall() { 43 LOG(1, "Selecting atoms of type " << *params.elemental );43 LOG(1, "Selecting atoms of type " << *params.elemental.get()); 44 44 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection()); 45 World::getInstance().selectAllAtoms(AtomByType(params.elemental ));45 World::getInstance().selectAllAtoms(AtomByType(params.elemental.get())); 46 46 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 47 47 return Action::state_ptr(new SelectionAtomByElementState(selectedAtoms,params)); … … 51 51 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 52 52 53 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental ));53 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get())); 54 54 BOOST_FOREACH(atom *_atom, state->selectedAtoms) 55 55 World::getInstance().selectAtom(_atom); … … 61 61 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 62 62 63 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental ));63 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get())); 64 64 65 65 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Atoms/AtomByElementAction.def
r5ffa05 rbd81f9 9 9 class element; 10 10 11 #include "Parameters/Validators/Specific/ElementValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (const element*) 15 17 #define paramtokens ("select-atom-by-element") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (elemental) 21 #define paramvalids \ 22 (ElementValidator()) 19 23 20 24 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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())); 41 41 if (Walker != NULL) { 42 42 if (!World::getInstance().isSelected(Walker)) { … … 56 56 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 57 57 58 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));58 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 59 59 World::getInstance().unselectAtom(Walker); 60 60 … … 65 65 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 66 66 67 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));67 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 68 68 World::getInstance().selectAtom(Walker); 69 69 -
src/Actions/SelectionAction/Atoms/AtomByIdAction.def
r5ffa05 rbd81f9 9 9 class atom; 10 10 11 #include "Parameters/Validators/Specific/AtomIdValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (atomId_t) 15 17 #define paramtokens ("select-atom-by-id") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (WalkerId) 21 #define paramvalids \ 22 (AtomIdValidator()) 19 23 20 24 #undef statetypes -
src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp
r5ffa05 rbd81f9 39 39 /** =========== define the function ====================== */ 40 40 Action::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())); 42 42 if (Walker != NULL) { 43 43 if (!World::getInstance().isSelected(Walker)) { -
src/Actions/SelectionAction/Atoms/AtomByOrderAction.def
r5ffa05 rbd81f9 9 9 class atom; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (int) 15 17 #define paramtokens ("select-atom-by-order") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (order) 21 #define paramvalids \ 22 (DummyValidator< int >()) 19 23 20 24 #define statetypes (atomId_t) -
src/Actions/SelectionAction/Atoms/ClearAllAtomsAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/InvertAtomsAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #undef statetypes -
src/Actions/SelectionAction/Atoms/NotAllAtomsAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp
r5ffa05 rbd81f9 46 46 Action::state_ptr SelectionNotAllAtomsInsideCuboidAction::performCall() { 47 47 RealSpaceMatrix RotationMatrix; 48 RotationMatrix.setRotation(params.Xangle , params.Yangle, params.Zangle);48 RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get()); 49 49 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()); 52 52 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s)); 53 53 World::getInstance().unselectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.def
r5ffa05 rbd81f9 12 12 class Vector; 13 13 14 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 15 #include "Parameters/Validators/Specific/RotationAngleValidator.hpp" 16 #include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp" 17 14 18 // i.e. there is an integer with variable name Z that can be found in 15 19 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 16 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value20 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 17 21 #define paramtypes (Vector)(Vector)(double)(double)(double) 18 22 #define paramtokens ("unselect-atoms-inside-cuboid")("position")("angle-x")("angle-y")("angle-z") 19 23 #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 (NO DEFAULT)(NODEFAULT)("0.")("0.")("0.")24 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.)) 21 25 #define paramreferences (extension)(position)(Xangle)(Yangle)(Zangle) 26 #define paramvalids \ 27 (VectorPositiveComponentsValidator()) \ 28 (BoxVectorValidator()) \ 29 (RotationAngleValidator()) \ 30 (RotationAngleValidator()) \ 31 (RotationAngleValidator()) 22 32 23 33 #define statetypes (std::vector<atom*>)(Shape) -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp
r5ffa05 rbd81f9 44 44 /** =========== define the function ====================== */ 45 45 Action::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()); 48 48 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s)); 49 49 World::getInstance().unselectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.def
r5ffa05 rbd81f9 10 10 class Vector; 11 11 12 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" 13 #include "Parameters/Validators/Specific/BoxVectorValidator.hpp" 14 12 15 // i.e. there is an integer with variable name Z that can be found in 13 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 18 #define paramtypes (double)(Vector) 16 19 #define paramtokens ("unselect-atoms-inside-sphere")("position") … … 18 21 #undef paramdefaults 19 22 #define paramreferences (radius)(position) 23 #define paramvalids \ 24 (BoxLengthValidator()) \ 25 (BoxVectorValidator()) 20 26 21 27 #define statetypes (std::vector<atom*>)(Shape) -
src/Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp
r5ffa05 rbd81f9 41 41 /** =========== define the function ====================== */ 42 42 Action::state_ptr SelectionNotAtomByElementAction::performCall() { 43 LOG(1, "Unselecting atoms of type " << *params.elemental );43 LOG(1, "Unselecting atoms of type " << *params.elemental.get()); 44 44 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection()); 45 World::getInstance().unselectAllAtoms(AtomByType(params.elemental ));45 World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get())); 46 46 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 47 47 return Action::state_ptr(new SelectionNotAtomByElementState(unselectedAtoms,params)); … … 51 51 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 52 52 53 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental ));53 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get())); 54 54 BOOST_FOREACH(atom *_atom, state->unselectedAtoms) 55 55 World::getInstance().unselectAtom(_atom); … … 61 61 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 62 62 63 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental ));63 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get())); 64 64 65 65 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Atoms/NotAtomByElementAction.def
r5ffa05 rbd81f9 9 9 class element; 10 10 11 #include "Parameters/Validators/Specific/ElementValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (const element*) 15 17 #define paramtokens ("unselect-atom-by-element") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (elemental) 21 #define paramvalids \ 22 (ElementValidator()) 19 23 20 24 #define statetypes (std::vector<atom*>) -
src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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())); 41 41 if (Walker != NULL) { 42 42 if (World::getInstance().isSelected(Walker)) { … … 56 56 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 57 57 58 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));58 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 59 59 World::getInstance().selectAtom(Walker); 60 60 … … 65 65 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 66 66 67 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));67 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 68 68 World::getInstance().unselectAtom(Walker); 69 69 -
src/Actions/SelectionAction/Atoms/NotAtomByIdAction.def
r5ffa05 rbd81f9 9 9 class atom; 10 10 11 #include "Parameters/Validators/Specific/AtomIdValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (atomId_t) 15 17 #define paramtokens ("unselect-atom-by-id") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (WalkerId) 21 #define paramvalids \ 22 (AtomIdValidator()) 19 23 20 24 #undef statetypes -
src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp
r5ffa05 rbd81f9 39 39 /** =========== define the function ====================== */ 40 40 Action::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())); 42 42 if (Walker != NULL) { 43 43 if (World::getInstance().isSelected(Walker)) { -
src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.def
r5ffa05 rbd81f9 9 9 class atom; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (int) 15 17 #define paramtokens ("unselect-atom-by-order") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (order) 21 #define paramvalids \ 22 (DummyValidator< int >()) 19 23 20 24 #define statetypes (atomId_t) -
src/Actions/SelectionAction/Molecules/AllMoleculesAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/ClearAllMoleculesAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/InvertMoleculesAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #undef statetypes -
src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp
r5ffa05 rbd81f9 40 40 /** =========== define the function ====================== */ 41 41 Action::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())); 44 44 std::vector<molecule *> selectedMolecules = 45 World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula ));45 World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get())); 46 46 // BOOST_FOREACH(molecule *mol, matchingMolecules) 47 47 // LOG(1, "\t" << mol->getId() << ", " << mol->getName() << "."); 48 World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula ));48 World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula.get())); 49 49 LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected."); 50 50 return Action::state_ptr(new SelectionMoleculeByFormulaState(selectedMolecules,params)); … … 54 54 SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get()); 55 55 56 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula ));56 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get())); 57 57 BOOST_FOREACH( molecule *mol, state->selectedMolecules) 58 58 World::getInstance().selectMolecule(mol); … … 64 64 SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get()); 65 65 66 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula ));66 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get())); 67 67 68 68 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/Specific/FormulaValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (std::string) 15 17 #define paramtokens ("select-molecules-by-formula") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (formula) 21 #define paramvalids \ 22 (FormulaValidator()) 19 23 20 24 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/MoleculeByIdAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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())); 41 41 if (mol != NULL) { 42 42 if (!World::getInstance().isSelected(mol)) { 43 43 LOG(1, "Selecting molecule " << mol->name); 44 World::getInstance().selectAllMolecules(MoleculeById(params.molindex ));44 World::getInstance().selectAllMolecules(MoleculeById(params.molindex.get())); 45 45 LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected."); 46 46 return Action::state_ptr(new SelectionMoleculeByIdState(params)); … … 56 56 SelectionMoleculeByIdState *state = assert_cast<SelectionMoleculeByIdState*>(_state.get()); 57 57 58 World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex ));58 World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex.get())); 59 59 60 60 return Action::state_ptr(_state); … … 64 64 SelectionMoleculeByIdState *state = assert_cast<SelectionMoleculeByIdState*>(_state.get()); 65 65 66 World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex ));66 World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex.get())); 67 67 68 68 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/MoleculeByIdAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include "types.hpp" 10 11 #include "Parameters/Validators/Specific/MoleculeIdValidator.hpp" 9 12 10 13 // i.e. there is an integer with variable name Z that can be found in 11 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value13 #define paramtypes ( int)15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 #define paramtypes (moleculeId_t) 14 17 #define paramtokens ("select-molecule-by-id") 15 18 #define paramdescriptions ("molecule index") 16 19 #undef paramdefaults 17 20 #define paramreferences (molindex) 21 #define paramvalids \ 22 (MoleculeIdValidator()) 18 23 19 24 #undef statetypes -
src/Actions/SelectionAction/Molecules/MoleculeByNameAction.cpp
r5ffa05 rbd81f9 40 40 /** =========== define the function ====================== */ 41 41 Action::state_ptr SelectionMoleculeByNameAction::performCall() { 42 LOG(1, "Selecting all molecules called " << params.molname );42 LOG(1, "Selecting all molecules called " << params.molname.get()); 43 43 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())); 46 46 LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected."); 47 47 … … 52 52 SelectionMoleculeByNameState *state = assert_cast<SelectionMoleculeByNameState*>(_state.get()); 53 53 54 World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname ));54 World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname.get())); 55 55 BOOST_FOREACH( molecule *mol, state->selectedMolecules) 56 56 World::getInstance().selectMolecule(mol); … … 62 62 SelectionMoleculeByNameState *state = assert_cast<SelectionMoleculeByNameState*>(_state.get()); 63 63 64 World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname ));64 World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname.get())); 65 65 66 66 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/MoleculeByNameAction.def
r5ffa05 rbd81f9 11 11 class molecule; 12 12 13 #include "Parameters/Validators/DummyValidator.hpp" 14 13 15 // i.e. there is an integer with variable name Z that can be found in 14 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 18 #define paramtypes (std::string) 17 19 #define paramtokens ("select-molecules-by-name") … … 19 21 #undef paramdefaults 20 22 #define paramreferences (molname) 23 #define paramvalids \ 24 (DummyValidator< std::string >()) 21 25 22 26 #define statetypes (std::vector<molecule *>) -
src/Actions/SelectionAction/Molecules/MoleculeByOrderAction.cpp
r5ffa05 rbd81f9 39 39 40 40 Action::state_ptr SelectionMoleculeByOrderAction::performCall() { 41 molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex ));41 molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex.get())); 42 42 43 43 if (mol != NULL) { -
src/Actions/SelectionAction/Molecules/MoleculeByOrderAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (int) 15 17 #define paramtokens ("select-molecule-by-order") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (molindex) 21 #define paramvalids \ 22 (DummyValidator< int >()) 19 23 20 24 #define statetypes (const molecule *) -
src/Actions/SelectionAction/Molecules/MoleculeOfAtomAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/NotAllMoleculesAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.cpp
r5ffa05 rbd81f9 40 40 /** =========== define the function ====================== */ 41 41 Action::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())); 44 44 std::vector<molecule *> unselectedMolecules = World::getInstance().getAllMolecules(!MoleculesBySelection()); 45 World::getInstance().unselectAllMolecules(MoleculeByFormula(params.formula ));45 World::getInstance().unselectAllMolecules(MoleculeByFormula(params.formula.get())); 46 46 LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected."); 47 47 return Action::state_ptr(new SelectionNotMoleculeByFormulaState(unselectedMolecules,params)); … … 51 51 SelectionNotMoleculeByFormulaState *state = assert_cast<SelectionNotMoleculeByFormulaState*>(_state.get()); 52 52 53 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula ));53 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get())); 54 54 BOOST_FOREACH( molecule *mol, state->unselectedMolecules) 55 55 World::getInstance().unselectMolecule(mol); … … 61 61 SelectionNotMoleculeByFormulaState *state = assert_cast<SelectionNotMoleculeByFormulaState*>(_state.get()); 62 62 63 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula ));63 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get())); 64 64 65 65 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/Specific/FormulaValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (std::string) 15 17 #define paramtokens ("unselect-molecules-by-formula") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (formula) 21 #define paramvalids \ 22 (FormulaValidator()) 19 23 20 24 #define statetypes (std::vector<molecule*>) -
src/Actions/SelectionAction/Molecules/NotMoleculeByIdAction.cpp
r5ffa05 rbd81f9 38 38 /** =========== define the function ====================== */ 39 39 Action::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())); 41 41 if (mol != NULL) { 42 42 if (World::getInstance().isSelected(mol)) { 43 43 LOG(1, "Unselecting molecule " << mol->name); 44 World::getInstance().unselectAllMolecules(MoleculeById(params.molindex ));44 World::getInstance().unselectAllMolecules(MoleculeById(params.molindex.get())); 45 45 LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected."); 46 46 return Action::state_ptr(new SelectionNotMoleculeByIdState(params)); … … 56 56 SelectionNotMoleculeByIdState *state = assert_cast<SelectionNotMoleculeByIdState*>(_state.get()); 57 57 58 World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex ));58 World::getInstance().selectAllMolecules(MoleculeById(state->params.molindex.get())); 59 59 60 60 return Action::state_ptr(_state); … … 64 64 SelectionNotMoleculeByIdState *state = assert_cast<SelectionNotMoleculeByIdState*>(_state.get()); 65 65 66 World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex ));66 World::getInstance().unselectAllMolecules(MoleculeById(state->params.molindex.get())); 67 67 68 68 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/NotMoleculeByIdAction.def
r5ffa05 rbd81f9 7 7 8 8 // 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" 10 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #define paramtypes ( int)15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 #define paramtypes (moleculeId_t) 15 17 #define paramtokens ("unselect-molecule-by-id") 16 18 #define paramdescriptions ("molecule index") 17 19 #undef paramdefaults 18 20 #define paramreferences (molindex) 21 #define paramvalids \ 22 (MoleculeIdValidator()) 19 23 20 24 #undef statetypes -
src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.cpp
r5ffa05 rbd81f9 40 40 /** =========== define the function ====================== */ 41 41 Action::state_ptr SelectionNotMoleculeByNameAction::performCall() { 42 LOG(1, "Unselecting all molecule called " << params.molname );42 LOG(1, "Unselecting all molecule called " << params.molname.get()); 43 43 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())); 46 46 LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected."); 47 47 … … 52 52 SelectionNotMoleculeByNameState *state = assert_cast<SelectionNotMoleculeByNameState*>(_state.get()); 53 53 54 World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname ));54 World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname.get())); 55 55 BOOST_FOREACH( molecule *mol, state->unselectedMolecules) 56 56 World::getInstance().unselectMolecule(mol); … … 62 62 SelectionNotMoleculeByNameState *state = assert_cast<SelectionNotMoleculeByNameState*>(_state.get()); 63 63 64 World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname ));64 World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname.get())); 65 65 66 66 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (std::string) 15 17 #define paramtokens ("unselect-molecules-by-name") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (molname) 21 #define paramvalids \ 22 (DummyValidator< std::string >()) 19 23 20 24 #define statetypes (std::vector<molecule *>) -
src/Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.cpp
r5ffa05 rbd81f9 39 39 40 40 Action::state_ptr SelectionNotMoleculeByOrderAction::performCall() { 41 molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex ));41 molecule *mol = World::getInstance().getMolecule(MoleculeByOrder(params.molindex.get())); 42 42 43 43 if (mol != NULL) { -
src/Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.def
r5ffa05 rbd81f9 9 9 class molecule; 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (int) 15 17 #define paramtokens ("unselect-molecule-by-order") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (molindex) 21 #define paramvalids \ 22 (DummyValidator< int >()) 19 23 20 24 #define statetypes (const molecule *) -
src/Actions/SelectionAction/Molecules/NotMoleculeOfAtomAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramtokens … … 16 18 #undef paramdefaults 17 19 #undef paramreferences 20 #undef paramvalids 18 21 19 22 #define statetypes (std::vector<molecule*>) -
src/Actions/TesselationAction/ConvexEnvelopeAction.cpp
r5ffa05 rbd81f9 50 50 const LinkedCell_deprecated *LCList = NULL; 51 51 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() << "."); 54 54 PointCloudAdaptor<molecule> cloud(mol, mol->name); 55 55 LCList = new LinkedCell_deprecated(cloud, 100.); … … 57 57 //FindConvexBorder(mol, BoundaryPoints, TesselStruct, LCList, argv[argptr]); 58 58 // 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()); 60 60 //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()); 62 62 const double clustervolume = TesselStruct->getVolumeOfConvexEnvelope(configuration->GetIsAngstroem()); 63 63 LOG(0, "The tesselated volume area is " << clustervolume << " " << (configuration->GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3."); -
src/Actions/TesselationAction/ConvexEnvelopeAction.def
r5ffa05 rbd81f9 9 9 class TesselationListClass; 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 11 14 // i.e. there is an integer with variable name Z that can be found in 12 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 17 #define paramtypes (boost::filesystem::path)(boost::filesystem::path) 15 18 #define paramtokens ("convex-file")("nonconvex-file") … … 17 20 #undef paramdefaults 18 21 #define paramreferences (filenameConvex)(filenameNonConvex) 22 #define paramvalids \ 23 (!FilePresentValidator()) \ 24 (!FilePresentValidator()) 19 25 20 26 #undef statetypes -
src/Actions/TesselationAction/NonConvexEnvelopeAction.cpp
r5ffa05 rbd81f9 49 49 const LinkedCell_deprecated *LCList = NULL; 50 50 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() << "."); 52 52 LOG(1, "Specified molecule has " << Boundary->getAtomCount() << " atoms."); 53 53 start = clock(); 54 54 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()); 58 58 end = clock(); 59 59 LOG(0, "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s."); -
src/Actions/TesselationAction/NonConvexEnvelopeAction.def
r5ffa05 rbd81f9 9 9 class TesselationListClass; 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" 13 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 18 #define paramtypes (double)(boost::filesystem::path) 15 19 #define paramtokens ("nonconvex-envelope")("nonconvex-file") … … 17 21 #undef paramdefaults 18 22 #define paramreferences (SphereRadius)(filename) 23 #define paramvalids \ 24 (BoxLengthValidator()) \ 25 (!FilePresentValidator()) 19 26 20 27 #undef statetypes -
src/Actions/UndoAction.def
r5ffa05 rbd81f9 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 10 #include "Parameters/Validators/DummyValidator.hpp" 11 10 12 // i.e. there is an integer with variable name Z that can be found in 11 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 12 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 13 15 #undef paramtypes 14 16 #undef paramreferences -
src/Actions/UndoRedoHelpers.cpp
r5ffa05 rbd81f9 26 26 27 27 #include "Atom/atom.hpp" 28 #include "molecule.hpp" 28 29 #include "Descriptors/AtomIdDescriptor.hpp" 30 #include "Descriptors/MoleculeIdDescriptor.hpp" 29 31 #include "CodePatterns/Assert.hpp" 30 32 #include "CodePatterns/Log.hpp" … … 123 125 } 124 126 } 127 128 void 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 70 70 */ 71 71 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); 72 78 } 73 79 -
src/Actions/Values.cpp
r5ffa05 rbd81f9 47 47 } 48 48 49 Box BoxValue::toBox() const49 RealSpaceMatrix RealSpaceMatrixValue::toRealSpaceMatrix() const 50 50 { 51 Box returnBox(ReturnFullMatrixforSymmetric(matrix));51 RealSpaceMatrix returnMatrix(ReturnFullMatrixforSymmetric(matrix)); 52 52 53 return return Box;53 return returnMatrix; 54 54 } -
src/Actions/Values.hpp
r5ffa05 rbd81f9 18 18 class Box; 19 19 class BoxVector; 20 class RealSpaceMatrix; 20 21 class Vector; 21 22 … … 37 38 * as BoxValue and lateron inside the CommandLineQuery placed into the real Box. 38 39 */ 39 struct BoxValue40 struct RealSpaceMatrixValue 40 41 { 41 42 double matrix[(NDIM*(NDIM+1))/2]; 42 43 43 Box toBox() const;44 RealSpaceMatrix toRealSpaceMatrix() const; 44 45 }; 45 46 -
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
r5ffa05 rbd81f9 77 77 for (int i=0;i<NDIM;i++) { 78 78 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]); 80 80 } 81 81 World::getInstance().setDomain(cell_size); … … 86 86 AtomRunner != AllAtoms.end(); 87 87 ++AtomRunner) 88 *(*AtomRunner) -= Min - params.boundary ;88 *(*AtomRunner) -= Min - params.boundary.get(); 89 89 90 90 // give final box size … … 125 125 AtomRunner != AllAtoms.end(); 126 126 ++AtomRunner) 127 *(*AtomRunner) += state->Min - state->params.boundary ;127 *(*AtomRunner) += state->Min - state->params.boundary.get(); 128 128 129 129 return Action::state_ptr(_state); … … 143 143 AtomRunner != AllAtoms.end(); 144 144 ++AtomRunner) 145 *(*AtomRunner) -= state->Min - state->params.boundary ;145 *(*AtomRunner) -= state->Min - state->params.boundary.get(); 146 146 147 147 return Action::state_ptr(_state); -
src/Actions/WorldAction/AddEmptyBoundaryAction.def
r5ffa05 rbd81f9 11 11 #include "LinearAlgebra/Vector.hpp" 12 12 13 #include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp" 14 13 15 // i.e. there is an integer with variable name Z that can be found in 14 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 18 #define paramtypes (Vector) 17 19 #define paramtokens ("add-empty-boundary") … … 19 21 #undef paramdefaults 20 22 #define paramreferences (boundary) 23 #define paramvalids \ 24 (VectorPositiveComponentsValidator()) 21 25 22 26 #define statetypes (std::string)(RealSpaceMatrix)(Vector) -
src/Actions/WorldAction/BoundInBoxAction.def
r5ffa05 rbd81f9 11 11 12 12 13 #include "Parameters/Validators/DummyValidator.hpp" 14 13 15 // i.e. there is an integer with variable name Z that can be found in 14 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 15 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 18 #undef paramtypes 17 19 #undef paramtokens … … 19 21 #undef paramdefaults 20 22 #undef paramreferences 23 #undef paramvalids 21 24 22 25 #define statetypes (std::vector< boost::shared_ptr<Vector> >) -
src/Actions/WorldAction/CenterInBoxAction.cpp
r5ffa05 rbd81f9 69 69 70 70 // set new domain 71 World::getInstance().setDomain(params.cell_size.get M());71 World::getInstance().setDomain(params.cell_size.get()); 72 72 73 73 // center atoms … … 125 125 126 126 // set new domain 127 World::getInstance().setDomain(state->params.cell_size.get M());127 World::getInstance().setDomain(state->params.cell_size.get()); 128 128 129 129 // center atoms -
src/Actions/WorldAction/CenterInBoxAction.def
r5ffa05 rbd81f9 7 7 8 8 // 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" 13 14 14 15 // i.e. there is an integer with variable name Z that can be found in 15 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 16 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 #define paramtypes ( Box)17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 18 #define paramtypes (RealSpaceMatrix) 18 19 #define paramtokens ("center-in-box") 19 20 #define paramdescriptions ("symmetric matrix of new domain") 20 21 #undef paramdefaults 21 22 #define paramreferences (cell_size) 23 #define paramvalids \ 24 (RealSpaceMatrixSymmetricValidator() && RealSpaceMatrixInvertibleValidator()) 22 25 23 26 #define statetypes (std::string)(std::vector< boost::shared_ptr<Vector> >) -
src/Actions/WorldAction/CenterOnEdgeAction.def
r5ffa05 rbd81f9 9 9 #include "LinearAlgebra/Vector.hpp" 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #undef paramtypes 15 17 #undef paramtokens … … 17 19 #undef paramdefaults 18 20 #undef paramreferences 21 #undef paramvalids 19 22 20 23 #define statetypes (std::string)(Vector)(Vector) -
src/Actions/WorldAction/ChangeBoxAction.cpp
r5ffa05 rbd81f9 50 50 oa << matrix; 51 51 52 World::getInstance().setDomain(params.cell_size.get M()); // 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. 53 53 54 54 // give final box size … … 82 82 83 83 Action::state_ptr WorldChangeBoxAction::performRedo(Action::state_ptr _state){ 84 World::getInstance().setDomain(params.cell_size.get M()); // 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. 85 85 86 86 // give final box size -
src/Actions/WorldAction/ChangeBoxAction.def
r5ffa05 rbd81f9 7 7 8 8 // 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" 11 14 12 15 // i.e. there is an integer with variable name Z that can be found in 13 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 #define paramtypes ( Box)17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 18 #define paramtypes (RealSpaceMatrix) 16 19 #define paramtokens ("change-box") 17 20 #define paramdescriptions ("symmetrc matrix of the new simulation domain") 18 21 #undef paramdefaults 19 22 #define paramreferences (cell_size) 23 #define paramvalids \ 24 (RealSpaceMatrixSymmetricValidator() && RealSpaceMatrixInvertibleValidator()) 20 25 21 26 #define statetypes (std::string) -
src/Actions/WorldAction/InputAction.cpp
r5ffa05 rbd81f9 46 46 FormatParserStorage &parsers = FormatParserStorage::getInstance(); 47 47 48 LOG(0, "Config file given " << params.filename << ".");48 LOG(0, "Config file given " << params.filename.get() << "."); 49 49 // using the filename as prefix for all parsers 50 50 std::string FilenameSuffix; 51 51 std::string FilenamePrefix; 52 if (params.filename. has_filename()) {52 if (params.filename.get().has_filename()) { 53 53 // get suffix 54 54 #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(); 57 57 #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(); 60 60 #endif 61 61 LOG(1, "Setting config file name prefix to " << FilenamePrefix << "."); … … 67 67 68 68 // 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."); 71 71 // DONT FAIL: it's just empty and we use the name. // return Action::failure; 72 72 // nonetheless, add to output formats … … 76 76 77 77 // parse the file 78 test.open(params.filename );78 test.open(params.filename.get()); 79 79 parsers.load(test, FilenameSuffix); 80 80 parsers.setOutputFormat( parsers.getTypeFromSuffix(FilenameSuffix) ); -
src/Actions/WorldAction/InputAction.def
r5ffa05 rbd81f9 9 9 #include <boost/filesystem.hpp> 10 10 11 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (boost::filesystem::path) 15 17 #define paramtokens ("input") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (filename) 21 #define paramvalids \ 22 (ParserFileValidator()) 19 23 20 24 #undef statetypes -
src/Actions/WorldAction/OutputAction.cpp
r5ffa05 rbd81f9 39 39 /** =========== define the function ====================== */ 40 40 Action::state_ptr WorldOutputAction::performCall() { 41 LOG(1, "Storing world to file " << params.filename << ".");41 LOG(1, "Storing world to file " << params.filename.get() << "."); 42 42 43 43 // extract suffix 44 44 std::string FilenameSuffix; 45 45 std::string FilenamePrefix; 46 if (params.filename. has_filename()) {46 if (params.filename.get().has_filename()) { 47 47 // get suffix 48 48 #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(); 51 51 #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(); 54 54 #endif 55 55 } else { … … 61 61 // parse the file 62 62 boost::filesystem::ofstream output; 63 output.open(params.filename );63 output.open(params.filename.get()); 64 64 if (!output.fail()) { 65 65 FormatParserStorage::getInstance().saveWorld(output, FilenameSuffix); 66 66 } else { 67 ELOG(1, "Could not open file " << params.filename << ".");67 ELOG(1, "Could not open file " << params.filename.get() << "."); 68 68 } 69 69 output.close(); -
src/Actions/WorldAction/OutputAction.def
r5ffa05 rbd81f9 9 9 # 10 10 11 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp" 13 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 14 11 15 // i.e. there is an integer with variable name Z that can be found in 12 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 18 #define paramtypes (boost::filesystem::path) 15 19 #define paramtokens ("output") … … 17 21 #undef paramdefaults 18 22 #define paramreferences (filename) 23 #define paramvalids \ 24 (!FilePresentValidator() && ParserFileValidator()) 19 25 20 26 #undef statetypes -
src/Actions/WorldAction/RepeatBoxAction.cpp
r5ffa05 rbd81f9 45 45 /** =========== define the function ====================== */ 46 46 47 void repeatMoleculesinDomain(Vector Repeater, const std::vector<molecule *> &AllMolecules) 47 void repeatMoleculesinDomain( 48 std::vector< unsigned int > Repeater, 49 const std::vector<molecule *> &AllMolecules) 48 50 { 49 51 LOG(0, "STATUS: Repeating box " << Repeater << " times for (x,y,z) axis."); … … 53 55 RealSpaceMatrix newM = M; 54 56 Vector x,y; 55 int n[NDIM];57 unsigned int n[NDIM]; 56 58 RealSpaceMatrix repMat; 57 for ( int axis = 0; axis < NDIM; axis++) {59 for (unsigned int axis = 0; axis < NDIM; axis++) { 58 60 Repeater[axis] = floor(Repeater[axis]); 59 61 if (Repeater[axis] < 1) { … … 109 111 WorldRepeatBoxState *undostate = new WorldRepeatBoxState(olddomain, oldmolecules, params); 110 112 111 repeatMoleculesinDomain(params.Repeater , AllMolecules);113 repeatMoleculesinDomain(params.Repeater.get(), AllMolecules); 112 114 113 115 // give final box size … … 151 153 ++iter) 152 154 originalmolecules.push_back(*iter); 153 repeatMoleculesinDomain(state->params.Repeater , originalmolecules);155 repeatMoleculesinDomain(state->params.Repeater.get(), originalmolecules); 154 156 155 157 // give final box size -
src/Actions/WorldAction/RepeatBoxAction.def
r5ffa05 rbd81f9 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 #include "Actions/Values.hpp"10 9 #include "LinearAlgebra/RealSpaceMatrix.hpp" 11 #include "LinearAlgebra/Vector.hpp"12 10 #include <set> 11 #include <vector> 13 12 14 13 class molecule; 15 14 15 #include "LinearAlgebra/defs.hpp" 16 #include "Parameters/Validators/DummyValidator.hpp" 17 #include "Parameters/Validators/STLVectorValidator.hpp" 18 16 19 // i.e. there is an integer with variable name Z that can be found in 17 20 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 18 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value19 #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 >) 20 23 #define paramtokens ("repeat-box") 21 24 #define paramdescriptions ("number of copies to create per axis") 22 25 #undef paramdefaults 23 26 #define paramreferences (Repeater) 27 #define paramvalids \ 28 (STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM)) 24 29 25 30 #define statetypes (RealSpaceMatrix)(std::set< molecule *>) -
src/Actions/WorldAction/ScaleBoxAction.cpp
r5ffa05 rbd81f9 44 44 // scale atoms 45 45 for (int i=0;i<NDIM;i++) 46 x[i] = params.Scaler [i];46 x[i] = params.Scaler.get()[i]; 47 47 std::vector<atom*> AllAtoms = World::getInstance().getAllAtoms(); 48 48 for(std::vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) { … … 54 54 RealSpaceMatrix scale; 55 55 for (int i=0;i<NDIM;i++) { 56 scale.at(i,i) = params.Scaler [i];56 scale.at(i,i) = params.Scaler.get()[i]; 57 57 } 58 58 M *= scale; … … 74 74 double x[NDIM]; 75 75 for (int i=0;i<NDIM;i++) 76 x[i] = 1./state->params.Scaler [i];76 x[i] = 1./state->params.Scaler.get()[i]; 77 77 vector<atom*> AllAtoms = World::getInstance().getAllAtoms(); 78 78 for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) { … … 84 84 RealSpaceMatrix scale; 85 85 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]; 87 87 } 88 88 M *= scale; … … 101 101 double x[NDIM]; 102 102 for (int i=0;i<NDIM;i++) 103 x[i] = state->params.Scaler [i];103 x[i] = state->params.Scaler.get()[i]; 104 104 vector<atom*> AllAtoms = World::getInstance().getAllAtoms(); 105 105 for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) { … … 111 111 RealSpaceMatrix scale; 112 112 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]; 114 114 } 115 115 M *= scale; -
src/Actions/WorldAction/ScaleBoxAction.def
r5ffa05 rbd81f9 10 10 #include "LinearAlgebra/Vector.hpp" 11 11 12 #include "Parameters/Validators/Specific/VectorPositiveComponentsValidator.hpp" 13 12 14 // i.e. there is an integer with variable name Z that can be found in 13 15 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value16 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 17 #define paramtypes (Vector) 16 18 #define paramtokens ("scale-box") … … 18 20 #undef paramdefaults 19 21 #define paramreferences (Scaler) 22 #define paramvalids \ 23 (VectorPositiveComponentsValidator()) 20 24 21 25 #undef statetypes -
src/Actions/WorldAction/SetBoundaryConditionsAction.cpp
r5ffa05 rbd81f9 52 52 53 53 // set conditions 54 World::getInstance().getDomain().setConditions(params.newconditions );54 World::getInstance().getDomain().setConditions(params.newconditions.get()); 55 55 56 56 LOG(0, "STATUS: Boundary conditions are now " << World::getInstance().getDomain().getConditionNames() << "."); … … 72 72 73 73 // set again conditions 74 World::getInstance().getDomain().setConditions(state->params.newconditions );74 World::getInstance().getDomain().setConditions(state->params.newconditions.get()); 75 75 76 76 LOG(0, "STATUS: Boundary conditions are again " << World::getInstance().getDomain().getConditionNames() << "."); -
src/Actions/WorldAction/SetBoundaryConditionsAction.def
r5ffa05 rbd81f9 10 10 #include <string> 11 11 12 #include "Parameters/Validators/STLVectorValidator.hpp" 13 #include "Parameters/Validators/Specific/BoundaryConditionValidator.hpp" 14 12 15 // i.e. there is an integer with variable name Z that can be found in 13 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 #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 >) 16 19 #define paramtokens ("set-boundary-conditions") 17 20 #define paramdescriptions ("new boundary conditions as list of three strings, e.g. 'wrap wrap ignore'") 18 21 #undef paramdefaults 19 22 #define paramreferences (newconditions) 23 #define paramvalids \ 24 (STLVectorValidator< std::vector< std::string > >(NDIM, NDIM, BoundaryConditionValidator())) 20 25 21 26 #define statetypes (std::string) -
src/Actions/WorldAction/SetDefaultNameAction.cpp
r5ffa05 rbd81f9 40 40 WorldSetDefaultNameState *UndoState = new WorldSetDefaultNameState(Worldsdefaultname, params); 41 41 42 World::getInstance().setDefaultName(params.newname );42 World::getInstance().setDefaultName(params.newname.get()); 43 43 LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << "."); 44 44 return Action::state_ptr(UndoState); … … 57 57 WorldSetDefaultNameState *state = assert_cast<WorldSetDefaultNameState*>(_state.get()); 58 58 59 World::getInstance().setDefaultName(state->params.newname );59 World::getInstance().setDefaultName(state->params.newname.get()); 60 60 LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << "."); 61 61 -
src/Actions/WorldAction/SetDefaultNameAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 14 16 #define paramtypes (std::string) 15 17 #define paramtokens ("default-molname") … … 17 19 #undef paramdefaults 18 20 #define paramreferences (newname) 21 #define paramvalids \ 22 (DummyValidator< std::string >()) 19 23 20 24 #define statetypes (std::string) -
src/Actions/WorldAction/SetWorldTimeAction.cpp
r5ffa05 rbd81f9 41 41 WorldSetWorldTimeState *UndoState = new WorldSetWorldTimeState(oldtime, params); 42 42 43 WorldTime::getInstance().setTime(params.newtime );43 WorldTime::getInstance().setTime(params.newtime.get()); 44 44 LOG(0, "Current time step is now: " << WorldTime::getTime() << "."); 45 45 return Action::state_ptr(UndoState); … … 58 58 WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get()); 59 59 60 WorldTime::getInstance().setTime(state->params.newtime );60 WorldTime::getInstance().setTime(state->params.newtime.get()); 61 61 LOG(0, "Current time step is now: " << WorldTime::getTime() << "."); 62 62 -
src/Actions/WorldAction/SetWorldTimeAction.def
r5ffa05 rbd81f9 9 9 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 12 11 13 // i.e. there is an integer with variable name Z that can be found in 12 14 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 // "undefine" if no parameters are required, use (NO DEFAULT) for each (undefined) default value14 #define paramtypes ( int)15 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 16 #define paramtypes (unsigned int) 15 17 #define paramtokens ("set-world-time") 16 18 #define paramdescriptions ("new time step") 17 #define paramdefaults ( "0")19 #define paramdefaults (PARAM_DEFAULT(0)) 18 20 #define paramreferences (newtime) 21 #define paramvalids \ 22 (DummyValidator< unsigned int >()) 19 23 20 #define statetypes ( int)24 #define statetypes (unsigned int) 21 25 #define statereferences (oldtime) 22 26 -
src/Actions/unittests/Makefile.am
r5ffa05 rbd81f9 31 31 ActionRegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 32 32 ../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 34 38 ActionRegistryUnitTest_LDADD = ${ACTIONLIBS} 35 39 … … 37 41 ../Actions/unittests/ActionSequenceUnitTest.cpp \ 38 42 ../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 40 48 ActionSequenceUnitTest_LDADD = \ 41 49 ${ACTIONLIBS} \ -
src/Actions/unittests/stubs/DummyUI.hpp
r5ffa05 rbd81f9 14 14 #endif 15 15 16 #include "Parameters/Parameter.hpp" 16 17 #include "UIElements/UIFactory.hpp" 17 18 #include "UIElements/Dialog.hpp" … … 24 25 25 26 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 query Box(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 = ""){} 47 48 }; 48 49 -
src/Box.cpp
r5ffa05 rbd81f9 365 365 } 366 366 367 void Box::setConditions(const std::vector< std::string >& _conditions) 368 { 369 OBSERVE; 370 NOTIFY(BoundaryConditionsChanged); 371 conditions.set(_conditions); 372 } 373 367 374 const std::vector<std::pair<Plane,Plane> > Box::getBoundingPlanes() const 368 375 { -
src/Box.hpp
r5ffa05 rbd81f9 134 134 void setConditions(const BoundaryConditions::Conditions_t & _conditions); 135 135 void setConditions(const std::string & _conditions); 136 void setConditions(const std::vector< std::string >& _conditions); 136 137 137 138 const std::vector<std::pair<Plane,Plane> > getBoundingPlanes() const; -
src/Box_BoundaryConditions.cpp
r5ffa05 rbd81f9 107 107 } 108 108 109 void 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 109 118 void BoundaryConditions::BCContainer::set(size_t index, const BoundaryConditions::BoundaryCondition_t _condition) 110 119 { … … 118 127 } 119 128 129 void BoundaryConditions::BCContainer::set(size_t index, const std::string &_condition) 130 { 131 set(index, getEnum(_condition)); 132 } 133 120 134 /** Converter from enum to string. 121 135 * … … 156 170 for (BoundaryConditions::BCContainer::const_iterator iter = t.begin(); iter != t.end(); ++iter) { 157 171 if (iter != t.begin()) 158 out << " ,";172 out << " "; 159 173 out << t.getName(*iter); 160 174 } … … 179 193 typedef boost::tokenizer< boost::char_separator<char> > tokens; 180 194 BoundaryConditions::Conditions_t conditions; 181 boost::char_separator<char> commasep(", ");195 boost::char_separator<char> commasep(", "); 182 196 // it is imperative to copy the content of the stringbuffer, otherwise we'll 183 197 // get strange bug where 'Wrap' != 'Wrap' and so on. -
src/Box_BoundaryConditions.hpp
r5ffa05 rbd81f9 23 23 24 24 class Box_BoundaryConditionsTest; 25 class BoundaryConditionValidator; 25 26 26 27 namespace BoundaryConditions { … … 46 47 //!> grant unit test access to private members 47 48 friend class ::Box_BoundaryConditionsTest; 49 friend class ::BoundaryConditionValidator; 48 50 public: 49 51 … … 55 57 const BoundaryCondition_t get(size_t index) const; 56 58 void set(const Conditions_t &_conditions); 59 void set(const std::vector< std::string > &_conditions); 57 60 void set(size_t index, const BoundaryCondition_t _condition); 61 void set(size_t index, const std::string &_conditions); 58 62 59 63 // converter -
src/Filling/Inserter/SurfaceInserter.cpp
r5ffa05 rbd81f9 36 36 SurfaceInserter::SurfaceInserter(const Shape & _s, const Vector &_alignedAxis) : 37 37 shape(_s), 38 alignedAxis(_alignedAxis )38 alignedAxis(_alignedAxis.getNormalized()) 39 39 {} 40 40 -
src/Filling/Mesh/CubeMesh.cpp
r5ffa05 rbd81f9 41 41 CubeMesh::CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M) 42 42 { 43 RealSpaceMatrix partition;44 int n[NDIM];45 46 43 #ifndef NDEBUG 47 44 for (size_t i=0;i<NDIM;++i) { … … 49 46 "CubeMesh::CubeMesh() - offset coordinates must be in [0,1) but offset[" 50 47 +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])+"."); 53 50 } 54 51 #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 */ 71 CubeMesh::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 80 void CubeMesh::init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M) 81 { 82 RealSpaceMatrix partition; 55 83 56 84 partition.setZero(); … … 59 87 LOG(1, "INFO: partition is " << partition << "."); 60 88 61 62 89 // go over [0,1]^3 filler grid 90 int n[NDIM]; 63 91 for (n[0] = 0; n[0] < counts[0]; n[0]++) 64 92 for (n[1] = 0; n[1] < counts[1]; n[1]++) -
src/Filling/Mesh/CubeMesh.hpp
r5ffa05 rbd81f9 25 25 public: 26 26 CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M); 27 CubeMesh(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M); 27 28 virtual ~CubeMesh(); 28 29 30 void init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M); 29 31 }; 30 32 -
src/Makefile.am
r5ffa05 rbd81f9 24 24 25 25 include LinkedCell/Makefile.am 26 include Parameters/Makefile.am 26 27 include Parser/Makefile.am 27 28 include RandomNumbers/Makefile.am … … 287 288 Actions/pyMoleCuilder.cpp 288 289 pyMoleCuilder_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} -I$(PYTHON_INCLUDE_DIR) 289 pyMoleCuilder_la_LDFLAGS = -module -avoid-version -shared 290 pyMoleCuilder_la_LDFLAGS = -module -avoid-version -shared $(BOOST_PYTHON_LDFLAGS) 290 291 pyMoleCuilder_la_LIBADD = \ 291 292 libMolecuilderUI.la \ 292 $(BOOST_PYTHON_L DFLAGS) $(BOOST_PYTHON_LIBS) \293 $(BOOST_PYTHON_LIBS) \ 293 294 ${CodePatterns_LIBS} \ 294 295 -l$(PYTHON_LIB) -
src/Parser/FormatParser_Parameters.cpp
r5ffa05 rbd81f9 29 29 #include "CodePatterns/Log.hpp" 30 30 31 #include "Parameters/Parameter .hpp"31 #include "Parameters/ParameterAsString.hpp" 32 32 #include "FormatParser_Parameters.hpp" 33 33 … … 87 87 * @param instance parameter to add 88 88 */ 89 void FormatParser_Parameters::appendParameter(Parameter *instance)89 void FormatParser_Parameters::appendParameter(ParameterAsString *instance) 90 90 { 91 91 storage->registerInstance(instance); … … 109 109 * @return pointer to instance with this \a _name 110 110 */ 111 Parameter *FormatParser_Parameters::getParameter(const std::string &_name) const111 ParameterAsString *FormatParser_Parameters::getParameter(const std::string &_name) const 112 112 { 113 113 return storage->getByName(_name); … … 129 129 iter != params.storage->getEndIter(); 130 130 ++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() << ";"; 133 133 ost << output.str(); 134 134 return ost; … … 187 187 +key+"' with value "+valuestream.str()+"!"); 188 188 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()); 191 191 } 192 192 } else { -
src/Parser/FormatParser_Parameters.hpp
r5ffa05 rbd81f9 20 20 #include "Parser/Parameters/ParameterStorage.hpp" 21 21 22 class Parameter ;22 class ParameterAsString; 23 23 24 24 /** This class is an interface to the internal parameters of any FormatParser. … … 41 41 42 42 // accessing parameters in storage 43 void appendParameter(Parameter *instance);43 void appendParameter(ParameterAsString *instance); 44 44 bool haveParameter(const std::string &_name) const; 45 Parameter *getParameter(const std::string &_name) const;45 ParameterAsString *getParameter(const std::string &_name) const; 46 46 47 47 protected: -
src/Parser/Makefile.am
r5ffa05 rbd81f9 57 57 58 58 PARSERPARAMETERSSOURCE = \ 59 Parser/Parameters/ParameterStorage.cpp \ 60 Parser/Parameters/StringParameter.cpp 59 Parser/Parameters/ParameterStorage.cpp 61 60 62 61 PARSERPARAMETERSHEADER = \ 63 62 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 75 78 76 79 PUGIXMLSOURCE = \ -
src/Parser/MpqcParser_Parameters.cpp
r5ffa05 rbd81f9 27 27 #include "MpqcParser_Parameters.hpp" 28 28 29 #include "Parser/Parameters/ContinuousParameter.hpp" 30 #include "Parser/Parameters/DiscreteParameter.hpp" 31 #include "Parser/Parameters/StringParameter.hpp" 29 #include "Parameters/Parameter.hpp" 32 30 33 31 template <> 34 const std::string ContinuousValue<bool>::get() const32 const std::string Value<bool>::getAsString() const throw(ParameterValueException) 35 33 { 36 ASSERT(ValueSet,37 "ContinuousValue<bool>::get() - requesting unset value.");34 if(!ValueSet) 35 throw ParameterValueException(); 38 36 if (value) 39 37 return std::string("yes"); … … 43 41 44 42 template <> 45 void ContinuousValue<bool>::set(const std::string _value)43 void Value<bool>::setAsString(const std::string _value) throw(ParameterException) 46 44 { 47 45 if (_value == std::string("yes")) { 48 set Value(true);46 set(true); 49 47 } else if (_value == std::string("no")) { 50 set Value(false);48 set(false); 51 49 } else { 52 ASSERT(0, 53 "void ContinuousValue<bool>::set() - value "+_value+" is neither yes or no."); 50 throw ParameterValueException(); 54 51 } 55 52 } … … 92 89 ValidTheories[MBPT2_R12]="MBPT2_R12"; 93 90 appendParameter( 94 new DiscreteParameter<std::string>(91 new Parameter<std::string>( 95 92 ParamNames[theoryParam], 96 93 ValidTheories, … … 105 102 ValidIntegrationMethods[IntegralCints] = "IntegralCints"; 106 103 appendParameter( 107 new DiscreteParameter<std::string>(104 new Parameter<std::string>( 108 105 ParamNames[integrationParam], 109 106 ValidIntegrationMethods, … … 113 110 // add all continuous parameters 114 111 { 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")); 124 121 } 125 122 } … … 135 132 const std::string MpqcParser_Parameters::getParameter(const enum Parameters param) const 136 133 { 137 return FormatParser_Parameters::getParameter(ParamNames[param])->get ();134 return FormatParser_Parameters::getParameter(ParamNames[param])->getAsString(); 138 135 } 139 136 … … 146 143 { 147 144 const std::string &name = getParameterName(param); 148 FormatParser_Parameters::getParameter(name)->set (_value);145 FormatParser_Parameters::getParameter(name)->setAsString(_value); 149 146 } 150 147 -
src/Parser/MpqcParser_Parameters.hpp
r5ffa05 rbd81f9 23 23 #include "Parser/FormatParser_Parameters.hpp" 24 24 25 #include "Parser/Parameters/ContinuousParameter.hpp" 25 #include "Parameters/Parameter.hpp" 26 #include "Parameters/Value.hpp" 26 27 27 28 // 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);29 template <> const std::string Value<bool>::getAsString() const throw(ParameterValueException); 30 template <> void Value<bool>::setAsString(const std::string _value) throw(ParameterException); 30 31 31 32 class MpqcParser; -
src/Parser/Parameters/ParameterStorage.cpp
r5ffa05 rbd81f9 37 37 { 38 38 for (const_iterator iter = _storage.getBeginIter(); iter != _storage.getEndIter(); ++iter) { 39 Parameter *instance = (iter->second)->clone();39 ParameterAsString *instance = (iter->second)->clone(); 40 40 registerInstance(instance); 41 41 } … … 49 49 } 50 50 51 CONSTRUCT_REGISTRY(Parameter )51 CONSTRUCT_REGISTRY(ParameterAsString) -
src/Parser/Parameters/ParameterStorage.hpp
r5ffa05 rbd81f9 16 16 #include "CodePatterns/Registry.hpp" 17 17 18 #include "Parameter .hpp"18 #include "Parameters/ParameterAsString.hpp" 19 19 20 20 /** Parameter Registry. … … 23 23 * 24 24 */ 25 class ParameterStorage : public Registry<Parameter >25 class ParameterStorage : public Registry<ParameterAsString> 26 26 { 27 27 public: -
src/Parser/Parameters/unittests/Makefile.am
r5ffa05 rbd81f9 4 4 5 5 PARSERPARAMETERSTESTSSOURCES = \ 6 ../Parser/Parameters/unittests/ContinuousValueUnitTest.cpp \7 ../Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp \8 ../Parser/Parameters/unittests/DiscreteValueUnitTest.cpp \9 ../Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp \10 6 ../Parser/Parameters/unittests/ParameterStorageUnitTest.cpp \ 11 7 ../Parser/Parameters/unittests/StringParameterUnitTest.cpp 12 8 13 9 PARSERPARAMETERSTESTSHEADERS = \ 14 ../Parser/Parameters/unittests/ContinuousValueUnitTest.hpp \15 ../Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp \16 ../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp \17 ../Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp \18 10 ../Parser/Parameters/unittests/ParameterStorageUnitTest.hpp \ 19 11 ../Parser/Parameters/unittests/StringParameterUnitTest.hpp 20 12 21 13 PARSERPARAMETERSTESTS = \ 22 ContinuousValueUnitTest \23 ContinuousParameterUnitTest \24 DiscreteValueUnitTest \25 DiscreteParameterUnitTest \26 14 ParameterStorageUnitTest \ 27 15 StringParameterUnitTest … … 31 19 noinst_PROGRAMS += $(PARSERPARAMETERSTESTS) 32 20 33 PARSERPARAMETERSLIBS = 21 PARSERPARAMETERSLIBS = \ 22 $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \ 23 ${CodePatterns_LIBS} 34 24 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.hpp42 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.hpp54 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.hpp63 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.hpp75 DiscreteParameterUnitTest_LDADD = \76 $(PARSERPARAMETERSLIBS)77 25 78 26 ParameterStorageUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ … … 81 29 ../Parser/Parameters/ParameterStorage.cpp \ 82 30 ../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 88 39 ParameterStorageUnitTest_LDADD = \ 89 $(CodePatterns_LIBS) \90 40 $(PARSERPARAMETERSLIBS) 91 41 … … 93 43 ../Parser/Parameters/unittests/StringParameterUnitTest.cpp \ 94 44 ../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 99 55 StringParameterUnitTest_LDADD = \ 100 56 $(PARSERPARAMETERSLIBS) -
src/Parser/Parameters/unittests/ParameterStorageUnitTest.cpp
r5ffa05 rbd81f9 27 27 28 28 #include "Parser/Parameters/ParameterStorage.hpp" 29 #include "Parser/Parameters/ContinuousParameter.hpp" 30 #include "Parser/Parameters/DiscreteParameter.hpp" 29 #include "Parameters/Parameter.hpp" 31 30 32 31 #ifdef HAVE_TESTRUNNER … … 53 52 ValidValues.push_back(i); 54 53 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); 57 56 // note: delete is done by registry in tearDown ... 58 57 -
src/Parser/Parameters/unittests/StringParameterUnitTest.cpp
r5ffa05 rbd81f9 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Par ser/Parameters/StringParameter.hpp"26 #include "Parameters/Parameter.hpp" 27 27 28 28 #include "CodePatterns/Assert.hpp" … … 54 54 { 55 55 // create instance 56 StringParametertest("stringParam");57 StringParametersamenamedsamevalued("stringParam");58 StringParametersamenamedelsevalued("stringParam");59 StringParameterelsenamedsamevalued("string2Param");60 StringParameterelsenamedelsevalued("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"); 61 61 test.set(std::string("1")); 62 62 samenamedsamevalued.set(std::string("1")); … … 77 77 { 78 78 // 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"); 86 80 87 81 // set parameter … … 90 84 // is returned as Parameter but we can compare only in true class as 91 85 // 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()); 93 87 94 88 // different places in memory -
src/Parser/Psi3Parser_Parameters.cpp
r5ffa05 rbd81f9 29 29 #include "Psi3Parser_Parameters.hpp" 30 30 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 36 34 template <> 37 inline const std::string ContinuousValue<bool>::get() const38 { 39 ASSERT(ValueSet,40 "ContinuousValue<bool>::get() - requesting unset value.");35 inline const std::string Value<bool>::getAsString() const throw(ParameterValueException) 36 { 37 if(!ValueSet) 38 throw ParameterValueException(); 41 39 if (value) 42 40 return std::string("yes"); … … 45 43 } 46 44 47 // TODO: ContinuousValue<bool>::setmust be defined inline otherwise we get multiple definition of virtual thunk compilation errors45 // TODO: Value<bool>::setAsString must be defined inline otherwise we get multiple definition of virtual thunk compilation errors 48 46 template <> 49 inline void ContinuousValue<bool>::set(const std::string _value)47 inline void Value<bool>::setAsString(const std::string _value) throw(ParameterException) 50 48 { 51 49 if (_value == std::string("yes")) { 52 set Value(true);50 set(true); 53 51 } else if (_value == std::string("no")) { 54 set Value(false);52 set(false); 55 53 } else { 56 ASSERT(0, 57 "void ContinuousValue<bool>::set() - value "+_value+" is neither yes or no."); 54 throw ParameterValueException(); 58 55 } 59 56 } … … 103 100 ValidFreezeCore[LARGE]="large"; 104 101 appendParameter( 105 new DiscreteParameter<std::string>(102 new Parameter<std::string>( 106 103 ParamNames[freeze_coreParam], 107 104 ValidFreezeCore, … … 116 113 ValidUnits[bohr]="bohr"; 117 114 appendParameter( 118 new DiscreteParameter<std::string>(115 new Parameter<std::string>( 119 116 ParamNames[unitsParam], 120 117 ValidUnits, … … 128 125 ValidDerivativeType[NONE]="none"; 129 126 appendParameter( 130 new DiscreteParameter<std::string>(127 new Parameter<std::string>( 131 128 ParamNames[dertypeParam], 132 129 ValidDerivativeType, … … 142 139 ValidUniqueAxis[Z]="z"; 143 140 appendParameter( 144 new DiscreteParameter<std::string>(141 new Parameter<std::string>( 145 142 ParamNames[unique_axisParam], 146 143 ValidUniqueAxis, … … 160 157 ValidJobtypes[RESPONSE]="response"; 161 158 appendParameter( 162 new DiscreteParameter<std::string>(159 new Parameter<std::string>( 163 160 ParamNames[jobtypeParam], 164 161 ValidJobtypes, … … 184 181 ValidWavefunction[ZAPTN]="zaptn"; 185 182 appendParameter( 186 new DiscreteParameter<std::string>(183 new Parameter<std::string>( 187 184 ParamNames[wavefunctionParam], 188 185 ValidWavefunction, … … 199 196 ValidReference[TWOCON]="twocon"; 200 197 appendParameter( 201 new DiscreteParameter<std::string>(198 new Parameter<std::string>( 202 199 ParamNames[referenceParam], 203 200 ValidReference, … … 207 204 // add all continuous parameters 208 205 { 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 vector213 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(""))); 218 215 } 219 216 } … … 229 226 const std::string Psi3Parser_Parameters::getParameter(const enum Parameters param) const 230 227 { 231 return FormatParser_Parameters::getParameter(ParamNames[param])->get ();228 return FormatParser_Parameters::getParameter(ParamNames[param])->getAsString(); 232 229 } 233 230 … … 240 237 { 241 238 const std::string &name = getParameterName(param); 242 FormatParser_Parameters::getParameter(name)->set (_value);239 FormatParser_Parameters::getParameter(name)->setAsString(_value); 243 240 } 244 241 -
src/Parser/Psi3Parser_Parameters.hpp
r5ffa05 rbd81f9 22 22 #include "Parser/FormatParser_Parameters.hpp" 23 23 24 #include "Parser/Parameters/ContinuousParameter.hpp" 24 #include "Parameters/Parameter.hpp" 25 #include "Parameters/Value.hpp" 25 26 26 27 // 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);28 template <> inline const std::string Value<bool>::getAsString() const throw(ParameterValueException); 29 template <> inline void Value<bool>::setAsString(const std::string _value) throw(ParameterException); 29 30 30 31 class Psi3Parser; -
src/Parser/TremoloParser.cpp
r5ffa05 rbd81f9 41 41 42 42 #include <algorithm> 43 #include <boost/lambda/lambda.hpp> 43 44 #include <boost/lexical_cast.hpp> 44 45 #include <boost/tokenizer.hpp> … … 47 48 #include <map> 48 49 #include <sstream> 50 #include <string> 49 51 #include <vector> 52 53 #include <boost/assign/list_of.hpp> // for 'map_list_of()' 54 #include <boost/assert.hpp> 50 55 51 56 // declare specialized static variables … … 54 59 const ParserTypes FormatParserTrait<tremolo>::type = tremolo; 55 60 61 // static instances 62 std::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 56 86 /** 57 87 * Constructor. … … 60 90 FormatParser_common(NULL) 61 91 { 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 keys84 85 92 createKnownTypesByIdentity(); 86 93 … … 92 99 } 93 100 101 94 102 /** 95 103 * Destructor. … … 99 107 usedFields_save.clear(); 100 108 additionalAtomData.clear(); 101 knownKeys.clear();102 109 } 103 110 … … 182 189 } 183 190 191 struct 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 205 struct 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 184 238 /** Helper function to make \given fields unique while preserving the order of first appearance. 185 239 * … … 191 245 * @param fields usedFields to make unique while preserving order of appearance 192 246 */ 193 void FormatParser< tremolo >::makeUsedFieldsUnique(usedFields_t &fields) 247 void FormatParser< tremolo >::makeUsedFieldsUnique(usedFields_t &fields) const 194 248 { 195 249 // 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); 198 254 usedFields_t::iterator it = 199 std::unique(temp_fields.begin(), temp_fields.end() ); // skips all duplicates in the vector255 std::unique(temp_fields.begin(), temp_fields.end(), WeakComparator); 200 256 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()); 204 260 // now go through each usedFields entry, check if in temp_fields and remove there on first occurence 205 261 for (usedFields_t::const_iterator iter = usedfields.begin(); … … 208 264 std::find(temp_fields.begin(), temp_fields.end(), *iter); 209 265 if (uniqueiter != temp_fields.end()) { 210 usedFields_save.push_back(*iter);266 fields.push_back(*iter); 211 267 // add only once to ATOMDATA 212 268 temp_fields.erase(uniqueiter); … … 441 497 if (knownKeys[keyword.substr(0, keyword.find("="))] == TremoloKey::noKey) { 442 498 // 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(); 444 501 break; 445 502 } … … 449 506 } 450 507 508 /** 509 * Tests whether the keys from the ATOMDATA line can be read correctly. 510 * 511 * \param line to parse the keys from 512 */ 513 bool 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 535 std::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 */ 551 void FormatParser< tremolo >::setAtomData(const std::string &atomdata_string) 552 { 553 parseAtomDataKeysLine(atomdata_string, 0, usedFields_save); 554 } 555 451 556 /** Sets the properties per atom to print to .data file by parsing line from 452 557 * \a atomdata_string. … … 457 562 * @param atomdata_string line to parse with space-separated values 458 563 */ 459 void FormatParser< tremolo >:: setAtomData(const std::string &atomdata_string)564 void FormatParser< tremolo >::resetAtomData(const std::string &atomdata_string) 460 565 { 461 566 usedFields_save.clear(); -
src/Parser/TremoloParser.hpp
r5ffa05 rbd81f9 27 27 28 28 class molecule; 29 class AtomDataValidator; 29 30 30 31 // declaration of specialized FormatParserTrait … … 46 47 class FormatParser< tremolo > : virtual public FormatParserInterface, public FormatParser_common 47 48 { 49 friend class AtomDataValidator; 48 50 public: 49 51 FormatParser(); … … 51 53 void load(std::istream* file); 52 54 void save(std::ostream* file, const std::vector<atom *> &atoms); 55 std::string getAtomData() const; 53 56 void setAtomData(const std::string &atomdata_string); 57 void resetAtomData(const std::string &atomdata_string); 54 58 55 59 private: … … 92 96 void readAtomDataLine(const std::string &line, molecule *newmol); 93 97 void parseAtomDataKeysLine(const std::string &line, const int offset, usedFields_t &fields); 98 static bool testParseAtomDataKeysLine(const std::string &line); 94 99 void readNeighbors(std::stringstream* line, const int numberOfNeighbors, const int atomId); 95 100 void processNeighborInformation(const std::vector<atomId_t> &atoms); … … 103 108 void save_BoxLine(std::ostream* file) const; 104 109 void distributeContinuousIds(const std::vector<atom *> &AtomList); 105 void makeUsedFieldsUnique(usedFields_t &fields) ;110 void makeUsedFieldsUnique(usedFields_t &fields) const; 106 111 107 112 /** 108 113 * Map to associate the known keys with numbers. 109 114 */ 110 st d::map<std::string, TremoloKey::atomDataKey> knownKeys;115 static std::map<std::string, TremoloKey::atomDataKey> knownKeys; 111 116 112 117 /** -
src/Parser/unittests/ParserTremoloUnitTest.cpp
r5ffa05 rbd81f9 23 23 #include <cppunit/extensions/TestFactoryRegistry.h> 24 24 #include <cppunit/ui/text/TestRunner.h> 25 26 #include "CodePatterns/Log.hpp" 25 27 26 28 #include "Atom/atom.hpp" … … 91 93 World::getInstance(); 92 94 95 setVerbosity(5); 96 93 97 parser = new FormatParser<tremolo>(); 94 98 … … 139 143 // Invalid key in Atomdata line 140 144 input << Tremolo_invalidkey; 141 parser->load(&input);145 CPPUNIT_ASSERT_THROW( parser->load(&input), IllegalParserKeyException); 142 146 //TODO: prove invalidity 143 147 input.clear(); 148 } 149 150 void 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() ); 144 171 } 145 172 -
src/Parser/unittests/ParserTremoloUnitTest.hpp
r5ffa05 rbd81f9 22 22 CPPUNIT_TEST_SUITE( ParserTremoloUnitTest ) ; 23 23 CPPUNIT_TEST ( readTremoloPreliminaryCommentsTest ); 24 CPPUNIT_TEST ( getsetAtomDataTest ); 24 25 CPPUNIT_TEST ( readTremoloCoordinatesTest ); 25 26 CPPUNIT_TEST ( readTremoloVelocityTest ); … … 35 36 36 37 void readTremoloPreliminaryCommentsTest(); 38 void getsetAtomDataTest(); 37 39 void readTremoloCoordinatesTest(); 38 40 void readTremoloVelocityTest(); -
src/RandomNumbers/RandomNumberDistributionFactory.hpp
r5ffa05 rbd81f9 29 29 30 30 class RandomNumberDistributionFactoryUnitTest; 31 class RandomNumberDistributionNameValidator; 31 32 namespace MoleCuilder { 32 33 class CommandSetRandomNumbersDistributionAction; … … 48 49 friend class Singleton<RandomNumberDistributionFactory>; 49 50 friend class RandomNumberDistributionFactoryTest; 51 friend class RandomNumberDistributionNameValidator; 50 52 friend class MoleCuilder::CommandSetRandomNumbersDistributionAction; 51 53 -
src/RandomNumbers/RandomNumberEngineFactory.hpp
r5ffa05 rbd81f9 29 29 30 30 class RandomNumberEngineFactoryUnitTest; 31 class RandomNumberEngineNameValidator; 31 32 namespace MoleCuilder { 32 33 class CommandSetRandomNumbersEngineAction; … … 48 49 friend class Singleton<RandomNumberEngineFactory>; 49 50 friend class RandomNumberEngineFactoryTest; 51 friend class RandomNumberEngineNameValidator; 50 52 friend class MoleCuilder::CommandSetRandomNumbersEngineAction; 51 53 -
src/UIElements/CommandLineUI/CommandLineDialog.cpp
r5ffa05 rbd81f9 40 40 } 41 41 42 void CommandLineDialog::queryInt( const char* title, std::string _description){43 registerQuery(new IntCommandLineQuery( title, _description));42 void CommandLineDialog::queryInt(Parameter<int> ¶m, const char* title, std::string _description){ 43 registerQuery(new IntCommandLineQuery(param, title, _description)); 44 44 } 45 45 46 void CommandLineDialog::queryInts( const char* title, std::string _description){47 registerQuery(new IntsCommandLineQuery( title, _description));46 void CommandLineDialog::queryInts(Parameter<std::vector<int> > ¶m, const char* title, std::string _description){ 47 registerQuery(new IntsCommandLineQuery(param, title, _description)); 48 48 } 49 49 50 void CommandLineDialog::queryUnsignedInt( const char* title, std::string _description){51 registerQuery(new UnsignedIntCommandLineQuery( title, _description));50 void CommandLineDialog::queryUnsignedInt(Parameter<unsigned int> ¶m, const char* title, std::string _description){ 51 registerQuery(new UnsignedIntCommandLineQuery(param, title, _description)); 52 52 } 53 53 54 void CommandLineDialog::queryUnsignedInts( const char* title, std::string _description){55 registerQuery(new UnsignedIntsCommandLineQuery( title, _description));54 void CommandLineDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > ¶m, const char* title, std::string _description){ 55 registerQuery(new UnsignedIntsCommandLineQuery(param, title, _description)); 56 56 } 57 57 58 void CommandLineDialog::queryBoolean( const char* title, std::string _description){59 registerQuery(new BooleanCommandLineQuery( title, _description));58 void CommandLineDialog::queryBoolean(Parameter<bool> ¶m, const char* title, std::string _description){ 59 registerQuery(new BooleanCommandLineQuery(param, title, _description)); 60 60 } 61 61 62 void CommandLineDialog::queryDouble( const char* title, std::string _description){63 registerQuery(new DoubleCommandLineQuery( title, _description));62 void CommandLineDialog::queryDouble(Parameter<double> ¶m, const char* title, std::string _description){ 63 registerQuery(new DoubleCommandLineQuery(param, title, _description)); 64 64 } 65 65 66 void CommandLineDialog::queryDoubles( const char* title, std::string _description){67 registerQuery(new DoublesCommandLineQuery( title, _description));66 void CommandLineDialog::queryDoubles(Parameter<std::vector<double> > ¶m, const char* title, std::string _description){ 67 registerQuery(new DoublesCommandLineQuery(param, title, _description)); 68 68 } 69 69 70 void CommandLineDialog::queryString( const char* title, std::string _description){71 registerQuery(new StringCommandLineQuery( title, _description));70 void CommandLineDialog::queryString(Parameter<std::string> ¶m, const char* title, std::string _description){ 71 registerQuery(new StringCommandLineQuery(param, title, _description)); 72 72 } 73 73 74 void CommandLineDialog::queryStrings( const char* title, std::string _description){75 registerQuery(new StringsCommandLineQuery( title, _description));74 void CommandLineDialog::queryStrings(Parameter<std::vector<std::string> > ¶m, const char* title, std::string _description){ 75 registerQuery(new StringsCommandLineQuery(param, title, _description)); 76 76 } 77 77 78 void CommandLineDialog::queryAtom( const char* title, std::string _description) {79 registerQuery(new AtomCommandLineQuery( title, _description));78 void CommandLineDialog::queryAtom(Parameter<const atom *> ¶m, const char* title, std::string _description) { 79 registerQuery(new AtomCommandLineQuery(param, title, _description)); 80 80 } 81 81 82 void CommandLineDialog::queryAtoms( const char* title, std::string _description) {83 registerQuery(new AtomsCommandLineQuery( title, _description));82 void CommandLineDialog::queryAtoms(Parameter<std::vector<const atom *> > ¶m, const char* title, std::string _description) { 83 registerQuery(new AtomsCommandLineQuery(param, title, _description)); 84 84 } 85 85 86 void CommandLineDialog::queryMolecule( const char* title, std::string _description) {87 registerQuery(new MoleculeCommandLineQuery( title, _description));86 void CommandLineDialog::queryMolecule(Parameter<const molecule *> ¶m, const char* title, std::string _description) { 87 registerQuery(new MoleculeCommandLineQuery(param, title, _description)); 88 88 } 89 89 90 void CommandLineDialog::queryMolecules( const char* title, std::string _description) {91 registerQuery(new MoleculesCommandLineQuery( title, _description));90 void CommandLineDialog::queryMolecules(Parameter<std::vector<const molecule *> > ¶m, const char* title, std::string _description) { 91 registerQuery(new MoleculesCommandLineQuery(param, title, _description)); 92 92 } 93 93 94 void CommandLineDialog::queryVector( const char* title, bool check, std::string _description) {95 registerQuery(new VectorCommandLineQuery( title,check, _description));94 void CommandLineDialog::queryVector(Parameter<Vector> ¶m, const char* title, bool check, std::string _description) { 95 registerQuery(new VectorCommandLineQuery(param, title,check, _description)); 96 96 } 97 97 98 void CommandLineDialog::queryVectors( const char* title, bool check, std::string _description) {99 registerQuery(new VectorsCommandLineQuery( title,check, _description));98 void CommandLineDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, bool check, std::string _description) { 99 registerQuery(new VectorsCommandLineQuery(param, title,check, _description)); 100 100 } 101 101 102 void CommandLineDialog::query Box(const char* title, std::string _description) {103 registerQuery(new BoxCommandLineQuery(title,_description));102 void CommandLineDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> ¶m, const char* title, std::string _description) { 103 registerQuery(new RealSpaceMatrixCommandLineQuery(param, title,_description)); 104 104 } 105 105 106 void CommandLineDialog::queryElement( const char* title, std::string _description){107 registerQuery(new ElementCommandLineQuery( title, _description));106 void CommandLineDialog::queryElement(Parameter<const element *> ¶m, const char* title, std::string _description){ 107 registerQuery(new ElementCommandLineQuery(param, title, _description)); 108 108 } 109 109 110 void CommandLineDialog::queryElements( const char* title, std::string _description){111 registerQuery(new ElementsCommandLineQuery( title, _description));110 void CommandLineDialog::queryElements(Parameter<std::vector<const element *> > ¶m, const char* title, std::string _description){ 111 registerQuery(new ElementsCommandLineQuery(param, title, _description)); 112 112 } 113 113 114 void CommandLineDialog::queryFile( const char* title, std::string _description){115 registerQuery(new FileCommandLineQuery( title, _description));114 void CommandLineDialog::queryFile(Parameter<boost::filesystem::path> ¶m, const char* title, std::string _description){ 115 registerQuery(new FileCommandLineQuery(param, title, _description)); 116 116 } 117 117 118 void CommandLineDialog::queryFiles( const char* title, std::string _description){119 registerQuery(new FilesCommandLineQuery( title, _description));118 void CommandLineDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > ¶m, const char* title, std::string _description){ 119 registerQuery(new FilesCommandLineQuery(param, title, _description)); 120 120 } 121 121 122 void CommandLineDialog::queryRandomNumberDistribution_Parameters( const char* title, std::string _description){123 registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery( title, _description));122 void CommandLineDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> ¶m, const char* title, std::string _description){ 123 registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(param, title, _description)); 124 124 } 125 125 -
src/UIElements/CommandLineUI/CommandLineDialog.hpp
r5ffa05 rbd81f9 34 34 35 35 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 = ""); 58 57 // specialized stuff for command line queries 59 58 // all placed into Query/CommandLineQuery.hpp … … 62 61 class AtomsCommandLineQuery; 63 62 class BooleanCommandLineQuery; 64 class BoxCommandLineQuery;65 63 class DoubleCommandLineQuery; 66 64 class DoublesCommandLineQuery; … … 74 72 class MoleculeCommandLineQuery; 75 73 class MoleculesCommandLineQuery; 74 class RealSpaceMatrixCommandLineQuery; 76 75 class StringCommandLineQuery; 77 76 class StringsCommandLineQuery; -
src/UIElements/CommandLineUI/CommandLineParser.cpp
r5ffa05 rbd81f9 193 193 ; 194 194 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;204 195 case TypeEnumContainer::FileType: 205 196 OptionList->add_options() … … 370 361 po::value < std::string >()->default_value(boost::lexical_cast< std::string >(currentOption->getDefaultValue().c_str())) : 371 362 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 >(), 372 372 currentOption->getDescription().c_str()) 373 373 ; -
src/UIElements/CommandLineUI/CommandLineParser_validate.cpp
r5ffa05 rbd81f9 84 84 } 85 85 86 void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int)86 void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int) 87 87 { 88 BoxValue BV;88 RealSpaceMatrixValue RSMV; 89 89 std::vector<std::string> components; 90 90 … … 129 129 } 130 130 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)); 133 133 } 134 134 -
src/UIElements/CommandLineUI/CommandLineParser_validate.hpp
r5ffa05 rbd81f9 22 22 #include <boost/lexical_cast.hpp> 23 23 24 class BoxValue;24 class RealSpaceMatrixValue; 25 25 class VectorValue; 26 26 27 27 void 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);28 void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int); 29 29 void validate(boost::any& v, const std::vector<std::string>& values, boost::filesystem::path *, int); 30 30 -
src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp
r5ffa05 rbd81f9 33 33 using namespace std; 34 34 35 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery( std::string title, std::string _description) :36 Dialog::AtomQuery( title, _description)35 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(Parameter<const atom *> ¶m, std::string title, std::string _description) : 36 Dialog::AtomQuery(param, title, _description) 37 37 {} 38 38 … … 43 43 if (CommandLineParser::getInstance().vm.count(getTitle())) { 44 44 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 45 tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));45 tmp.set(World::getInstance().getAtom(AtomById(IdxOfAtom))); 46 46 return true; 47 47 } else { -
src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp
r5ffa05 rbd81f9 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery( std::string title, std::string _description) :31 Dialog::AtomsQuery( title, _description)30 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description) : 31 Dialog::AtomsQuery(param, title, _description) 32 32 {} 33 33 … … 38 38 if (CommandLineParser::getInstance().vm.count(getTitle())) { 39 39 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 40 std::vector<const atom *> temp_atoms; 40 41 for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) { 41 42 temp = World::getInstance().getAtom(AtomById(*iter)); 42 43 if (temp) 43 t mp.push_back(temp);44 temp_atoms.push_back(temp); 44 45 } 46 tmp.set(temp_atoms); 45 47 return true; 46 48 } else { -
src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery( std::string title, std::string _description) :28 Dialog::BooleanQuery( title, _description)27 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(Parameter<bool> ¶m, std::string title, std::string _description) : 28 Dialog::BooleanQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::BooleanCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<bool>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp
r5ffa05 rbd81f9 26 26 class CommandLineDialog::IntCommandLineQuery : public Dialog::IntQuery { 27 27 public: 28 IntCommandLineQuery( std::string title, std::string _description = "");28 IntCommandLineQuery(Parameter<int> ¶m, std::string title, std::string _description = ""); 29 29 virtual ~IntCommandLineQuery(); 30 30 virtual bool handle(); … … 33 33 class CommandLineDialog::IntsCommandLineQuery : public Dialog::IntsQuery { 34 34 public: 35 IntsCommandLineQuery( std::string title, std::string _description = "");35 IntsCommandLineQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string _description = ""); 36 36 virtual ~IntsCommandLineQuery(); 37 37 virtual bool handle(); … … 40 40 class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::UnsignedIntQuery { 41 41 public: 42 UnsignedIntCommandLineQuery( std::string title, std::string _description = "");42 UnsignedIntCommandLineQuery(Parameter<unsigned int> ¶m, std::string title, std::string _description = ""); 43 43 virtual ~UnsignedIntCommandLineQuery(); 44 44 virtual bool handle(); … … 47 47 class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::UnsignedIntsQuery { 48 48 public: 49 UnsignedIntsCommandLineQuery( std::string title, std::string _description = "");49 UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string _description = ""); 50 50 virtual ~UnsignedIntsCommandLineQuery(); 51 51 virtual bool handle(); … … 54 54 class CommandLineDialog::BooleanCommandLineQuery : public Dialog::BooleanQuery { 55 55 public: 56 BooleanCommandLineQuery( std::string title, std::string _description = "");56 BooleanCommandLineQuery(Parameter<bool> ¶m, std::string title, std::string _description = ""); 57 57 virtual ~BooleanCommandLineQuery(); 58 58 virtual bool handle(); … … 61 61 class CommandLineDialog::DoubleCommandLineQuery : public Dialog::DoubleQuery { 62 62 public: 63 DoubleCommandLineQuery( std::string title, std::string _description = "");63 DoubleCommandLineQuery(Parameter<double> ¶m, std::string title, std::string _description = ""); 64 64 virtual ~DoubleCommandLineQuery(); 65 65 virtual bool handle(); … … 68 68 class CommandLineDialog::DoublesCommandLineQuery : public Dialog::DoublesQuery { 69 69 public: 70 DoublesCommandLineQuery( std::string title, std::string _description = "");70 DoublesCommandLineQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description = ""); 71 71 virtual ~DoublesCommandLineQuery(); 72 72 virtual bool handle(); … … 75 75 class CommandLineDialog::StringCommandLineQuery : public Dialog::StringQuery { 76 76 public: 77 StringCommandLineQuery( std::string title, std::string _description = "");77 StringCommandLineQuery(Parameter<std::string> ¶m, std::string title, std::string _description = ""); 78 78 virtual ~StringCommandLineQuery(); 79 79 virtual bool handle(); … … 82 82 class CommandLineDialog::StringsCommandLineQuery : public Dialog::StringsQuery { 83 83 public: 84 StringsCommandLineQuery( std::string title, std::string _description = "");84 StringsCommandLineQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description = ""); 85 85 virtual ~StringsCommandLineQuery(); 86 86 virtual bool handle(); … … 89 89 class CommandLineDialog::AtomCommandLineQuery : public Dialog::AtomQuery { 90 90 public: 91 AtomCommandLineQuery( std::string title, std::string _description = "");91 AtomCommandLineQuery(Parameter<const atom *> ¶m, std::string title, std::string _description = ""); 92 92 virtual ~AtomCommandLineQuery(); 93 93 virtual bool handle(); … … 96 96 class CommandLineDialog::AtomsCommandLineQuery : public Dialog::AtomsQuery { 97 97 public: 98 AtomsCommandLineQuery( std::string title, std::string _description = "");98 AtomsCommandLineQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description = ""); 99 99 virtual ~AtomsCommandLineQuery(); 100 100 virtual bool handle(); … … 103 103 class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::MoleculeQuery { 104 104 public: 105 MoleculeCommandLineQuery( std::string title, std::string _description = "");105 MoleculeCommandLineQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description = ""); 106 106 virtual ~MoleculeCommandLineQuery(); 107 107 virtual bool handle(); … … 110 110 class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::MoleculesQuery { 111 111 public: 112 MoleculesCommandLineQuery( std::string title, std::string _description = "");112 MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description = ""); 113 113 virtual ~MoleculesCommandLineQuery(); 114 114 virtual bool handle(); … … 117 117 class CommandLineDialog::VectorCommandLineQuery : public Dialog::VectorQuery { 118 118 public: 119 VectorCommandLineQuery( std::string title,bool _check, std::string _description = "");119 VectorCommandLineQuery(Parameter<Vector> ¶m, std::string title,bool _check, std::string _description = ""); 120 120 virtual ~VectorCommandLineQuery(); 121 121 virtual bool handle(); … … 124 124 class CommandLineDialog::VectorsCommandLineQuery : public Dialog::VectorsQuery { 125 125 public: 126 VectorsCommandLineQuery( std::string title,bool _check, std::string _description = "");126 VectorsCommandLineQuery(Parameter<std::vector<Vector> > ¶m, std::string title,bool _check, std::string _description = ""); 127 127 virtual ~VectorsCommandLineQuery(); 128 128 virtual bool handle(); 129 129 }; 130 130 131 class CommandLineDialog:: BoxCommandLineQuery : public Dialog::BoxQuery {131 class CommandLineDialog::RealSpaceMatrixCommandLineQuery : public Dialog::RealSpaceMatrixQuery { 132 132 public: 133 BoxCommandLineQuery(std::string title, std::string _description = "");134 virtual ~ BoxCommandLineQuery();133 RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> ¶m, std::string title, std::string _description = ""); 134 virtual ~RealSpaceMatrixCommandLineQuery(); 135 135 virtual bool handle(); 136 136 }; … … 138 138 class CommandLineDialog::ElementCommandLineQuery : public Dialog::ElementQuery { 139 139 public: 140 ElementCommandLineQuery( std::string title, std::string _description = "");140 ElementCommandLineQuery(Parameter<const element *> ¶m, std::string title, std::string _description = ""); 141 141 virtual ~ElementCommandLineQuery(); 142 142 virtual bool handle(); … … 145 145 class CommandLineDialog::ElementsCommandLineQuery : public Dialog::ElementsQuery { 146 146 public: 147 ElementsCommandLineQuery( std::string title, std::string _description = "");147 ElementsCommandLineQuery(Parameter<std::vector<const element *> > ¶m, std::string title, std::string _description = ""); 148 148 virtual ~ElementsCommandLineQuery(); 149 149 virtual bool handle(); … … 152 152 class CommandLineDialog::FileCommandLineQuery : public Dialog::FileQuery { 153 153 public: 154 FileCommandLineQuery( std::string title, std::string _description = "");154 FileCommandLineQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description = ""); 155 155 virtual ~FileCommandLineQuery(); 156 156 virtual bool handle(); … … 159 159 class CommandLineDialog::FilesCommandLineQuery : public Dialog::FilesQuery { 160 160 public: 161 FilesCommandLineQuery( std::string title, std::string _description = "");161 FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string title, std::string _description = ""); 162 162 virtual ~FilesCommandLineQuery(); 163 163 virtual bool handle(); … … 166 166 class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery { 167 167 public: 168 RandomNumberDistribution_ParametersCommandLineQuery( std::string title, std::string _description = "");168 RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description = ""); 169 169 virtual ~RandomNumberDistribution_ParametersCommandLineQuery(); 170 170 virtual bool handle(); -
src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp
r5ffa05 rbd81f9 26 26 27 27 28 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery( std::string title, std::string _description) :29 Dialog::DoubleQuery( title, _description)28 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(Parameter<double> ¶m, std::string title, std::string _description) : 29 Dialog::DoubleQuery(param, title, _description) 30 30 {} 31 31 … … 34 34 bool CommandLineDialog::DoubleCommandLineQuery::handle() { 35 35 if (CommandLineParser::getInstance().vm.count(getTitle())) { 36 tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();36 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<double>()); 37 37 return true; 38 38 } else { -
src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery( std::string title, std::string _description) :28 Dialog::DoublesQuery( title, _description)27 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description) : 28 Dialog::DoublesQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::DoublesCommandLineQuery::handle() { 34 34 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> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp
r5ffa05 rbd81f9 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery( std::string title, std::string _description) :31 Dialog::ElementQuery( title, _description)30 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(Parameter<const element*> ¶m, std::string title, std::string _description) : 31 Dialog::ElementQuery(param, title, _description) 32 32 {} 33 33 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 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"); 44 44 return true; 45 45 } else { -
src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp
r5ffa05 rbd81f9 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery( std::string title, std::string _description) :31 Dialog::ElementsQuery( title, _description)30 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(Parameter<std::vector<const element*> > ¶m, std::string title, std::string _description) : 31 Dialog::ElementsQuery(param, title, _description) 32 32 {} 33 33 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >(); 42 vector<const element *> temp_elements; 42 43 for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) { 43 44 temp = periode->FindElement(*ZRunner); 44 45 ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery"); 45 t mp.push_back(temp);46 temp_elements.push_back(temp); 46 47 } 48 tmp.set(temp_elements); 47 49 return true; 48 50 } else { -
src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery( std::string title, std::string _description) :28 Dialog::FileQuery( title, _description)27 CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description) : 28 Dialog::FileQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::FileCommandLineQuery::handle() { 34 34 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 >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery( std::string title, std::string _description) :28 Dialog::FilesQuery( title, _description)27 CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string title, std::string _description) : 28 Dialog::FilesQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::FilesCommandLineQuery::handle() { 34 34 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> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery( std::string title, std::string _description) :28 Dialog::IntQuery( title, _description)27 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(Parameter<int> ¶m, std::string title, std::string _description) : 28 Dialog::IntQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::IntCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<int>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery( std::string title, std::string _description) :28 Dialog::IntsQuery( title, _description)27 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string _description) : 28 Dialog::IntsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::IntsCommandLineQuery::handle() { 34 34 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> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp
r5ffa05 rbd81f9 28 28 #include "CodePatterns/Verbose.hpp" 29 29 30 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery( std::string title, std::string _description) :31 Dialog::MoleculeQuery( title, _description)30 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description) : 31 Dialog::MoleculeQuery(param, title, _description) 32 32 {} 33 33 … … 38 38 if (CommandLineParser::getInstance().vm.count(getTitle())) { 39 39 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 40 tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));40 tmp.set(World::getInstance().getMolecule(MoleculeById(IdxOfMol))); 41 41 return true; 42 42 } else { -
src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp
r5ffa05 rbd81f9 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery( std::string title, std::string _description) :32 Dialog::MoleculesQuery( title, _description)31 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description) : 32 Dialog::MoleculesQuery(param, title, _description) 33 33 {} 34 34 … … 39 39 if (CommandLineParser::getInstance().vm.count(getTitle())) { 40 40 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 41 std::vector<const molecule *> temp_molecules; 41 42 for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) { 42 43 temp = World::getInstance().getMolecule(MoleculeById(*iter)); 43 44 if (temp) 44 t mp.push_back(temp);45 temp_molecules.push_back(temp); 45 46 } 47 tmp.set(temp_molecules); 46 48 return true; 47 49 } else { -
src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp
r5ffa05 rbd81f9 31 31 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp" 32 32 33 CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery( std::string title, std::string _description) :34 Dialog::RandomNumberDistribution_ParametersQuery( title, _description)33 CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description) : 34 Dialog::RandomNumberDistribution_ParametersQuery(param, title, _description) 35 35 {} 36 36 … … 42 42 std::stringstream text(stringtext); 43 43 // 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); 45 47 return true; 46 48 } else { -
src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery( std::string title, std::string _description) :28 Dialog::StringQuery( title, _description)27 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(Parameter<std::string> ¶m, std::string title, std::string _description) : 28 Dialog::StringQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::StringCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<string>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery( std::string title, std::string _description) :28 Dialog::StringsQuery( title, _description)27 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description) : 28 Dialog::StringsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::StringsCommandLineQuery::handle() { 34 34 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> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery( std::string title, std::string _description) :28 Dialog::UnsignedIntQuery( title, _description)27 CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(Parameter<unsigned int> ¶m, std::string title, std::string _description) : 28 Dialog::UnsignedIntQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::UnsignedIntCommandLineQuery::handle() { 34 34 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>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery( std::string title, std::string _description) :28 Dialog::UnsignedIntsQuery( title, _description)27 CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string _description) : 28 Dialog::UnsignedIntsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::UnsignedIntsCommandLineQuery::handle() { 34 34 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> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp
r5ffa05 rbd81f9 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery( std::string title, bool _check, std::string _description) :32 Dialog::VectorQuery( title,_check, _description)31 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(Parameter<Vector> ¶m, std::string title, bool _check, std::string _description) : 32 Dialog::VectorQuery(param, title,_check, _description) 33 33 {} 34 34 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >(); 42 tmp= temp.toVector();43 if ((check) && (!World::getInstance().getDomain().isValid(t mp))) {44 ELOG(1, "Vector " << t mp<< " 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."); 45 45 return false; 46 46 } 47 tmp.set(temp_vector); 47 48 return true; 48 49 } else { -
src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp
r5ffa05 rbd81f9 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery( std::string title, bool _check, std::string _description) :32 Dialog::VectorsQuery( title,_check, _description)31 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(Parameter<std::vector<Vector> > ¶m, std::string title, bool _check, std::string _description) : 32 Dialog::VectorsQuery(param, title,_check, _description) 33 33 {} 34 34 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >(); 42 std::vector<Vector> temp_vectors; 42 43 for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) { 43 44 temp = (*iter).toVector(); 44 45 if ((!check) || (World::getInstance().getDomain().isValid(temp))) 45 t mp.push_back(temp);46 temp_vectors.push_back(temp); 46 47 else 47 48 ELOG(1, "Vector " << temp << " would be outside of box domain."); 48 49 } 50 tmp.set(temp_vectors); 49 51 return true; 50 52 } else { -
src/UIElements/CommandLineUI/TypeEnumContainer.cpp
r5ffa05 rbd81f9 31 31 32 32 #include "Atom/atom.hpp" 33 #include "Box.hpp"34 33 #include "LinearAlgebra/BoxVector.hpp" 34 #include "LinearAlgebra/RealSpaceMatrix.hpp" 35 35 #include "LinearAlgebra/Vector.hpp" 36 36 #include "Element/element.hpp" … … 45 45 TypeEnumMap[&typeid(void)] = NoneType; 46 46 TypeEnumMap[&typeid(bool)] = BooleanType; 47 TypeEnumMap[&typeid( Box)] = BoxType;47 TypeEnumMap[&typeid(RealSpaceMatrix)] = RealSpaceMatrixType; 48 48 TypeEnumMap[&typeid(BoxVector)] = VectorType; 49 49 TypeEnumMap[&typeid(Vector)] = VectorType; -
src/UIElements/CommandLineUI/TypeEnumContainer.hpp
r5ffa05 rbd81f9 28 28 enum EnumOfTypes { NoneType, 29 29 BooleanType, 30 BoxType,31 30 FileType, 32 31 ListOfFilesType, … … 47 46 ElementType, 48 47 ListOfElementsType, 49 RandomNumberDistribution_ParametersType 48 RandomNumberDistribution_ParametersType, 49 RealSpaceMatrixType 50 50 }; 51 51 -
src/UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistencyUnitTest.cpp
r5ffa05 rbd81f9 28 28 #include "Actions/ActionTrait.hpp" 29 29 #include "UIElements/CommandLineUI/CommandLineParser.hpp" 30 #include "World.hpp" 31 #include "WorldTime.hpp" 30 32 31 33 #include "CommandLineParser_ActionRegistry_ConsistencyUnitTest.hpp" … … 45 47 void CommandLineParser_ActionRegistry_ConsistencyTest::setUp() 46 48 { 47 AR = ActionRegistry::getPointer();49 CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer()); 48 50 CLP = CommandLineParser::getPointer(); 49 51 }; … … 54 56 CommandLineParser::purgeInstance(); 55 57 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(); 56 63 }; 57 64 -
src/UIElements/Dialog.cpp
r5ffa05 rbd81f9 26 26 #include "CodePatterns/Verbose.hpp" 27 27 28 #include "Parameters/ParameterExceptions.hpp" 29 28 30 class Atom; 29 class Box;30 31 class element; 31 32 class RealSpaceMatrix; … … 65 66 bool retval = true; 66 67 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 } 68 76 // if any query fails (is canceled), we can end the handling process 69 77 if(!retval) { … … 78 86 list<Query*>::iterator iter; 79 87 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 } 81 95 } 82 96 } … … 86 100 } 87 101 88 template <> void Dialog::query<void *>( const char *token, std::string description)102 template <> void Dialog::query<void *>(Parameter<void *> ¶m, const char *token, std::string description) 89 103 { 90 104 queryEmpty(token, description); 91 105 } 92 106 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); 107 template <> void Dialog::query<bool>(Parameter<bool> ¶m, const char *token, std::string description) 108 { 109 queryBoolean(param, token, description); 110 } 111 112 template <> void Dialog::query<int>(Parameter<int> ¶m, const char *token, std::string description) 113 { 114 queryInt(param, token, description); 115 } 116 117 template <> void Dialog::query< std::vector<int> >(Parameter<std::vector<int> > ¶m, const char *token, std::string description) 118 { 119 queryInts(param, token, description); 120 } 121 122 template <> void Dialog::query<unsigned int>(Parameter<unsigned int> ¶m, const char *token, std::string description) 123 { 124 queryUnsignedInt(param, token, description); 125 } 126 127 template <> void Dialog::query< std::vector<unsigned int> >(Parameter<std::vector<unsigned int> > ¶m, const char *token, std::string description) 128 { 129 queryUnsignedInts(param, token, description); 130 } 131 132 template <> void Dialog::query<double>(Parameter<double> ¶m, const char *token, std::string description) 133 { 134 queryDouble(param, token, description); 135 } 136 137 template <> void Dialog::query< std::vector<double> >(Parameter<std::vector<double> > ¶m, const char *token, std::string description) 138 { 139 queryDoubles(param, token, description); 140 } 141 142 template <> void Dialog::query<std::string>(Parameter<std::string> ¶m, const char *token, std::string description) 143 { 144 queryString(param, token, description); 145 } 146 147 template <> void Dialog::query< std::vector<std::string> >(Parameter<std::vector<std::string> > ¶m, const char *token, std::string description) 148 { 149 queryStrings(param, token, description); 150 } 151 152 template <> void Dialog::query<const atom *>(Parameter<const atom *> ¶m, const char *token, std::string description) 153 { 154 queryAtom(param, token, description); 155 } 156 157 template <> void Dialog::query< std::vector<const atom *> >(Parameter<std::vector<const atom *> > ¶m, const char *token, std::string description) 158 { 159 queryAtoms(param, token, description); 160 } 161 162 template <> void Dialog::query<const molecule *>(Parameter<const molecule *> ¶m, const char *token, std::string description) 163 { 164 queryMolecule(param, token, description); 165 } 166 167 template <> void Dialog::query< std::vector<const molecule *> >(Parameter<std::vector<const molecule *> > ¶m, const char *token, std::string description) 168 { 169 queryMolecules(param, token, description); 170 } 171 172 template <> void Dialog::query<Vector>(Parameter<Vector> ¶m, const char *token, std::string description) 173 { 174 queryVector(param, token, false, description); 175 } 176 177 template <> void Dialog::query< std::vector<Vector> >(Parameter<std::vector<Vector> > ¶m, const char *token, std::string description) 178 { 179 queryVectors(param, token, false, description); 180 } 181 182 template <> void Dialog::query<BoxVector>(Parameter<BoxVector> ¶m, const char *token, std::string description) 183 { 184 ASSERT(0, "TODO: query<BoxVector>"); 185 //queryVector(param, token, true, description); 186 } 187 188 template <> void Dialog::query< std::vector<BoxVector> >(Parameter<std::vector<BoxVector> > ¶m, const char *token, std::string description) 189 { 190 ASSERT(0, "TODO: query<vector<BoxVector> >"); 191 //queryVectors(param, token, true, description); 192 } 193 194 template <> void Dialog::query<RealSpaceMatrix>(Parameter<RealSpaceMatrix> ¶m, const char *token, std::string description) 195 { 196 queryRealSpaceMatrix(param, token, description); 197 } 198 199 template <> void Dialog::query<const element *>(Parameter<const element *> ¶m, const char *token, std::string description) 200 { 201 queryElement(param, token, description); 202 } 203 204 template <> void Dialog::query< std::vector<const element *> >(Parameter<std::vector<const element *> > ¶m, const char *token, std::string description) 205 { 206 queryElements(param, token, description); 207 } 208 209 template <> void Dialog::query< boost::filesystem::path >(Parameter<boost::filesystem::path> ¶m, const char *token, std::string description) 210 { 211 queryFile(param, token, description); 212 } 213 214 template <> void Dialog::query< std::vector<boost::filesystem::path> >(Parameter<std::vector< boost::filesystem::path> > ¶m, const char *token, std::string description) 215 { 216 queryFiles(param, token, description); 217 } 218 219 template <> void Dialog::query< RandomNumberDistribution_Parameters >(Parameter<RandomNumberDistribution_Parameters> ¶m, const char *token, std::string description) 220 { 221 queryRandomNumberDistribution_Parameters(param, token, description); 206 222 } 207 223 -
src/UIElements/Dialog.hpp
r5ffa05 rbd81f9 20 20 21 21 #include <boost/filesystem.hpp> 22 #include " Box.hpp"22 #include "LinearAlgebra/RealSpaceMatrix.hpp" 23 23 #include "LinearAlgebra/Vector.hpp" 24 24 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp" 25 #include "Parameters/Parameter.hpp" 25 26 26 27 class atom; 27 class Box;28 class RealSpaceMatrix; 28 29 class element; 29 30 class molecule; … … 155 156 virtual ~Dialog(); 156 157 157 template <class T> void query( const char *, std::string = "");158 template <class T> void query(Parameter<T> &, const char *, std::string = ""); 158 159 159 160 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 query Box(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; 181 182 182 183 virtual bool display(); … … 265 266 class BooleanQuery : public Query { 266 267 public: 267 BooleanQuery( std::string title, std::string _description = "");268 BooleanQuery(Parameter<bool> ¶m, std::string title, std::string _description = ""); 268 269 virtual ~BooleanQuery(); 269 270 virtual bool handle()=0; 270 271 virtual void setResult(); 271 272 protected: 272 booltmp;273 Parameter<bool> &tmp; 273 274 }; 274 275 275 276 class IntQuery : public Query { 276 277 public: 277 IntQuery( std::string title, std::string _description = "");278 IntQuery(Parameter<int> ¶m, std::string title, std::string _description = ""); 278 279 virtual ~IntQuery(); 279 280 virtual bool handle()=0; 280 281 virtual void setResult(); 281 282 protected: 282 inttmp;283 Parameter<int> &tmp; 283 284 }; 284 285 285 286 class IntsQuery : public Query { 286 287 public: 287 IntsQuery( std::string title, std::string _description = "");288 IntsQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = ""); 288 289 virtual ~IntsQuery(); 289 290 virtual bool handle()=0; … … 291 292 protected: 292 293 int temp; 293 std::vector<int>tmp;294 Parameter<std::vector<int> > &tmp; 294 295 }; 295 296 296 297 class UnsignedIntQuery : public Query { 297 298 public: 298 UnsignedIntQuery( std::string title, std::string _description = "");299 UnsignedIntQuery(Parameter<unsigned int> &, std::string title, std::string _description = ""); 299 300 virtual ~UnsignedIntQuery(); 300 301 virtual bool handle()=0; 301 302 virtual void setResult(); 302 303 protected: 303 unsigned inttmp;304 Parameter<unsigned int> &tmp; 304 305 }; 305 306 306 307 class UnsignedIntsQuery : public Query { 307 308 public: 308 UnsignedIntsQuery( std::string title, std::string _description = "");309 UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = ""); 309 310 virtual ~UnsignedIntsQuery(); 310 311 virtual bool handle()=0; … … 312 313 protected: 313 314 unsigned int temp; 314 std::vector<unsigned int>tmp;315 Parameter<std::vector<unsigned int> > &tmp; 315 316 }; 316 317 317 318 class DoubleQuery : public Query { 318 319 public: 319 DoubleQuery( std::string title, std::string _description = "");320 DoubleQuery(Parameter<double> &, std::string title, std::string _description = ""); 320 321 virtual ~DoubleQuery(); 321 322 virtual bool handle()=0; 322 323 virtual void setResult(); 323 324 protected: 324 doubletmp;325 Parameter<double> &tmp; 325 326 }; 326 327 327 328 class DoublesQuery : public Query { 328 329 public: 329 DoublesQuery( std::string title, std::string _description = "");330 DoublesQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = ""); 330 331 virtual ~DoublesQuery(); 331 332 virtual bool handle()=0; … … 333 334 protected: 334 335 double temp; 335 std::vector<double>tmp;336 Parameter<std::vector<double> > &tmp; 336 337 }; 337 338 338 339 class StringQuery : public Query { 339 340 public: 340 StringQuery( std::string title, std::string _description = "");341 StringQuery(Parameter<std::string> ¶m, std::string title, std::string _description = ""); 341 342 virtual ~StringQuery(); 342 343 virtual bool handle()=0; 343 344 virtual void setResult(); 344 345 protected: 345 std::stringtmp;346 Parameter<std::string> &tmp; 346 347 }; 347 348 348 349 class StringsQuery : public Query { 349 350 public: 350 StringsQuery( std::string title, std::string _description = "");351 StringsQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description = ""); 351 352 virtual ~StringsQuery(); 352 353 virtual bool handle()=0; … … 354 355 protected: 355 356 std::string temp; 356 std::vector<std::string>tmp;357 Parameter<std::vector<std::string> > &tmp; 357 358 }; 358 359 359 360 class MoleculeQuery : public Query { 360 361 public: 361 MoleculeQuery( std::string title, std::string _description = "");362 MoleculeQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description = ""); 362 363 virtual ~MoleculeQuery(); 363 364 virtual bool handle()=0; 364 365 virtual void setResult(); 365 366 protected: 366 const molecule *tmp;367 Parameter<const molecule *> &tmp; 367 368 }; 368 369 369 370 class MoleculesQuery : public Query { 370 371 public: 371 MoleculesQuery( std::string title, std::string _description = "");372 MoleculesQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description = ""); 372 373 virtual ~MoleculesQuery(); 373 374 virtual bool handle()=0; … … 375 376 protected: 376 377 const molecule * temp; 377 std::vector<const molecule *>tmp;378 Parameter<std::vector<const molecule *> > &tmp; 378 379 }; 379 380 380 381 class AtomQuery : public Query { 381 382 public: 382 AtomQuery( std::string title, std::string _description = "");383 AtomQuery(Parameter<const atom *> ¶m, std::string title, std::string _description = ""); 383 384 virtual ~AtomQuery(); 384 385 virtual bool handle()=0; 385 386 virtual void setResult(); 386 387 protected: 387 const atom *tmp;388 Parameter<const atom *> &tmp; 388 389 }; 389 390 390 391 class AtomsQuery : public Query { 391 392 public: 392 AtomsQuery( std::string title, std::string _description = "");393 AtomsQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description = ""); 393 394 virtual ~AtomsQuery(); 394 395 virtual bool handle()=0; … … 396 397 protected: 397 398 const atom *temp; 398 std::vector<const atom *>tmp;399 Parameter<std::vector<const atom *> > &tmp; 399 400 }; 400 401 401 402 class VectorQuery : public Query { 402 403 public: 403 VectorQuery( std::string title,bool _check, std::string _description = "");404 VectorQuery(Parameter<Vector> ¶m, std::string title,bool _check, std::string _description = ""); 404 405 virtual ~VectorQuery(); 405 406 virtual bool handle()=0; 406 407 virtual void setResult(); 407 408 protected: 408 Vectortmp;409 Parameter<Vector> &tmp; 409 410 bool check; 410 411 }; … … 412 413 class VectorsQuery : public Query { 413 414 public: 414 VectorsQuery( std::string title,bool _check, std::string _description = "");415 VectorsQuery(Parameter<std::vector<Vector> > ¶m, std::string title,bool _check, std::string _description = ""); 415 416 virtual ~VectorsQuery(); 416 417 virtual bool handle()=0; … … 418 419 protected: 419 420 Vector temp; 420 std::vector<Vector>tmp;421 Parameter<std::vector<Vector> > &tmp; 421 422 bool check; 422 423 }; 423 424 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> ¶m, std::string title, std::string _description = ""); 428 virtual ~RealSpaceMatrixQuery(); 428 429 virtual bool handle()=0; 429 430 virtual void setResult(); 430 431 protected: 431 Boxtmp;432 Parameter<RealSpaceMatrix> &tmp; 432 433 }; 433 434 434 435 class ElementQuery : public Query { 435 436 public: 436 ElementQuery( std::string title, std::string _description = "");437 ElementQuery(Parameter<const element*> ¶m, std::string title, std::string _description = ""); 437 438 virtual ~ElementQuery(); 438 439 virtual bool handle()=0; 439 440 virtual void setResult(); 440 441 protected: 441 const element *tmp;442 Parameter<const element *> &tmp; 442 443 }; 443 444 444 445 class ElementsQuery : public Query { 445 446 public: 446 ElementsQuery( std::string title, std::string _description = "");447 ElementsQuery(Parameter<std::vector<const element *> > ¶m, std::string title, std::string _description = ""); 447 448 virtual ~ElementsQuery(); 448 449 virtual bool handle()=0; … … 450 451 protected: 451 452 const element *temp; 452 std::vector<const element *>tmp;453 Parameter<std::vector<const element *> > &tmp; 453 454 }; 454 455 455 456 class FileQuery : public Query { 456 457 public: 457 FileQuery( std::string title, std::string _description = "");458 FileQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description = ""); 458 459 virtual ~FileQuery(); 459 460 virtual bool handle()=0; 460 461 virtual void setResult(); 461 462 protected: 462 boost::filesystem::pathtmp;463 Parameter<boost::filesystem::path> &tmp; 463 464 }; 464 465 465 466 class FilesQuery : public Query { 466 467 public: 467 FilesQuery( std::string title, std::string _description = "");468 FilesQuery(Parameter<std::vector<boost::filesystem::path> > ¶m, std::string title, std::string _description = ""); 468 469 virtual ~FilesQuery(); 469 470 virtual bool handle()=0; 470 471 virtual void setResult(); 471 472 protected: 472 std::vector<boost::filesystem::path>tmp;473 Parameter<std::vector<boost::filesystem::path> > &tmp; 473 474 }; 474 475 475 476 class RandomNumberDistribution_ParametersQuery : public Query { 476 477 public: 477 RandomNumberDistribution_ParametersQuery( std::string title, std::string _description = "");478 RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description = ""); 478 479 virtual ~RandomNumberDistribution_ParametersQuery(); 479 480 virtual bool handle()=0; 480 481 virtual void setResult(); 481 482 protected: 482 RandomNumberDistribution_Parameterstmp;483 Parameter<RandomNumberDistribution_Parameters> &tmp; 483 484 }; 484 485 -
src/UIElements/Makefile.am
r5ffa05 rbd81f9 5 5 UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp \ 6 6 UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp \ 7 UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp \8 7 UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp \ 9 8 UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp \ … … 17 16 UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp \ 18 17 UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp \ 18 UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp \ 19 19 UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp \ 20 20 UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp \ … … 75 75 UIElements/TextUI/Query/AtomTextQuery.cpp \ 76 76 UIElements/TextUI/Query/BooleanTextQuery.cpp \ 77 UIElements/TextUI/Query/BoxTextQuery.cpp \78 77 UIElements/TextUI/Query/DoubleTextQuery.cpp \ 79 78 UIElements/TextUI/Query/DoublesTextQuery.cpp \ … … 87 86 UIElements/TextUI/Query/MoleculesTextQuery.cpp \ 88 87 UIElements/TextUI/Query/MoleculeTextQuery.cpp \ 88 UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp \ 89 89 UIElements/TextUI/Query/StringTextQuery.cpp \ 90 90 UIElements/TextUI/Query/StringsTextQuery.cpp \ … … 125 125 UIElements/Query/AtomsQuery.cpp \ 126 126 UIElements/Query/BooleanQuery.cpp \ 127 UIElements/Query/BoxQuery.cpp \128 127 UIElements/Query/DoubleQuery.cpp \ 129 128 UIElements/Query/DoublesQuery.cpp \ … … 139 138 UIElements/Query/Query.cpp \ 140 139 UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp \ 140 UIElements/Query/RealSpaceMatrixQuery.cpp \ 141 141 UIElements/Query/StringQuery.cpp \ 142 142 UIElements/Query/StringsQuery.cpp \ … … 161 161 UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp \ 162 162 UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp \ 163 UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp \164 163 UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp \ 165 164 UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp \ … … 175 174 UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp \ 176 175 UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp \ 176 UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp \ 177 177 UIElements/Qt4/Query/AtomQtQuery.cpp \ 178 178 UIElements/Qt4/Query/AtomsQtQuery.cpp \ 179 179 UIElements/Qt4/Query/BooleanQtQuery.cpp \ 180 UIElements/Qt4/Query/BoxQtQuery.cpp \181 180 UIElements/Qt4/Query/DoubleQtQuery.cpp \ 182 181 UIElements/Qt4/Query/DoublesQtQuery.cpp \ … … 190 189 UIElements/Qt4/Query/MoleculeQtQuery.cpp \ 191 190 UIElements/Qt4/Query/MoleculesQtQuery.cpp \ 191 UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp \ 192 192 UIElements/Qt4/Query/StringQtQuery.cpp \ 193 193 UIElements/Qt4/Query/StringsQtQuery.cpp \ … … 219 219 UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp \ 220 220 UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp \ 221 UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp \222 221 UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp \ 223 222 UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp \ … … 229 228 UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp \ 230 229 UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp \ 230 UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp \ 231 231 UIElements/Qt4/Pipe/StringQtQueryPipe.hpp \ 232 232 UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp \ … … 269 269 $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \ 270 270 $(BOOST_RANDOM_LDFLAGS) \ 271 $(BOOST_SERIALIZATION_LDFLAGS) 271 272 $(BOOST_SYSTEM_LDFLAGS) \ 272 273 $(BOOST_THREAD_LDFLAGS) … … 284 285 libMolecuilderFragmentation.la \ 285 286 libMolecuilderParser.la \ 287 libMolecuilderParameters.la \ 286 288 libMolecuilderShapes.la \ 287 289 libMolecuilderLinkedCell.la \ … … 297 299 libMolecuilderUI_la_LIBADD += \ 298 300 ${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) 303 306 304 307 nobase_libMolecuilderUI_la_include_HEADERS = ${UIHEADER} -
src/UIElements/Menu/Menu.cpp
r5ffa05 rbd81f9 106 106 void Menu::populateActions() 107 107 { 108 // go through all actions and add those belon ing to this menu108 // go through all actions and add those belonging to this menu 109 109 ActionRegistry &AR = ActionRegistry::getInstance(); 110 110 for (ActionRegistry::const_iterator iter = AR.getBeginIter(); -
src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp
r5ffa05 rbd81f9 26 26 #include "Actions/ActionRegistry.hpp" 27 27 #include "Actions/ActionTrait.hpp" 28 #include "World.hpp" 29 #include "WorldTime.hpp" 28 30 29 31 #include "MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp" … … 43 45 void MenuDescription_ActionRegistry_ConsistencyTest::setUp() 44 46 { 45 AR = ActionRegistry::getPointer();47 CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer()); 46 48 }; 47 49 … … 50 52 { 51 53 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(); 52 59 }; 53 60 -
src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp
r5ffa05 rbd81f9 28 28 29 29 30 AtomQtQueryPipe::AtomQtQueryPipe( const atom **_content, QtDialog *_dialog, QComboBox *_theBox) :30 AtomQtQueryPipe::AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox) : 31 31 content(_content), 32 32 dialog(_dialog), … … 40 40 QVariant data = theBox->itemData(newIndex); 41 41 int idx = data.toInt(); 42 (*content) = World::getInstance().getAtom(AtomById(idx));42 content.set(World::getInstance().getAtom(AtomById(idx))); 43 43 dialog->update(); 44 44 } -
src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 25 26 Q_OBJECT 26 27 public: 27 AtomQtQueryPipe( const atom **_content, QtDialog *_dialog, QComboBox *_theBox);28 AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox); 28 29 virtual ~AtomQtQueryPipe(); 29 30 … … 32 33 33 34 private: 34 const atom **content;35 Parameter<const atom *> &content; 35 36 QtDialog *dialog; 36 37 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp
r5ffa05 rbd81f9 30 30 31 31 32 AtomsQtQueryPipe::AtomsQtQueryPipe( std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList) :32 AtomsQtQueryPipe::AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList) : 33 33 content(_content), 34 34 dialog(_dialog), … … 41 41 void AtomsQtQueryPipe::update() { 42 42 // clear target and put all atoms therein 43 (*content).clear();43 std::vector<const atom *> temp_atoms; 44 44 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); 46 47 dialog->update(); 47 48 } … … 53 54 atom *Walker = World::getInstance().getAtom(AtomById(index)); 54 55 if (Walker) { 55 (*content).push_back(Walker);56 56 currentList.insert(Walker); 57 57 if (lookup.find(index) != lookup.end()) -
src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 29 30 Q_OBJECT 30 31 public: 31 AtomsQtQueryPipe( std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList);32 AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList); 32 33 virtual ~AtomsQtQueryPipe(); 33 34 … … 38 39 39 40 private: 40 std::vector<const atom *>*content;41 Parameter<std::vector<const atom *> > &content; 41 42 std::map<int, const atom *> lookup; 42 43 std::set<const atom *> currentList; -
src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp
r5ffa05 rbd81f9 25 25 #include "CodePatterns/MemDebug.hpp" 26 26 27 BooleanQtQueryPipe::BooleanQtQueryPipe( bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :27 BooleanQtQueryPipe::BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) : 28 28 content(_content), 29 29 dialog(_dialog), … … 35 35 36 36 void BooleanQtQueryPipe::update(int state) { 37 (*content) =(state == Qt::Checked);37 content.set(state == Qt::Checked); 38 38 dialog->update(); 39 39 } -
src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 23 24 Q_OBJECT 24 25 public: 25 BooleanQtQueryPipe( bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);26 BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox); 26 27 virtual ~BooleanQtQueryPipe(); 27 28 … … 30 31 31 32 private: 32 bool *content;33 Parameter<bool> &content; 33 34 QtDialog *dialog; 34 35 QCheckBox *booleanCheckBox; -
src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp
r5ffa05 rbd81f9 23 23 #include "CodePatterns/MemDebug.hpp" 24 24 25 DoubleQtQueryPipe::DoubleQtQueryPipe( double *_content, QtDialog *_dialog) :25 DoubleQtQueryPipe::DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog) : 26 26 content(_content), 27 27 dialog(_dialog) … … 32 32 33 33 void DoubleQtQueryPipe::update(double newDbl) { 34 (*content) = newDbl;34 content.set(newDbl); 35 35 dialog->update(); 36 36 } -
src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 22 23 Q_OBJECT 23 24 public: 24 DoubleQtQueryPipe( double *_content, QtDialog *_dialog);25 DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog); 25 26 virtual ~DoubleQtQueryPipe(); 26 27 … … 29 30 30 31 private: 31 double *content;32 Parameter<double> &content; 32 33 QtDialog *dialog; 33 34 -
src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp
r5ffa05 rbd81f9 29 29 30 30 31 ElementQtQueryPipe::ElementQtQueryPipe( const element **_content, QtDialog *_dialog, QComboBox *_theBox) :31 ElementQtQueryPipe::ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox) : 32 32 content(_content), 33 33 dialog(_dialog), … … 41 41 QVariant data = theBox->itemData(newIndex); 42 42 int idx = data.toInt(); 43 *content = World::getInstance().getPeriode()->FindElement(idx);43 content.set(World::getInstance().getPeriode()->FindElement(idx)); 44 44 dialog->update(); 45 45 } -
src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 25 26 Q_OBJECT 26 27 public: 27 ElementQtQueryPipe( const element **_content, QtDialog *_dialog, QComboBox *_theBox);28 ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox); 28 29 virtual ~ElementQtQueryPipe(); 29 30 … … 32 33 33 34 private: 34 const element **content;35 Parameter<const element *> &content; 35 36 QtDialog *dialog; 36 37 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp
r5ffa05 rbd81f9 31 31 32 32 33 ElementsQtQueryPipe::ElementsQtQueryPipe( std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox) :33 ElementsQtQueryPipe::ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox) : 34 34 content(_content), 35 35 dialog(_dialog), … … 44 44 int idx = data.toInt(); 45 45 const element *elemental = World::getInstance().getPeriode()->FindElement(idx); 46 std::vector<const element *> temp_elements; 46 47 if(elemental) 47 (*content).push_back(elemental); 48 temp_elements.push_back(elemental); 49 content.set(temp_elements); 48 50 dialog->update(); 49 51 } -
src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 28 29 Q_OBJECT 29 30 public: 30 ElementsQtQueryPipe( std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox);31 ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox); 31 32 virtual ~ElementsQtQueryPipe(); 32 33 … … 35 36 36 37 private: 37 std::vector<const element *>*content;38 Parameter<std::vector<const element *> > &content; 38 39 QtDialog *dialog; 39 40 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp
r5ffa05 rbd81f9 31 31 #include "UIElements/Qt4/QtDialog.hpp" 32 32 33 FileQtQueryPipe::FileQtQueryPipe( boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :33 FileQtQueryPipe::FileQtQueryPipe(Parameter<boost::filesystem::path> &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) : 34 34 content(_content), 35 35 dialog(_dialog), … … 49 49 QStringList ListOfFilenames = theFileDialog->selectedFiles(); 50 50 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())); 53 53 dialog->update(); 54 54 } -
src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 27 28 Q_OBJECT 28 29 public: 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); 30 31 virtual ~FileQtQueryPipe(); 31 32 … … 35 36 36 37 private: 37 boost::filesystem::path *content;38 Parameter<boost::filesystem::path> &content; 38 39 QtDialog *dialog; 39 40 QLineEdit *filenameLineEdit; -
src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp
r5ffa05 rbd81f9 24 24 25 25 26 IntQtQueryPipe::IntQtQueryPipe( int *_content, QtDialog *_dialog) :26 IntQtQueryPipe::IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog) : 27 27 content(_content), 28 28 dialog(_dialog) … … 33 33 34 34 void IntQtQueryPipe::update(int newInt) { 35 (*content) = newInt;35 content.set(newInt); 36 36 dialog->update(); 37 37 } -
src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 22 23 Q_OBJECT 23 24 public: 24 IntQtQueryPipe( int *_content, QtDialog *_dialog);25 IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog); 25 26 virtual ~IntQtQueryPipe(); 26 27 … … 29 30 30 31 private: 31 int *content;32 Parameter<int> &content; 32 33 QtDialog *dialog; 33 34 -
src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp
r5ffa05 rbd81f9 29 29 30 30 31 MoleculeQtQueryPipe::MoleculeQtQueryPipe( const molecule **_content, QtDialog *_dialog, QComboBox *_theBox) :31 MoleculeQtQueryPipe::MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox) : 32 32 content(_content), 33 33 dialog(_dialog), … … 41 41 QVariant data = theBox->itemData(newIndex); 42 42 int idx = data.toInt(); 43 (*content) = World::getInstance().getMolecule(MoleculeById(idx));43 content.set(World::getInstance().getMolecule(MoleculeById(idx))); 44 44 dialog->update(); 45 45 } -
src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 25 26 Q_OBJECT 26 27 public: 27 MoleculeQtQueryPipe( const molecule **_content, QtDialog *_dialog, QComboBox *_theBox);28 MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox); 28 29 virtual ~MoleculeQtQueryPipe(); 29 30 … … 32 33 33 34 private: 34 const molecule **content;35 Parameter<const molecule *> &content; 35 36 QtDialog *dialog; 36 37 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp
r5ffa05 rbd81f9 31 31 32 32 33 MoleculesQtQueryPipe::MoleculesQtQueryPipe( std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox) :33 MoleculesQtQueryPipe::MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox) : 34 34 content(_content), 35 35 dialog(_dialog), … … 44 44 int idx = data.toInt(); 45 45 molecule *mol = World::getInstance().getMolecule(MoleculeById(idx)); 46 std::vector<const molecule *> temp_mols; 46 47 if (mol) 47 (*content).push_back(mol); 48 temp_mols.push_back(mol); 49 content.set(temp_mols); 48 50 dialog->update(); 49 51 } -
src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 27 28 Q_OBJECT 28 29 public: 29 MoleculesQtQueryPipe( std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox);30 MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox); 30 31 virtual ~MoleculesQtQueryPipe(); 31 32 … … 34 35 35 36 private: 36 std::vector<const molecule *>*content;37 Parameter<std::vector<const molecule *> > &content; 37 38 QtDialog *dialog; 38 39 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include "QtQueryPipe.hpp" 18 19 … … 23 24 24 25 25 template<typename T> QtQueryListPipe<T>::QtQueryListPipe( std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :26 template<typename T> QtQueryListPipe<T>::QtQueryListPipe(Parameter<std::vector<T> > &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) : 26 27 content(_content), 27 28 dialog(_dialog), -
src/UIElements/Qt4/Pipe/QtQueryPipe.hpp
r5ffa05 rbd81f9 19 19 // since MOC doesn't like nested classes 20 20 21 #include "Parameters/Parameter.hpp" 21 22 #include <Qt/qwidget.h> 22 23 … … 33 34 template<typename T> class QtQueryListPipe : public QWidget { 34 35 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); 36 37 virtual ~QtQueryListPipe(); 37 38 void AddInteger(); … … 44 45 void RemoveRow(int row); 45 46 46 std::vector<T> *content;47 Parameter<std::vector<T> > &content; 47 48 QtDialog *dialog; 48 49 QLineEdit *inputBox; -
src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp
r5ffa05 rbd81f9 30 30 class RandomNumberDistribution_Parameters; 31 31 32 RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe( const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox) :32 RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox) : 33 33 content(_content), 34 34 dialog(_dialog), -
src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 25 26 Q_OBJECT 26 27 public: 27 RandomNumberDistribution_ParametersQtQueryPipe( const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox);28 RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox); 28 29 virtual ~RandomNumberDistribution_ParametersQtQueryPipe(); 29 30 … … 32 33 33 34 private: 34 const RandomNumberDistribution_Parameters *content;35 Parameter<RandomNumberDistribution_Parameters> &content; 35 36 QtDialog *dialog; 36 37 QTextEdit *theBox; -
src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp
r5ffa05 rbd81f9 26 26 27 27 28 StringQtQueryPipe::StringQtQueryPipe( std::string *_content, QtDialog *_dialog) :28 StringQtQueryPipe::StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog) : 29 29 content(_content), 30 30 dialog(_dialog) … … 35 35 36 36 void StringQtQueryPipe::update(const QString& newText) { 37 content ->assign(newText.toStdString());37 content.set(newText.toStdString()); 38 38 dialog->update(); 39 39 } -
src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 24 25 Q_OBJECT 25 26 public: 26 StringQtQueryPipe( std::string *_content, QtDialog *_dialog);27 StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog); 27 28 virtual ~StringQtQueryPipe(); 28 29 … … 31 32 32 33 private: 33 std::string *content;34 Parameter<std::string> &content; 34 35 QtDialog *dialog; 35 36 -
src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp
r5ffa05 rbd81f9 24 24 25 25 26 UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe( unsigned int *_content, QtDialog *_dialog) :26 UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog) : 27 27 content(_content), 28 28 dialog(_dialog) … … 33 33 34 34 void UnsignedIntQtQueryPipe::update(unsigned int newUnsignedInt) { 35 (*content) = newUnsignedInt;35 content.set(newUnsignedInt); 36 36 dialog->update(); 37 37 } -
src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 22 23 Q_OBJECT 23 24 public: 24 UnsignedIntQtQueryPipe( unsigned int *_content, QtDialog *_dialog);25 UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog); 25 26 virtual ~UnsignedIntQtQueryPipe(); 26 27 … … 29 30 30 31 private: 31 unsigned int *content;32 Parameter<unsigned int> &content; 32 33 QtDialog *dialog; 33 34 -
src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp
r5ffa05 rbd81f9 26 26 27 27 28 VectorQtQueryPipe::VectorQtQueryPipe( Vector *_content, QtDialog *_dialog, QComboBox *_theBox) :28 VectorQtQueryPipe::VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox) : 29 29 content(_content), 30 30 dialog(_dialog), … … 36 36 37 37 void VectorQtQueryPipe::updateX(double newDouble) { 38 (*content)[0] = newDouble; 38 Vector v = content.get(); 39 v[0] = newDouble; 40 content.set(v); 39 41 dialog->update(); 40 42 } 41 43 42 44 void VectorQtQueryPipe::updateY(double newDouble) { 43 (*content)[1] = newDouble; 45 Vector v = content.get(); 46 v[1] = newDouble; 47 content.set(v); 44 48 dialog->update(); 45 49 } 46 50 47 51 void VectorQtQueryPipe::updateZ(double newDouble) { 48 (*content)[2] = newDouble; 52 Vector v = content.get(); 53 v[2] = newDouble; 54 content.set(v); 49 55 dialog->update(); 50 56 } -
src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 25 26 Q_OBJECT 26 27 public: 27 VectorQtQueryPipe( Vector *_content, QtDialog *_dialog, QComboBox *_theBox);28 VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox); 28 29 virtual ~VectorQtQueryPipe(); 29 30 … … 34 35 35 36 private: 36 Vector *content;37 Parameter<Vector> &content; 37 38 QtDialog *dialog; 38 39 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp
r5ffa05 rbd81f9 28 28 29 29 30 VectorsQtQueryPipe::VectorsQtQueryPipe( std::vector<Vector> *_content, QtDialog *_dialog, QComboBox *_theBox) :30 VectorsQtQueryPipe::VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox) : 31 31 content(_content), 32 32 dialog(_dialog), -
src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include <Qt/qwidget.h> 18 19 … … 27 28 Q_OBJECT 28 29 public: 29 VectorsQtQueryPipe( std::vector<Vector>*_content, QtDialog *_dialog, QComboBox *_theBox);30 VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox); 30 31 virtual ~VectorsQtQueryPipe(); 31 32 … … 34 35 35 36 private: 36 std::vector<Vector> *content;37 Parameter<std::vector<Vector> > &content; 37 38 QtDialog *dialog; 38 39 QComboBox *theBox; -
src/UIElements/Qt4/QtDialog.cpp
r5ffa05 rbd81f9 80 80 } 81 81 82 void QtDialog::queryBoolean( const char* title,string)82 void QtDialog::queryBoolean(Parameter<bool> ¶m, const char* title,string) 83 83 { 84 registerQuery(new BooleanQtQuery( title,inputLayout,this));84 registerQuery(new BooleanQtQuery(param,title,inputLayout,this)); 85 85 } 86 86 87 void QtDialog::queryAtom( const char* title, std::string)87 void QtDialog::queryAtom(Parameter<const atom *> ¶m, const char* title, std::string) 88 88 { 89 registerQuery(new AtomQtQuery( title,inputLayout,this));89 registerQuery(new AtomQtQuery(param,title,inputLayout,this)); 90 90 } 91 91 92 void QtDialog::queryAtoms( const char* title, std::string)92 void QtDialog::queryAtoms(Parameter<std::vector<const atom *> > ¶m, const char* title, std::string) 93 93 { 94 registerQuery(new AtomsQtQuery( title,inputLayout,this));94 registerQuery(new AtomsQtQuery(param,title,inputLayout,this)); 95 95 } 96 96 97 void QtDialog::query Box(const char* title, std::string)97 void QtDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> ¶m, const char* title, std::string) 98 98 { 99 registerQuery(new BoxQtQuery(title,inputLayout,this));99 registerQuery(new RealSpaceMatrixQtQuery(param,title,inputLayout,this)); 100 100 } 101 101 102 void QtDialog::queryInt( const char *title,string)102 void QtDialog::queryInt(Parameter<int> ¶m, const char *title,string) 103 103 { 104 registerQuery(new IntQtQuery( title,inputLayout,this));104 registerQuery(new IntQtQuery(param,title,inputLayout,this)); 105 105 } 106 106 107 void QtDialog::queryInts( const char *title,string)107 void QtDialog::queryInts(Parameter<std::vector<int> > ¶m, const char *title,string) 108 108 { 109 registerQuery(new IntsQtQuery( title,inputLayout,this));109 registerQuery(new IntsQtQuery(param,title,inputLayout,this)); 110 110 } 111 111 112 void QtDialog::queryUnsignedInt( const char *title,string)112 void QtDialog::queryUnsignedInt(Parameter<unsigned int> ¶m, const char *title,string) 113 113 { 114 registerQuery(new UnsignedIntQtQuery( title,inputLayout,this));114 registerQuery(new UnsignedIntQtQuery(param,title,inputLayout,this)); 115 115 } 116 116 117 void QtDialog::queryUnsignedInts( const char *title,string)117 void QtDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > ¶m, const char *title,string) 118 118 { 119 registerQuery(new UnsignedIntsQtQuery( title,inputLayout,this));119 registerQuery(new UnsignedIntsQtQuery(param,title,inputLayout,this)); 120 120 } 121 121 122 void QtDialog::queryDouble( const char* title,string)122 void QtDialog::queryDouble(Parameter<double> ¶m, const char* title,string) 123 123 { 124 registerQuery(new DoubleQtQuery( title,inputLayout,this));124 registerQuery(new DoubleQtQuery(param,title,inputLayout,this)); 125 125 } 126 126 127 void QtDialog::queryDoubles( const char* title,string)127 void QtDialog::queryDoubles(Parameter<std::vector<double> > ¶m, const char* title,string) 128 128 { 129 registerQuery(new DoublesQtQuery( title,inputLayout,this));129 registerQuery(new DoublesQtQuery(param,title,inputLayout,this)); 130 130 } 131 131 132 void QtDialog::queryString( const char* title,string)132 void QtDialog::queryString(Parameter<std::string> ¶m, const char* title,string) 133 133 { 134 registerQuery(new StringQtQuery( title,inputLayout,this));134 registerQuery(new StringQtQuery(param,title,inputLayout,this)); 135 135 } 136 136 137 void QtDialog::queryStrings( const char* title,string)137 void QtDialog::queryStrings(Parameter<std::vector<std::string> > ¶m, const char* title,string) 138 138 { 139 registerQuery(new StringsQtQuery( title,inputLayout,this));139 registerQuery(new StringsQtQuery(param, title,inputLayout,this)); 140 140 } 141 141 142 void QtDialog::queryMolecule( const char *title,string)142 void QtDialog::queryMolecule(Parameter<const molecule *> ¶m, const char *title,string) 143 143 { 144 registerQuery(new MoleculeQtQuery( title,inputLayout,this));144 registerQuery(new MoleculeQtQuery(param,title,inputLayout,this)); 145 145 } 146 146 147 void QtDialog::queryMolecules( const char *title,string)147 void QtDialog::queryMolecules(Parameter<std::vector<const molecule *> > ¶m, const char *title,string) 148 148 { 149 registerQuery(new MoleculesQtQuery( title,inputLayout,this));149 registerQuery(new MoleculesQtQuery(param, title,inputLayout,this)); 150 150 } 151 151 152 void QtDialog::queryVector( const char* title, bool check,string)152 void QtDialog::queryVector(Parameter<Vector> ¶m, const char* title, bool check,string) 153 153 { 154 registerQuery(new VectorQtQuery( title,check,inputLayout,this));154 registerQuery(new VectorQtQuery(param,title,check,inputLayout,this)); 155 155 } 156 156 157 void QtDialog::queryVectors( const char* title, bool check,string)157 void QtDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, bool check,string) 158 158 { 159 registerQuery(new VectorsQtQuery( title,check,inputLayout,this));159 registerQuery(new VectorsQtQuery(param, title,check,inputLayout,this)); 160 160 } 161 161 162 void QtDialog::queryElement( const char* title, std::string)162 void QtDialog::queryElement(Parameter<const element *> ¶m, const char* title, std::string) 163 163 { 164 registerQuery(new ElementQtQuery( title,inputLayout,this));164 registerQuery(new ElementQtQuery(param,title,inputLayout,this)); 165 165 } 166 166 167 void QtDialog::queryElements( const char* title, std::string)167 void QtDialog::queryElements(Parameter<std::vector<const element *> > ¶m, const char* title, std::string) 168 168 { 169 registerQuery(new ElementsQtQuery( title,inputLayout,this));169 registerQuery(new ElementsQtQuery(param,title,inputLayout,this)); 170 170 } 171 171 172 void QtDialog::queryFile( const char* title, std::string)172 void QtDialog::queryFile(Parameter<boost::filesystem::path> ¶m, const char* title, std::string) 173 173 { 174 registerQuery(new FileQtQuery( title,inputLayout,this));174 registerQuery(new FileQtQuery(param,title,inputLayout,this)); 175 175 } 176 176 177 void QtDialog::queryFiles( const char* title, std::string)177 void QtDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> >¶m, const char* title, std::string) 178 178 { 179 registerQuery(new FilesQtQuery( title,inputLayout,this));179 registerQuery(new FilesQtQuery(param, title,inputLayout,this)); 180 180 } 181 181 182 void QtDialog::queryRandomNumberDistribution_Parameters( const char* title, std::string)182 void QtDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> ¶m, const char* title, std::string) 183 183 { 184 registerQuery(new RandomNumberDistribution_ParametersQtQuery( title,inputLayout,this));184 registerQuery(new RandomNumberDistribution_ParametersQtQuery(param,title,inputLayout,this)); 185 185 } 186 186 -
src/UIElements/Qt4/QtDialog.hpp
r5ffa05 rbd81f9 15 15 16 16 17 #include "Parameters/Parameter.hpp" 17 18 #include "UIElements/Dialog.hpp" 18 19 #include <QtGui/QDialog> … … 33 34 34 35 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 query Box(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 = ""); 56 57 57 58 virtual bool display(); … … 63 64 class AtomsQtQuery; 64 65 class BooleanQtQuery; 65 class BoxQtQuery;66 class RealSpaceMatrixQtQuery; 66 67 class DoubleQtQuery; 67 68 class DoublesQtQuery; -
src/UIElements/Qt4/Query/AtomQtQuery.cpp
r5ffa05 rbd81f9 30 30 #include "World.hpp" 31 31 32 QtDialog::AtomQtQuery::AtomQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::AtomQuery( _title),32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::AtomQuery(param, _title), 34 34 parent(_parent) 35 35 { … … 46 46 thisLayout->addWidget(inputBox); 47 47 48 pipe = new AtomQtQueryPipe( &tmp,_dialog, inputBox);48 pipe = new AtomQtQueryPipe(tmp,_dialog, inputBox); 49 49 pipe->update(inputBox->currentIndex()); 50 50 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/AtomsQtQuery.cpp
r5ffa05 rbd81f9 33 33 34 34 35 QtDialog::AtomsQtQuery::AtomsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :36 Dialog::AtomsQuery( _title),35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 36 Dialog::AtomsQuery(param, _title), 37 37 parent(_parent) 38 38 { … … 67 67 thisHLayout->addLayout(thisV2Layout); 68 68 69 pipe = new AtomsQtQueryPipe( &tmp,_dialog,inputList);69 pipe = new AtomsQtQueryPipe(tmp,_dialog,inputList); 70 70 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 71 71 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add())); -
src/UIElements/Qt4/Query/BooleanQtQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 QtDialog::BooleanQtQuery::BooleanQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :31 Dialog::BooleanQuery( _title),30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 31 Dialog::BooleanQuery(param, _title), 32 32 parent(_parent) 33 33 { 34 if (!param.isSet()) 35 param.set(false); 34 36 thisLayout = new QHBoxLayout(); 35 37 titleLabel = new QLabel(QString(getTitle().c_str()),_dialog); 36 38 booleanCheckBox = new QCheckBox(QString(getTitle().c_str()), _dialog); 39 booleanCheckBox->setCheckState(param.get() ? Qt::Checked : Qt::Unchecked); 37 40 38 41 parent->addLayout(thisLayout); … … 40 43 thisLayout->addWidget(booleanCheckBox); 41 44 42 pipe = new BooleanQtQueryPipe( &tmp,_dialog,booleanCheckBox);45 pipe = new BooleanQtQueryPipe(tmp,_dialog,booleanCheckBox); 43 46 connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int))); 44 47 } -
src/UIElements/Qt4/Query/DoubleQtQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 QtDialog::DoubleQtQuery::DoubleQtQuery( std::string title,QBoxLayout *_parent,QtDialog *_dialog) :31 Dialog::DoubleQuery( title),30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> ¶m, std::string title,QBoxLayout *_parent,QtDialog *_dialog) : 31 Dialog::DoubleQuery(param, title), 32 32 parent(_parent) 33 33 { 34 if (!param.isSet()) 35 param.set(0.0); 34 36 thisLayout = new QHBoxLayout(); 35 37 titleLabel = new QLabel(QString(getTitle().c_str())); 36 38 inputBox = new QDoubleSpinBox(); 37 inputBox->setValue( 0);39 inputBox->setValue(param.get()); 38 40 inputBox->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max()); 39 41 inputBox->setDecimals(3); … … 42 44 thisLayout->addWidget(inputBox); 43 45 44 pipe = new DoubleQtQueryPipe( &tmp,_dialog);46 pipe = new DoubleQtQueryPipe(tmp,_dialog); 45 47 pipe->update(inputBox->value()); 46 48 connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double))); -
src/UIElements/Qt4/Query/DoublesQtQuery.cpp
r5ffa05 rbd81f9 30 30 31 31 32 QtDialog::DoublesQtQuery::DoublesQtQuery( std::string title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::DoublesQuery( title),32 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > ¶m, std::string title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::DoublesQuery(param, title), 34 34 parent(_parent) 35 35 { … … 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<double>( &tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<double>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); -
src/UIElements/Qt4/Query/ElementQtQuery.cpp
r5ffa05 rbd81f9 31 31 #include "World.hpp" 32 32 33 QtDialog::ElementQtQuery::ElementQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :34 Dialog::ElementQuery( _title),33 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 34 Dialog::ElementQuery(param, _title), 35 35 parent(_parent) 36 36 { … … 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new ElementQtQueryPipe( &tmp,_dialog,inputBox);53 pipe = new ElementQtQueryPipe(tmp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/ElementsQtQuery.cpp
r5ffa05 rbd81f9 32 32 33 33 34 QtDialog::ElementsQtQuery::ElementsQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :35 Dialog::ElementsQuery( _title),34 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 35 Dialog::ElementsQuery(param, _title), 36 36 parent(_parent) 37 37 { … … 52 52 thisLayout->addWidget(inputBox); 53 53 54 pipe = new ElementsQtQueryPipe( &tmp,_dialog,inputBox);54 pipe = new ElementsQtQueryPipe(tmp,_dialog,inputBox); 55 55 pipe->update(inputBox->currentIndex()); 56 56 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/FileQtQuery.cpp
r5ffa05 rbd81f9 29 29 30 30 31 QtDialog::FileQtQuery::FileQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :32 Dialog::FileQuery( _title),31 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 32 Dialog::FileQuery(param, _title), 33 33 parent(_parent) 34 34 { … … 43 43 filedialogButton = new QPushButton("&Choose", _dialog); 44 44 45 pipe = new FileQtQueryPipe( &tmp,_dialog,filenameLineEdit,filedialogButton);45 pipe = new FileQtQueryPipe(tmp,_dialog,filenameLineEdit,filedialogButton); 46 46 47 47 thisLayout = new QHBoxLayout(); -
src/UIElements/Qt4/Query/FilesQtQuery.cpp
r5ffa05 rbd81f9 26 26 #include "CodePatterns/MemDebug.hpp" 27 27 28 #include <boost/filesystem/path.hpp> 29 28 30 #include "UIElements/Qt4/Query/QtQuery.hpp" 29 31 #include "UIElements/Qt4/Pipe/QtQueryListPipe.hpp" 30 32 31 33 32 QtDialog::FilesQtQuery::FilesQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :33 Dialog::FilesQuery( _title),34 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 35 Dialog::FilesQuery(param, _title), 34 36 parent(_parent) 35 37 { … … 60 62 thisHLayout->addLayout(thisV2Layout); 61 63 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); 63 65 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 66 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); -
src/UIElements/Qt4/Query/IntQtQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 QtDialog::IntQtQuery::IntQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :31 Dialog::IntQuery( _title),30 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 31 Dialog::IntQuery(param, _title), 32 32 parent(_parent) 33 33 { 34 if (!param.isSet()) 35 param.set(0); 34 36 thisLayout = new QHBoxLayout(); 35 37 titleLabel = new QLabel(QString(getTitle().c_str())); 36 38 inputBox = new QSpinBox(); 37 inputBox->setValue( 0);39 inputBox->setValue(param.get()); 38 40 parent->addLayout(thisLayout); 39 41 thisLayout->addWidget(titleLabel); 40 42 thisLayout->addWidget(inputBox); 41 43 42 pipe = new IntQtQueryPipe( &tmp,_dialog);44 pipe = new IntQtQueryPipe(tmp,_dialog); 43 45 pipe->update(inputBox->value()); 44 46 connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/IntsQtQuery.cpp
r5ffa05 rbd81f9 30 30 31 31 32 QtDialog::IntsQtQuery::IntsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::IntsQuery( _title),32 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::IntsQuery(param, _title), 34 34 parent(_parent) 35 35 { … … 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<int>( &tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); -
src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 QtDialog::MoleculeQtQuery::MoleculeQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :34 Dialog::MoleculeQuery( _title),33 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> ¶m, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) : 34 Dialog::MoleculeQuery(param, _title), 35 35 parent(_parent) 36 36 { … … 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new MoleculeQtQueryPipe( &tmp,_dialog,inputBox);53 pipe = new MoleculeQtQueryPipe(tmp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 QtDialog::MoleculesQtQuery::MoleculesQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :34 Dialog::MoleculesQuery( _title),33 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > ¶m, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) : 34 Dialog::MoleculesQuery(param, _title), 35 35 parent(_parent) 36 36 { … … 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new MoleculesQtQueryPipe( &tmp,_dialog,inputBox);53 pipe = new MoleculesQtQueryPipe(tmp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); -
src/UIElements/Qt4/Query/QtQuery.hpp
r5ffa05 rbd81f9 16 16 17 17 #include "Qt4/QtDialog.hpp" 18 #include "Parameters/Parameter.hpp" 18 19 19 20 class QHBoxLayout; … … 36 37 class AtomsQtQueryPipe; 37 38 class BooleanQtQueryPipe; 38 class BoxQtQueryPipe;39 class RealSpaceMatrixQtQueryPipe; 39 40 class DoubleQtQueryPipe; 40 41 class DoublesQtQueryPipe; … … 43 44 class EmptyQtQueryPipe; 44 45 class FileQtQueryPipe; 46 class FilesQtQueryPipe; 45 47 class IntQtQueryPipe; 46 48 class MoleculeQtQueryPipe; … … 56 58 class QtDialog::AtomQtQuery : public Dialog::AtomQuery { 57 59 public: 58 AtomQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);60 AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 59 61 virtual ~AtomQtQuery(); 60 62 virtual bool handle(); … … 70 72 class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery { 71 73 public: 72 AtomsQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);74 AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 73 75 virtual ~AtomsQtQuery(); 74 76 virtual bool handle(); … … 85 87 class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery { 86 88 public: 87 BooleanQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog);89 BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 88 90 virtual ~BooleanQtQuery(); 89 91 virtual bool handle(); … … 97 99 }; 98 100 99 class QtDialog:: BoxQtQuery : public Dialog::BoxQuery {100 public: 101 BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);102 virtual ~ BoxQtQuery();101 class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery { 102 public: 103 RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 104 virtual ~RealSpaceMatrixQtQuery(); 103 105 virtual bool handle(); 104 106 private: … … 108 110 QTableWidget *inputTable; 109 111 110 BoxQtQueryPipe *pipe;112 RealSpaceMatrixQtQueryPipe *pipe; 111 113 }; 112 114 113 115 class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery { 114 116 public: 115 DoubleQtQuery( std::string title,QBoxLayout *_parent,QtDialog *_dialog);117 DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog); 116 118 virtual ~DoubleQtQuery(); 117 119 virtual bool handle(); … … 127 129 class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery { 128 130 public: 129 DoublesQtQuery( std::string title,QBoxLayout *_parent,QtDialog *_dialog);131 DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog); 130 132 virtual ~DoublesQtQuery(); 131 133 virtual bool handle(); … … 141 143 class QtDialog::ElementQtQuery : public Dialog::ElementQuery { 142 144 public: 143 ElementQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog);145 ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 144 146 virtual ~ElementQtQuery(); 145 147 virtual bool handle(); … … 155 157 class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery { 156 158 public: 157 ElementsQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog);159 ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 158 160 virtual ~ElementsQtQuery(); 159 161 virtual bool handle(); … … 182 184 class QtDialog::FileQtQuery : public Dialog::FileQuery { 183 185 public: 184 FileQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog);186 FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 185 187 virtual ~FileQtQuery(); 186 188 virtual bool handle(); … … 197 199 class QtDialog::FilesQtQuery : public Dialog::FilesQuery { 198 200 public: 199 FilesQtQuery( std::string _title, QBoxLayout *_parent, QtDialog *_dialog);201 FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 200 202 virtual ~FilesQtQuery(); 201 203 virtual bool handle(); … … 214 216 class QtDialog::IntQtQuery : public Dialog::IntQuery { 215 217 public: 216 IntQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog);218 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog); 217 219 virtual ~IntQtQuery(); 218 220 virtual bool handle(); … … 228 230 class QtDialog::IntsQtQuery : public Dialog::IntsQuery { 229 231 public: 230 IntsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog);232 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog); 231 233 virtual ~IntsQtQuery(); 232 234 virtual bool handle(); … … 245 247 class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery { 246 248 public: 247 MoleculeQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);249 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 248 250 virtual ~MoleculeQtQuery(); 249 251 virtual bool handle(); … … 259 261 class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery { 260 262 public: 261 MoleculesQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);263 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 262 264 virtual ~MoleculesQtQuery(); 263 265 virtual bool handle(); … … 273 275 class QtDialog::StringQtQuery : public Dialog::StringQuery { 274 276 public: 275 StringQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);277 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 276 278 virtual ~StringQtQuery(); 277 279 virtual bool handle(); … … 287 289 class QtDialog::StringsQtQuery : public Dialog::StringsQuery { 288 290 public: 289 StringsQtQuery( std::string _title, QBoxLayout *_parent,QtDialog *_dialog);291 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog); 290 292 virtual ~StringsQtQuery(); 291 293 virtual bool handle(); … … 301 303 class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery { 302 304 public: 303 UnsignedIntQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog);305 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog); 304 306 virtual ~UnsignedIntQtQuery(); 305 307 virtual bool handle(); … … 315 317 class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery { 316 318 public: 317 UnsignedIntsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog);319 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog); 318 320 virtual ~UnsignedIntsQtQuery(); 319 321 virtual bool handle(); … … 333 335 class QtDialog::VectorQtQuery : public Dialog::VectorQuery { 334 336 public: 335 VectorQtQuery( std::string title,bool _check,QBoxLayout *,QtDialog *);337 VectorQtQuery(Parameter<Vector> &, std::string title,bool _check,QBoxLayout *,QtDialog *); 336 338 virtual ~VectorQtQuery(); 337 339 virtual bool handle(); … … 352 354 class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery { 353 355 public: 354 VectorsQtQuery( std::string title,bool _check,QBoxLayout *,QtDialog *);356 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check,QBoxLayout *,QtDialog *); 355 357 virtual ~VectorsQtQuery(); 356 358 virtual bool handle(); … … 369 371 class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery { 370 372 public: 371 RandomNumberDistribution_ParametersQtQuery( std::string title,QBoxLayout *,QtDialog *);373 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *); 372 374 virtual ~RandomNumberDistribution_ParametersQtQuery(); 373 375 virtual bool handle(); -
src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
r5ffa05 rbd81f9 31 31 #include "World.hpp" 32 32 33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :34 Dialog::RandomNumberDistribution_ParametersQuery( _title),33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 34 Dialog::RandomNumberDistribution_ParametersQuery(param, _title), 35 35 parent(_parent) 36 36 { … … 50 50 okButton = new QPushButton(tr("Ok")); 51 51 52 pipe = new RandomNumberDistribution_ParametersQtQueryPipe( &tmp,_dialog, inputBox);52 pipe = new RandomNumberDistribution_ParametersQtQueryPipe(tmp,_dialog, inputBox); 53 53 connect(okButton,SIGNAL(clicked()),pipe,SLOT(update())); 54 54 } -
src/UIElements/Qt4/Query/StringQtQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 QtDialog::StringQtQuery::StringQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :31 Dialog::StringQuery( _title),30 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 31 Dialog::StringQuery(param, _title), 32 32 parent(_parent) 33 33 { 34 if (!param.isSet()) 35 param.set(""); 34 36 thisLayout = new QHBoxLayout(); 35 37 titleLabel = new QLabel(QString(getTitle().c_str())); … … 39 41 thisLayout->addWidget(inputBox); 40 42 41 pipe = new StringQtQueryPipe( &tmp,_dialog);43 pipe = new StringQtQueryPipe(tmp,_dialog); 42 44 pipe->update(inputBox->text()); 43 45 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&))); … … 52 54 bool QtDialog::StringQtQuery::handle() 53 55 { 54 return tmp !="";56 return tmp.get() != ""; 55 57 } 56 58 -
src/UIElements/Qt4/Query/StringsQtQuery.cpp
r5ffa05 rbd81f9 30 30 31 31 32 QtDialog::StringsQtQuery::StringsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::StringsQuery( _title),32 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::StringsQuery(param, _title), 34 34 parent(_parent) 35 35 { … … 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<std::string>( &tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<std::string>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); … … 76 76 // dissect by "," 77 77 std::string::iterator olditer = temp.begin(); 78 std::vector<std::string> temp_strings; 78 79 for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) { 79 80 if (*iter == ' ') { 80 t mp.push_back(std::string(iter, olditer));81 temp_strings.push_back(std::string(iter, olditer)); 81 82 olditer = iter; 82 83 } 83 84 } 84 85 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); 86 88 87 89 return temp!=""; -
src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :31 Dialog::UnsignedIntQuery( _title),30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 31 Dialog::UnsignedIntQuery(param, _title), 32 32 parent(_parent) 33 33 { 34 if (!param.isSet()) 35 param.set(0); 34 36 thisLayout = new QHBoxLayout(); 35 37 titleLabel = new QLabel(QString(getTitle().c_str())); 36 38 inputBox = new QSpinBox(); 37 inputBox->setValue( 0);39 inputBox->setValue(param.get()); 38 40 parent->addLayout(thisLayout); 39 41 thisLayout->addWidget(titleLabel); 40 42 thisLayout->addWidget(inputBox); 41 43 42 pipe = new UnsignedIntQtQueryPipe( &tmp,_dialog);44 pipe = new UnsignedIntQtQueryPipe(tmp,_dialog); 43 45 pipe->update(inputBox->value()); 44 46 connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int))); -
src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
r5ffa05 rbd81f9 30 30 31 31 32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery( std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::UnsignedIntsQuery( _title),32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > ¶m, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::UnsignedIntsQuery(param, _title), 34 34 parent(_parent) 35 35 { … … 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<unsigned int>( &tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<unsigned int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); -
src/UIElements/Qt4/Query/VectorQtQuery.cpp
r5ffa05 rbd81f9 29 29 30 30 31 QtDialog::VectorQtQuery::VectorQtQuery( std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :32 Dialog::VectorQuery( title,_check),31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> ¶m, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) : 32 Dialog::VectorQuery(param, title,_check), 33 33 parent(_parent) 34 34 { 35 if (!param.isSet()) 36 param.set(Vector(0,0,0)); 35 37 mainLayout= new QHBoxLayout(); 36 38 titleLabel = new QLabel(QString(getTitle().c_str())); … … 45 47 coordInputX = new QDoubleSpinBox(); 46 48 coordInputX->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max()); 49 coordInputX->setValue(param.get()[0]); 47 50 // coordInputX->setRange(0,M.at(i,i)); 48 51 coordInputX->setDecimals(3); … … 50 53 coordInputY = new QDoubleSpinBox(); 51 54 coordInputY->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max()); 55 coordInputY->setValue(param.get()[1]); 52 56 // coordInputY->setRange(0,M.at(i,i)); 53 57 coordInputY->setDecimals(3); … … 55 59 coordInputZ = new QDoubleSpinBox(); 56 60 coordInputZ->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max()); 61 coordInputZ->setValue(param.get()[2]); 57 62 // coordInputZ->setRange(0,M.at(i,i)); 58 63 coordInputZ->setDecimals(3); 59 64 coordLayout->addWidget(coordInputZ); 60 pipe = new VectorQtQueryPipe( &(tmp),_dialog,inputBox);65 pipe = new VectorQtQueryPipe(tmp,_dialog,inputBox); 61 66 //pipe->update(coordInput->value()); 62 67 connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double))); -
src/UIElements/Qt4/Query/VectorsQtQuery.cpp
r5ffa05 rbd81f9 29 29 30 30 31 QtDialog::VectorsQtQuery::VectorsQtQuery( std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :32 Dialog::VectorsQuery( title,_check),31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > ¶m, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) : 32 Dialog::VectorsQuery(param, title,_check), 33 33 parent(_parent) 34 34 { … … 47 47 coordInput->setDecimals(3); 48 48 coordLayout->addWidget(coordInput); 49 pipe = new VectorsQtQueryPipe( &(tmp),_dialog,inputBox);49 pipe = new VectorsQtQueryPipe(tmp,_dialog,inputBox); 50 50 //pipe->update(coordInput->value()); 51 51 connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double))); -
src/UIElements/Query/AtomQuery.cpp
r5ffa05 rbd81f9 23 23 24 24 // Atom Queries 25 Dialog::AtomQuery::AtomQuery( std::string title, std::string _description) :25 Dialog::AtomQuery::AtomQuery(Parameter<const atom *> ¶m, std::string title, std::string _description) : 26 26 Query(title, _description), 27 tmp( 0)27 tmp(param) 28 28 {} 29 29 … … 31 31 32 32 void Dialog::AtomQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);33 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 34 } 35 35 -
src/UIElements/Query/AtomsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Atoms Queries 26 Dialog::AtomsQuery::AtomsQuery( std::string title, std::string _description) :26 Dialog::AtomsQuery::AtomsQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description) : 27 27 Query(title, _description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::AtomsQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/BooleanQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Bool Queries 26 Dialog::BooleanQuery::BooleanQuery( std::string title,std::string description) :26 Dialog::BooleanQuery::BooleanQuery(Parameter<bool> ¶m, std::string title,std::string description) : 27 27 Query(title, description), 28 tmp( false)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::BooleanQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/DoubleQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Double Queries 26 Dialog::DoubleQuery::DoubleQuery( std::string title, std::string _description) :26 Dialog::DoubleQuery::DoubleQuery(Parameter<double> ¶m, std::string title, std::string _description) : 27 27 Query(title, _description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::DoubleQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/DoublesQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Doubles Queries 26 Dialog::DoublesQuery::DoublesQuery(std::string title, std::string _description) : 27 Query(title, _description) 26 Dialog::DoublesQuery::DoublesQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::DoublesQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/ElementQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Element Queries 26 Dialog::ElementQuery::ElementQuery(std::string title, std::string _description) : 27 Query(title, _description) 26 Dialog::ElementQuery::ElementQuery(Parameter<const element *> ¶m, std::string title, std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::ElementQuery::setResult(){ 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/ElementsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Elements Queries 26 Dialog::ElementsQuery::ElementsQuery(std::string title, std::string _description) : 27 Query(title, _description) 26 Dialog::ElementsQuery::ElementsQuery(Parameter<std::vector<const element *> > ¶m, std::string title, std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::ElementsQuery::setResult(){ 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/FileQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // File Queries 26 Dialog::FileQuery::FileQuery(std::string title, std::string _description) : 27 Query(title, _description) 26 Dialog::FileQuery::FileQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::FileQuery::setResult(){ 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/FilesQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // File Queries 26 Dialog::FilesQuery::FilesQuery(std::string title, std::string _description) : 27 Query(title, _description) 26 Dialog::FilesQuery::FilesQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string title, std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::FilesQuery::setResult(){ 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/IntQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Int Queries 26 Dialog::IntQuery::IntQuery( std::string title, std::string description) :26 Dialog::IntQuery::IntQuery(Parameter<int> ¶m, std::string title, std::string description) : 27 27 Query(title, description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::IntQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/IntsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Ints Queries 26 Dialog::IntsQuery::IntsQuery(std::string title, std::string description) : 27 Query(title, description) 26 Dialog::IntsQuery::IntsQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string description) : 27 Query(title, description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::IntsQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/MoleculeQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Molecule Queries 26 Dialog::MoleculeQuery::MoleculeQuery( std::string title, std::string _description) :26 Dialog::MoleculeQuery::MoleculeQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description) : 27 27 Query(title, _description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::MoleculeQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/MoleculesQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Molecules Queries 26 Dialog::MoleculesQuery::MoleculesQuery( std::string title, std::string _description) :26 Dialog::MoleculesQuery::MoleculesQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description) : 27 27 Query(title, _description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::MoleculesQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp
r5ffa05 rbd81f9 23 23 24 24 // RandomNumberDistribution_Parameters Queries 25 Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(std::string title, std::string _description) : 26 Query(title, _description) 25 Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description) : 26 Query(title, _description), 27 tmp(param) 27 28 {} 28 29 … … 30 31 31 32 void Dialog::RandomNumberDistribution_ParametersQuery::setResult() { 32 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);33 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 33 34 } 34 35 -
src/UIElements/Query/StringQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // String Queries 26 Dialog::StringQuery::StringQuery(std::string title,std::string _description) : 27 Query(title, _description) 26 Dialog::StringQuery::StringQuery(Parameter<std::string> ¶m, std::string title,std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::StringQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/StringsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Strings Queries 26 Dialog::StringsQuery::StringsQuery(std::string title,std::string _description) : 27 Query(title, _description) 26 Dialog::StringsQuery::StringsQuery(Parameter<std::vector<std::string> > ¶m, std::string title,std::string _description) : 27 Query(title, _description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::StringsQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/UnsignedIntQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // UnsignedInt Queries 26 Dialog::UnsignedIntQuery::UnsignedIntQuery( std::string title, std::string description) :26 Dialog::UnsignedIntQuery::UnsignedIntQuery(Parameter<unsigned int> ¶m, std::string title, std::string description) : 27 27 Query(title, description), 28 tmp( 0)28 tmp(param) 29 29 {} 30 30 … … 32 32 33 33 void Dialog::UnsignedIntQuery::setResult() { 34 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 35 35 } 36 36 -
src/UIElements/Query/UnsignedIntsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // UnsignedInts Queries 26 Dialog::UnsignedIntsQuery::UnsignedIntsQuery(std::string title, std::string description) : 27 Query(title, description) 26 Dialog::UnsignedIntsQuery::UnsignedIntsQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string description) : 27 Query(title, description), 28 tmp(param) 28 29 {} 29 30 … … 31 32 32 33 void Dialog::UnsignedIntsQuery::setResult() { 33 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);34 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 34 35 } 35 36 -
src/UIElements/Query/VectorQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Vector Queries 26 Dialog::VectorQuery::VectorQuery( std::string title,bool _check, std::string _description) :26 Dialog::VectorQuery::VectorQuery(Parameter<Vector> ¶m, std::string title,bool _check, std::string _description) : 27 27 Query(title, _description), 28 tmp(param), 28 29 check(_check) 29 30 {} … … 33 34 34 35 void Dialog::VectorQuery::setResult() { 35 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);36 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 36 37 } 37 38 -
src/UIElements/Query/VectorsQuery.cpp
r5ffa05 rbd81f9 24 24 25 25 // Vectors Queries 26 Dialog::VectorsQuery::VectorsQuery( std::string title,bool _check, std::string _description) :26 Dialog::VectorsQuery::VectorsQuery(Parameter<std::vector<Vector> > ¶m, std::string title,bool _check, std::string _description) : 27 27 Query(title, _description), 28 tmp(param), 28 29 check(_check) 29 30 {} … … 33 34 34 35 void Dialog::VectorsQuery::setResult() { 35 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);36 //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 36 37 } 37 38 -
src/UIElements/TextUI/Query/AtomTextQuery.cpp
r5ffa05 rbd81f9 30 30 #include "World.hpp" 31 31 32 TextDialog::AtomTextQuery::AtomTextQuery( std::string title, std::string _description) :33 Dialog::AtomQuery( title,_description)32 TextDialog::AtomTextQuery::AtomTextQuery(Parameter<const atom *> ¶m, std::string title, std::string _description) : 33 Dialog::AtomQuery(param, title,_description) 34 34 {} 35 35 … … 51 51 } 52 52 53 tmp= World::getInstance().getAtom(AtomById(idxOfAtom));54 if(!t mp&& idxOfAtom!=-1){53 const atom * temp_atom = World::getInstance().getAtom(AtomById(idxOfAtom)); 54 if(!temp_atom && idxOfAtom!=-1){ 55 55 std::cout << "Invalid Atom Index" << idxOfAtom << std::endl; 56 56 badInput = true; 57 57 } 58 tmp.set(temp_atom); 58 59 59 60 } while(badInput); -
src/UIElements/TextUI/Query/AtomsTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::AtomsTextQuery::AtomsTextQuery( std::string title, std::string _description) :34 Dialog::AtomsQuery( title,_description)33 TextDialog::AtomsTextQuery::AtomsTextQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description) : 34 Dialog::AtomsQuery(param, title,_description) 35 35 {} 36 36 … … 44 44 // dissect by " " 45 45 std::string::iterator olditer = line.begin(); 46 std::vector<const atom *> temp_atoms; 46 47 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { 47 48 if (*iter == ' ') { … … 53 54 break; 54 55 } 55 t mp.push_back(temp);56 temp_atoms.push_back(temp); 56 57 olditer = iter; 57 58 } … … 63 64 if(!temp && idxOfAtom!=-1) { 64 65 std::cout << "Invalid Atom Index" << idxOfAtom << std::endl; 65 t mp.push_back(temp);66 temp_atoms.push_back(temp); 66 67 } 67 68 } 69 tmp.set(temp_atoms); 68 70 69 71 return (idxOfAtom!=-1); -
src/UIElements/TextUI/Query/BooleanTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::BooleanTextQuery::BooleanTextQuery( std::string title, std::string _description) :31 Dialog::BooleanQuery( title,_description)30 TextDialog::BooleanTextQuery::BooleanTextQuery(Parameter<bool> ¶m, std::string title, std::string _description) : 31 Dialog::BooleanQuery(param, title,_description) 32 32 {} 33 33 … … 42 42 std::cin >> input; 43 43 if ((input == 'y' ) || (input == 'Y')) { 44 tmp = true;44 tmp.set(true); 45 45 } else if ((input == 'n' ) || (input == 'N')) { 46 tmp = false;46 tmp.set(false); 47 47 } else { 48 48 badInput=true; -
src/UIElements/TextUI/Query/DoubleTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::DoubleTextQuery::DoubleTextQuery( std::string title, std::string _description) :31 Dialog::DoubleQuery( title,_description)30 TextDialog::DoubleTextQuery::DoubleTextQuery(Parameter<double> ¶m, std::string title, std::string _description) : 31 Dialog::DoubleQuery(param, title,_description) 32 32 {} 33 33 … … 38 38 do{ 39 39 badInput = false; 40 std::cout << getDescription() << ": "; 41 std::cin >> tmp; 40 std::cout << getDescription() << ": ";\ 41 double temp_double; 42 std::cin >> temp_double; 42 43 if(std::cin.fail()){ 43 44 badInput = true; … … 46 47 std::cout << "Input was not a number!" << std::endl; 47 48 } 49 tmp.set(temp_double); 48 50 }while(badInput); 49 51 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); -
src/UIElements/TextUI/Query/DoublesTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::DoublesTextQuery::DoublesTextQuery( std::string title, std::string _description) :31 Dialog::DoublesQuery( title,_description)30 TextDialog::DoublesTextQuery::DoublesTextQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description) : 31 Dialog::DoublesQuery(param, title,_description) 32 32 {} 33 33 … … 40 40 // dissect by " " 41 41 std::string::iterator olditer = line.begin(); 42 std::vector<double> temp_doubles; 42 43 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { 43 44 if (*iter == ' ') { 44 45 std::istringstream stream(std::string(iter, olditer)); 45 46 stream >> temp; 46 t mp.push_back(temp);47 temp_doubles.push_back(temp); 47 48 olditer = iter; 48 49 } … … 51 52 std::istringstream stream(std::string(olditer, line.end())); 52 53 stream >> temp; 53 t mp.push_back(temp);54 temp_doubles.push_back(temp); 54 55 } 56 tmp.set(temp_doubles); 55 57 56 58 return true; -
src/UIElements/TextUI/Query/ElementTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::ElementTextQuery::ElementTextQuery( std::string title, std::string _description) :34 Dialog::ElementQuery( title,_description)33 TextDialog::ElementTextQuery::ElementTextQuery(Parameter<const element *> ¶m, std::string title, std::string _description) : 34 Dialog::ElementQuery(param, title,_description) 35 35 {} 36 36 -
src/UIElements/TextUI/Query/ElementsTextQuery.cpp
r5ffa05 rbd81f9 35 35 36 36 37 TextDialog::ElementsTextQuery::ElementsTextQuery( std::string title, std::string _description) :38 Dialog::ElementsQuery( title,_description)37 TextDialog::ElementsTextQuery::ElementsTextQuery(Parameter<std::vector<const element *> > ¶m, std::string title, std::string _description) : 38 Dialog::ElementsQuery(param, title,_description) 39 39 {} 40 40 … … 50 50 // dissect by " " 51 51 std::string::iterator olditer = line.begin(); 52 std::vector<const element *> temp_elements; 52 53 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { 53 54 if (*iter == ' ') { … … 64 65 break; 65 66 } 66 t mp.push_back(temp);67 temp_elements.push_back(temp); 67 68 olditer = iter; 68 69 } … … 79 80 if(!temp && Z!=-1) { 80 81 std::cout << "Invalid Element" << shorthand << std::endl; 81 t mp.push_back(temp);82 temp_elements.push_back(temp); 82 83 } 83 84 } 85 tmp.set(temp_elements); 84 86 85 87 return (Z!=-1); -
src/UIElements/TextUI/Query/FileTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::FileTextQuery::FileTextQuery( std::string title, std::string _description) :34 Dialog::FileQuery( title,_description)33 TextDialog::FileTextQuery::FileTextQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description) : 34 Dialog::FileQuery(param, title,_description) 35 35 {} 36 36 … … 48 48 std::cin.clear(); 49 49 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; 51 51 continue; 52 52 } 53 53 } while(badInput); 54 54 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 55 tmp = tempstring;55 tmp.set(tempstring); 56 56 return true; 57 57 } -
src/UIElements/TextUI/Query/FilesTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::FilesTextQuery::FilesTextQuery( std::string title, std::string _description) :34 Dialog::FilesQuery( title,_description)33 TextDialog::FilesTextQuery::FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string title, std::string _description) : 34 Dialog::FilesQuery(param, title,_description) 35 35 {} 36 36 … … 38 38 39 39 bool 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]? "; 44 60 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); 59 65 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 60 return !tmp.empty(); 66 tmp.set(tempfiles); 67 return true; 61 68 } 62 69 -
src/UIElements/TextUI/Query/IntTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::IntTextQuery::IntTextQuery( std::string title, std::string _description) :31 Dialog::IntQuery( title,_description)30 TextDialog::IntTextQuery::IntTextQuery(Parameter<int> ¶m, std::string title, std::string _description) : 31 Dialog::IntQuery(param, title,_description) 32 32 {} 33 33 … … 39 39 badInput = false; 40 40 std::cout << getDescription() << ": "; 41 std::cin >> tmp; 41 int temp_int; 42 std::cin >> temp_int; 43 tmp.set(temp_int); 42 44 if(std::cin.fail()){ 43 45 badInput=true; -
src/UIElements/TextUI/Query/IntsTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::IntsTextQuery::IntsTextQuery( std::string title, std::string _description) :31 Dialog::IntsQuery( title,_description)30 TextDialog::IntsTextQuery::IntsTextQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string _description) : 31 Dialog::IntsQuery(param, title,_description) 32 32 {} 33 33 … … 39 39 getline(std::cin,line); 40 40 // dissect by " " 41 std::vector<int> temp_int; 41 42 std::string::iterator olditer = line.begin(); 42 43 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { … … 44 45 std::istringstream stream(std::string(iter, olditer)); 45 46 stream >> temp; 46 t mp.push_back(temp);47 temp_int.push_back(temp); 47 48 olditer = iter; 48 49 } … … 51 52 std::istringstream stream(std::string(olditer, line.end())); 52 53 stream >> temp; 53 t mp.push_back(temp);54 temp_int.push_back(temp); 54 55 } 56 tmp.set(temp_int); 55 57 56 58 return true; -
src/UIElements/TextUI/Query/MoleculeTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::MoleculeTextQuery::MoleculeTextQuery( std::string title, std::string _description) :34 Dialog::MoleculeQuery( title,_description)33 TextDialog::MoleculeTextQuery::MoleculeTextQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description) : 34 Dialog::MoleculeQuery(param, title,_description) 35 35 {} 36 36 … … 52 52 } 53 53 54 tmp= World::getInstance().getMolecule(MoleculeById(idxOfMol));55 if(!t mp&& idxOfMol!=-1){54 const molecule *temp_mol = World::getInstance().getMolecule(MoleculeById(idxOfMol)); 55 if(!temp_mol && idxOfMol!=-1){ 56 56 std::cout << "Invalid Molecule Index" << std::endl; 57 57 badInput = true; 58 58 } 59 tmp.set(temp_mol); 59 60 60 61 } while(badInput); -
src/UIElements/TextUI/Query/MoleculesTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::MoleculesTextQuery::MoleculesTextQuery( std::string title, std::string _description) :34 Dialog::MoleculesQuery( title,_description)33 TextDialog::MoleculesTextQuery::MoleculesTextQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description) : 34 Dialog::MoleculesQuery(param, title,_description) 35 35 {} 36 36 … … 43 43 getline(std::cin,line); 44 44 // dissect by " " 45 std::vector<const molecule *> temp_mols; 45 46 std::string::iterator olditer = line.begin(); 46 47 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { … … 53 54 break; 54 55 } 55 t mp.push_back(temp);56 temp_mols.push_back(temp); 56 57 olditer = iter; 57 58 } … … 63 64 if(!temp && idxOfMol!=-1){ 64 65 std::cout << "Invalid Molecule Index" << idxOfMol << std::endl; 65 t mp.push_back(temp);66 temp_mols.push_back(temp); 66 67 } 67 68 } 69 tmp.set(temp_mols); 68 70 69 71 return (idxOfMol!=-1); -
src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp
r5ffa05 rbd81f9 30 30 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp" 31 31 32 TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery( std::string title, std::string _description) :33 Dialog::RandomNumberDistribution_ParametersQuery( title,_description)32 TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description) : 33 Dialog::RandomNumberDistribution_ParametersQuery(param, title,_description) 34 34 {} 35 35 … … 43 43 std::cout << "Please enter parameters as follows: 'p=0.5;'"; 44 44 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); 46 48 if(std::cin.fail()){ 47 49 badInput = true; -
src/UIElements/TextUI/Query/StringTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::StringTextQuery::StringTextQuery( std::string title, std::string _description) :31 Dialog::StringQuery( title,_description)30 TextDialog::StringTextQuery::StringTextQuery(Parameter<std::string> ¶m, std::string title, std::string _description) : 31 Dialog::StringQuery(param, title,_description) 32 32 {} 33 33 … … 36 36 bool TextDialog::StringTextQuery::handle() { 37 37 std::cout << getDescription() << ": "; 38 getline(std::cin,tmp); 38 std::string temp_string; 39 getline(std::cin,temp_string); 40 tmp.set(temp_string); 39 41 return true; 40 42 } -
src/UIElements/TextUI/Query/StringsTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::StringsTextQuery::StringsTextQuery( std::string title, std::string _description) :31 Dialog::StringsQuery( title,_description)30 TextDialog::StringsTextQuery::StringsTextQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description) : 31 Dialog::StringsQuery(param, title,_description) 32 32 {} 33 33 … … 38 38 getline(std::cin,temp); 39 39 // dissect by " " 40 std::vector<std::string> temp_strings; 40 41 std::string::iterator olditer = temp.begin(); 41 42 for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) { 42 43 if (*iter == ' ') { 43 t mp.push_back(std::string(iter, olditer));44 temp_strings.push_back(std::string(iter, olditer)); 44 45 olditer = iter; 45 46 } 46 47 } 47 48 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); 49 51 50 52 return true; -
src/UIElements/TextUI/Query/TextQuery.hpp
r5ffa05 rbd81f9 19 19 class TextDialog::AtomTextQuery : public Dialog::AtomQuery { 20 20 public: 21 AtomTextQuery( std::string title, std::string _description = NULL);21 AtomTextQuery(Parameter<const atom *> &, std::string title, std::string _description = NULL); 22 22 virtual ~AtomTextQuery(); 23 23 virtual bool handle(); … … 26 26 class TextDialog::AtomsTextQuery : public Dialog::AtomsQuery { 27 27 public: 28 AtomsTextQuery( std::string title, std::string _description = NULL);28 AtomsTextQuery(Parameter<std::vector<const atom *> > &, std::string title, std::string _description = NULL); 29 29 virtual ~AtomsTextQuery(); 30 30 virtual bool handle(); … … 33 33 class TextDialog::BooleanTextQuery : public Dialog::BooleanQuery { 34 34 public: 35 BooleanTextQuery( std::string title, std::string _description = NULL);35 BooleanTextQuery(Parameter<bool> &, std::string title, std::string _description = NULL); 36 36 virtual ~BooleanTextQuery(); 37 37 virtual bool handle(); 38 38 }; 39 39 40 class TextDialog:: BoxTextQuery : public Dialog::BoxQuery {40 class TextDialog::RealSpaceMatrixTextQuery : public Dialog::RealSpaceMatrixQuery { 41 41 public: 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(); 44 44 virtual bool handle(); 45 45 }; … … 47 47 class TextDialog::DoubleTextQuery : public Dialog::DoubleQuery { 48 48 public: 49 DoubleTextQuery( std::string title, std::string _description = NULL);49 DoubleTextQuery(Parameter<double> &, std::string title, std::string _description = NULL); 50 50 virtual ~DoubleTextQuery(); 51 51 virtual bool handle(); … … 54 54 class TextDialog::DoublesTextQuery : public Dialog::DoublesQuery { 55 55 public: 56 DoublesTextQuery( std::string title, std::string _description = NULL);56 DoublesTextQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = NULL); 57 57 virtual ~DoublesTextQuery(); 58 58 virtual bool handle(); … … 61 61 class TextDialog::ElementTextQuery : public Dialog::ElementQuery { 62 62 public: 63 ElementTextQuery( std::string title, std::string _description = NULL);63 ElementTextQuery(Parameter<const element *> &, std::string title, std::string _description = NULL); 64 64 virtual ~ElementTextQuery(); 65 65 virtual bool handle(); … … 68 68 class TextDialog::ElementsTextQuery : public Dialog::ElementsQuery { 69 69 public: 70 ElementsTextQuery( std::string title, std::string _description = NULL);70 ElementsTextQuery(Parameter<std::vector<const element *> > &, std::string title, std::string _description = NULL); 71 71 virtual ~ElementsTextQuery(); 72 72 virtual bool handle(); … … 82 82 class TextDialog::FileTextQuery : public Dialog::FileQuery { 83 83 public: 84 FileTextQuery( std::string title, std::string _description = NULL);84 FileTextQuery(Parameter<boost::filesystem::path> &, std::string title, std::string _description = NULL); 85 85 virtual ~FileTextQuery(); 86 86 virtual bool handle(); … … 89 89 class TextDialog::FilesTextQuery : public Dialog::FilesQuery { 90 90 public: 91 FilesTextQuery( std::string title, std::string _description = NULL);91 FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string title, std::string _description = NULL); 92 92 virtual ~FilesTextQuery(); 93 93 virtual bool handle(); … … 96 96 class TextDialog::IntTextQuery : public Dialog::IntQuery { 97 97 public: 98 IntTextQuery( std::string title, std::string _description = NULL);98 IntTextQuery(Parameter<int> &, std::string title, std::string _description = NULL); 99 99 virtual ~IntTextQuery(); 100 100 virtual bool handle(); … … 103 103 class TextDialog::IntsTextQuery : public Dialog::IntsQuery { 104 104 public: 105 IntsTextQuery( std::string title, std::string _description = NULL);105 IntsTextQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = NULL); 106 106 virtual ~IntsTextQuery(); 107 107 virtual bool handle(); … … 110 110 class TextDialog::MoleculeTextQuery : public Dialog::MoleculeQuery { 111 111 public: 112 MoleculeTextQuery( std::string title, std::string _description = NULL);112 MoleculeTextQuery(Parameter<const molecule *> &, std::string title, std::string _description = NULL); 113 113 virtual ~MoleculeTextQuery(); 114 114 virtual bool handle(); … … 117 117 class TextDialog::MoleculesTextQuery : public Dialog::MoleculesQuery { 118 118 public: 119 MoleculesTextQuery( std::string title, std::string _description = NULL);119 MoleculesTextQuery(Parameter<std::vector<const molecule *> > &, std::string title, std::string _description = NULL); 120 120 virtual ~MoleculesTextQuery(); 121 121 virtual bool handle(); … … 124 124 class TextDialog::StringTextQuery : public Dialog::StringQuery { 125 125 public: 126 StringTextQuery( std::string title, std::string _description = NULL);126 StringTextQuery(Parameter<std::string> &, std::string title, std::string _description = NULL); 127 127 virtual ~StringTextQuery(); 128 128 virtual bool handle(); … … 131 131 class TextDialog::StringsTextQuery : public Dialog::StringsQuery { 132 132 public: 133 StringsTextQuery( std::string title, std::string _description = NULL);133 StringsTextQuery(Parameter<std::vector<std::string> > &, std::string title, std::string _description = NULL); 134 134 virtual ~StringsTextQuery(); 135 135 virtual bool handle(); … … 138 138 class TextDialog::UnsignedIntTextQuery : public Dialog::UnsignedIntQuery { 139 139 public: 140 UnsignedIntTextQuery( std::string title, std::string _description = NULL);140 UnsignedIntTextQuery(Parameter<unsigned int> &, std::string title, std::string _description = NULL); 141 141 virtual ~UnsignedIntTextQuery(); 142 142 virtual bool handle(); … … 145 145 class TextDialog::UnsignedIntsTextQuery : public Dialog::UnsignedIntsQuery { 146 146 public: 147 UnsignedIntsTextQuery( std::string title, std::string _description = NULL);147 UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = NULL); 148 148 virtual ~UnsignedIntsTextQuery(); 149 149 virtual bool handle(); … … 152 152 class TextDialog::VectorTextQuery : public Dialog::VectorQuery { 153 153 public: 154 VectorTextQuery( std::string title,bool _check, std::string _description = NULL);154 VectorTextQuery(Parameter<Vector> &, std::string title,bool _check, std::string _description = NULL); 155 155 virtual ~VectorTextQuery(); 156 156 virtual bool handle(); … … 159 159 class TextDialog::VectorsTextQuery : public Dialog::VectorsQuery { 160 160 public: 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); 162 162 virtual ~VectorsTextQuery(); 163 163 virtual bool handle(); … … 166 166 class TextDialog::RandomNumberDistribution_ParametersTextQuery : public Dialog::RandomNumberDistribution_ParametersQuery { 167 167 public: 168 RandomNumberDistribution_ParametersTextQuery( std::string title, std::string _description = NULL);168 RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title, std::string _description = NULL); 169 169 virtual ~RandomNumberDistribution_ParametersTextQuery(); 170 170 virtual bool handle(); -
src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery( std::string title, std::string _description) :31 Dialog::UnsignedIntQuery( title,_description)30 TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(Parameter<unsigned int> ¶m, std::string title, std::string _description) : 31 Dialog::UnsignedIntQuery(param, title,_description) 32 32 {} 33 33 … … 39 39 badInput = false; 40 40 std::cout << getDescription() << ": "; 41 std::cin >> tmp; 41 unsigned int temp_uint; 42 std::cin >> temp_uint; 42 43 if(std::cin.fail()){ 43 44 badInput=true; … … 46 47 std::cout << "Input was not a number!" << std::endl; 47 48 } 49 tmp.set(temp_uint); 48 50 } while(badInput); 49 51 // clear the input buffer of anything still in the line -
src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp
r5ffa05 rbd81f9 28 28 29 29 30 TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery( std::string title, std::string _description) :31 Dialog::UnsignedIntsQuery( title,_description)30 TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string _description) : 31 Dialog::UnsignedIntsQuery(param, title,_description) 32 32 {} 33 33 … … 39 39 getline(std::cin,line); 40 40 // dissect by " " 41 std::vector<unsigned int> temp_uints; 41 42 std::string::iterator olditer = line.begin(); 42 43 for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) { … … 44 45 std::istringstream stream(std::string(iter, olditer)); 45 46 stream >> temp; 46 t mp.push_back(temp);47 temp_uints.push_back(temp); 47 48 olditer = iter; 48 49 } … … 51 52 std::istringstream stream(std::string(olditer, line.end())); 52 53 stream >> temp; 53 t mp.push_back(temp);54 temp_uints.push_back(temp); 54 55 } 56 tmp.set(temp_uints); 55 57 56 58 return true; -
src/UIElements/TextUI/Query/VectorTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::VectorTextQuery::VectorTextQuery( std::string title, bool _check, std::string _description) :34 Dialog::VectorQuery( title,_check,_description)33 TextDialog::VectorTextQuery::VectorTextQuery(Parameter<Vector> ¶m, std::string title, bool _check, std::string _description) : 34 Dialog::VectorQuery(param, title,_check,_description) 35 35 {} 36 36 … … 48 48 getline(std::cin,line); 49 49 50 Vector temp_vector; 51 50 52 // dissect by "," 51 53 double coord = 0.; … … 56 58 std::istringstream stream(std::string(iter, olditer)); 57 59 stream >> coord; 58 t mp[counter++] = coord;60 temp_vector[counter++] = coord; 59 61 olditer = iter; 60 62 } … … 63 65 std::istringstream stream(std::string(olditer, line.end())); 64 66 stream >> coord; 65 t mp[counter++] = coord;67 temp_vector[counter++] = coord; 66 68 } 69 tmp.set(temp_vector); 67 70 68 71 // check vector 69 return World::getInstance().getDomain().isValid(t mp);72 return World::getInstance().getDomain().isValid(temp_vector); 70 73 } 71 74 -
src/UIElements/TextUI/Query/VectorsTextQuery.cpp
r5ffa05 rbd81f9 31 31 32 32 33 TextDialog::VectorsTextQuery::VectorsTextQuery( std::string title, bool _check, std::string _description) :34 Dialog::VectorsQuery( title,_check,_description)33 TextDialog::VectorsTextQuery::VectorsTextQuery(Parameter<std::vector<Vector> > ¶m, std::string title, bool _check, std::string _description) : 34 Dialog::VectorsQuery(param, title,_check,_description) 35 35 {} 36 36 … … 50 50 // dissect by "," 51 51 double coord = 0.; 52 std::vector<Vector> temp_vectors; 52 53 std::string::iterator olditerspace = line.begin(); 53 54 std::string::iterator olditercomma = line.begin(); … … 72 73 } 73 74 if (World::getInstance().getDomain().isValid(temp)) 74 t mp.push_back(temp);75 temp_vectors.push_back(temp); 75 76 olditerspace = vectoriter; 76 77 } 77 78 } 79 tmp.set(temp_vectors); 78 80 79 81 return true; -
src/UIElements/TextUI/TextDialog.cpp
r5ffa05 rbd81f9 38 38 } 39 39 40 void TextDialog::queryBoolean( const char* title, std::string description){41 registerQuery(new BooleanTextQuery( title,description));40 void TextDialog::queryBoolean(Parameter<bool> ¶m, const char* title, std::string description){ 41 registerQuery(new BooleanTextQuery(param, title,description)); 42 42 } 43 43 44 void TextDialog::queryInt( const char* title, std::string description){45 registerQuery(new IntTextQuery( title,description));44 void TextDialog::queryInt(Parameter<int> ¶m, const char* title, std::string description){ 45 registerQuery(new IntTextQuery(param, title,description)); 46 46 } 47 47 48 void TextDialog::queryInts( const char* title, std::string description){49 registerQuery(new IntsTextQuery( title,description));48 void TextDialog::queryInts(Parameter<std::vector<int> > ¶m, const char* title, std::string description){ 49 registerQuery(new IntsTextQuery(param, title,description)); 50 50 } 51 51 52 void TextDialog::queryUnsignedInt( const char* title, std::string description){53 registerQuery(new UnsignedIntTextQuery( title,description));52 void TextDialog::queryUnsignedInt(Parameter<unsigned int> ¶m, const char* title, std::string description){ 53 registerQuery(new UnsignedIntTextQuery(param, title,description)); 54 54 } 55 55 56 void TextDialog::queryUnsignedInts( const char* title, std::string description){57 registerQuery(new UnsignedIntsTextQuery( title,description));56 void TextDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > ¶m, const char* title, std::string description){ 57 registerQuery(new UnsignedIntsTextQuery(param, title,description)); 58 58 } 59 59 60 void TextDialog::queryDouble( const char* title, std::string description){61 registerQuery(new DoubleTextQuery( title,description));60 void TextDialog::queryDouble(Parameter<double> ¶m, const char* title, std::string description){ 61 registerQuery(new DoubleTextQuery(param, title,description)); 62 62 } 63 63 64 void TextDialog::queryDoubles( const char* title, std::string description){65 registerQuery(new DoublesTextQuery( title,description));64 void TextDialog::queryDoubles(Parameter<std::vector<double> > ¶m, const char* title, std::string description){ 65 registerQuery(new DoublesTextQuery(param, title,description)); 66 66 } 67 67 68 void TextDialog::queryString( const char* title, std::string description){69 registerQuery(new StringTextQuery( title,description));68 void TextDialog::queryString(Parameter<std::string> ¶m, const char* title, std::string description){ 69 registerQuery(new StringTextQuery(param, title,description)); 70 70 } 71 71 72 void TextDialog::queryStrings( const char* title, std::string description){73 registerQuery(new StringsTextQuery( title,description));72 void TextDialog::queryStrings(Parameter<std::vector<std::string> > ¶m, const char* title, std::string description){ 73 registerQuery(new StringsTextQuery(param, title,description)); 74 74 } 75 75 76 void TextDialog::queryAtom( const char* title, std::string description) {77 registerQuery(new AtomTextQuery( title,description));76 void TextDialog::queryAtom(Parameter<const atom *> ¶m, const char* title, std::string description) { 77 registerQuery(new AtomTextQuery(param, title,description)); 78 78 } 79 79 80 void TextDialog::queryAtoms( const char* title, std::string description) {81 registerQuery(new AtomsTextQuery( title,description));80 void TextDialog::queryAtoms(Parameter<std::vector<const atom *> > ¶m, const char* title, std::string description) { 81 registerQuery(new AtomsTextQuery(param, title,description)); 82 82 } 83 83 84 void TextDialog::queryMolecule( const char* title, std::string description) {85 registerQuery(new MoleculeTextQuery( title,description));84 void TextDialog::queryMolecule(Parameter<const molecule *> ¶m, const char* title, std::string description) { 85 registerQuery(new MoleculeTextQuery(param, title,description)); 86 86 } 87 87 88 void TextDialog::queryMolecules( const char* title, std::string description) {89 registerQuery(new MoleculesTextQuery( title,description));88 void TextDialog::queryMolecules(Parameter<std::vector<const molecule *> > ¶m, const char* title, std::string description) { 89 registerQuery(new MoleculesTextQuery(param, title,description)); 90 90 } 91 91 92 void TextDialog::queryVector( const char* title, bool check, std::string description) {93 registerQuery(new VectorTextQuery( title,check,description));92 void TextDialog::queryVector(Parameter<Vector> ¶m, const char* title, bool check, std::string description) { 93 registerQuery(new VectorTextQuery(param, title,check,description)); 94 94 } 95 95 96 void TextDialog::queryVectors( const char* title, bool check, std::string description) {97 registerQuery(new VectorsTextQuery( title,check,description));96 void TextDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, bool check, std::string description) { 97 registerQuery(new VectorsTextQuery(param, title,check,description)); 98 98 } 99 99 100 void TextDialog::query Box(const char* title, std::string description) {101 registerQuery(new BoxTextQuery(title,description));100 void TextDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> ¶m, const char* title, std::string description) { 101 registerQuery(new RealSpaceMatrixTextQuery(param, title,description)); 102 102 } 103 103 104 void TextDialog::queryElement( const char* title, std::string description){105 registerQuery(new ElementTextQuery( title,description));104 void TextDialog::queryElement(Parameter<const element *> ¶m, const char* title, std::string description){ 105 registerQuery(new ElementTextQuery(param, title,description)); 106 106 } 107 107 108 void TextDialog::queryElements( const char* title, std::string description){109 registerQuery(new ElementsTextQuery( title,description));108 void TextDialog::queryElements(Parameter<std::vector<const element *> > ¶m, const char* title, std::string description){ 109 registerQuery(new ElementsTextQuery(param, title,description)); 110 110 } 111 111 112 void TextDialog::queryFile( const char* title, std::string description){113 registerQuery(new FileTextQuery( title,description));112 void TextDialog::queryFile(Parameter<boost::filesystem::path> ¶m, const char* title, std::string description){ 113 registerQuery(new FileTextQuery(param, title,description)); 114 114 } 115 115 116 void TextDialog::queryFiles( const char* title, std::string description){117 registerQuery(new FilesTextQuery( title,description));116 void TextDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > ¶m, const char* title, std::string description){ 117 registerQuery(new FilesTextQuery(param, title,description)); 118 118 } 119 119 120 void TextDialog::queryRandomNumberDistribution_Parameters( const char* title, std::string description){121 registerQuery(new RandomNumberDistribution_ParametersTextQuery( title,description));120 void TextDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> ¶m, const char* title, std::string description){ 121 registerQuery(new RandomNumberDistribution_ParametersTextQuery(param, title,description)); 122 122 } 123 123 -
src/UIElements/TextUI/TextDialog.hpp
r5ffa05 rbd81f9 22 22 class element; 23 23 class molecule; 24 class RealSpaceMatrix; 24 25 class Vector; 25 26 … … 31 32 32 33 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 query Box(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 = ""); 54 55 55 56 protected: … … 60 61 class AtomsTextQuery; 61 62 class BooleanTextQuery; 62 class BoxTextQuery;63 63 class DoubleTextQuery; 64 64 class DoublesTextQuery; … … 72 72 class MoleculeTextQuery; 73 73 class MoleculesTextQuery; 74 class RealSpaceMatrixTextQuery; 74 75 class StringTextQuery; 75 76 class StringsTextQuery; -
src/World.cpp
r5ffa05 rbd81f9 505 505 const molecule *mol = _mol; 506 506 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 uns select... see above507 for_each(mol->begin(),mol->end(),bind1st(mem_fun(func),this)); // func is unselect... see above 508 508 } 509 509 -
src/World.hpp
r5ffa05 rbd81f9 290 290 * Unless you are calling this method from inside an atom don't fiddle with the third parameter. 291 291 * 292 * Return value indicates w ether the change could be done or not.292 * Return value indicates whether the change could be done or not. 293 293 */ 294 294 bool changeAtomId(atomId_t oldId, atomId_t newId, atom* target=0); … … 296 296 /** 297 297 * used when changing an molecule Id. 298 * Unless you are calling this method from inside an mole ucle don't fiddle with the third parameter.299 * 300 * Return value indicates w ether 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. 301 301 */ 302 302 bool changeMoleculeId(moleculeId_t oldId, moleculeId_t newId, molecule* target=0); -
src/molecule_geometry.cpp
r5ffa05 rbd81f9 274 274 // obtain first column, eigenvector to biggest eigenvalue 275 275 Vector BiggestEigenvector(InertiaTensor.column(Eigenvalues.SmallestComponent())); 276 Vector DesiredAxis(Axis );276 Vector DesiredAxis(Axis.getNormalized()); 277 277 278 278 // Creation Line that is the rotation axis -
src/unittests/Box_BoundaryConditionsUnitTest.cpp
r5ffa05 rbd81f9 102 102 std::stringstream outstream; 103 103 outstream << *bc; 104 CPPUNIT_ASSERT( outstream.str() == std::string("Wrap , Wrap,Wrap"));104 CPPUNIT_ASSERT( outstream.str() == std::string("Wrap Wrap Wrap")); 105 105 } 106 106 … … 132 132 { 133 133 // 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"); 136 137 137 138 // 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 ); 138 152 CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) ); 139 153 CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) ); -
src/unittests/Makefile.am
r5ffa05 rbd81f9 21 21 22 22 include ../../src/LinkedCell/unittests/Makefile.am 23 include ../../src/Parameters/unittests/Makefile.am 23 24 include ../../src/Parser/unittests/Makefile.am 24 25 include ../../src/RandomNumbers/unittests/Makefile.am … … 85 86 ${LINKEDCELLTESTSSOURCES} \ 86 87 ${LINEARALGEBRATESTSSOURCES} \ 88 ${PARAMETERTESTSSOURCES} \ 87 89 ${PARSERTESTSSOURCES} \ 88 90 ${RANDOMNUMBERTESTSSOURCES} \ … … 110 112 ${LINKEDCELLTESTHEADERS} \ 111 113 ${LINEARALGEBRATESTSHEADERS} \ 114 ${PARAMETERTESTSHEADERS} \ 112 115 ${PARSERTESTSHEADERS} \ 113 116 ${RANDOMNUMBERTESTSHEADERS} \ -
tests/Fragmentations/Fragmenting/1_2-dimethoxyethane/testsuite-fragmenting-1_2-dimethoxyethane-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/2-methylcyclohexanone/testsuite-fragmenting-2-methylcyclohexanone-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_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 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/benzene/testsuite-fragmenting-benzene-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cholesterol/testsuite-fragmenting-cholesterol-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/cycloheptane/testsuite-fragmenting-cycloheptane-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/dimethyl_bromomalonate/testsuite-fragmenting-dimethyl_bromomalonate-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/glucose/testsuite-fragmenting-glucose-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/heptan/testsuite-fragmenting-heptan-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/isoleucine/testsuite-fragmenting-isoleucine-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/neohexane/testsuite-fragmenting-neohexane-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/proline/testsuite-fragmenting-proline-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/putrescine/testsuite-fragmenting-putrescine-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order1.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order2.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order3.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order4.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order5.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Fragmentations/Fragmenting/tartaric_acid/testsuite-fragmenting-tartaric_acid-order6.at
r5ffa05 rbd81f9 14 14 AT_CHECK([chmod u+w $file], 0) 15 15 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])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]) 17 17 AT_CHECK([ls ${FILENAME}*.conf | wc -l | grep $FragNo], 0, [ignore], [ignore]) 18 18 AT_CHECK([ls ${FILENAME}*.xyz | wc -l | grep $FragNo], 0, [ignore], [ignore]) -
tests/Python/AllActions/options.dat
r5ffa05 rbd81f9 126 126 random-number-engine-parameters "seed=2;" 127 127 repeat-box "1 1 1" 128 reset 1 128 129 rotate-around-origin "180." 129 130 rotate-around-origin "20." -
tests/regression/Analysis/PairCorrelation-RangeTest/testsuite-analysis-pair-correlation-range-test.at
r5ffa05 rbd81f9 5 5 6 6 AT_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])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]) 8 8 #AT_CHECK([file=output-5.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-5.csv], 0, [ignore], [ignore]) 9 9 AT_CHECK([file=bin_output-5.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/bin_output-5.csv], 0, [ignore], [ignore]) 10 10 11 11 AT_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])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]) 13 13 #AT_CHECK([file=output-10.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-10.csv], 0, [ignore], [ignore]) 14 14 AT_CHECK([file=bin_output-10.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/bin_output-10.csv], 0, [ignore], [ignore]) 15 15 16 16 AT_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])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]) 18 18 #AT_CHECK([file=output-20.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/PairCorrelation-RangeTest/post/output-20.csv], 0, [ignore], [ignore]) 19 19 AT_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 5 5 6 6 AT_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])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]) 8 8 AT_CHECK([fgrep "Begin of PairCorrelation" stdout], 0, [ignore], [ignore]) 9 9 #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 5 5 6 6 AT_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-id0], 0, [stdout], [stderr])7 AT_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]) 8 8 AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore]) 9 9 #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 36 36 AT_SETUP([Atoms - adding outside boundary fails]) 37 37 AT_KEYWORDS([atoms boundary add-atom]) 38 AT_XFAIL_IF([/bin/true]) 38 39 39 40 AT_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 7 7 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 8 8 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 9 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 1, 1"], 0, [stdout], [stderr])9 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 1], 0, [stdout], [stderr]) 10 10 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 11 11 AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 16 16 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 17 17 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 18 AT_CHECK([../../molecuilder -i $file -o xyz -d "2, 1, 1"], 0, [stdout], [stderr])18 AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1], 0, [stdout], [stderr]) 19 19 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 20 20 AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 25 25 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 26 26 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 27 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 2, 1"], 0, [stdout], [stderr])27 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 2 1], 0, [stdout], [stderr]) 28 28 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 29 29 AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 34 34 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 35 35 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 36 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 1, 2"], 0, [stdout], [stderr])36 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 2], 0, [stdout], [stderr]) 37 37 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 38 38 AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 43 43 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0) 44 44 AT_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])45 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file -o tremolo -d 2 2 2], 0, [stdout], [stderr]) 46 46 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 47 47 AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/$file], 0, [ignore], [ignore]) … … 56 56 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 57 57 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 58 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 1, 1"--undo], 0, [stdout], [stderr])58 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 1 --undo], 0, [stdout], [stderr]) 59 59 AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore]) 60 60 AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 65 65 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 66 66 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 67 AT_CHECK([../../molecuilder -i $file -o xyz -d "2, 1, 1"--undo], 0, [stdout], [stderr])67 AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1 --undo], 0, [stdout], [stderr]) 68 68 AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore]) 69 69 AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 74 74 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 75 75 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 76 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 2, 1"--undo], 0, [stdout], [stderr])76 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 2 1 --undo], 0, [stdout], [stderr]) 77 77 AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore]) 78 78 AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 83 83 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 84 84 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 85 AT_CHECK([../../molecuilder -i $file -o xyz -d "1, 1, 2"--undo], 0, [stdout], [stderr])85 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 2 --undo], 0, [stdout], [stderr]) 86 86 AT_CHECK([fgrep "Box domain restored to" stdout], 0, [ignore], [ignore]) 87 87 AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 92 92 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0) 93 93 AT_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])94 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file -o tremolo -d 2 2 2 --undo], 0, [stdout], [stderr]) 95 95 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 96 96 AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/$file], 0, [ignore], [ignore]) … … 105 105 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 106 106 AT_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])107 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 1 --undo --redo], 0, [stdout], [stderr]) 108 108 AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore]) 109 109 AT_CHECK([file=test.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 114 114 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 115 115 AT_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])116 AT_CHECK([../../molecuilder -i $file -o xyz -d 2 1 1 --undo --redo], 0, [stdout], [stderr]) 117 117 AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore]) 118 118 AT_CHECK([file=test-x.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 123 123 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 124 124 AT_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])125 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 2 1 --undo --redo], 0, [stdout], [stderr]) 126 126 AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore]) 127 127 AT_CHECK([file=test-y.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 132 132 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/test.conf $file], 0) 133 133 AT_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])134 AT_CHECK([../../molecuilder -i $file -o xyz -d 1 1 2 --undo --redo], 0, [stdout], [stderr]) 135 135 AT_CHECK([fgrep "Box domain is again" stdout], 0, [ignore], [ignore]) 136 136 AT_CHECK([file=test-z.xyz;sort -n $file | grep -v "Created by" >$file-sorted], 0, [ignore], [ignore]) … … 141 141 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0) 142 142 AT_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])143 AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file -o tremolo -d 2 2 2 --undo --redo], 0, [stdout], [stderr]) 144 144 AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore]) 145 145 AT_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 4 4 AT_KEYWORDS([domain set-boundary-conditions]) 5 5 6 BC="Wrap , Wrap,Wrap"7 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions "$BC"], 0, [stdout], [stderr])6 BC="Wrap Wrap Wrap" 7 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr]) 8 8 AT_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])9 BC="Bounce Bounce Bounce" 10 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr]) 11 11 AT_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])12 BC="Ignore Ignore Ignore" 13 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr]) 14 14 AT_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])15 BC="Wrap Bounce Ignore" 16 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC], 0, [stdout], [stderr]) 17 17 AT_CHECK([fgrep "Boundary conditions are now ${BC}" stdout], 0, [ignore], [ignore]) 18 18 … … 23 23 AT_KEYWORDS([domain set-boundary-conditions undo]) 24 24 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])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]) 28 28 AT_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])29 BC="Bounce Bounce Bounce" 30 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr]) 31 31 AT_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])32 BC="Ignore Ignore Ignore" 33 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr]) 34 34 AT_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])35 BC="Wrap Bounce Ignore" 36 AT_CHECK([../../molecuilder -B "5,0,5,0,0,5" --set-boundary-conditions $BC --undo], 0, [stdout], [stderr]) 37 37 AT_CHECK([fgrep "Boundary conditions are set back to ${Check_BC}" stdout], 0, [ignore], [ignore]) 38 38 … … 43 43 AT_KEYWORDS([domain set-boundary-conditions redo]) 44 44 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])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]) 47 47 AT_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])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]) 50 50 AT_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])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]) 53 53 AT_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])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]) 56 56 AT_CHECK([fgrep "Boundary conditions are again ${BC}" stdout], 0, [ignore], [ignore]) 57 57 -
tests/regression/Filling/RegularGrid/testsuite-molecules-fill-regular-grid-with-surface.at
r5ffa05 rbd81f9 8 8 AT_CHECK([chmod u+w $file], 0) 9 9 # 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])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]) 11 11 12 12 AT_CLEANUP … … 18 18 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0) 19 19 AT_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])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]) 21 21 AT_CHECK([grep "366 out of 385 returned true from predicate" stdout], 0, [ignore], [ignore]) 22 22 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore]) … … 31 31 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0) 32 32 AT_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])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]) 34 34 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/double_sles-undo.data], 0, [ignore], [ignore]) 35 35 … … 43 43 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/double_sles.data $file], 0) 44 44 AT_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])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]) 46 46 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore]) 47 47 -
tests/regression/Filling/RegularGrid/testsuite-molecules-fill-regular-grid.at
r5ffa05 rbd81f9 7 7 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0) 8 8 AT_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])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]) 10 10 AT_CHECK([grep "222 out of 275 returned true from predicate" stdout], 0, [ignore], [ignore]) 11 11 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore]) … … 20 20 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0) 21 21 AT_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])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]) 23 23 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/single_sles-undo.data], 0, [ignore], [ignore]) 24 24 … … 32 32 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/pre/single_sles.data $file], 0) 33 33 AT_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])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]) 35 35 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/RegularGrid/post/$file], 0, [ignore], [ignore]) 36 36 -
tests/regression/Graph/SubgraphDissection-BoundaryConditions/testsuite-graph-subgraph-dissection_boundary-conditions.at
r5ffa05 rbd81f9 7 7 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 8 8 AT_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])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]) 10 10 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 11 11 file=water-bounced.xyz 12 12 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 13 13 AT_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])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]) 15 15 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 16 16 file=water-wrapped.xyz 17 17 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 18 18 AT_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])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]) 20 20 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 21 21 … … 28 28 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 29 29 AT_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])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]) 31 31 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 32 32 file=water-bounced.xyz 33 33 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 34 34 AT_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])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]) 36 36 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 37 37 file=water-wrapped.xyz 38 38 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 39 39 AT_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])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]) 41 41 AT_CHECK([fgrep "I scanned 2 molecules." stdout], 0, [ignore], [ignore]) 42 42 … … 49 49 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 50 50 AT_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])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]) 52 52 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 53 53 file=water-bounced.xyz 54 54 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 55 55 AT_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])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]) 57 57 AT_CHECK([fgrep "I scanned 1 molecules." stdout], 0, [ignore], [ignore]) 58 58 file=water-wrapped.xyz 59 59 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Graph/SubgraphDissection-BoundaryConditions/pre/$file $file], 0) 60 60 AT_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])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]) 62 62 AT_CHECK([fgrep "I scanned 2 molecules." stdout], 0, [ignore], [ignore]) 63 63 -
tests/regression/Makefile.am
r5ffa05 rbd81f9 127 127 $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-basis.at \ 128 128 $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-maxiterations.at \ 129 $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-none.at \ 129 130 $(srcdir)/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-theory.at \ 130 131 $(srcdir)/Parser/SetParameters/Psi3/testsuite-parser-set-parameters-psi3-reference.at \ … … 134 135 $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-load-multiply.at \ 135 136 $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-save.at \ 137 $(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-save-unique_usedfields.at \ 136 138 $(srcdir)/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at \ 137 139 $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials.at \ 138 140 $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-load.at \ 139 141 $(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-save.at \ 142 $(srcdir)/Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-resetatomdata.at \ 140 143 $(srcdir)/Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at \ 141 144 $(srcdir)/Parser/Xyz/testsuite-parser-xyz-empty.at \ -
tests/regression/Molecules/Copy/testsuite-molecules-copy-molecule.at
r5ffa05 rbd81f9 7 7 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0) 8 8 AT_CHECK([chmod u+w $file], 0) 9 AT_CHECK([../../molecuilder -i $file --copy-molecule 0--position "0,0,10"], 0, [stdout], [stderr])9 AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10"], 0, [stdout], [stderr]) 10 10 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-copy.xyz], 0, [ignore], [ignore]) 11 11 … … 14 14 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0) 15 15 AT_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])16 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10"], 0, [stdout], [stderr]) 17 17 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore]) 18 18 … … 26 26 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0) 27 27 AT_CHECK([chmod u+w $file], 0) 28 AT_CHECK([../../molecuilder -i $file --copy-molecule 0--position "0,0,10" --undo], 0, [stdout], [stderr])28 AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo], 0, [stdout], [stderr]) 29 29 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-undo.xyz], 0, [ignore], [ignore]) 30 30 … … 33 33 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0) 34 34 AT_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])35 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo], 0, [stdout], [stderr]) 36 36 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.data], 0, [ignore], [ignore]) 37 37 … … 45 45 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/test.xyz $file], 0) 46 46 AT_CHECK([chmod u+w $file], 0) 47 AT_CHECK([../../molecuilder -i $file --copy-molecule 0--position "0,0,10" --undo --redo], 0, [stdout], [stderr])47 AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --copy-molecule --position "0,0,10" --undo --redo], 0, [stdout], [stderr]) 48 48 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/test-copy.xyz], 0, [ignore], [ignore]) 49 49 … … 52 52 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Copy/pre/tensid.potentials .], 0) 53 53 AT_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])54 AT_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]) 55 55 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore]) 56 56 -
tests/regression/Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc.at
r5ffa05 rbd81f9 4 4 AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory]) 5 5 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])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]) 7 7 AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore]) 8 8 … … 14 14 AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory undo]) 15 15 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])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]) 17 17 AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore]) 18 18 … … 23 23 AT_KEYWORDS([options mpqc set-mpqc-parameters basis maxiter theory redo]) 24 24 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])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]) 26 26 AT_CHECK([file=testCLHF.in; diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in], 0, [ignore], [ignore]) 27 27 -
tests/regression/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-save.at
r5ffa05 rbd81f9 4 4 AT_KEYWORDS([parser tremolo save parse-tremolo-potentials]) 5 5 6 AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Potentials/pre/argon.potentials .], 0, [ignore], [ignore]) 6 7 AT_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]) 7 8 AT_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 1 1 ### parsing tremolo 2 2 3 AT_SETUP([Parser - set tremolo's atomdata])3 AT_SETUP([Parser - reset tremolo's atomdata]) 4 4 AT_KEYWORDS([parser tremolo set-tremolo-atomdata]) 5 5 … … 8 8 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 9 9 AT_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])10 AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/argon.data], 0, [ignore], [ignore]) 11 11 12 12 AT_CLEANUP 13 14 AT_SETUP([Parser - reset tremolo's atomdata with Undo]) 15 AT_KEYWORDS([parser tremolo set-tremolo-atomdata undo]) 16 17 file=argon.data 18 AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/pre/argon.data $file], 0, [ignore], [ignore]) 19 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 20 AT_CHECK([../../molecuilder -i argon.data --set-tremolo-atomdata "type x=3" --undo], 0, [stdout], [ignore]) 21 AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/undo.data], 0, [ignore], [ignore]) 22 23 AT_CLEANUP 24 25 AT_SETUP([Parser - reset tremolo's atomdata with Redo]) 26 AT_KEYWORDS([parser tremolo set-tremolo-atomdata redo]) 27 28 file=argon.data 29 AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/pre/argon.data $file], 0, [ignore], [ignore]) 30 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 31 AT_CHECK([../../molecuilder -i argon.data --set-tremolo-atomdata "type x=3" --undo --redo], 0, [stdout], [ignore]) 32 AT_CHECK([diff -I '%.*' $file ${abs_top_srcdir}/tests/regression/Parser/Tremolo-SetAtomdata/post/argon.data], 0, [ignore], [ignore]) 33 34 AT_CLEANUP -
tests/regression/Parser/testsuite-parser.at
r5ffa05 rbd81f9 10 10 # set mpqc basis, theory and maxiter 11 11 m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc.at]) 12 m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-none.at]) 12 13 m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-basis.at]) 13 14 m4_include([Parser/SetParameters/Mpqc/testsuite-parser-set-parameters-mpqc-maxiterations.at]) … … 49 50 m4_include([Parser/Tremolo/testsuite-parser-tremolo-load-multiply.at]) 50 51 m4_include([Parser/Tremolo/testsuite-parser-tremolo-save.at]) 52 m4_include([Parser/Tremolo/testsuite-parser-tremolo-save-unique_usedfields.at]) 51 53 52 54 # parsing tremolo with .potentials … … 57 59 # setting tremolo's atomdata line 58 60 m4_include([Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at]) 61 m4_include([Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-resetatomdata.at]) 59 62 60 63 # writing and exttypes file -
tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at
r5ffa05 rbd81f9 35 35 AT_KEYWORDS([selection molecule select-molecules-by-formula undo]) 36 36 37 comparisonfile=empty.xyz 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 38 39 srcfile=mix.xyz 39 40 testfile=test.xyz 40 targetfile=empty .xyz41 targetfile=empty1.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 46 47 srcfile=mix.xyz 47 48 testfile=test.xyz 48 targetfile=empty .xyz49 targetfile=empty2.xyz 49 50 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 50 51 AT_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])52 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 52 53 53 54 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 54 55 srcfile=mix.xyz 55 56 testfile=test.xyz 56 targetfile=empty .xyz57 targetfile=empty3.xyz 57 58 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 58 59 AT_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])60 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 60 61 61 62 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-unselect-molecules-by-formula.at
r5ffa05 rbd81f9 35 35 AT_KEYWORDS([unselection molecule unselect-molecules-by-formula undo]) 36 36 37 comparisonfile=mix.xyz 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 38 39 srcfile=mix.xyz 39 40 testfile=test.xyz 40 targetfile=mix .xyz41 targetfile=mix1.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 46 47 srcfile=mix.xyz 47 48 testfile=test.xyz 48 targetfile=mix .xyz49 targetfile=mix2.xyz 49 50 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 50 51 AT_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])52 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 52 53 53 54 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" 54 55 srcfile=mix.xyz 55 56 testfile=test.xyz 56 targetfile=mix .xyz57 targetfile=mix3.xyz 57 58 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 58 59 AT_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])60 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 60 61 61 62 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-select-molecule-by-order-backward.at
r5ffa05 rbd81f9 27 27 AT_KEYWORDS([selection molecule select-molecule-by-order undo]) 28 28 29 comparisonfile=empty.xyz 29 30 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 30 31 srcfile=twowater.xyz 31 32 testfile=test.xyz 32 targetfile=empty .xyz33 targetfile=empty1.xyz 33 34 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 34 35 AT_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])36 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 36 37 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 38 39 srcfile=twowater.xyz 39 40 testfile=test.xyz 40 targetfile=empty .xyz41 targetfile=empty2.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-select-molecule-by-order-forward.at
r5ffa05 rbd81f9 27 27 AT_KEYWORDS([selection molecule select-molecule-by-order undo]) 28 28 29 comparisonfile=empty.xyz 29 30 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 30 31 srcfile=twowater.xyz 31 32 testfile=test.xyz 32 targetfile=empty .xyz33 targetfile=empty1.xyz 33 34 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 34 35 AT_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])36 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 36 37 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 38 39 srcfile=twowater.xyz 39 40 testfile=test.xyz 40 targetfile=empty .xyz41 targetfile=empty2.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-unselect-molecule-by-order-backward.at
r5ffa05 rbd81f9 27 27 AT_KEYWORDS([unselection molecule unselect-molecule-by-order undo]) 28 28 29 comparisonfile=twowater.xyz 29 30 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 30 31 srcfile=twowater.xyz 31 32 testfile=test.xyz 32 targetfile=twowater .xyz33 targetfile=twowater1.xyz 33 34 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 34 35 AT_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])36 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 36 37 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 38 39 srcfile=twowater.xyz 39 40 testfile=test.xyz 40 targetfile=twowater .xyz41 targetfile=twowater2.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-unselect-molecule-by-order-forward.at
r5ffa05 rbd81f9 27 27 AT_KEYWORDS([unselection molecule unselect-molecule-by-order undo]) 28 28 29 comparisonfile=twowater.xyz 29 30 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 30 31 srcfile=twowater.xyz 31 32 testfile=test.xyz 32 targetfile=twowater .xyz33 targetfile=twowater1.xyz 33 34 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 34 35 AT_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])36 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 36 37 37 38 regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder" 38 39 srcfile=twowater.xyz 39 40 testfile=test.xyz 40 targetfile=twowater .xyz41 targetfile=twowater2.xyz 41 42 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 43 AT_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])44 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) 44 45 45 46 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.