There was an error fetching the commit references. Please try again later.
Tentative implementation of periodic variables
Implementation of periodicity as we discussed at the meeting. In the constructor of a collective variable or function is it possible to declare, for each value, if it is periodic or not. E.g., torsions will be periodic, distances not. The difference between two values (hypothetically, a stored value and the present one) can than be computed automatically using a Value::difference() method. If difference() is called for undeclared values, an error is raised. Thus, functions of unpredictable periodicity (e.g. MATHEVAL) should allow the user to specify the periodicity (or the non-periodicity) in the input line. See how I implemented the setting of periodicity in the available Colvars. The syntax is a bit baroque (I will probably simplify it), but it seems to work. I also added a check on the fact that two labels can not be equal.
Showing
- src/Action.cpp 1 addition, 0 deletionssrc/Action.cpp
- src/ActionWithArguments.h 7 additions, 0 deletionssrc/ActionWithArguments.h
- src/BiasMovingRestraint.cpp 1 addition, 1 deletionsrc/BiasMovingRestraint.cpp
- src/BiasRestraint.cpp 1 addition, 1 deletionsrc/BiasRestraint.cpp
- src/ColvarDistance.cpp 5 additions, 0 deletionssrc/ColvarDistance.cpp
- src/ColvarEnergy.cpp 1 addition, 0 deletionssrc/ColvarEnergy.cpp
- src/ColvarVolume.cpp 2 additions, 0 deletionssrc/ColvarVolume.cpp
- src/FunctionCombine.cpp 14 additions, 1 deletionsrc/FunctionCombine.cpp
- src/FunctionMatheval.cpp 11 additions, 1 deletionsrc/FunctionMatheval.cpp
- src/Value.cpp 35 additions, 0 deletionssrc/Value.cpp
- src/Value.h 87 additions, 13 deletionssrc/Value.h
- test/simplemd/in 1 addition, 1 deletiontest/simplemd/in
- test/simplemd/plumed.dat 13 additions, 8 deletionstest/simplemd/plumed.dat
Loading
Please register or sign in to comment