Gromacs
2020-beta1
|
#include <gromacs/options/timeunitmanager.h>
Provides common functionality for time unit conversions.
Methods/objects that need to deal with time units can either take a TimeUnitManager object, or they can take a TimeUnit value and construct a TimeUnitManager object internally.
Default copy constructor and assignment are used: the copy is an independent object that is initialized with the same time unit as the original.
Public Member Functions | |
TimeUnitManager () | |
Creates a time unit manager with the default (ps) time unit. | |
TimeUnitManager (TimeUnit unit) | |
Creates a time unit manager with the given time unit. | |
TimeUnit | timeUnit () const |
Returns the currently selected time unit. | |
void | setTimeUnit (TimeUnit unit) |
Set a new time unit for the manager. | |
const char * | timeUnitAsString () const |
Returns a string constant corresponding to the current time unit. | |
double | timeScaleFactor () const |
Returns the scaling factor to convert times to ps. | |
double | inverseTimeScaleFactor () const |
Returns the scaling factor to convert times from ps. | |