Class TorsionTorsionForce

java.lang.Object
ffx.openmm.Force
ffx.openmm.amoeba.TorsionTorsionForce
Direct Known Subclasses:
AmoebaTorsionTorsionForce

public class TorsionTorsionForce extends Force
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

    Fields inherited from class ffx.openmm.Force

    pointer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an AmoebaTorsionTorsionForce.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    Destroy the Amoeba Torsion-Torsion Force.
    int
    Get the number of torsion-torsion grids
    int
    Get the number of torsion-torsion terms in the potential function
    com.sun.jna.ptr.PointerByReference
    Get the torsion-torsion grid at the specified index
    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.
    void
    setTorsionTorsionGrid(int gridIndex, com.sun.jna.ptr.PointerByReference grid)
    Set the torsion-torsion grid at the specified index
    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.
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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-torsion
      particle2 - the index of the second particle connected by the torsion-torsion
      particle3 - the index of the third particle connected by the torsion-torsion
      particle4 - the index of the fourth particle connected by the torsion-torsion
      particle5 - the index of the fifth particle connected by the torsion-torsion
      chiralCheckAtomIndex - the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
      gridIndex - 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.
      Specified by:
      destroy in class 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 parameters
      particle1 - the index of the first particle connected by the torsion-torsion
      particle2 - the index of the second particle connected by the torsion-torsion
      particle3 - the index of the third particle connected by the torsion-torsion
      particle4 - the index of the fourth particle connected by the torsion-torsion
      particle5 - the index of the fifth particle connected by the torsion-torsion
      chiralCheckAtomIndex - the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
      gridIndex - 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 parameters
      particle1 - the index of the first particle connected by the torsion-torsion
      particle2 - the index of the second particle connected by the torsion-torsion
      particle3 - the index of the third particle connected by the torsion-torsion
      particle4 - the index of the fourth particle connected by the torsion-torsion
      particle5 - the index of the fifth particle connected by the torsion-torsion
      chiralCheckAtomIndex - the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
      gridIndex - 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 parameters
      grid - 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 class Force
      Returns:
      true if force uses PBC and false otherwise