MTK++ Latest version: 0.2.0

Public Member Functions | Protected Attributes
MTKpp::mmPotential Class Reference

Base class for MM potentials. More...

#include <mtkpp/src/MM/mmPotential.h>

Inheritance diagram for MTKpp::mmPotential:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mmPotential ()
 mmPotential Constructor
virtual ~mmPotential ()
 mmPotential Destructor
void initialize ()
 mmPotential initializer
int setNumAtoms (int nAtoms)
 START ALLOCATION ///.
int setNumTypes (int n)
 Set number of distinct atom type.
int setNumResidues (int n)
 Set number of residues.
int setExcludedSize (int n, int n2)
 Set number of excluded atoms.
int getNumAtoms ()
 END ALLOCATION ///.
char * getResidueNames ()
 Get residue names.
int * getResiduePointers ()
 Get residue pointers.
int setNumAtomsBigRes (int n)
 Set number of atoms in the largest residue.
double * getCoords ()
 Get coordinate array.
double * getCharges ()
 Get atomic charge array pointer.
char * getSymbols ()
 Get atomic symbols array pointer.
char * getAtomNames ()
 Get atomic symbols array pointer.
int getNumTypes ()
 Get number of unique types.
int * getIntTypes ()
 Get atom integer types.
char * getCharTypes ()
 Get atom character types.
int * getNumExcluded ()
 Get number of excluded atoms array pointer.
int * getExcluded ()
 Get excluded atoms array pointer.
int * getNumExcluded14 ()
 Get number of excluded 1-4 atoms array pointer.
int * getExcluded14 ()
 Get excluded 1-4 atoms array pointer.
int * getAtomFlags ()
 Get atom flags array pointer.
double * getGradients ()
 Get gradient array pointer.
int setNumBonds (int nBonds)
 Set number of bonds.
int getNumBonds ()
 Get number of bonds.
int setNumBondsWithH (int n)
 Set number of bonds containing Hydrogen.
int setNumBondsWithOutH (int n)
 Set number of bonds not containing Hydrogen.
int * getBonds ()
 Get bond array pointer.
double * getBondParams ()
 Get bond parameter array pointer.
int setNumUniqueBonds (int n)
 Set number of unique bonds.
int setNumAngles (int nAngles)
 Set number of angles.
int getNumAngles ()
 Get number of angles.
int setNumAnglesWithH (int n)
 Set number of angles containing Hydrogen.
int setNumAnglesWithOutH (int n)
 Set number of angles not containing Hydrogen.
int * getAngles ()
 Get angle array pointer.
double * getAngleParams ()
 Get angle parameter array pointer.
int setNumUniqueAngles (int n)
 Set number of unique angles.
int setNumTorsions (int nTorsions)
 Set number of torsions.
int getNumTorsions ()
 Get number of torsions.
int * getTorsions ()
 Get torsion array pointer.
double * getTorsionParams ()
 Get torsion parameter array pointer.
int setNumImpropers (int nImpropers)
 Set number of impropers.
int getNumImpropers ()
 Get number of impropers.
int * getImpropers ()
 Get improper array pointer.
double * getImproperParams ()
 Get improper parameter array pointer.
int setNumDihedralsWithH (int n)
 Set number of dihedrals containing Hydrogen.
int setNumDihedralsWithOutH (int n)
 Set number of dihedrals not containing Hydrogen.
int setNumUniqueDihedrals (int n)
 Set number of unique dihedrals.
int setNumNonBonded (int nNonBonded)
 Set number of non-bonded interactions.
int getNumNonBonded ()
 Set number of non-bonded interactions.
int * getNonBonded ()
 Get nonbonded array pointer.
double * getNonBondedParams ()
 Get nonbonded parameter array pointer.
int * getNonBondedPtrs ()
 Get nonbonded indexing array pointer.
int * getNonBonded14Ptrs ()
 Get 1-4 nonbonded indexing array pointer.
double * getR6Params ()
 Get L-J R6 Parameters.
double * getR12Params ()
 Get L-J R12 Parameters.
int * getNonBondedParameterIndex ()
 Get nonbonded indexing array pointer.
void setPotential (bool bBond, bool bAngle, bool bTorsion, bool bImproper, bool bNonBonded, bool bHBond)
 Set the potential to be used.
void getPotential (bool &bBond, bool &bAngle, bool &bTorsion, bool &bImproper, bool &bNonBonded, bool &bHBond)
 Get the potential to be used.
void calcForces (int i)
 Turn on gradient calculation.
void calcEnergy ()
 Calculate energy and/or gradient.
void decomposeEnergy (bool bBond, bool bAngle, bool bTorsion, bool bImproper, bool bNonBonded, bool bHBond, std::string f)
 Decompose energy.
int * getOutputFlags ()
 Get output flags array for energy decomposition.
void printEnergy ()
 Print energy to screen (verbose)
void printEnergy (std::ostream &os)
 Print energy (verbose)
void printEnergy2 ()
 Print energy terms in single line to the screen.
