ABoundDistRestraint Class Reference

#include <FreeEnergyRestrain.h>

Inheritance diagram for ABoundDistRestraint:

ADistRestraint ARestraint List of all members.

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 ()

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.

00271 {return(m_Bound);}

double ABoundDistRestraint::GetDistTarget (  )  [inline, virtual]

Implements ADistRestraint.

Definition at line 277 of file FreeEnergyRestrain.h.

00277 {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.

00849                                       {
00850 //---------------------------------------------------------------------------
00851 // return the Energy for this bound distance restraint.
00852 //---------------------------------------------------------------------------
00853   double Dist, E;
00854 
00855   E = 0.0;
00856   Dist = m_pCOMs[0].Dist(m_pCOMs[1]);
00857   if (((m_Bound==kUpper) && (Dist>m_RefDist)) ||
00858       ((m_Bound==kLower) && (Dist<m_RefDist))) {
00859     E = GetE(m_RefDist);
00860   }
00861   return(E);
00862 }

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.

00865                                                        {
00866 //---------------------------------------------------------------------------
00867 // return the gradient for this bound distance restraint.
00868 //---------------------------------------------------------------------------
00869   double  Dist;
00870   AVector Vec;
00871 
00872   Dist = m_pCOMs[0].Dist(m_pCOMs[1]);
00873   if (((m_Bound==kUpper) && (Dist>m_RefDist)) ||
00874       ((m_Bound==kLower) && (Dist<m_RefDist))) {
00875     Vec = GetGrad(WhichGroup, m_RefDist);
00876   }
00877   return(Vec);
00878 }

double ABoundDistRestraint::GetRefDist (  )  [inline]

Definition at line 270 of file FreeEnergyRestrain.h.

00270 {return(m_RefDist);}

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

Implements ARestraint.

Definition at line 274 of file FreeEnergyRestrain.h.

00274                             {
00275     strcpy(Str, "Bound   Distance Restraint");
00276   }

void ABoundDistRestraint::SetBound ( Bound_t  Bound  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 269 of file FreeEnergyRestrain.h.

00269 {m_Bound=Bound;}

void ABoundDistRestraint::SetRefDist ( double  Dist  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 268 of file FreeEnergyRestrain.h.

00268 {m_RefDist=Dist;}


The documentation for this class was generated from the following files:
Generated on Sun Jun 17 01:17:19 2018 for NAMD by  doxygen 1.4.7