FreeEnergyLambda.h

Go to the documentation of this file.
00001 
00007 // written by David Hurwitz, March to May 1998.
00008 
00009 #if !defined(LAMBDA_HPP)
00010   #define LAMBDA_HPP
00011 
00012 class ALambdaControl {
00013 private:
00014 
00015   // don't forget to change operator= if member variables change
00016   int     m_NumSteps;         // for pmf block
00017   int     m_NumEquilSteps;    // for mcti block
00018   int     m_NumAccumSteps;    // "
00019   int     m_NumRepeats;       // "
00020   int     m_NumPrintSteps;    // for pmf & mcti blocks
00021   int     m_StartStep;        // "
00022   int     m_StopStep;         // "
00023   double  m_LambdaKf;         // "
00024   double  m_LambdaRef;        // "
00025   feptask_t  m_Task;             // "
00026   double  m_Sum_dU_dLambda;   // for accumulating dU/dLambda
00027   int     m_Num_dU_dLambda;   // number averaged
00028   double  m_MCTI_Integration; // for accumulating <dU/dLambda> * dLambda
00029 
00030   static int  m_CurrStep;     // for all pmf & mcti blocks
00031 
00032 public:
00033   ALambdaControl();
00034   void    Init(ALambdaControl& PriorBlock);
00035   double  GetLambdaKf();
00036   double  GetLambdaRef();
00037   Bool_t  IsActive();
00038   Bool_t  IsTimeToPrint();
00039   Bool_t  IsFirstStep();
00040   Bool_t  IsTimeToPrint_dU_dLambda();
00041   Bool_t  IsTimeToClearAccumulator();
00042   Bool_t  IsEndOf_MCTI_Step();
00043   Bool_t  IsEndOf_MCTI();
00044   void    PrintHeader(double dT);
00045   void    PrintLambdaHeader(double dT);
00046   void    IncCurrStep() {m_CurrStep++;}
00047   ALambdaControl&  operator= (ALambdaControl& PmfBlock);
00048   void    GetTaskStr(char* Str);
00049   void    GetPaddedTaskStr(char* Str);
00050   void    Integrate_MCTI();
00051   void    Accumulate(double dU_dLambda);
00052   double  GetIntegration();
00053   double  GetAccumulation();
00054   void    ZeroAccumulator() {
00055     m_Sum_dU_dLambda = 0.0;
00056     m_Num_dU_dLambda = 0;
00057   }
00058 
00059   int    GetNumSteps();
00060   int    GetNumStepsSoFar()            {return(m_CurrStep-m_StartStep);}
00061   int    GetNumAccumStepsSoFar();
00062   int    GetNum_dU_dLambda()           {return(m_Num_dU_dLambda);}
00063   void   SetNumSteps(int Steps)        {m_NumSteps=Steps;}
00064   void   SetNumEquilSteps(int Steps)   {m_NumEquilSteps=Steps;}
00065   void   SetNumAccumSteps(int Steps)   {m_NumAccumSteps=Steps;}
00066   void   SetNumPrintSteps(int Steps)   {m_NumPrintSteps=Steps;}
00067   void   SetNumRepeats(int Repeats)    {m_NumRepeats=Repeats;}
00068   void   SetStartStep(int Step)        {m_StartStep=Step;}
00069   void   SetStopStep(int Step)         {m_StopStep=Step;}
00070   void   SetLambdaKf(double LambdaKf)  {m_LambdaKf=LambdaKf;}
00071   void   SetLambdaRef(double LambdaRef){m_LambdaRef=LambdaRef;}
00072   void   SetTask(feptask_t Task)          {m_Task=Task;}
00073   feptask_t GetTask()                     {return(m_Task);}
00074 
00075 private:
00076   Bool_t IsLastStep();
00077   int    GetLastStep();
00078 };
00079 
00080 #endif
00081 

Generated on Sat Nov 18 01:17:13 2017 for NAMD by  doxygen 1.4.7