void printEnergy2 (std::ostream &os)
 Print energy terms in single line to the screen.
void printEnergy2 (std::string s)
 Print energy terms in single line to the screen.
void printEnergy2 (std::string s, std::string s2)
 Print energy terms in single line to the screen.
void printEnergy2 (std::ostream &os, std::string s, std::string s2)
 Print energy terms in single line to the screen.
void printCoords ()
 Print coords.
virtual double calcBondEnergy ()
 Calculate bond energy and/or gradient.
virtual double calcAngleEnergy ()
 Calculate angle energy and/or gradient.
virtual double calcTorsionEnergy ()
 Calculate torsion energy and/or gradient.
virtual double calcImproperEnergy ()
 Calculate improper energy and/or gradient.
virtual double calcNonBondedEnergy ()
 Calculate non-bonded energy and/or gradient.
virtual double calcHBondEnergy ()
 Calculate H-bond energy and/or gradient.
double getTotalEnergy ()
 Get the total energy.
double getBondEnergy ()
 Get the bond energy.
double getTotalVDWEnergy ()
 Get the total van der Waals energy.
double getTotalEleEnergy ()
 Get the total electrostatic energy.
void resetGMatrix ()
 Set gradient matrix to zero.
void setNonHGradsToZero ()
 Set non-hydrogen atom gradients zero.
void getGradNorm (double &gMax, int &gMaxAtom, double &gNorm)
 Get the gMax value, gMaxAtom, and gNorm.

Protected Attributes

int nAtoms
 Number of atoms.
int nDistinctTypes
 Number of distinct atom types.
int nBondsWithH
 Number of bonds containing Hydrogen.
int nBondsWithOutH
 Number of bonds not containing hydrogen.
int nAnglesWithH
 Number of angles containing hydrogen.
int nAnglesWithOutH
 Number of angles not containing hydrogen.
int nDihedralsWithH
 Number of dihedrals containing hydrogen.
int nDihedralsWithOutH
 Number of dihedrals not containing hydrogen.
int nExcluded
 Number of excluded atoms This is a sum over all atoms excluded atoms.
int nExcluded14
 Number of excluded 1-4 atoms This is a sum over all atoms excluded atoms.
int nResidues
 Number of residues.
int nUniqueBonds
 Number of unique bond types.
int nUniqueAngles
 Number of unique angle types.
int nUniqueDihedrals
 Number of unique angle types.
int nAtomsBigRes
 Number of unique angle types.
double * xyz
 Array of atom coordinates.
char * symbols
 Atom symbols.
char * names
 Atom names.
int * iTypes
 Array of atom integer types.
char * cTypes
 Array of atom integer types.
double * charges
 Array of atom charges.
double * masses
 Array of atom charges.
double * gradients
 Array of atom coordinates.
int * numExcluded
 Array of number of excluded atoms per atom.
int * numExcluded14
 Array of number of excluded 1-4 atoms per atom.
int * atomFlags
 Array of atom flags.
int * outFlags
 Array of atom flags for energy decomposition.
int * excluded
 Array of number of excluded atoms per atom.
int * excluded14
 Array of number of excluded 1-4 atoms per atom.
double * r12Params
 L-J A Coefficient.
double * r6Params
 L-J B Coefficient.
char * resNames
 Residue names.
int * resPointers
 Residue pointers.
int * nonBondedParameterIndex
 Non-Bonded index.
int nBonds
 Number of bonds.
int * bonds
 Array of bonds (A-B, atom indices)
double * bondParams
 Bond parameters array.
int nAngles
 Number of angles.
int * angles
 Array of angles (A-B-C, atom indices)
double * angleParams
 Angle parameters array.
int nTorsions
 Number of torsions.
int * torsions
 Array of torsions (A-B-C-D, atom indices)
double * torsionParams
 Torsion parameters array.
int nImpropers
 Number of Impropers.
int * impropers
double * improperParams
 Improper parameter array.
int nNonBonded
 Total number of non bonded interactions.
int * nonBonded
 non-bonded atom indices array
double * nonBondedParams
 non-bonded array
int * nonBondedPtrs
 non-bonded pointers
int nNonBonded14
 Total number of non bonded 1-4 interactions.
int * nonBonded14
 non-bonded 1-4 atom indices array
double * nonBonded14Params
 non-bonded 1-4 array
int * nonBonded14Ptrs
 non-bonded 1-4 pointers
bool bEnergy
 Calculate only E.
bool bGradient
 Calculate both E and G.
bool bBond
 Switch for bond part of the energy function.
bool bAngle
 Switch for angle part of the energy function.
bool bTorsion
 Switch for torsion part of the energy function.
bool bImproper
 Switch for improper part of the energy function.
bool bNonBonded
 Switch for nonbonded part of the energy function.
bool bHBond
 Switch for H-bond part of the energy function.
bool bBondDecompose
 Decompose bond energy.
bool bAngleDecompose
 Decompose angle energy.
bool bTorsionDecompose
 Decompose torsion energy.
bool bImproperDecompose
 Decompose improper energy.
bool bNonBondedDecompose
 Decompose non-bonded energy.
bool bHBondDecompose
 Decompose H-Bonding energy.
std::string pwdFile
 Decomposed energy output file.
std::ofstream pwdFileStream
 Output File Stream.
std::string pwdGZFile
 Decomposed energy output file.
double totalEnergy
 Total energy:
double bondEnergy
 bond energy
double angleEnergy
 angle energy
double torsionEnergy
 torsion energy
double improperEnergy
 improper energy
double vdWEnergy
 van der Waals energy
double vdW14Energy
 1-4 part of the vdW energy
double R6
 R6 component of the vdW energy.
double R12
 R12 component of the vdW energy.
double eleEnergy
 electrostatic energy
double ele14Energy
 1-4 part of the ele energy
double nonBondedEnergy
 non bonded energy
double hBondEnergy
 H-Bond energy.

Detailed Description

Base class for MM potentials.

Author:
Martin Peters
Version:
0.1
Date:
2005

Some useful math for MM potentials

\begin{eqnarray*} r_{ij} &=& r_i - r_j \\ |r_{ij}| &=& \sqrt{(x_i - x_j)^2 + (y_i - y_j)^2 + (z_i - z_j)^2} \\ |r_{ij}| &=& \left((x_i - x_j)^2 + (y_i - y_j)^2 + (z_i - z_j)\right)^{1/2} \\ |r_{ij}| &=& \sqrt{r_i \cdot r_j} \\ \hat r_{ij} &=& {r_{ij} \over |r_{ij}|} \label{dist:r} \end{eqnarray*}

where $r_i$ is the position of atom $i$ and $x_i$ is the $x$ component of the position vector of atom $i$.

\begin{eqnarray*} {d\theta \over d\cos\theta} & = & \left({d\cos\theta \over d\theta}\right)^{-1} \\ & = & -{1 \over \sin\theta} \label{dt:dcost} \end{eqnarray*}

\begin{eqnarray*} \nabla_i = \hat x {\partial \over \partial x_i} + \hat y {\partial \over \partial y_i} + \hat z {\partial \over \partial z_i} \end{eqnarray*}

where $\hat x$ is a unit vector parallel to axis of the reference coordinate system.


Constructor & Destructor Documentation

MTKpp::mmPotential::mmPotential ( )
MTKpp::mmPotential::~mmPotential ( ) [virtual]

Member Function Documentation

void MTKpp::mmPotential::initialize ( )
int MTKpp::mmPotential::setNumAtoms ( int  nAtoms)

START ALLOCATION ///.

Set number of atoms

Parameters:
nAtomsnumber of atoms
Returns:
success

References atomFlags, bGradient, charges, cTypes, gradients, iTypes, masses, names, nAtoms, numExcluded, numExcluded14, outFlags, symbols, and xyz.

Referenced by main().

int MTKpp::mmPotential::setNumTypes ( int  n)

Set number of distinct atom type.

Parameters:
nnumber of distinct atom type
Returns:
success

References nDistinctTypes, nonBondedParameterIndex, r12Params, and r6Params.

Referenced by main().

int MTKpp::mmPotential::setNumResidues ( int  n)

Set number of residues.

Parameters:
nnumber of residues
Returns:
success

References nResidues, resNames, and resPointers.

Referenced by main().

int MTKpp::mmPotential::setExcludedSize ( int  n,
int  n2 
)

Set number of excluded atoms.

Parameters:
nnumber of excluded atoms
n2number of excluded 1-4 atoms
Returns:
success

References excluded, excluded14, nExcluded, and nExcluded14.

Referenced by main().

int MTKpp::mmPotential::getNumAtoms ( )

END ALLOCATION ///.

Get number of atoms

Returns:
number of atoms

References nAtoms.

Referenced by MTKpp::amberNonBonded::calculateE(), and MTKpp::amberNonBonded::decompose().

char * MTKpp::mmPotential::getResidueNames ( )

Get residue names.

Returns:
residue names

References resNames.

int * MTKpp::mmPotential::getResiduePointers ( )

Get residue pointers.

Returns:
residue pointers

References resPointers.

int MTKpp::mmPotential::setNumAtomsBigRes ( int  n)

Set number of atoms in the largest residue.

Parameters:
nnumber of atoms in the largest residue
Returns:
success

References nAtomsBigRes.

double * MTKpp::mmPotential::getCoords ( )
double * MTKpp::mmPotential::getCharges ( )

Get atomic charge array pointer.

Returns:
charges array pointer

References charges.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

char * MTKpp::mmPotential::getSymbols ( )

Get atomic symbols array pointer.

Returns:
symbols array pointer

References symbols.

Referenced by main().

char * MTKpp::mmPotential::getAtomNames ( )

Get atomic symbols array pointer.

Returns:
symbols array pointer

References names.

int MTKpp::mmPotential::getNumTypes ( )

Get number of unique types.

Returns:
number of unique types

References nDistinctTypes.

