Package ffx.openmm.amoeba
Class TorsionTorsionForce
java.lang.Object
ffx.openmm.Force
ffx.openmm.amoeba.TorsionTorsionForce
- Direct Known Subclasses:
AmoebaTorsionTorsionForce
This class implements the Amoeba torsion-torsion interaction.
To use it, create an AmoebaTorsionTorsionForce object then call addTorsionTorsion() once for each torsion-torsion. After a torsion-torsion has been added, you can modify its force field parameters by calling setTorsionTorsionParameters().
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
addTorsionTorsion
(int particle1, int particle2, int particle3, int particle4, int particle5, int chiralCheckAtomIndex, int gridIndex) Add a torsion-torsion term to the force field.void
destroy()
Destroy the Amoeba Torsion-Torsion Force.int
Get the number of torsion-torsion gridsint
Get the number of torsion-torsion terms in the potential functioncom.sun.jna.ptr.PointerByReference
getTorsionTorsionGrid
(int index) Get the torsion-torsion grid at the specified indexvoid
getTorsionTorsionParameters
(int index, com.sun.jna.ptr.IntByReference particle1, com.sun.jna.ptr.IntByReference particle2, com.sun.jna.ptr.IntByReference particle3, com.sun.jna.ptr.IntByReference particle4, com.sun.jna.ptr.IntByReference particle5, com.sun.jna.ptr.IntByReference chiralCheckAtomIndex, com.sun.jna.ptr.IntByReference gridIndex) Get the force field parameters for a torsion-torsion term.void
setTorsionTorsionGrid
(int gridIndex, com.sun.jna.ptr.PointerByReference grid) Set the torsion-torsion grid at the specified indexvoid
setTorsionTorsionParameters
(int index, int particle1, int particle2, int particle3, int particle4, int particle5, int chiralCheckAtomIndex, int gridIndex) Set the force field parameters for a torsion-torsion term.void
setUsesPeriodicBoundaryConditions
(boolean periodic) Set whether this force should apply periodic boundary conditions when calculating displacements.boolean
Returns whether or not this force makes use of periodic boundary conditions.Methods inherited from class ffx.openmm.Force
getForceGroup, getForceIndex, getName, getPointer, setForceGroup, setForceIndex, setName
-
Constructor Details
-
TorsionTorsionForce
public TorsionTorsionForce()Create an AmoebaTorsionTorsionForce.
-
-
Method Details
-
addTorsionTorsion
public int addTorsionTorsion(int particle1, int particle2, int particle3, int particle4, int particle5, int chiralCheckAtomIndex, int gridIndex) Add a torsion-torsion term to the force field.- Parameters:
particle1
- the index of the first particle connected by the torsion-torsionparticle2
- the index of the second particle connected by the torsion-torsionparticle3
- the index of the third particle connected by the torsion-torsionparticle4
- the index of the fourth particle connected by the torsion-torsionparticle5
- the index of the fifth particle connected by the torsion-torsionchiralCheckAtomIndex
- the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality checkgridIndex
- the index to the grid to be used- Returns:
- the index of the torsion-torsion that was added
-
destroy
public void destroy()Destroy the Amoeba Torsion-Torsion Force. -
getNumTorsionTorsions
public int getNumTorsionTorsions()Get the number of torsion-torsion terms in the potential function- Returns:
- the number of torsion-torsion terms
-
getNumTorsionTorsionGrids
public int getNumTorsionTorsionGrids()Get the number of torsion-torsion grids- Returns:
- the number of torsion-torsion grids
-
getTorsionTorsionParameters
public void getTorsionTorsionParameters(int index, com.sun.jna.ptr.IntByReference particle1, com.sun.jna.ptr.IntByReference particle2, com.sun.jna.ptr.IntByReference particle3, com.sun.jna.ptr.IntByReference particle4, com.sun.jna.ptr.IntByReference particle5, com.sun.jna.ptr.IntByReference chiralCheckAtomIndex, com.sun.jna.ptr.IntByReference gridIndex) Get the force field parameters for a torsion-torsion term.- Parameters:
index
- the index of the torsion-torsion for which to get parametersparticle1
- the index of the first particle connected by the torsion-torsionparticle2
- the index of the second particle connected by the torsion-torsionparticle3
- the index of the third particle connected by the torsion-torsionparticle4
- the index of the fourth particle connected by the torsion-torsionparticle5
- the index of the fifth particle connected by the torsion-torsionchiralCheckAtomIndex
- the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality checkgridIndex
- the grid index
-
getTorsionTorsionGrid
public com.sun.jna.ptr.PointerByReference getTorsionTorsionGrid(int index) Get the torsion-torsion grid at the specified index- Parameters:
index
- the grid index- Returns:
- grid return grid reference
-
setTorsionTorsionParameters
public void setTorsionTorsionParameters(int index, int particle1, int particle2, int particle3, int particle4, int particle5, int chiralCheckAtomIndex, int gridIndex) Set the force field parameters for a torsion-torsion term.- Parameters:
index
- the index of the torsion-torsion for which to set parametersparticle1
- the index of the first particle connected by the torsion-torsionparticle2
- the index of the second particle connected by the torsion-torsionparticle3
- the index of the third particle connected by the torsion-torsionparticle4
- the index of the fourth particle connected by the torsion-torsionparticle5
- the index of the fifth particle connected by the torsion-torsionchiralCheckAtomIndex
- the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality checkgridIndex
- the grid index
-
setTorsionTorsionGrid
public void setTorsionTorsionGrid(int gridIndex, com.sun.jna.ptr.PointerByReference grid) Set the torsion-torsion grid at the specified index- Parameters:
gridIndex
- the index of the torsion-torsion for which to get parametersgrid
- either 3 or 6 values may be specified per grid point. If the derivatives are omitted, they are calculated automatically by fitting a 2D spline to the energies. grid[x][y][0] = x value grid[x][y][1] = y value grid[x][y][2] = energy grid[x][y][3] = dEdx value grid[x][y][4] = dEdy value grid[x][y][5] = dEd(xy) value
-
setUsesPeriodicBoundaryConditions
public void setUsesPeriodicBoundaryConditions(boolean periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful.- Parameters:
periodic
- if true, periodic boundary conditions will be used
-
usesPeriodicBoundaryConditions
public boolean usesPeriodicBoundaryConditions()Returns whether or not this force makes use of periodic boundary conditions.- Overrides:
usesPeriodicBoundaryConditions
in classForce
- Returns:
- true if force uses PBC and false otherwise
-