Continuous2DFunction

class openmm.openmm.Continuous2DFunction(*args)

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

__init__(self, xsize, ysize, values, xmin, xmax, ymin, ymax, periodic=False)Continuous2DFunction
__init__(self, other)Continuous2DFunction

Create a Continuous2DFunction f(x,y) based on a set of tabulated values.

Parameters
  • values (int) – the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i’th uniformly spaced value of x. This must be of length xsize*ysize.

  • xsize (int) – the number of table elements along the x direction

  • ysize (vector< double >) – the number of table elements along the y direction

  • xmin (double) – the value of x corresponding to the first element of values

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

  • ymin (double) – the value of y corresponding to the first element of values

  • ymax (double) – the value of y 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__(-> Continuous2DFunction)

Create a Continuous2DFunction f(x,y) 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, xsize, ysize, …)

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 (int) – the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i’th uniformly spaced value of x. This must be of length xsize*ysize.

  • xsize (int) – the number of table elements along the x direction

  • ysize (vector< double >) – the number of table elements along the y direction

  • xmin (double) – the value of x corresponding to the first element of values

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

  • ymin (double) – the value of y corresponding to the first element of values

  • ymax (double) – the value of y corresponding to the last element of values

setFunctionParameters(self, xsize, ysize, values, xmin, xmax, ymin, ymax)

Set the parameters for the tabulated function.

Parameters
  • values (int) – the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i’th uniformly spaced value of x. This must be of length xsize*ysize.

  • xsize (int) – the number of table elements along the x direction

  • ysize (vector< double >) – the number of table elements along the y direction

  • xmin (double) – the value of x corresponding to the first element of values

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

  • ymin (double) – the value of y corresponding to the first element of values

  • ymax (double) – the value of y corresponding to the last element of values

Copy(self)Continuous2DFunction

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.