My Project
 All Classes Functions
GibbsSampling.h
1 /*
2  * GibbsSampling.h
3  *
4  * Created on: Jun 10, 2012
5  * Author: Yajia
6  */
7 
8 #ifndef GIBBSSAMPLING_H_
9 #define GIBBSSAMPLING_H_
10 
11 #include "PProtein.h"
12 #include <vector.h>
13 #include "RamachandranPlot.h"
14 #include "BFactor.h"
15 #include "SideChainRotater.h"
16 
18 public:
23  GibbsSampling( PProtein* p);
27  virtual ~GibbsSampling();
34  void sample( const double time, const int s, const int e);
35 
41  void useBFactor( const bool, PProtein* p_bfactor = NULL);
42 
47  void activateSidechain( const bool);
48 
53  void isFreeEnd( const bool);
54 
59  void enableLog(const int skipLength);
60 
64  void disableLog();
65 
66 private:
75  bool MHStep( double P, double Q, double P_proposal, double Q_proposal);
76 
82  double getP_log( PProtein* chain);
83 
91  double getQ_log( PProtein* chain, const int num_solutions, int& status);
92 
99  double getMetricTensor_log(PProtein* protein, int& status);
100 
104  PProtein* protein;
105 
109  vector<PProtein*> subchains;
110 
114  static const int MAX_IK_SAMPLE = 100;
115 
119  static const int MAX_METROPOLIS_REJECT = 10;
120 
124  static const int MAX_COLLISION_DETECT = 1;
125 
126  BFactor* bfactor;
127  RamachandranPlot* rplot;
128 
129  SideChainRotater* scRotater;
130 
131  bool use_BFactor;
132  bool use_Rotamer;
133  bool freeEnd;
134 
135  bool init_Rotamer;
136  bool logFile;
137  int skipLength;
138 };
139 
140 const double EPSILON = 0.0000001;
141 #endif /* GIBBSSAMPLING_H_ */