Continuous1DFunction¶
-
class
OpenMM::Continuous1DFunction¶ This is a
TabulatedFunctionthat computes a continuous one dimensional function.Methods
Continuous1DFunctionCreate a Continuous1DFunctionf(x) based on a set of tabulated values.getFunctionParametersGet the parameters for the tabulated function. setFunctionParametersSet the parameters for the tabulated function. CopyCreate a deep copy of the tabulated function. -
Continuous1DFunction(const std::vector<double> &values, double min, double max)¶ Create a
Continuous1DFunction()f(x) based on a set of tabulated values.Parameters: - values – the tabulated values of the function f(x) at uniformly spaced values of x between min and max. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero for x < min or x > max.
- min – the value of x corresponding to the first element of values
- max – the value of x corresponding to the last element of values
-
void
getFunctionParameters(std::vector<double> &values, double &min, double &max) const¶ Get the parameters for the tabulated function.
Parameters: - values – [out] the tabulated values of the function f(x) at uniformly spaced values of x between min and max. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero for x < min or x > max.
- min – [out] the value of x corresponding to the first element of values
- max – [out] the value of x corresponding to the last element of values
-
void
setFunctionParameters(const std::vector<double> &values, double min, double max)¶ Set the parameters for the tabulated function.
Parameters: - values – the tabulated values of the function f(x) at uniformly spaced values of x between min and max. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero for x < min or x > max.
- min – the value of x corresponding to the first element of values
- max – the value of x corresponding to the last element of values
-
Continuous1DFunction *
Copy() const¶ Create a deep copy of the tabulated function.
Deprecated
This will be removed in a future release.
-