ABoundDiheRestraint Class Reference

#include <FreeEnergyRestrain.h>

Inheritance diagram for ABoundDiheRestraint:

ADiheRestraint ARestraint List of all members.

Public Member Functions

void SetLowerAngle (double Angle)
void SetUpperAngle (double Angle)
void SetIntervalAngle (double Angle)
double GetLowerAngle ()
double GetUpperAngle ()
double GetIntervalAngle ()
double GetEnergy ()
AVector GetGradient (int WhichGroup)
void GetStr (char *Str)
Bool_t TwoTargets ()
double GetDiheTarget1 ()
double GetDiheTarget2 ()

Detailed Description

Definition at line 392 of file FreeEnergyRestrain.h.


Member Function Documentation

double ABoundDiheRestraint::GetDiheTarget1 (  )  [inline, virtual]

Implements ADiheRestraint.

Definition at line 413 of file FreeEnergyRestrain.h.

00413 {return(m_LowerAngle);}

double ABoundDiheRestraint::GetDiheTarget2 (  )  [inline, virtual]

Implements ADiheRestraint.

Definition at line 414 of file FreeEnergyRestrain.h.

00414 {return(m_UpperAngle);}

double ABoundDiheRestraint::GetEnergy (  )  [virtual]

Implements ARestraint.

Definition at line 1019 of file FreeEnergyRestrain.C.

References ARestraint::GetDihe(), ADiheRestraint::GetE(), ARestraint::m_Kf, and ARestraint::m_pCOMs.

01019                                       {
01020 //---------------------------------------------------------------------------
01021 // return the Energy for this bound dihedral angle restraint.
01022 //---------------------------------------------------------------------------
01023   double  E, Dihe, Const;
01024 
01025   Const = m_Kf / (1.0 - cos(m_IntervalAngle));
01026   Dihe = GetDihe(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2], m_pCOMs[3]);
01027   // dihedral angle is between LowerAngle and UpperAngle
01028   if ( (Dihe>m_LowerAngle) && (Dihe<m_UpperAngle) ) {
01029     E = 0.0;
01030   }
01031   // dihedral angle is between LowerAngle and LowerAngle-IntervalAngle
01032   else if ( (Dihe<m_LowerAngle) && (Dihe>(m_LowerAngle-m_IntervalAngle)) ) {
01033     E = GetE(m_LowerAngle, Const);
01034   }
01035   // dihedral angle is between UpperAngle and UpperAngle+IntervalAngle
01036   else if ( (Dihe>m_UpperAngle) && (Dihe<(m_UpperAngle+m_IntervalAngle)) ) {
01037     E = GetE(m_UpperAngle, Const);
01038   }
01039   // dihedral angle is more than UpperAngle or less than LowerAngle
01040   else {
01041     E = Const;
01042   }
01043   return(E);
01044 }

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

Implements ARestraint.

Definition at line 1047 of file FreeEnergyRestrain.C.

References ARestraint::GetDihe(), ADiheRestraint::GetGrad(), ARestraint::m_Kf, and ARestraint::m_pCOMs.

01047                                                        {
01048 //---------------------------------------------------------------------------
01049 // return the gradient for this bound dihedral angle restraint.
01050 //---------------------------------------------------------------------------
01051   AVector Vec;
01052   double  Dihe, Const;
01053 
01054   Const = m_Kf / (1.0 - cos(m_IntervalAngle));
01055   Dihe = GetDihe(m_pCOMs[0], m_pCOMs[1], m_pCOMs[2], m_pCOMs[3]);
01056   // dihedral angle is between LowerAngle and LowerAngle-IntervalAngle
01057   if ( (Dihe<m_LowerAngle) && (Dihe>(m_LowerAngle-m_IntervalAngle)) ) {
01058     Vec = GetGrad(WhichGroup, m_LowerAngle, Const);
01059   }
01060   // dihedral angle is between UpperAngle and UpperAngle+IntervalAngle
01061   else if ( (Dihe>m_UpperAngle) && (Dihe<(m_UpperAngle+m_IntervalAngle)) ) {
01062     Vec = GetGrad(WhichGroup, m_UpperAngle, Const);
01063   }
01064   return(Vec);
01065 }

double ABoundDiheRestraint::GetIntervalAngle (  )  [inline]

Definition at line 406 of file FreeEnergyRestrain.h.

00406 {return(m_IntervalAngle);}

double ABoundDiheRestraint::GetLowerAngle (  )  [inline]

Definition at line 404 of file FreeEnergyRestrain.h.

00404 {return(m_LowerAngle);}

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

Implements ARestraint.

Definition at line 409 of file FreeEnergyRestrain.h.

00409                             {
00410     strcpy(Str, "Bound   Dihedral Restraint");
00411   }

double ABoundDiheRestraint::GetUpperAngle (  )  [inline]

Definition at line 405 of file FreeEnergyRestrain.h.

00405 {return(m_UpperAngle);}

void ABoundDiheRestraint::SetIntervalAngle ( double  Angle  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 403 of file FreeEnergyRestrain.h.

00403 {m_IntervalAngle=Angle;}

void ABoundDiheRestraint::SetLowerAngle ( double  Angle  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 401 of file FreeEnergyRestrain.h.

00401 {m_LowerAngle=Angle;}

void ABoundDiheRestraint::SetUpperAngle ( double  Angle  )  [inline, virtual]

Reimplemented from ARestraint.

Definition at line 402 of file FreeEnergyRestrain.h.

00402 {m_UpperAngle=Angle;}

Bool_t ABoundDiheRestraint::TwoTargets (  )  [inline, virtual]

Implements ADiheRestraint.

Definition at line 412 of file FreeEnergyRestrain.h.

References kTrue.

00412 {return(kTrue);}


The documentation for this class was generated from the following files:
Generated on Sat Sep 23 01:17:17 2017 for NAMD by  doxygen 1.4.7