Referenced by MTKpp::amberNonBonded::calculateE(), and MTKpp::amberNonBonded::decompose().

int * MTKpp::mmPotential::getIntTypes ( )

Get atom integer types.

Returns:
integer types array pointer

References iTypes.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

char * MTKpp::mmPotential::getCharTypes ( )

Get atom character types.

Returns:
character types array pointer

References cTypes.

Referenced by main().

int * MTKpp::mmPotential::getNumExcluded ( )

Get number of excluded atoms array pointer.

Returns:
number of excluded atoms array pointer

References numExcluded.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

int * MTKpp::mmPotential::getExcluded ( )

Get excluded atoms array pointer.

Returns:
excluded atoms array pointer

References excluded.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

int * MTKpp::mmPotential::getNumExcluded14 ( )

Get number of excluded 1-4 atoms array pointer.

Returns:
number of excluded atoms array pointer

References numExcluded14.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

int * MTKpp::mmPotential::getExcluded14 ( )

Get excluded 1-4 atoms array pointer.

Returns:
excluded atoms array pointer

References excluded14.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

int * MTKpp::mmPotential::getAtomFlags ( )

Get atom flags array pointer.

Returns:
atom flags array pointer

References atomFlags.

Referenced by MTKpp::amberNonBonded::calculateE(), and MTKpp::amberNonBonded::decompose().

double * MTKpp::mmPotential::getGradients ( )

Get gradient array pointer.

Returns:
gradient array pointer

References gradients.

Referenced by MTKpp::amberTorsion::calculateG(), MTKpp::amberBond::calculateG(), MTKpp::amberAngle::calculateG(), and main().

int MTKpp::mmPotential::setNumBonds ( int  nBonds)

Set number of bonds.

Parameters:
nBondsnumber of bonds
Returns:
success

References bondParams, bonds, and nBonds.

Referenced by main().

int MTKpp::mmPotential::getNumBonds ( )

Get number of bonds.

Returns:
number of bonds

References nBonds.

Referenced by MTKpp::amberBond::calculateE(), and MTKpp::amberBond::calculateG().

int MTKpp::mmPotential::setNumBondsWithH ( int  n)

Set number of bonds containing Hydrogen.

Parameters:
nnumber of bonds containing Hydrogen
Returns:
success

References nBondsWithH.

int MTKpp::mmPotential::setNumBondsWithOutH ( int  n)

Set number of bonds not containing Hydrogen.

Parameters:
nnumber of bonds not containing Hydrogen
Returns:
success

References nBondsWithOutH.

int * MTKpp::mmPotential::getBonds ( )

Get bond array pointer.

Returns:
bond array pointer

References bonds.

Referenced by MTKpp::amberBond::calculateE(), MTKpp::amberBond::calculateG(), and main().

double * MTKpp::mmPotential::getBondParams ( )

Get bond parameter array pointer.

Returns:
bond parameter array pointer

References bondParams.

Referenced by MTKpp::amberBond::calculateE(), MTKpp::amberBond::calculateG(), and main().

int MTKpp::mmPotential::setNumUniqueBonds ( int  n)

Set number of unique bonds.

Parameters:
nnumber of unique bonds
Returns:
success

References nUniqueBonds.

int MTKpp::mmPotential::setNumAngles ( int  nAngles)

Set number of angles.

Parameters:
nAnglesnumber of angles
Returns:
success

References angleParams, angles, and nAngles.

Referenced by main().

int MTKpp::mmPotential::getNumAngles ( )

Get number of angles.

Returns:
number of angles

References nAngles.

Referenced by MTKpp::amberAngle::calculateE(), and MTKpp::amberAngle::calculateG().

int MTKpp::mmPotential::setNumAnglesWithH ( int  n)

Set number of angles containing Hydrogen.

Parameters:
nnumber of angles containing Hydrogen
Returns:
success

References nAnglesWithH.

int MTKpp::mmPotential::setNumAnglesWithOutH ( int  n)

Set number of angles not containing Hydrogen.

Parameters:
nnumber of angles not containing Hydrogen
Returns:
success

References nAnglesWithOutH.

int * MTKpp::mmPotential::getAngles ( )

Get angle array pointer.

Returns:
angle array pointer

References angles.

Referenced by MTKpp::amberAngle::calculateE(), MTKpp::amberAngle::calculateG(), and main().

double * MTKpp::mmPotential::getAngleParams ( )

Get angle parameter array pointer.

Returns:
angle parameter array pointer

References angleParams.

Referenced by MTKpp::amberAngle::calculateE(), MTKpp::amberAngle::calculateG(), and main().

int MTKpp::mmPotential::setNumUniqueAngles ( int  n)

Set number of unique angles.

Parameters:
nnumber of unique angles
Returns:
success

References nUniqueAngles.

int MTKpp::mmPotential::setNumTorsions ( int  nTorsions)

Set number of torsions.

Parameters:
nTorsionsnumber of torsions
Returns:
success

References nTorsions, torsionParams, and torsions.

Referenced by main().

int MTKpp::mmPotential::getNumTorsions ( )

