mdhmm

Construct a hidden Markov model (HMM) from spin label side chain dihedrals obtained from MD simulations.

Syntax
HMM = mdhmm(dihedrals,dt,nStates,nLag)
HMM = mdhmm(dihedrals,dt,nStates,nLag,Opt)
Description

mdhmm takes the trajectories of dihedral angles provided in dihedrals and builds a Gaussian hidden Markov model (HMM) that stochastically models these trajectories.

mdhmm accepts up to five input arguments

The possible fields in the structure Opt are

Verbosity
If > 0, print information to the command window.
isSeeded
If set to true, use systematic seeds for the clustering of the dihedral angles. If set to false, use random seeds.
nTrials
Number of times to repeat the k-means clustering (only meaningful with random seeds).

If no input argument is given, a short help summary is shown (same as when typing help cardamom).

mdhmm returns a structure with information about the Gaussian HMM. It has the following fields

TransProb
Transition probability matrix
eqDistr
Equilibrium distribution among the HMM states
mu
Center vectors for all states
Sigma
Covariance matrices for all states
viterbiTraj
Most likely state trajectory given the model and the dihedral trajectory.
tauRelax
List of relaxation times (in seconds) of the Gaussian HMM.
logLik
Trajectory of log-likelihood for the Gaussian HMM parameter values throughout model optimization.
Algorithm

mdhmm uses k-means clustering to determine an initial set of state centers and covariance matrices, and a maximum-likelihood estimator to obtain initial estimates for the transition probability matrix and the initial distribution. It then uses these estimates as starting values to optimize them, using the Baum-Welch expectation maximization algorithm. This yields the final HMM parameters. At the end, the most likely state trajectory giving rise to the dihedral trajectory is calculated using the Viterbi algorithm, and the relaxation times of the HMM are calculated from the eigenvalues of the transition probability matrix. For diagnostics purposes, the log-likelihood exhibited by the set of HMM parameter values throughout model optimization is also provided.

See also

cardamom, mdload, stochtraj_diffusion, stochtraj_jump