Package ffx.openmm
Class Continuous3DFunction
java.lang.Object
ffx.openmm.TabulatedFunction
ffx.openmm.Continuous3DFunction
This is a TabulatedFunction that computes a continuous three dimensional function.
-
Field Summary
Fields inherited from class ffx.openmm.TabulatedFunction
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionContinuous3DFunction
(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, int zsize, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, boolean periodic) Create a Continuous3DFunction f(x,y,z) based on a set of tabulated values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the continuous 3D function.void
getFunctionParameters
(com.sun.jna.ptr.PointerByReference values, com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.IntByReference zsize, com.sun.jna.ptr.DoubleByReference xmin, com.sun.jna.ptr.DoubleByReference xmax, com.sun.jna.ptr.DoubleByReference ymin, com.sun.jna.ptr.DoubleByReference ymax, com.sun.jna.ptr.DoubleByReference zmin, com.sun.jna.ptr.DoubleByReference zmax) Get the parameters for the tabulated function.void
setFunctionParameters
(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, int zsize, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) Set the parameters for the tabulated function.Methods inherited from class ffx.openmm.TabulatedFunction
getPeriodic, getPointer, getUpdateCount
-
Constructor Details
-
Continuous3DFunction
public Continuous3DFunction(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, int zsize, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, boolean periodic) Create a Continuous3DFunction f(x,y,z) based on a set of tabulated values.- Parameters:
values
- 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
- the number of table elements along the x directionysize
- the number of table elements along the y directionzsize
- the number of table elements along the z directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of valueszmin
- the value of z corresponding to the first element of valueszmax
- the value of z corresponding to the last element of valuesperiodic
- whether the interpolated function is periodic
-
-
Method Details
-
destroy
public void destroy()Destroy the continuous 3D function.- Specified by:
destroy
in classTabulatedFunction
-
getFunctionParameters
public void getFunctionParameters(com.sun.jna.ptr.PointerByReference values, com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.IntByReference zsize, com.sun.jna.ptr.DoubleByReference xmin, com.sun.jna.ptr.DoubleByReference xmax, com.sun.jna.ptr.DoubleByReference ymin, com.sun.jna.ptr.DoubleByReference ymax, com.sun.jna.ptr.DoubleByReference zmin, com.sun.jna.ptr.DoubleByReference zmax) Get the parameters for the tabulated function.- Parameters:
values
- 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
- the number of table elements along the x directionysize
- the number of table elements along the y directionzsize
- the number of table elements along the z directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of valueszmin
- the value of z corresponding to the first element of valueszmax
- the value of z corresponding to the last element of values
-
setFunctionParameters
public void setFunctionParameters(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, int zsize, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) Set the parameters for the tabulated function.- Parameters:
values
- 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
- the number of table elements along the x directionysize
- the number of table elements along the y directionzsize
- the number of table elements along the z directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of valueszmin
- the value of z corresponding to the first element of valueszmax
- the value of z corresponding to the last element of values
-