Get number of torsions.

Returns:
number of torsions

References nTorsions.

Referenced by MTKpp::amberTorsion::calculateE(), and MTKpp::amberTorsion::calculateG().

int * MTKpp::mmPotential::getTorsions ( )

Get torsion array pointer.

Returns:
torsion array pointer

References torsions.

Referenced by MTKpp::amberTorsion::calculateE(), MTKpp::amberTorsion::calculateG(), and main().

double * MTKpp::mmPotential::getTorsionParams ( )

Get torsion parameter array pointer.

Returns:
torsion parameter array pointer

References torsionParams.

Referenced by MTKpp::amberTorsion::calculateE(), MTKpp::amberTorsion::calculateG(), and main().

int MTKpp::mmPotential::setNumImpropers ( int  nImpropers)

Set number of impropers.

Parameters:
nImpropersnumber of impropers
Returns:
success

References improperParams, impropers, and nImpropers.

Referenced by main().

int MTKpp::mmPotential::getNumImpropers ( )

Get number of impropers.

Returns:
number of impropers

References nImpropers.

Referenced by MTKpp::amberImproper::calculateE(), MTKpp::amberTorsion::calculateE(), and MTKpp::amberTorsion::calculateG().

int * MTKpp::mmPotential::getImpropers ( )

Get improper array pointer.

Returns:
improper array pointer

References impropers.

Referenced by MTKpp::amberImproper::calculateE(), MTKpp::amberTorsion::calculateE(), MTKpp::amberTorsion::calculateG(), and main().

double * MTKpp::mmPotential::getImproperParams ( )

Get improper parameter array pointer.

Returns:
improper parameter array pointer

References improperParams.

Referenced by MTKpp::amberImproper::calculateE(), MTKpp::amberTorsion::calculateE(), MTKpp::amberTorsion::calculateG(), and main().

int MTKpp::mmPotential::setNumDihedralsWithH ( int  n)

Set number of dihedrals containing Hydrogen.

Parameters:
nnumber of dihedrals containing Hydrogen
Returns:
success

References nDihedralsWithH.

int MTKpp::mmPotential::setNumDihedralsWithOutH ( int  n)

Set number of dihedrals not containing Hydrogen.

Parameters:
nnumber of dihedrals not containing Hydrogen
Returns:
success

References nDihedralsWithOutH.

int MTKpp::mmPotential::setNumUniqueDihedrals ( int  n)

Set number of unique dihedrals.

Parameters:
nnumber of unique dihedrals
Returns:
success

References nUniqueDihedrals.

int MTKpp::mmPotential::setNumNonBonded ( int  nNonBonded)

Set number of non-bonded interactions.

Parameters:
nNonBondednumber of non-bonded interactions
Returns:
success

References nAtoms, nNonBonded, nonBonded, nonBonded14Ptrs, nonBondedParams, and nonBondedPtrs.

int MTKpp::mmPotential::getNumNonBonded ( )

Set number of non-bonded interactions.

Returns:
number of non-bonded interactions

References nNonBonded.

int * MTKpp::mmPotential::getNonBonded ( )

Get nonbonded array pointer.

Returns:
nonbonded array pointer

References nonBonded.

double * MTKpp::mmPotential::getNonBondedParams ( )

Get nonbonded parameter array pointer.

Returns:
nonbonded parameter array pointer

References nonBondedParams.

int * MTKpp::mmPotential::getNonBondedPtrs ( )

Get nonbonded indexing array pointer.

Returns:
nonbonded indexing array pointer

References nonBondedPtrs.

int * MTKpp::mmPotential::getNonBonded14Ptrs ( )

Get 1-4 nonbonded indexing array pointer.

Returns:
1-4 nonbonded indexing array pointer

References nonBonded14Ptrs.

double * MTKpp::mmPotential::getR6Params ( )

Get L-J R6 Parameters.

Returns:
L-J R6 Parameters

References r6Params.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

double * MTKpp::mmPotential::getR12Params ( )

Get L-J R12 Parameters.

Returns:
L-J R12 Parameters

References r12Params.

Referenced by MTKpp::amberNonBonded::calculateE(), MTKpp::amberNonBonded::decompose(), and main().

int * MTKpp::mmPotential::getNonBondedParameterIndex ( )

Get nonbonded indexing array pointer.

Returns:
nonbonded indexing array pointer

References nonBondedParameterIndex.

Referenced by MTKpp::amberNonBonded::calculateE(), and MTKpp::amberNonBonded::decompose().

void MTKpp::mmPotential::setPotential ( bool  bBond,
bool  bAngle,
bool  bTorsion,
bool  bImproper,
bool  bNonBonded,
bool  bHBond 
)

Set the potential to be used.

Parameters:
bBondturn on bond calculation
bAngleturn on angle calculation
bTorsionturn on torsion calculation
bImproperturn on improper calculation
bNonBondedturn on non-bonded (Ele & L-J) calculation
bHBondturn on H-bond calculation

