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

#include <FreeEnergyRestrain.h>

Inheritance diagram for AForcingDiheRestraint:
ADiheRestraint ARestraint

Public Member Functions

void SetStartAngle (double Angle)
 
void SetStopAngle (double Angle)
 
double GetStartAngle ()
 
double GetStopAngle ()
 
double GetEnergy ()
 
AVector GetGradient (int WhichGroup)
 
double Get_dU_dLambda ()
 
Bool_t IsForcing ()
 
void GetStr (char *Str)
 
Bool_t TwoTargets ()
 
double GetDiheTarget1 ()
 
double GetDiheTarget2 ()
 
- Public Member Functions inherited from ADiheRestraint
 ADiheRestraint ()
 
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 SetStartDist (double)
 
virtual void SetStopDist (double)
 

Additional Inherited Members

- Protected Member Functions inherited from ADiheRestraint
double GetE (double RefDihe, double Const)
 
AVector GetGrad (int WhichGroup, double RefDihe, double Const)
 
AVector gradU (AVector &P1P2P3, AVector &P4P5P6, AVector &dP1, AVector &dP2, AVector &dP3, AVector &dP4, AVector &dP5, AVector &dP6)
 
- 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 417 of file FreeEnergyRestrain.h.

Member Function Documentation

double AForcingDiheRestraint::Get_dU_dLambda ( )
virtual

Reimplemented from ARestraint.

Definition at line 1086 of file FreeEnergyRestrain.C.

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

1086  {
1087 //---------------------------------------------------------------------------
1088 // return dU/dLambda for this forcing dihedral angle restraint
1089 //---------------------------------------------------------------------------
1090  double Dihe;
1091  double RefDihe;
1092 
1093  Dihe = GetDihe(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2], m_pCOMs[3]);
1094  RefDihe = m_StopAngle*m_LambdaRef + m_StartAngle*(1.0-m_LambdaRef);
1095  return((m_Kf/2)*m_LambdaKf * sin(Dihe-RefDihe) * (m_StartAngle-m_StopAngle));
1096 }
double GetDihe(AVector &A, AVector &B, AVector &C, AVector &D)
static double m_LambdaRef
static double m_LambdaKf
AVector * m_pCOMs
double AForcingDiheRestraint::GetDiheTarget1 ( )
inlinevirtual

Implements ADiheRestraint.

Definition at line 437 of file FreeEnergyRestrain.h.

References ARestraint::m_LambdaRef.

437  {
438  return(m_StopAngle*m_LambdaRef + m_StartAngle*(1.0-m_LambdaRef));
439  }
static double m_LambdaRef
double AForcingDiheRestraint::GetDiheTarget2 ( )
inlinevirtual

Implements ADiheRestraint.

Definition at line 440 of file FreeEnergyRestrain.h.

440 {return(0);}
double AForcingDiheRestraint::GetEnergy ( )
virtual

Implements ARestraint.

Definition at line 1064 of file FreeEnergyRestrain.C.

References ADiheRestraint::GetE(), ARestraint::m_Kf, ARestraint::m_LambdaKf, and ARestraint::m_LambdaRef.

1064  {
1065 //---------------------------------------------------------------------------
1066 // return the Energy for this forcing dihedral angle restraint.
1067 //---------------------------------------------------------------------------
1068  double RefDihe;
1069 
1070  RefDihe = m_StopAngle*m_LambdaRef + m_StartAngle*(1.0-m_LambdaRef);
1071  return(GetE(RefDihe, m_Kf*m_LambdaKf));
1072 }
static double m_LambdaRef
static double m_LambdaKf
double GetE(double RefDihe, double Const)
AVector AForcingDiheRestraint::GetGradient ( int  WhichGroup)
virtual

Implements ARestraint.

Definition at line 1075 of file FreeEnergyRestrain.C.

References ADiheRestraint::GetGrad(), ARestraint::m_Kf, ARestraint::m_LambdaKf, and ARestraint::m_LambdaRef.

1075  {
1076 //---------------------------------------------------------------------------
1077 // return the gradient for this forcing dihedral angle restraint.
1078 //---------------------------------------------------------------------------
1079  double RefDihe;
1080 
1081  RefDihe = m_StopAngle*m_LambdaRef + m_StartAngle*(1.0-m_LambdaRef);
1082  return(GetGrad(WhichGroup, RefDihe, m_Kf*m_LambdaKf));
1083 }
AVector GetGrad(int WhichGroup, double RefDihe, double Const)
static double m_LambdaRef
static double m_LambdaKf
double AForcingDiheRestraint::GetStartAngle ( )
inline

Definition at line 427 of file FreeEnergyRestrain.h.

427 {return(m_StartAngle);}
double AForcingDiheRestraint::GetStopAngle ( )
inline

Definition at line 428 of file FreeEnergyRestrain.h.

428 {return(m_StopAngle);}
void AForcingDiheRestraint::GetStr ( char *  Str)
inlinevirtual

Implements ARestraint.

Definition at line 433 of file FreeEnergyRestrain.h.

433  {
434  strcpy(Str, "Forcing Dihedral Restraint");
435  }
Bool_t AForcingDiheRestraint::IsForcing ( )
inlinevirtual

Reimplemented from ARestraint.

Definition at line 432 of file FreeEnergyRestrain.h.

References kTrue.

432 {return(kTrue);}
void AForcingDiheRestraint::SetStartAngle ( double  Angle)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 425 of file FreeEnergyRestrain.h.

425 {m_StartAngle=Angle;}
struct angle Angle
void AForcingDiheRestraint::SetStopAngle ( double  Angle)
inlinevirtual

Reimplemented from ARestraint.

Definition at line 426 of file FreeEnergyRestrain.h.

426 {m_StopAngle=Angle;}
struct angle Angle
Bool_t AForcingDiheRestraint::TwoTargets ( )
inlinevirtual

Implements ADiheRestraint.

Definition at line 436 of file FreeEnergyRestrain.h.

References kFalse.

436 {return(kFalse);}

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