AForcingPosRestraint Class Reference

#include <FreeEnergyRestrain.h>

Inheritance diagram for AForcingPosRestraint:

APosRestraint ARestraint List of all members.

Public Member Functions

void SetStartPos (AVector Pos)
void SetStopPos (AVector Pos)
AVector GetStartPos ()
AVector GetStopPos ()
double GetEnergy ()
AVector GetGradient (int WhichGroup)
double Get_dU_dLambda ()
Bool_t IsForcing ()
void GetStr (char *Str)
AVector GetPosTarget ()
double GetDistance ()

Detailed Description

Definition at line 211 of file FreeEnergyRestrain.h.


Member Function Documentation

double AForcingPosRestraint::Get_dU_dLambda (  )  [virtual]

Reimplemented from ARestraint.

Definition at line 822 of file FreeEnergyRestrain.C.

References ARestraint::m_Kf, ARestraint::m_LambdaKf, ARestraint::m_LambdaRef, and ARestraint::m_pCOMs.

00822                                             {
00823 //---------------------------------------------------------------------------
00824 // return dU/dLambda for this forcing position restraint
00825 //---------------------------------------------------------------------------
00826   AVector  RefPos;
00827   double   T1, T2, T3;
00828 
00829   RefPos = m_StopPos*m_LambdaRef + m_StartPos*(1.0-m_LambdaRef);
00830   T1 = (m_pCOMs[0][0] - RefPos[0]) * (m_StartPos[0] - m_StopPos[0]);
00831   T2 = (m_pCOMs[0][1] - RefPos[1]) * (m_StartPos[1] - m_StopPos[1]);
00832   T3 = (m_pCOMs[0][2] - RefPos[2]) * (m_StartPos[2] - m_StopPos[2]);
00833   return( m_Kf * m_LambdaKf * (T1+T2+T3) );
00834 }

double AForcingPosRestraint::GetDistance (  )  [inline, virtual]

Implements APosRestraint.

Definition at line 233 of file FreeEnergyRestrain.h.

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

00233                         {
00234     AVector RefPos = m_StopPos*m_LambdaRef + m_StartPos*(1.0-m_LambdaRef);
00235     return(RefPos.Dist(m_pCOMs[0]));
00236   }

double AForcingPosRestraint::GetEnergy (  )  [virtual]

Implements ARestraint.

Definition at line 794 of file FreeEnergyRestrain.C.

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

00794                                        {
00795 //--------------------------------------------------------------------
00796 // return the Energy for this forcing position restraint.
00797 //
00798 // rref = lambda*r1 + (1-lambda)*r0.
00799 // where r0 is the starting position and r1 is the final position
00800 //--------------------------------------------------------------------
00801   AVector  RefPos;
00802 
00803   RefPos = m_StopPos*m_LambdaRef + m_StartPos*(1.0-m_LambdaRef);
00804   return(GetE(RefPos, m_LambdaKf));
00805 }

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

Implements ARestraint.

Definition at line 808 of file FreeEnergyRestrain.C.

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

00808                                                         {
00809 //---------------------------------------------------------------------------
00810 // return the gradient for this forcing position restraint.
00811 //
00812 // rref = lambda*r1 + (1-lambda)*r0.
00813 // where r0 is the starting position and r1 is the final position
00814 //---------------------------------------------------------------------------
00815   AVector  RefPos;
00816 
00817   RefPos = m_StopPos*m_LambdaRef + m_StartPos*(1.0-m_LambdaRef);
00818   return(GetGrad(WhichGroup, RefPos, m_LambdaKf));
00819 }

AVector AForcingPosRestraint::GetPosTarget (  )  [inline, virtual]

Implements APosRestraint.

Definition at line 230 of file FreeEnergyRestrain.h.

References ARestraint::m_LambdaRef.

00230                          {
00231     return(m_StopPos*m_LambdaRef + m_StartPos*(1.0-m_LambdaRef));
00232   }

AVector AForcingPosRestraint::GetStartPos (  )  [inline]

Definition at line 221 of file FreeEnergyRestrain.h.

00221 {return(m_StartPos);}

AVector AForcingPosRestraint::GetStopPos (  )  [inline]

Definition at line 222 of file FreeEnergyRestrain.h.

00222 {return(m_StopPos);}

void AForcingPosRestraint::GetStr ( char *  Str  )  [inline, virtual]

Implements ARestraint.

Definition at line 227 of file FreeEnergyRestrain.h.

00227                             {
00228     strcpy(Str, "Forcing Position Restraint");
00229   }

Bool_t AForcingPosRestraint::IsForcing (  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 226 of file FreeEnergyRestrain.h.

References kTrue.

00226 {return(kTrue);}

void AForcingPosRestraint::SetStartPos ( AVector  Pos  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 219 of file FreeEnergyRestrain.h.

00219 {m_StartPos=Pos;}

void AForcingPosRestraint::SetStopPos ( AVector  Pos  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 220 of file FreeEnergyRestrain.h.

00220 {m_StopPos=Pos;}


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 01:17:18 2017 for NAMD by  doxygen 1.4.7