References bAngle, bBond, bHBond, bImproper, bNonBonded, and bTorsion.

Referenced by main().

void MTKpp::mmPotential::getPotential ( bool &  bBond,
bool &  bAngle,
bool &  bTorsion,
bool &  bImproper,
bool &  bNonBonded,
bool &  bHBond 
)

Get the potential to be used.

Parameters:
bBondBond switch
bAngleAngle switch
bTorsionTorsion switch
bImproperImproper switch
bNonBondedNonbonded switch
bHBondH-Bond switch

References bAngle, bBond, bHBond, bImproper, bNonBonded, and bTorsion.

void MTKpp::mmPotential::calcForces ( int  i)

Turn on gradient calculation.

Parameters:
ion/off

References bGradient.

Referenced by main().

void MTKpp::mmPotential::calcEnergy ( )
void MTKpp::mmPotential::decomposeEnergy ( bool  bBond,
bool  bAngle,
bool  bTorsion,
bool  bImproper,
bool  bNonBonded,
bool  bHBond,
std::string  f 
)

Decompose energy.

Parameters:
bBondBond switch
bAngleAngle switch
bTorsionTorsion switch
bImproperImproper switch
bNonBondedNonbonded switch
bHBondH-Bond switch
fOutput file

References bAngle, bAngleDecompose, bBond, bBondDecompose, bHBond, bHBondDecompose, bImproper, bImproperDecompose, bNonBonded, bNonBondedDecompose, bTorsion, bTorsionDecompose, and pwdGZFile.

int * MTKpp::mmPotential::getOutputFlags ( )

Get output flags array for energy decomposition.

Returns:
output flags array

References outFlags.

Referenced by MTKpp::amberNonBonded::decompose().

void MTKpp::mmPotential::printEnergy ( )

Print energy to screen (verbose)

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, hBondEnergy, improperEnergy, nonBondedEnergy, R12, R6, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

Referenced by main().

void MTKpp::mmPotential::printEnergy ( std::ostream &  os)

Print energy (verbose)

Parameters:
osprint stream

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, hBondEnergy, improperEnergy, nonBondedEnergy, R12, R6, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

void MTKpp::mmPotential::printEnergy2 ( )

Print energy terms in single line to the screen.

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, improperEnergy, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

Referenced by main().

void MTKpp::mmPotential::printEnergy2 ( std::ostream &  os)

Print energy terms in single line to the screen.

Parameters:
osprint stream

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, improperEnergy, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

void MTKpp::mmPotential::printEnergy2 ( std::string  s)

Print energy terms in single line to the screen.

Parameters:
sA string thats added to the begining of the line

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, improperEnergy, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

void MTKpp::mmPotential::printEnergy2 ( std::string  s,
std::string  s2 
)

Print energy terms in single line to the screen.

Parameters:
sA string thats added to the begining of the line
s2A string thats added to the end of the line

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, improperEnergy, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

void MTKpp::mmPotential::printEnergy2 ( std::ostream &  os,
std::string  s,
std::string  s2 
)

Print energy terms in single line to the screen.

Parameters:
osprint stream
sA string thats added to the begining of the line
s2A string thats added to the end of the line

References angleEnergy, bondEnergy, ele14Energy, eleEnergy, improperEnergy, torsionEnergy, totalEnergy, vdW14Energy, and vdWEnergy.

void MTKpp::mmPotential::printCoords ( )

Print coords.

References nAtoms, and xyz.

double MTKpp::mmPotential::calcBondEnergy ( ) [virtual]

Calculate bond energy and/or gradient.

Returns:
bond energy

Reimplemented in MTKpp::amber.

References bondEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::calcAngleEnergy ( ) [virtual]

Calculate angle energy and/or gradient.

Returns:
angle energy

Reimplemented in MTKpp::amber.

References angleEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::calcTorsionEnergy ( ) [virtual]

Calculate torsion energy and/or gradient.

Returns:
torsion energy

Reimplemented in MTKpp::amber.

References torsionEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::calcImproperEnergy ( ) [virtual]

Calculate improper energy and/or gradient.

Returns:
improper energy

Reimplemented in MTKpp::amber.

References improperEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::calcNonBondedEnergy ( ) [virtual]

Calculate non-bonded energy and/or gradient.

Returns:
non-bonded energy

Reimplemented in MTKpp::amber.

References nonBondedEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::calcHBondEnergy ( ) [virtual]

Calculate H-bond energy and/or gradient.

Returns:
H-Bond energy

Reimplemented in MTKpp::amber.

References hBondEnergy.

Referenced by calcEnergy().

double MTKpp::mmPotential::getTotalEnergy ( )

Get the total energy.

Returns:
total energy

References totalEnergy.

Referenced by main().

double MTKpp::mmPotential::getBondEnergy ( )

Get the bond energy.

Returns:
bond energy
double MTKpp::mmPotential::getTotalVDWEnergy ( )

Get the total van der Waals energy.

Returns:
total vdW energy

References vdW14Energy, and vdWEnergy.

double MTKpp::mmPotential::getTotalEleEnergy ( )

Get the total electrostatic energy.

Returns:
ELE energy

References ele14Energy, and eleEnergy.

void MTKpp::mmPotential::resetGMatrix ( )

Set gradient matrix to zero.

References gradients, and nAtoms.

Referenced by main().

void MTKpp::mmPotential::setNonHGradsToZero ( )

Set non-hydrogen atom gradients zero.

References gradients, nAtoms, and symbols.

Referenced by main().

void MTKpp::mmPotential::getGradNorm ( double &  gMax,
int &  gMaxAtom,
double &  gNorm 
)

Get the gMax value, gMaxAtom, and gNorm.

Parameters:
gMaxgMax value
gMaxAtomgMaxAtom index
gNormgNorm value

References gradients, and nAtoms.

Referenced by main().


Member Data Documentation

int MTKpp::mmPotential::nAtoms [protected]

Number of distinct atom types.

Referenced by getNumTypes(), mmPotential(), and setNumTypes().

Number of bonds containing Hydrogen.

Referenced by mmPotential(), and setNumBondsWithH().

Number of bonds not containing hydrogen.

Referenced by mmPotential(), and setNumBondsWithOutH().

Number of angles containing hydrogen.

Referenced by mmPotential(), and setNumAnglesWithH().

Number of angles not containing hydrogen.

Referenced by mmPotential(), and setNumAnglesWithOutH().

Number of dihedrals containing hydrogen.

Referenced by mmPotential(), and setNumDihedralsWithH().

Number of dihedrals not containing hydrogen.

Referenced by mmPotential(), and setNumDihedralsWithOutH().

Number of excluded atoms This is a sum over all atoms excluded atoms.

Referenced by mmPotential(), and setExcludedSize().

Number of excluded 1-4 atoms This is a sum over all atoms excluded atoms.

Referenced by mmPotential(), and setExcludedSize().

Number of residues.

Referenced by mmPotential(), and setNumResidues().

Number of unique bond types.

Referenced by mmPotential(), and setNumUniqueBonds().

Number of unique angle types.

Referenced by mmPotential(), and setNumUniqueAngles().

Number of unique angle types.

Referenced by mmPotential(), and setNumUniqueDihedrals().

Number of unique angle types.

Referenced by mmPotential(), and setNumAtomsBigRes().

double* MTKpp::mmPotential::xyz [protected]

Array of atom coordinates.

Referenced by getCoords(), mmPotential(), printCoords(), setNumAtoms(), and ~mmPotential().

char* MTKpp::mmPotential::symbols [protected]

Atom symbols.

Referenced by getSymbols(), setNonHGradsToZero(), setNumAtoms(), and ~mmPotential().

char* MTKpp::mmPotential::names [protected]

Atom names.

Referenced by getAtomNames(), setNumAtoms(), and ~mmPotential().

int* MTKpp::mmPotential::iTypes [protected]

Array of atom integer types.

Referenced by getIntTypes(), mmPotential(), setNumAtoms(), and ~mmPotential().

char* MTKpp::mmPotential::cTypes [protected]

Array of atom integer types.

Referenced by getCharTypes(), setNumAtoms(), and ~mmPotential().

double* MTKpp::mmPotential::charges [protected]

Array of atom charges.

Referenced by getCharges(), mmPotential(), setNumAtoms(), and ~mmPotential().

double* MTKpp::mmPotential::masses [protected]

Array of atom charges.

Referenced by mmPotential(), setNumAtoms(), and ~mmPotential().

double* MTKpp::mmPotential::gradients [protected]

Array of number of excluded atoms per atom.

Referenced by getNumExcluded(), mmPotential(), setNumAtoms(), and ~mmPotential().

Array of number of excluded 1-4 atoms per atom.

Referenced by getNumExcluded14(), mmPotential(), setNumAtoms(), and ~mmPotential().

Array of atom flags.

Referenced by getAtomFlags(), mmPotential(), setNumAtoms(), and ~mmPotential().

int* MTKpp::mmPotential::outFlags [protected]

Array of atom flags for energy decomposition.

Referenced by getOutputFlags(), mmPotential(), setNumAtoms(), and ~mmPotential().

int* MTKpp::mmPotential::excluded [protected]

Array of number of excluded atoms per atom.

Referenced by getExcluded(), mmPotential(), setExcludedSize(), and ~mmPotential().

Array of number of excluded 1-4 atoms per atom.

Referenced by getExcluded14(), mmPotential(), setExcludedSize(), and ~mmPotential().

double* MTKpp::mmPotential::r12Params [protected]

L-J A Coefficient.

Referenced by getR12Params(), mmPotential(), setNumTypes(), and ~mmPotential().

double* MTKpp::mmPotential::r6Params [protected]

L-J B Coefficient.

Referenced by getR6Params(), mmPotential(), setNumTypes(), and ~mmPotential().

char* MTKpp::mmPotential::resNames [protected]

Residue names.

Referenced by getResidueNames(), setNumResidues(), and ~mmPotential().

Residue pointers.

