diff --git a/src/Action.cpp b/src/Action.cpp index fd8155ad52e8f4384af28de8ae0b31144dd80000..2ac3b5bdf0b0fbd3bfd127d3033b4fe206f7ecaf 100644 --- a/src/Action.cpp +++ b/src/Action.cpp @@ -95,6 +95,10 @@ double Action::getTime()const{ return plumed.getAtoms().getTimeStep()*getStep(); } +double Action::getTimeStep()const{ + return plumed.getAtoms().getTimeStep(); +} + void Action::exit(int c){ diff --git a/src/Action.h b/src/Action.h index 51d6f3d80e57ba464c8bc51a6ea7249355ba2fc9..b432074e8d06d3c99ac8f1d10df97ef1d184ca8f 100644 --- a/src/Action.h +++ b/src/Action.h @@ -75,6 +75,9 @@ protected: /// Return the present time double getTime()const; +/// Return the timestep + double getTimeStep()const; + /// Check if Action was properly read. /// This checks if Action::line is empty. It must be called after /// a final Action has been initialized diff --git a/src/Value.cpp b/src/Value.cpp index 618a1bb30bde323d4091e7bde4561b1d844ed895..1ec70fcfcc78d6f3e1b5505a6417e42f3d172fde 100644 --- a/src/Value.cpp +++ b/src/Value.cpp @@ -13,6 +13,16 @@ Value::Value(ActionWithValue&action,const std::string& name): max(0.0) {} +bool Value::isPeriodic()const{ + assert(periodicity!=unset); + return periodicity==periodic; +} + +void Value::getDomain(double&min,double&max)const{ + min=this->min; + max=this->max; +} + void Value::setPeriodicity(bool p){ if(p) periodicity=periodic; else periodicity=notperiodic; diff --git a/src/Value.h b/src/Value.h index 8568d98b4fad8a1335468dc3f518edc0d7e92ea6..990362283d6cb55fa451c8652efa1ab98e05c667 100644 --- a/src/Value.h +++ b/src/Value.h @@ -31,6 +31,8 @@ public: double get()const; void setPeriodicity(bool); void setDomain(double,double); + bool isPeriodic()const; + void getDomain(double&,double&)const; const std::string& getName()const; const std::string getFullName()const; void enableDerivatives();