# CMAPTorsionForce Class Reference

This class implements an interaction between pairs of dihedral angles. More...

Inheritance diagram for CMAPTorsionForce:

List of all members.

## Public Member Functions

def | getNumMaps
| getNumMaps(self) -> int
def | getNumTorsions
| getNumTorsions(self) -> int
def | addMap
| addMap(self, int size, vectord energy) -> int
def | getMapParameters
| getMapParameters(self, int index)
def | setMapParameters
| setMapParameters(self, int index, int size, vectord energy)
def | addTorsion
| addTorsion(self, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4) -> int
def | getTorsionParameters
| getTorsionParameters(self, int index)
def | setTorsionParameters
| setTorsionParameters(self, int index, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4)
def | __init__
| __init__(self) -> CMAPTorsionForce __init__(self, CMAPTorsionForce other) -> CMAPTorsionForce
def | __del__
| __del__(self)

## Public Attributes

| this

## Detailed Description

This class implements an interaction between pairs of dihedral angles.

The interaction energy is defined by an "energy correction map" (CMAP), which is simply a set of tabulated energy values on a regular grid of (phi, psi) angles. Natural cubic spline interpolation is used to compute forces and energies at arbitrary values of the two angles.

To use this class, first create one or more energy correction maps by calling addMap(). For each one, you provide an array of energies at uniformly spaced values of the two angles. Next, add interactions by calling addTorsion(). For each one, you specify the sequence of particles used to calculate each of the two dihedral angles, and the index of the map used to calculate their interaction energy.

## Member Function Documentation

def __del__ | ( |  | self | ) |

__del__(self)

Reimplemented from Force.

def __init__ | ( |  | self,
|  |  | args |
| ) |  |  |

__init__(self) -> CMAPTorsionForce __init__(self, CMAPTorsionForce other) -> CMAPTorsionForce

Create a CMAPTorsionForce.

def addMap | ( |  | self,
|  |  | args |
| ) |  |  |

addMap(self, int size, vectord energy) -> int

Create a new map that can be used for torsion pairs.

Parameters:

  | size | the size of the map along each dimension
  | energy | the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size.

def addTorsion | ( |  | self,
|  |  | args |
| ) |  |  |

addTorsion(self, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4) -> int

Add a CMAP torsion term to the force field.

Parameters:

  | map | the index of the map to use for this term
  | a1 | the index of the first particle forming the first torsion
  | a2 | the index of the second particle forming the first torsion
  | a3 | the index of the third particle forming the first torsion
  | a4 | the index of the fourth particle forming the first torsion
  | b1 | the index of the first particle forming the second torsion
  | b2 | the index of the second particle forming the second torsion
  | b3 | the index of the third particle forming the second torsion
  | b4 | the index of the fourth particle forming the second torsion

def getMapParameters | ( |  | self,
|  |  | args |
| ) |  |  |

getMapParameters(self, int index)

Get the energy values of a map.

Parameters:

  | index | the index of the map for which to get energy values
  | size | the size of the map along each dimension
  | energy | the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size.

def getNumMaps | ( |  | self | ) |

getNumMaps(self) -> int

Get the number of maps that have been defined.

def getNumTorsions | ( |  | self | ) |

getNumTorsions(self) -> int

Get the number of CMAP torsion terms in the potential function

def getTorsionParameters | ( |  | self,
|  |  | args |
| ) |  |  |

getTorsionParameters(self, int index)

Get the force field parameters for a CMAP torsion term.

Parameters:

  | index | the index of the torsion for which to get parameters
  | map | the index of the map to use for this term
  | a1 | the index of the first particle forming the first torsion
  | a2 | the index of the second particle forming the first torsion
  | a3 | the index of the third particle forming the first torsion
  | a4 | the index of the fourth particle forming the first torsion
  | b1 | the index of the first particle forming the second torsion
  | b2 | the index of the second particle forming the second torsion
  | b3 | the index of the third particle forming the second torsion
  | b4 | the index of the fourth particle forming the second torsion

def setMapParameters | ( |  | self,
|  |  | args |
| ) |  |  |

setMapParameters(self, int index, int size, vectord energy)

Set the energy values of a map.

Parameters:

  | index | the index of the map for which to set energy values
  | size | the size of the map along each dimension
  | energy | the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size.

def setTorsionParameters | ( |  | self,
|  |  | args |
| ) |  |  |

setTorsionParameters(self, int index, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4)

Set the force field parameters for a CMAP torsion term.

Parameters:

  | index | the index of the torsion for which to set parameters
  | map | the index of the map to use for this term
  | a1 | the index of the first particle forming the first torsion
  | a2 | the index of the second particle forming the first torsion
  | a3 | the index of the third particle forming the first torsion
  | a4 | the index of the fourth particle forming the first torsion
  | b1 | the index of the first particle forming the second torsion
  | b2 | the index of the second particle forming the second torsion
  | b3 | the index of the third particle forming the second torsion
  | b4 | the index of the fourth particle forming the second torsion

## Member Data Documentation

this

The documentation for this class was generated from the following file:

- openmm.py