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

References AVector::Dist(), ADistRestraint::GetE(), kLower, kUpper, and ARestraint::m_pCOMs.

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

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

Implements ARestraint.

Definition at line 869 of file FreeEnergyRestrain.C.

References AVector::Dist(), ADistRestraint::GetGrad(), kLower, kUpper, and ARestraint::m_pCOMs.

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

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 Wed Nov 22 01:17:18 2017 for NAMD by  doxygen 1.4.7