Continuous1DFunction

class openmm.openmm.Continuous1DFunction(*args)

This is a TabulatedFunction that computes a continuous one dimensional function.

__init__(self, values, min, max, periodic=False)Continuous1DFunction
__init__(self, other)Continuous1DFunction

Create a Continuous1DFunction f(x) based on a set of tabulated values.

Parameters
  • values (vector< double >) – 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 (double) – the value of x corresponding to the first element of values

  • max (double) – the value of x corresponding to the last element of values

  • periodic (bool) – whether the interpolated function is periodic

Methods

Copy(self)

Create a deep copy of the tabulated function.

__init__(-> Continuous1DFunction)

Create a Continuous1DFunction f(x) based on a set of tabulated values.

getFunctionParameters(self)

Get the parameters for the tabulated function.

getPeriodic(self)

Get the periodicity status of the tabulated function.

getUpdateCount(self)

Get the value of a counter that is updated every time setFunctionParameters() is called.

setFunctionParameters(self, values, min, max)

Set the parameters for the tabulated function.

Attributes

thisown

The membership flag

property thisown

The membership flag

getFunctionParameters(self)

Get the parameters for the tabulated function.

Returns

  • values (vector< double >) – 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 (double) – the value of x corresponding to the first element of values

  • max (double) – the value of x corresponding to the last element of values

setFunctionParameters(self, values, min, max)

Set the parameters for the tabulated function.

Parameters
  • values (vector< double >) – 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 (double) – the value of x corresponding to the first element of values

  • max (double) – the value of x corresponding to the last element of values

Copy(self)Continuous1DFunction

Create a deep copy of the tabulated function.

Deprecated

This will be removed in a future release.

__eq__(self, other)bool
__ne__(self, other)bool
getPeriodic(self)bool

Get the periodicity status of the tabulated function.

getUpdateCount(self)int

Get the value of a counter that is updated every time setFunctionParameters() is called. This provides a fast way to detect when a function has changed.