# Continuous3DFunction¶

class openmm.openmm.Continuous3DFunction(*args)

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

__init__(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax, periodic=False)Continuous3DFunction
__init__(self, other)Continuous3DFunction

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

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

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

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

• ysize – the number of table elements along the z 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

• zmin (double) – the value of z corresponding to the first element of values

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

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

• ysize (int) – the number of table elements along the y direction

• zsize (vector< double >) – the number of table elements along the z 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

• zmin (double) – the value of z corresponding to the first element of values

• zmax (double) – the value of z corresponding to the last element of values

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

Set the parameters for the tabulated function.

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

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

• ysize (int) – the number of table elements along the y direction

• zsize (vector< double >) – the number of table elements along the z 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

• zmin (double) – the value of z corresponding to the first element of values

• zmax (double) – the value of z corresponding to the last element of values

Copy(self)Continuous3DFunction

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.