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

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

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

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

Implements ARestraint.

Definition at line 1043 of file FreeEnergyRestrain.C.

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

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

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