MTK++ Latest version: 0.2.0

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

AMBER angle energy and gradient. More...

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

Collaboration diagram for MTKpp::amberAngle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 amberAngle ()
 amberAngle Constructor
 amberAngle (amber *pAmber)
 amberAngle Constructor
virtual ~amberAngle ()
 amberAngle Destructor
double calculateE ()
 Calculate angle Energy.
double calculateG ()
 Calculate angle Energy and Gradient.

Protected Member Functions

double angle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, bool &bError)
 Determine the angle between atoms 1, 2, and 3.

Protected Attributes

amberpAmber
 parent potential
double energy
double deltaAngle
 angle
bool bError

Detailed Description

AMBER angle energy and gradient.

Author:
Martin Peters
Version:
0.1
Date:
2006

AMBER Angle Energy And Gradient

\begin{eqnarray*} E_{\rm angle} & = & K_\theta (\theta - \theta_{eq})^2 \label{AMBER:angle} \end{eqnarray*}

where $K_\theta$ is the angle force constant, $\theta$ is the angle ( $0 \leq \theta \leq \pi$), $\theta_{eq}$ is the standard angle.

\begin{eqnarray*} \theta & = & \arccos\left({{r_{ij} \cdot r_{kj}} \over {|r_{ij}||r_{kj}|}}\right) \\ \cos{\theta} & = & {{r_{ij} \cdot r_{kj}} \over {|r_{ij}||r_{kj}|}} \label{cos:theta} \end{eqnarray*}

\begin{eqnarray*} \nabla_iE & = & {\partial E \over \partial\theta} \cdot {\partial\theta \over \partial\cos\theta} \cdot \nabla_i \cos \theta \\ & = & 2K_\theta(\theta - \theta_{eq}) \cdot -\left({1 \over \sin\theta}\right) \cdot \nabla_i\cos\theta \\ \label{dAngle:E} \end{eqnarray*}

How to determine $\nabla_i\cos\theta$?

Considering that $\cos\theta$ is a function of $r_{ij}$ and $r_{kj}$ both of which are functions of $r_i$, $r_j$, and $r_k$. Therefore you need to use the chain rule:

\begin{eqnarray*} {\partial\cos\theta \over \partial x_i} & = & \hat x \nabla_i\cos\theta \\ & = & {\partial\cos\theta \over \partial x_{ij}} {\partial x_{ij} \over \partial x_i} + {\partial\cos\theta \over \partial y_{ij}} {\partial y_{ij} \over \partial x_i} + {\partial\cos\theta \over \partial z_{ij}} {\partial z_{ij} \over \partial x_i} + \nonumber \\ & & {\partial\cos\theta \over \partial x_{kj}} {\partial x_{kj} \over \partial x_i} + {\partial\cos\theta \over \partial y_{kj}} {\partial y_{kj} \over \partial x_i} + {\partial\cos\theta \over \partial z_{kj}} {\partial z_{kj} \over \partial x_i} \\ & = & {\partial\cos\theta \over \partial x_{ij}} \label{dcost:dxi} \end{eqnarray*}

There is a total of 9 such expression similar to the previous equation which lead to the following

\begin{eqnarray*} {\nabla_i\cos\theta} & = & \hat x {\partial\cos\theta \over \partial x_{ij}} + \hat y {\partial\cos\theta \over \partial y_{ij}} + \hat z {\partial\cos\theta \over \partial z_{ij}} \\ {\nabla_j\cos\theta} & = & \hat x \left({\partial\cos\theta \over \partial x_{ij}} + {\partial\cos\theta \over \partial x_{kj}}\right) + \hat y \left({\partial\cos\theta \over \partial y_{ij}} + {\partial\cos\theta \over \partial y_{kj}}\right) + \nonumber \\ & & \hat z \left({\partial\cos\theta \over \partial z_{ij}} + {\partial\cos\theta \over \partial z_{kj}}\right) \\ {\nabla_k\cos\theta} & = & \hat x {\partial\cos\theta \over \partial x_{kj}} + \hat y {\partial\cos\theta \over \partial y_{kj}} + \hat z {\partial\cos\theta \over \partial z_{kj}} \label{nine:angle} \end{eqnarray*}

Finally, how do you determine $d\cos\theta/dx_{ij}$?

\begin{eqnarray*} \cos{\theta} & = & {{r_{ij} \cdot r_{kj}} \over {|r_{ij}||r_{kj}|}} \end{eqnarray*}

\begin{eqnarray*} {\partial\cos\theta \over \partial x_{ij}} & = & { |r_{ij}||r_{kj}| {d\left(r_{ij}\cdot {r_{kj}} \right) \over dx_{ij}} - \left(r_{ij}\cdot{r_{kj}}\right) {d\left(|r_{ij}||r_{kj}| \right) \over dx_{ij}} \over {|r_{ij}|^2|r_{kj}|^2} } \nonumber \\ & = & {|r_{ij}||r_{kj}|r_{kj} - \left(r_{ij} \cdot r_{kj}\right){r_{ij} \over |r_{ij}|}|r_{kj}| \over {|r_{ij}|^2|r_{kj}|^2} } \nonumber \\ & = & {r_{kj} \over |r_{ij}||r_{kj}|} - {\left( r_{ij}\cdot r_{kj}\right) {r_{ij} \over |r_{ij}|} \over |r_{ij}|^2|r_{kj}|} \nonumber \\ & = & {1 \over |r_{ij}|} \left[{r_{kj} \over |r_{kj}|} - {\left(r_{ij}\cdot r_{kj}\right) \over |r_{ij}||r_{kj}|} {r_{ij} \over |r_{ij}|} \right] \nonumber \\ & = & {1 \over |r_{ij}|} \left[\hat r_{kj} - \cos\theta\hat r_{ij} \right] \\ {\partial\cos\theta \over \partial x_{kj}} & = & {1 \over |r_{kj}|} \left[\hat r_{ij} - \cos\theta\hat r_{kj} \right] \label{dcos:dxs} \end{eqnarray*}


Constructor & Destructor Documentation

MTKpp::amberAngle::amberAngle ( )

amberAngle Constructor

MTKpp::amberAngle::amberAngle ( amber pAmber)

amberAngle Constructor

Parameters:
pAmberparent potential
MTKpp::amberAngle::~amberAngle ( ) [virtual]

amberAngle Destructor


Member Function Documentation

double MTKpp::amberAngle::calculateE ( )
double MTKpp::amberAngle::calculateG ( )
double MTKpp::amberAngle::angle ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3,
bool &  bError 
) [protected]

Determine the angle between atoms 1, 2, and 3.

Parameters:
x1atom 1 x coordinate
y1atom 1 y coordinate
z1atom 1 z coordinate
x2atom 2 x coordinate
y2atom 2 y coordinate
z2atom 2 z coordinate
x3atom 3 x coordinate
y3atom 3 y coordinate
z3atom 3 z coordinate
bErrorerror boolean
Returns:
angle between atoms 1, 2, and 3

Referenced by calculateE().


Member Data Documentation

parent potential

Referenced by calculateE(), and calculateG().

double MTKpp::amberAngle::energy [protected]

Referenced by calculateE(), and calculateG().

double MTKpp::amberAngle::deltaAngle [protected]

angle

Referenced by calculateE(), and calculateG().

bool MTKpp::amberAngle::bError [protected]

Referenced by calculateE().


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