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

#include <FreeEnergyRestrain.h>

Inheritance diagram for AForcingDistRestraint:
ADistRestraint ARestraint

Public Member Functions

void SetStartDist (double Dist)
 
void SetStopDist (double Dist)
 
double GetStartDist ()
 
double GetStopDist ()
 
double GetEnergy ()
 
AVector GetGradient (int WhichGroup)
 
double Get_dU_dLambda ()
 
Bool_t IsForcing ()
 
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 void SetRefPos (AVector)
 
virtual void SetRefDist (double)
 
virtual void SetRefAngle (double)
 
virtual void SetBound (Bound_t)
 
virtual void SetLowerAngle (double)
 
virtual void SetUpperAngle (double)
 
virtual void SetIntervalAngle (double)
 
virtual void SetStartPos (AVector)
 
virtual void SetStopPos (AVector)
 
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 280 of file FreeEnergyRestrain.h.

Member Function Documentation

double AForcingDistRestraint::Get_dU_dLambda ( )
virtual

Reimplemented from ARestraint.

Definition at line 903 of file FreeEnergyRestrain.C.

References AVector::Dist(), ARestraint::m_Kf, ARestraint::m_LambdaKf, ARestraint::m_LambdaRef, and ARestraint::m_pCOMs.

903  {
904 //---------------------------------------------------------------------------
905 // return dU/dLambda for this forcing distance restraint
906 //---------------------------------------------------------------------------
907  double Dist;
908  double RefDist;
909 
910  Dist = m_pCOMs[0].Dist(m_pCOMs[1]);
911  RefDist = m_StopDist*m_LambdaRef + m_StartDist*(1.0-m_LambdaRef);
912  return( m_Kf * m_LambdaKf * (Dist-RefDist)*(m_StartDist-m_StopDist) );
913 }
static double m_LambdaRef
static double m_LambdaKf
double Dist()
AVector * m_pCOMs
double AForcingDistRestraint::GetDistTarget ( )
inlinevirtual

Implements ADistRestraint.

Definition at line 299 of file FreeEnergyRestrain.h.

References ARestraint::m_LambdaRef.

299  {
300  return(m_StopDist*m_LambdaRef + m_StartDist*(1.0-m_LambdaRef));
301  }
static double m_LambdaRef
double AForcingDistRestraint::GetEnergy ( )
virtual

Implements ARestraint.

Definition at line 881 of file FreeEnergyRestrain.C.

References ADistRestraint::GetE(), ARestraint::m_LambdaKf, and ARestraint::m_LambdaRef.

881  {
882 //---------------------------------------------------------------------------
883 // return the Energy for this forcing distance restraint.
884 //---------------------------------------------------------------------------
885  double RefDist;
886 
887  RefDist = m_StopDist*m_LambdaRef + m_StartDist*(1.0-m_LambdaRef);
888  return(GetE(RefDist, m_LambdaKf));
889 }
double GetE(double RefDist, double LambdaKf=1.0)
static double m_LambdaRef
static double m_LambdaKf
AVector AForcingDistRestraint::GetGradient ( int  WhichGroup)
virtual

Implements ARestraint.

Definition at line 892 of file FreeEnergyRestrain.C.

References ADistRestraint::GetGrad(), ARestraint::m_LambdaKf, and ARestraint::m_LambdaRef.

892  {
893 //---------------------------------------------------------------------------
894 // return the gradient for this forcing distance restraint.
895 //---------------------------------------------------------------------------
896  double RefDist;
897 
898  RefDist = m_StopDist*m_LambdaRef + m_StartDist*(1.0-m_LambdaRef);
899  return(GetGrad(WhichGroup, RefDist, m_LambdaKf));
900 }
static double m_LambdaRef
AVector GetGrad(int WhichGroup, double RefDist, double LambdaKf=1.0)
static double m_LambdaKf
double AForcingDistRestraint::GetStartDist ( )
inline

Definition at line 290 of file FreeEnergyRestrain.h.

290 {return(m_StartDist);}
double AForcingDistRestraint::GetStopDist ( )
inline

Definition at line 291 of file FreeEnergyRestrain.h.

291 {return(m_StopDist);}
void AForcingDistRestraint::GetStr ( char *  Str)
inlinevirtual

Implements ARestraint.

Definition at line 296 of file FreeEnergyRestrain.h.

296  {
297  strcpy(Str, "Forcing Distance Restraint");
298  }
Bool_t AForcingDistRestraint::IsForcing ( )
inlinevirtual

Reimplemented from ARestraint.

Definition at line 295 of file FreeEnergyRestrain.h.

References kTrue.

295 {return(kTrue);}
void AForcingDistRestraint::SetStartDist ( double  Dist)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 288 of file FreeEnergyRestrain.h.

288 {m_StartDist=Dist;}
void AForcingDistRestraint::SetStopDist ( double  Dist)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 289 of file FreeEnergyRestrain.h.

289 {m_StopDist=Dist;}

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