OpenMM
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
AmoebaTorsionTorsionForce Class Reference

This class implements the Amoeba torsion-torsion interaction. More...

#include <AmoebaTorsionTorsionForce.h>

+ Inheritance diagram for AmoebaTorsionTorsionForce:

Public Member Functions

 AmoebaTorsionTorsionForce (void)
 Create an AmoebaTorsionTorsionForce. More...
 
int getNumTorsionTorsions (void) const
 Get the number of torsion-torsion terms in the potential function. More...
 
int getNumTorsionTorsionGrids (void) const
 Get the number of torsion-torsion grids. More...
 
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. More...
 
void getTorsionTorsionParameters (int index, int &particle1, int &particle2, int &particle3, int &particle4, int &particle5, int &chiralCheckAtomIndex, int &gridIndex) const
 Get the force field parameters for a torsion-torsion term. More...
 
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. More...
 
const std::vector< std::vector
< std::vector< double > > > & 
getTorsionTorsionGrid (int index) const
 Get the torsion-torsion grid at the specified index. More...
 
void setTorsionTorsionGrid (int index, const std::vector< std::vector< std::vector< double > > > &grid)
 Set the torsion-torsion grid at the specified index. More...
 
- Public Member Functions inherited from Force
 Force ()
 
virtual ~Force ()
 
int getForceGroup () const
 Get the force group this Force belongs to. More...
 
void setForceGroup (int group)
 Set the force group this Force belongs to. More...
 

Protected Member Functions

ForceImplcreateImpl () const
 When a Context is created, it invokes this method on each Force in the System. More...
 
- Protected Member Functions inherited from Force
ForceImplgetImplInContext (Context &context)
 Get the ForceImpl corresponding to this Force in a Context. More...
 
ContextImplgetContextImpl (Context &context)
 Get the ContextImpl corresponding to a Context. More...
 

Detailed Description

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().

Constructor & Destructor Documentation

Member Function Documentation

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
particle1the index of the first particle connected by the torsion-torsion
particle2the index of the second particle connected by the torsion-torsion
particle3the index of the third particle connected by the torsion-torsion
particle4the index of the fourth particle connected by the torsion-torsion
particle5the index of the fifth particle connected by the torsion-torsion
chiralCheckAtomIndexthe index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
gridIndexthe index to the grid to be used
Returns
the index of the torsion-torsion that was added
ForceImpl* createImpl ( ) const
protectedvirtual

When a Context is created, it invokes this method on each Force in the System.

It should create a new ForceImpl object which can be used by the context for calculating forces. The ForceImpl will be deleted automatically when the Context is deleted.

Implements Force.

int getNumTorsionTorsionGrids ( void  ) const
inline

Get the number of torsion-torsion grids.

int getNumTorsionTorsions ( void  ) const
inline

Get the number of torsion-torsion terms in the potential function.

const std::vector<std::vector<std::vector<double> > >& getTorsionTorsionGrid ( int  index) const

Get the torsion-torsion grid at the specified index.

Parameters
gridIndexthe grid index
Returns
grid return grid reference
void getTorsionTorsionParameters ( int  index,
int &  particle1,
int &  particle2,
int &  particle3,
int &  particle4,
int &  particle5,
int &  chiralCheckAtomIndex,
int &  gridIndex 
) const

Get the force field parameters for a torsion-torsion term.

Parameters
indexthe index of the torsion-torsion for which to get parameters
particle1the index of the first particle connected by the torsion-torsion
particle2the index of the second particle connected by the torsion-torsion
particle3the index of the third particle connected by the torsion-torsion
particle4the index of the fourth particle connected by the torsion-torsion
particle5the index of the fifth particle connected by the torsion-torsion
chiralCheckAtomIndexthe index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
gridIndexthe grid index
void setTorsionTorsionGrid ( int  index,
const std::vector< std::vector< std::vector< double > > > &  grid 
)

Set the torsion-torsion grid at the specified index.

Parameters
indexthe index of the torsion-torsion for which to get parameters
grideither 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
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
indexthe index of the torsion-torsion for which to set parameters
particle1the index of the first particle connected by the torsion-torsion
particle2the index of the second particle connected by the torsion-torsion
particle3the index of the third particle connected by the torsion-torsion
particle4the index of the fourth particle connected by the torsion-torsion
particle5the index of the fifth particle connected by the torsion-torsion
chiralCheckAtomIndexthe index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
gridIndexthe grid index

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