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 818 of file FreeEnergyRestrain.C.

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

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

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 790 of file FreeEnergyRestrain.C.

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

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

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

Implements ARestraint.

Definition at line 804 of file FreeEnergyRestrain.C.

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

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

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 Thu Jun 21 01:17:18 2018 for NAMD by  doxygen 1.4.7