Referenced by getResiduePointers(), mmPotential(), setNumResidues(), and ~mmPotential().

int MTKpp::mmPotential::nBonds [protected]

Number of bonds.

Referenced by getNumBonds(), mmPotential(), and setNumBonds().

int* MTKpp::mmPotential::bonds [protected]

Array of bonds (A-B, atom indices)

Referenced by getBonds(), mmPotential(), setNumBonds(), and ~mmPotential().

double* MTKpp::mmPotential::bondParams [protected]

Bond parameters array.

Referenced by getBondParams(), mmPotential(), setNumBonds(), and ~mmPotential().

int MTKpp::mmPotential::nAngles [protected]

Number of angles.

Referenced by getNumAngles(), mmPotential(), and setNumAngles().

int* MTKpp::mmPotential::angles [protected]

Array of angles (A-B-C, atom indices)

Referenced by getAngles(), mmPotential(), setNumAngles(), and ~mmPotential().

double* MTKpp::mmPotential::angleParams [protected]

Angle parameters array.

Referenced by getAngleParams(), mmPotential(), setNumAngles(), and ~mmPotential().

Number of torsions.

Referenced by getNumTorsions(), mmPotential(), and setNumTorsions().

int* MTKpp::mmPotential::torsions [protected]

Array of torsions (A-B-C-D, atom indices)

Referenced by getTorsions(), mmPotential(), setNumTorsions(), and ~mmPotential().

double* MTKpp::mmPotential::torsionParams [protected]

Torsion parameters array.

Referenced by getTorsionParams(), mmPotential(), setNumTorsions(), and ~mmPotential().

Number of Impropers.

Referenced by getNumImpropers(), mmPotential(), and setNumImpropers().

Total number of non bonded interactions.

Referenced by getNumNonBonded(), mmPotential(), and setNumNonBonded().

non-bonded atom indices array

Referenced by getNonBonded(), mmPotential(), setNumNonBonded(), and ~mmPotential().

non-bonded array

Referenced by getNonBondedParams(), mmPotential(), and setNumNonBonded().

non-bonded pointers

Referenced by getNonBondedPtrs(), setNumNonBonded(), and ~mmPotential().

Total number of non bonded 1-4 interactions.

non-bonded 1-4 atom indices array

non-bonded 1-4 array

non-bonded 1-4 pointers

Referenced by getNonBonded14Ptrs(), setNumNonBonded(), and ~mmPotential().

bool MTKpp::mmPotential::bEnergy [protected]

Calculate only E.

Referenced by initialize().

bool MTKpp::mmPotential::bBond [protected]

Switch for bond part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

bool MTKpp::mmPotential::bAngle [protected]

Switch for angle part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

bool MTKpp::mmPotential::bTorsion [protected]

Switch for torsion part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

Switch for improper part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

Switch for nonbonded part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

bool MTKpp::mmPotential::bHBond [protected]

Switch for H-bond part of the energy function.

Referenced by calcEnergy(), decomposeEnergy(), getPotential(), initialize(), and setPotential().

Decompose bond energy.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

Decompose angle energy.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

Decompose torsion energy.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

Decompose improper energy.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

Decompose non-bonded energy.

Referenced by calcEnergy(), MTKpp::amber::calcNonBondedEnergy(), decomposeEnergy(), and initialize().

Decompose H-Bonding energy.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

std::string MTKpp::mmPotential::pwdFile [protected]

Decomposed energy output file.

Referenced by initialize().

std::ofstream MTKpp::mmPotential::pwdFileStream [protected]

Output File Stream.

Referenced by calcEnergy().

std::string MTKpp::mmPotential::pwdGZFile [protected]

Decomposed energy output file.

Referenced by calcEnergy(), decomposeEnergy(), and initialize().

double MTKpp::mmPotential::totalEnergy [protected]
double MTKpp::mmPotential::bondEnergy [protected]
double MTKpp::mmPotential::angleEnergy [protected]
double MTKpp::mmPotential::vdWEnergy [protected]
double MTKpp::mmPotential::vdW14Energy [protected]

1-4 part of the vdW energy

Referenced by getTotalVDWEnergy(), initialize(), printEnergy(), printEnergy2(), and MTKpp::amber::setVDW14().

double MTKpp::mmPotential::R6 [protected]

R6 component of the vdW energy.

Referenced by initialize(), printEnergy(), and MTKpp::amber::setR6().

double MTKpp::mmPotential::R12 [protected]

R12 component of the vdW energy.

Referenced by initialize(), printEnergy(), and MTKpp::amber::setR12().

double MTKpp::mmPotential::eleEnergy [protected]
double MTKpp::mmPotential::ele14Energy [protected]

1-4 part of the ele energy

Referenced by getTotalEleEnergy(), initialize(), printEnergy(), printEnergy2(), and MTKpp::amber::setEle14().

double MTKpp::mmPotential::hBondEnergy [protected]

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

Generated on Fri Dec 23 2011 09:28:56 for MTK++ by Doxygen 1.7.5.1