SLIKMC  1.0
 All Classes Functions Variables Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MHSampler Class Reference

The class MHSample is a sampler based on standard Metropolis-Hastings algorithm. This class can be used to generate free-end conformations. More...

#include <MetropolisHastingsSampler.h>

Public Member Functions

 MHSampler (PProtein *chain)
 Construct a standard Metropolis-Hastings sampler for specific chain.
 
virtual ~MHSampler ()
 Destructor.
 
void sample (const double time, const double radius)
 Sample conformations of protein. More...
 
void enableBfactors (PProtein *chain=NULL)
 Enable using B-factors as priors. More...
 
void disableBfactors ()
 Disable using B-factors as priors.
 

Private Member Functions

bool MHStep (double P, double Q, double P_proposal, double Q_proposal)
 Metropolis-Hastings step to decide whether to accept a proposal conformation. More...
 
double getP_log (PProtein *chain)
 Evaluate probability density given one conformation. More...
 

Private Attributes

BFactorbfactor
 
RamachandranPlot rplot
 
PProtein * chain
 
bool use_BFactor
 

Detailed Description

The class MHSample is a sampler based on standard Metropolis-Hastings algorithm. This class can be used to generate free-end conformations.

Member Function Documentation

void MHSampler::enableBfactors ( PProtein *  chain = NULL)

Enable using B-factors as priors.

Parameters
chaina chain conformation with desired atom positions and B-factors.
double MHSampler::getP_log ( PProtein *  chain)
private

Evaluate probability density given one conformation.

Parameters
conformationto be evaluated
Returns
probability density in logarithm
bool MHSampler::MHStep ( double  P,
double  Q,
double  P_proposal,
double  Q_proposal 
)
private

Metropolis-Hastings step to decide whether to accept a proposal conformation.

Parameters
PProbability density of initial conformation
QProposal density of initial conformation to proposal conformation
P_proposalProbability density of proposal conformation
Q_proposalProposal density of proposal conformation to initial conformation
Returns
true: accept; false: reject
void MHSampler::sample ( const double  time,
const double  radius 
)

Sample conformations of protein.

Parameters
timetime duration for sampling
radiusperturbation radius in degrees

The documentation for this class was generated from the following files: