Discrete1DFunction¶
- class openmm.openmm.Discrete1DFunction(*args)¶
This is a TabulatedFunction that computes a discrete one dimensional function f(x). To evaluate it, x is rounded to the nearest integer and the table element with that index is returned. If the index is outside the range [0, size), the result is undefined.
- __init__(self, values) Discrete1DFunction ¶
- __init__(self, other) Discrete1DFunction
Create a Discrete1DFunction f(x) based on a set of tabulated values.
- Parameters:
values (Sequence[float]) – the tabulated values of the function f(x)
Methods
Copy
(self)Create a deep copy of the tabulated function
__init__
(-> Discrete1DFunction)Create a Discrete1DFunction 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)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:
values – the tabulated values of the function f(x)
- Return type:
Sequence[float]
- setFunctionParameters(self, values)¶
Set the parameters for the tabulated function.
- Parameters:
values (Sequence[float]) – the tabulated values of the function f(x)
- Copy(self) Discrete1DFunction ¶
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.