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 932 of file FreeEnergyRestrain.C.

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

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

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

Implements ARestraint.

Definition at line 948 of file FreeEnergyRestrain.C.

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

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

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 Jun 23 01:17:18 2018 for NAMD by  doxygen 1.4.7