NAMD
Public Member Functions | List of all members
ABoundAngleRestraint Class Reference

#include <FreeEnergyRestrain.h>

Inheritance diagram for ABoundAngleRestraint:
AnAngleRestraint ARestraint

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 ()
 
- Public Member Functions inherited from AnAngleRestraint
 AnAngleRestraint ()
 
void PrintInfo ()
 
- Public Member Functions inherited from ARestraint
 ARestraint ()
 
virtual ~ARestraint ()
 
int GetNumGroups ()
 
void SetKf (double Kf)
 
double GetKf ()
 
void SetLambdaKf (double LambdaKf)
 
void SetLambdaRef (double LambdaRef)
 
double GetLambdaKf ()
 
double GetLambdaRef ()
 
void SetGroup (AGroup &Group, int GroupIndex)
 
void SetGroups (AGroup &Group1)
 
void SetGroups (AGroup &Group1, AGroup &Group2)
 
void SetGroups (AGroup &Group1, AGroup &Group2, AGroup &Group3)
 
void SetGroups (AGroup &Group1, AGroup &Group2, AGroup &Group3, AGroup &Group4)
 
void UpdateCOMs (GlobalMasterFreeEnergy &CFE)
 
void DistributeForce (int WhichGroup, AVector Force, GlobalMasterFreeEnergy &CFE)
 
virtual Bool_t IsForcing ()
 
virtual double Get_dU_dLambda ()
 
virtual void SetRefPos (AVector)
 
virtual void SetRefDist (double)
 
virtual void SetLowerAngle (double)
 
virtual void SetUpperAngle (double)
 
virtual void SetIntervalAngle (double)
 
virtual void SetStartPos (AVector)
 
virtual void SetStopPos (AVector)
 
virtual void SetStartDist (double)
 
virtual void SetStopDist (double)
 
virtual void SetStartAngle (double)
 
virtual void SetStopAngle (double)
 

Additional Inherited Members

- Protected Member Functions inherited from AnAngleRestraint
double GetE (double RefAngle, double LambdaKf=1.0)
 
AVector GetGrad (int WhichGroup, double RefAngle, double LambdaKf=1.0)
 
- Protected Member Functions inherited from ARestraint
double GetAngle (AVector &A, AVector &B, AVector &C)
 
double GetDihe (AVector &A, AVector &B, AVector &C, AVector &D)
 
void EarlyExit (const char *Str, int AtomID)
 
- Protected Attributes inherited from ARestraint
double m_Kf
 
int m_NumGroups
 
AGroupm_pGroups
 
AVectorm_pCOMs
 
- Static Protected Attributes inherited from ARestraint
static double m_LambdaKf = 1.0
 
static double m_LambdaRef = 0.0
 

Detailed Description

Definition at line 325 of file FreeEnergyRestrain.h.

Member Function Documentation

double ABoundAngleRestraint::GetAngleTarget ( )
inlinevirtual

Implements AnAngleRestraint.

Definition at line 342 of file FreeEnergyRestrain.h.

342 {return(m_RefAngle);}
Bound_t ABoundAngleRestraint::GetBound ( )
inline

Definition at line 336 of file FreeEnergyRestrain.h.

336 {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.

932  {
933 //---------------------------------------------------------------------------
934 // return the Energy for this bound angle restraint.
935 //---------------------------------------------------------------------------
936  double E, Angle;
937 
938  E = 0.0;
939  Angle = GetAngle(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2]);
940  if (((m_Bound==kUpper) && (Angle>m_RefAngle)) ||
941  ((m_Bound==kLower) && (Angle<m_RefAngle))) {
942  E = GetE(m_RefAngle);
943  }
944  return(E);
945 }
struct angle Angle
double GetE(double RefAngle, double LambdaKf=1.0)
double GetAngle(AVector &A, AVector &B, AVector &C)
AVector * m_pCOMs
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.

948  {
949 //---------------------------------------------------------------------------
950 // return the gradient for this bound angle restraint
951 //---------------------------------------------------------------------------
952  double Angle;
953  AVector Vec;
954 
955  Angle = GetAngle(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2]);
956  if (((m_Bound==kUpper) && (Angle>m_RefAngle)) ||
957  ((m_Bound==kLower) && (Angle<m_RefAngle))) {
958  Vec = GetGrad(WhichGroup, m_RefAngle);
959  }
960  return(Vec);
961 }
struct angle Angle
double GetAngle(AVector &A, AVector &B, AVector &C)
AVector GetGrad(int WhichGroup, double RefAngle, double LambdaKf=1.0)
AVector * m_pCOMs
double ABoundAngleRestraint::GetRefAngle ( )
inline

Definition at line 335 of file FreeEnergyRestrain.h.

335 {return(m_RefAngle);}
void ABoundAngleRestraint::GetStr ( char *  Str)
inlinevirtual

Implements ARestraint.

Definition at line 339 of file FreeEnergyRestrain.h.

339  {
340  strcpy(Str, "Bound Angle Restraint");
341  }
void ABoundAngleRestraint::SetBound ( Bound_t  Bound)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 334 of file FreeEnergyRestrain.h.

334 {m_Bound=Bound;}
void ABoundAngleRestraint::SetRefAngle ( double  Angle)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 333 of file FreeEnergyRestrain.h.

333 {m_RefAngle=Angle;}
struct angle Angle

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