| 52 |
|
|
| 53 |
|
#include "io/ParamConstraint.hpp" |
| 54 |
|
|
| 55 |
+ |
using namespace oopse; |
| 56 |
|
|
| 57 |
|
Globals::Globals(){ |
| 58 |
|
|
| 130 |
|
|
| 131 |
|
} |
| 132 |
|
|
| 133 |
+ |
Globals::~Globals(){ |
| 134 |
+ |
int i; |
| 135 |
+ |
if( components != NULL ){ |
| 136 |
+ |
for( i=0; i< getNComponents(); i++ ) delete components[i]; |
| 137 |
+ |
delete[] components; |
| 138 |
+ |
} |
| 139 |
+ |
|
| 140 |
+ |
if( zConstraints != NULL ){ |
| 141 |
+ |
for( i=0; i< getNZconstraints(); i++ ) delete zConstraints[i]; |
| 142 |
+ |
delete[] zConstraints; |
| 143 |
+ |
} |
| 144 |
+ |
|
| 145 |
+ |
} |
| 146 |
+ |
|
| 147 |
|
int Globals::globalAssign( event* the_event ){ |
| 148 |
|
char errorMessage[65535]; |
| 149 |
|
int key; |
| 342 |
|
CheckParameter(ForceField, isNotEmpty()); |
| 343 |
|
CheckParameter(NComponents,isPositive()); |
| 344 |
|
CheckParameter(TargetTemp, isPositive()); |
| 345 |
< |
CheckParameter(Ensemble, isEqualIgnoreCase(std::string("NVE")) || |
| 331 |
< |
isEqualIgnoreCase(std::string("NVT")) || |
| 332 |
< |
isEqualIgnoreCase(std::string("NPTi")) || |
| 333 |
< |
isEqualIgnoreCase(std::string("NPTf")) || |
| 334 |
< |
isEqualIgnoreCase(std::string("NPTxyz")) ); |
| 345 |
> |
CheckParameter(Ensemble, isEqualIgnoreCase(std::string("NVE")) || isEqualIgnoreCase(std::string("NVT")) || isEqualIgnoreCase(std::string("NPTi")) || isEqualIgnoreCase(std::string("NPTf")) || isEqualIgnoreCase(std::string("NPTxyz")) ); |
| 346 |
|
CheckParameter(Dt, isPositive()); |
| 347 |
|
CheckParameter(RunTime, isPositive()); |
| 348 |
|
CheckParameter(InitialConfig, isNotEmpty()); |
| 368 |
|
CheckParameter(ZconsTol, isPositive()); |
| 369 |
|
//CheckParameter(ZconsForcePolicy,); |
| 370 |
|
CheckParameter(Seed, isPositive()); |
| 371 |
< |
CheckParameter(Minimizer, isEqualIgnoreCase(std::string("SD")) || |
| 361 |
< |
isEqualIgnoreCase(std::string("CG"))); |
| 371 |
> |
CheckParameter(Minimizer, isEqualIgnoreCase(std::string("SD")) || isEqualIgnoreCase(std::string("CG"))); |
| 372 |
|
CheckParameter(MinimizerMaxIter, isPositive()); |
| 373 |
|
CheckParameter(MinimizerWriteFrq, isPositive()); |
| 374 |
|
CheckParameter(MinimizerStepSize, isPositive()); |
| 386 |
|
CheckParameter(ThermIntThetaSpringConst, isPositive()); |
| 387 |
|
CheckParameter(ThermIntOmegaSpringConst, isPositive()); |
| 388 |
|
CheckParameter(SurfaceTension, isPositive()); |
| 389 |
< |
CheckParameter(ElectrostaticSummationMethod, |
| 390 |
< |
isEqualIgnoreCase(std::string("NONE")) || |
| 391 |
< |
isEqualIgnoreCase(std::string("SHIFTED_POTENTIAL")) || |
| 392 |
< |
isEqualIgnoreCase(std::string("SHIFTED_FORCE")) || |
| 383 |
< |
isEqualIgnoreCase(std::string("REACTION_FIELD"))); |
| 384 |
< |
CheckParameter(ElectrostaticScreeningMethod, |
| 385 |
< |
isEqualIgnoreCase(std::string("UNDAMPED")) || |
| 386 |
< |
isEqualIgnoreCase(std::string("DAMPED"))); |
| 387 |
< |
CheckParameter(CutoffPolicy, isEqualIgnoreCase(std::string("MIX")) || |
| 388 |
< |
isEqualIgnoreCase(std::string("MAX")) || |
| 389 |
< |
isEqualIgnoreCase(std::string("TRADITIONAL"))); |
| 390 |
< |
CheckParameter(SwitchingFunctionType, |
| 391 |
< |
isEqualIgnoreCase(std::string("CUBIC")) || |
| 392 |
< |
isEqualIgnoreCase(std::string("FIFTH_ORDER_POLYNOMIAL"))); |
| 389 |
> |
CheckParameter(ElectrostaticSummationMethod, isEqualIgnoreCase(std::string("NONE")) || isEqualIgnoreCase(std::string("SHIFTED_POTENTIAL")) || isEqualIgnoreCase(std::string("SHIFTED_FORCE")) || isEqualIgnoreCase(std::string("REACTION_FIELD"))); |
| 390 |
> |
CheckParameter(ElectrostaticScreeningMethod, isEqualIgnoreCase(std::string("UNDAMPED")) || isEqualIgnoreCase(std::string("DAMPED"))); |
| 391 |
> |
CheckParameter(CutoffPolicy, isEqualIgnoreCase(std::string("MIX")) || isEqualIgnoreCase(std::string("MAX")) || isEqualIgnoreCase(std::string("TRADITIONAL"))); |
| 392 |
> |
CheckParameter(SwitchingFunctionType, isEqualIgnoreCase(std::string("CUBIC")) || isEqualIgnoreCase(std::string("FIFTH_ORDER_POLYNOMIAL"))); |
| 393 |
|
//CheckParameter(StatFileFormat,); |
| 394 |
|
//CheckParameter(MixingRule,); |
| 395 |
|
CheckParameter(OrthoBoxTolerance, isPositive()); |