ABoundAngleRestraint Class Reference

#include <FreeEnergyRestrain.h>

Inheritance diagram for ABoundAngleRestraint:

AnAngleRestraint ARestraint List of all members.

Public Member Functions

void SetRefAngle (double Angle)
void SetBound (Bound_t Bound)
double GetRefAngle ()
Bound_t GetBound ()
double GetEnergy ()
AVector GetGradient (int WhichGroup)
void GetStr (char *Str)
double GetAngleTarget ()

Detailed Description

Definition at line 325 of file FreeEnergyRestrain.h.


Member Function Documentation

double ABoundAngleRestraint::GetAngleTarget (  )  [inline, virtual]

Implements AnAngleRestraint.

Definition at line 342 of file FreeEnergyRestrain.h.

00342 {return(m_RefAngle);}

Bound_t ABoundAngleRestraint::GetBound (  )  [inline]

Definition at line 336 of file FreeEnergyRestrain.h.

00336 {return(m_Bound);}

double ABoundAngleRestraint::GetEnergy (  )  [virtual]

Implements ARestraint.

Definition at line 936 of file FreeEnergyRestrain.C.

References ARestraint::GetAngle(), AnAngleRestraint::GetE(), kLower, kUpper, and ARestraint::m_pCOMs.

00936                                        {
00937 //---------------------------------------------------------------------------
00938 // return the Energy for this bound angle restraint.
00939 //---------------------------------------------------------------------------
00940   double  E, Angle;
00941 
00942   E = 0.0;
00943   Angle = GetAngle(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2]);
00944   if (((m_Bound==kUpper) && (Angle>m_RefAngle)) ||
00945       ((m_Bound==kLower) && (Angle<m_RefAngle))) {
00946     E = GetE(m_RefAngle);
00947   }
00948   return(E);
00949 }

AVector ABoundAngleRestraint::GetGradient ( int  WhichGroup  )  [virtual]

Implements ARestraint.

Definition at line 952 of file FreeEnergyRestrain.C.

References ARestraint::GetAngle(), AnAngleRestraint::GetGrad(), kLower, kUpper, and ARestraint::m_pCOMs.

00952                                                         {
00953 //---------------------------------------------------------------------------
00954 // return the gradient for this bound angle restraint
00955 //---------------------------------------------------------------------------
00956   double  Angle;
00957   AVector Vec;
00958 
00959   Angle = GetAngle(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2]);
00960   if (((m_Bound==kUpper) && (Angle>m_RefAngle)) ||
00961       ((m_Bound==kLower) && (Angle<m_RefAngle))) {
00962     Vec = GetGrad(WhichGroup, m_RefAngle);
00963   }
00964   return(Vec);
00965 }

double ABoundAngleRestraint::GetRefAngle (  )  [inline]

Definition at line 335 of file FreeEnergyRestrain.h.

00335 {return(m_RefAngle);}

void ABoundAngleRestraint::GetStr ( char *  Str  )  [inline, virtual]

Implements ARestraint.

Definition at line 339 of file FreeEnergyRestrain.h.

00339                             {
00340     strcpy(Str, "Bound   Angle    Restraint");
00341   }

void ABoundAngleRestraint::SetBound ( Bound_t  Bound  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 334 of file FreeEnergyRestrain.h.

00334 {m_Bound=Bound;}

void ABoundAngleRestraint::SetRefAngle ( double  Angle  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 333 of file FreeEnergyRestrain.h.

00333 {m_RefAngle=Angle;}


The documentation for this class was generated from the following files:
Generated on Sat Sep 23 01:17:17 2017 for NAMD by  doxygen 1.4.7