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

Sub-Loop Inverse Kinematic Markov Chain (SLIKMC) sampler. Support chain/subchain close-loop sampling, free-end sampling. Side-chain sampling is also supported. More...

#include <SLIKMC.h>

Public Member Functions

 SLIKMCSampler (PProtein *chain)
 Construct a SLIKMC sampler for specific chain.
 
virtual ~SLIKMCSampler ()
 Destructor.
 
void sample (const double time, const int s, const int e)
 Sample conformations of sub-loop from residue s to residue e. More...
 
void enableBfactors (PProtein *chain=NULL)
 Enable using B-factors as priors. More...
 
void disableBfactors ()
 Disable using B-factors as priors.
 
void enableSidechain ()
 Enable side-chain conformation sampling.
 
void disableSidechain ()
 Disable side-chain in sampling.
 
void enableFreeEnd ()
 Enable free-end sampling (terminal atoms will stay at fixed positions).
 
void disableFreeEnd ()
 Disable free-end sampling.
 
void enableLog (const int skip=0)
 Enable saving generated conformations. More...
 
void disableLog ()
 Disable saving generated conformations.
 
void enableCollisionChecking ()
 Enable steric clash checking for samples.
 
void disableCollisionChecking ()
 Disable steric clash checking for samples.
 
void enableRamachandran ()
 Enable using Ramachandran plot as prior.
 
void disableRamachandran ()
 Disable using Ramachandran plot as prior.
 
void dispSettings ()
 Print current settings for sampling.
 
void enableCustomPriors ()
 Enable custom defined priors.
 
void disableCustomPriors ()
 Disable custom defined priors.
 
void addCustomPrior (Prior &prior)
 Add a custom defined prior.
 

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 block. More...
 
double getP_log (PProtein *chain)
 Evaluate probability density of one block or sub-chain. More...
 
double getQ_log (PProtein *chain, const int num_solutions, int &status)
 Evaluate proposal density given one block or sub-chain. Initial block and proposal block are assumed to be independent. More...
 
double getMetricTensor_log (PProtein *protein, int &status)
 Calculate the metric tensor for one block. More...
 

Private Attributes

PProtein * protein
 The protein chain to sample.
 
vector< PProtein * > subchains
 Collection of 4-residue size blocks.
 
BFactorbfactor
 
RamachandranPlotrplot
 
SidechainRotaterscRotater
 
bool use_BFactor
 
bool use_Rotamer
 
bool freeEnd
 
bool use_colChecking
 
bool use_RPlot
 
bool use_customPrior
 
bool init_Rotamer
 
bool logFile
 
int skipLength
 
vector< Prior * > priors
 

Static Private Attributes

static const int MAX_IK_SAMPLE = 100
 Maximum number of dihedral angles we try for the first residue in the subchain in case that IK cannot find a solution.
 
static const int MAX_METROPOLIS_REJECT = 1
 Maximum number of Metropolis Hasting rejects before we giving up.
 
static const int MAX_COLLISION_DETECT = 1
 Maximum number of collision detected before we giving up.
 

Detailed Description

Sub-Loop Inverse Kinematic Markov Chain (SLIKMC) sampler. Support chain/subchain close-loop sampling, free-end sampling. Side-chain sampling is also supported.

Member Function Documentation

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

Enable using B-factors as priors.

Parameters
chaina chain conformation with desired atom positions and B-factors
void SLIKMCSampler::enableLog ( const int  skip = 0)

Enable saving generated conformations.

Parameters
skipnumber of conformations to skip after last saving conformation.
double SLIKMCSampler::getMetricTensor_log ( PProtein *  protein,
int &  status 
)
private

Calculate the metric tensor for one block.

Parameters
proteina block to be evaluated
statusan indicator if matrix is not invertible in calculating metric tensor
Returns
double SLIKMCSampler::getP_log ( PProtein *  chain)
private

Evaluate probability density of one block or sub-chain.

Returns
probability density in logarithm
double SLIKMCSampler::getQ_log ( PProtein *  chain,
const int  num_solutions,
int &  status 
)
private

Evaluate proposal density given one block or sub-chain. Initial block and proposal block are assumed to be independent.

Parameters
num_solutionsnumber of IK solution for the block or sub-chain
statusan indicator if matrix is not invertible in calculating metric tensor
Returns
proposal density in logarithm
bool SLIKMCSampler::MHStep ( double  P,
double  Q,
double  P_proposal,
double  Q_proposal 
)
private

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

Parameters
PProbability density of initial block
QProposal density of initial block to proposal block
P_proposalProbability density of proposal block
Q_proposalProposal density of proposal block to initial block
Returns
true: accept; false: reject
void SLIKMCSampler::sample ( const double  time,
const int  s,
const int  e 
)

Sample conformations of sub-loop from residue s to residue e.

Parameters
timetime duration for sampling
sindex of starting residue
eindex of ending residue

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