FreeEnergyRMgr.h

Go to the documentation of this file.
00001 
00007 //-------------------------------------------------------------------------
00008 // ARestraintManager contains a (potentially long) list of restraint POINTERS
00009 // written by David Hurwitz, March to May 1998.
00010 //-------------------------------------------------------------------------
00011 #if !defined(RMGR_HPP)
00012   #define RMGR_HPP
00013 
00014 typedef ARestraint* pRestr;
00015 
00016 // to start, there's room for this number of restraint pointers
00017 // each time array size is exceeded, its size is increased by this many times.
00018 const int kNumToStart = 1024;
00019 const int kMultiplier = 4;
00020 
00021 class GlobalMasterFreeEnergy;
00022 
00023 class ARestraintManager {
00024 private:
00025   ARestraint** m_ppRestraints; // list of restraint pointers
00026   int  m_NumRestraints;        // number of pointers in the list
00027   int  m_MaxNum;               // max num pointers without allocating more mem
00028   AFixedPosRestraint  m_Dummy; // for setting ARestraint statics
00029 
00030 public:
00031   ARestraintManager();
00032   ~ARestraintManager();
00033   ARestraint*  operator[] (int Index);
00034   void   Add(ARestraint* pRestraint);
00035   int    GetNumRestraints() {return(m_NumRestraints);}
00036   void   UpdateCOMs(GlobalMasterFreeEnergy& CFE);
00037   void   AddForces(GlobalMasterFreeEnergy& CFE);
00038   void   PrintEnergyInfo();
00039   void   PrintRestraintInfo();
00040   void   Print_dU_dLambda_Info();
00041   double Sum_dU_dLambdas();
00042   Bool_t ThereIsAForcingRestraint();
00043   void   PrintPreInfo(int Index);
00044   void   SetLambdaKf(double LambdaKf)   {m_Dummy.SetLambdaKf(LambdaKf);}
00045   void   SetLambdaRef(double LambdaRef) {m_Dummy.SetLambdaRef(LambdaRef);}
00046   void   SetLambdas(double LambdaKf, double LambdaRef)
00047   {
00048      m_Dummy.SetLambdaKf(LambdaKf);
00049      m_Dummy.SetLambdaRef(LambdaRef);
00050   }
00051 };
00052 
00053 #endif
00054 

Generated on Sun Nov 19 01:17:13 2017 for NAMD by  doxygen 1.4.7