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

#include <FreeEnergyRestrain.h>

Inheritance diagram for ABoundDistRestraint:
ADistRestraint ARestraint

Public Member Functions

void SetRefDist (double Dist)
 
void SetBound (Bound_t Bound)
 
double GetRefDist ()
 
Bound_t GetBound ()
 
double GetEnergy ()
 
AVector GetGradient (int WhichGroup)
 
void GetStr (char *Str)
 
double GetDistTarget ()
 
- Public Member Functions inherited from ADistRestraint
 ADistRestraint ()
 
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 SetRefAngle (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 ADistRestraint
double GetE (double RefDist, double LambdaKf=1.0)
 
AVector GetGrad (int WhichGroup, double RefDist, 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 260 of file FreeEnergyRestrain.h.

Member Function Documentation

Bound_t ABoundDistRestraint::GetBound ( )
inline

Definition at line 271 of file FreeEnergyRestrain.h.

271 {return(m_Bound);}
double ABoundDistRestraint::GetDistTarget ( )
inlinevirtual

Implements ADistRestraint.

Definition at line 277 of file FreeEnergyRestrain.h.

277 {return(m_RefDist);}
double ABoundDistRestraint::GetEnergy ( )
virtual

Implements ARestraint.

Definition at line 849 of file FreeEnergyRestrain.C.

References AVector::Dist(), ADistRestraint::GetE(), kLower, kUpper, and ARestraint::m_pCOMs.

849  {
850 //---------------------------------------------------------------------------
851 // return the Energy for this bound distance restraint.
852 //---------------------------------------------------------------------------
853  double Dist, E;
854 
855  E = 0.0;
856  Dist = m_pCOMs[0].Dist(m_pCOMs[1]);
857  if (((m_Bound==kUpper) && (Dist>m_RefDist)) ||
858  ((m_Bound==kLower) && (Dist<m_RefDist))) {
859  E = GetE(m_RefDist);
860  }
861  return(E);
862 }
double GetE(double RefDist, double LambdaKf=1.0)
double Dist()
AVector * m_pCOMs
AVector ABoundDistRestraint::GetGradient ( int  WhichGroup)
virtual

Implements ARestraint.

Definition at line 865 of file FreeEnergyRestrain.C.

References AVector::Dist(), ADistRestraint::GetGrad(), kLower, kUpper, and ARestraint::m_pCOMs.

865  {
866 //---------------------------------------------------------------------------
867 // return the gradient for this bound distance restraint.
868 //---------------------------------------------------------------------------
869  double Dist;
870  AVector Vec;
871 
872  Dist = m_pCOMs[0].Dist(m_pCOMs[1]);
873  if (((m_Bound==kUpper) && (Dist>m_RefDist)) ||
874  ((m_Bound==kLower) && (Dist<m_RefDist))) {
875  Vec = GetGrad(WhichGroup, m_RefDist);
876  }
877  return(Vec);
878 }
AVector GetGrad(int WhichGroup, double RefDist, double LambdaKf=1.0)
double Dist()
AVector * m_pCOMs
double ABoundDistRestraint::GetRefDist ( )
inline

Definition at line 270 of file FreeEnergyRestrain.h.

270 {return(m_RefDist);}
void ABoundDistRestraint::GetStr ( char *  Str)
inlinevirtual

Implements ARestraint.

Definition at line 274 of file FreeEnergyRestrain.h.

274  {
275  strcpy(Str, "Bound Distance Restraint");
276  }
void ABoundDistRestraint::SetBound ( Bound_t  Bound)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 269 of file FreeEnergyRestrain.h.

269 {m_Bound=Bound;}
void ABoundDistRestraint::SetRefDist ( double  Dist)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 268 of file FreeEnergyRestrain.h.

268 {m_RefDist=Dist;}

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