Discrete3DFunction¶
- class openmm.openmm.Discrete3DFunction(*args)¶
This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z). To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those indices is returned. If any index is outside the range [0, size), the result is undefined.
- __init__(self, xsize, ysize, zsize, values) Discrete3DFunction ¶
- __init__(self, other) Discrete3DFunction
Create a Discrete3DFunction f(x,y,z) based on a set of tabulated values.
- Parameters:
xsize (int) – the number of table elements along the x direction
ysize (int) – the number of table elements along the y direction
zsize (int) – the number of table elements along the z direction
values (Sequence[float]) – the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
Methods
Copy
(self)Create a deep copy of the tabulated function
__init__
(-> Discrete3DFunction)Create a Discrete3DFunction f(x,y,z) 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
The membership flag
- property thisown¶
The membership flag
- getFunctionParameters(self)¶
Get the parameters for the tabulated function.
- Returns:
xsize (int) – the number of table elements along the x direction
ysize (int) – the number of table elements along the y direction
zsize (int) – the number of table elements along the z direction
values (Sequence[float]) – the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
- setFunctionParameters(self, xsize, ysize, zsize, values)¶
Set the parameters for the tabulated function.
- Parameters:
xsize (int) – the number of table elements along the x direction
ysize (int) – the number of table elements along the y direction
zsize (int) – the number of table elements along the z direction
values (Sequence[float]) – the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
- Copy(self) Discrete3DFunction ¶
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.