In this directory you find a script to perform the dynamical Markov state model
analysis shown in Nagel et al. 2023 and the script perform_msm
to reproduce
the results.
Dihedral-Based States | Contact-Based States | |
---|---|---|
Contact Rep. |
The analysis is included in the Python package msmhelper and it can be used with its command-line interface. For more details and installation instructions please refer to the package documentation.
- Plot Contact Representation
In the following we are using the hp35.mindists2 as contacts and the corresponding MoSAIC clusters hp35.mindist2.mosaic_clusters. To apply the MoSAIC cluster analysis, please take a look at MoSAIC.
python -m msmhelper contact-rep \ --grid 4 3 \ # number of rows and cols --contacts contacts \ # path to contacts file --clusters mosaic_clusters \ # path to MoSAIC cluster file --state macrostates # path to macrostate trajectory
All following figures are obtained using the Hummer-Szabo projection. To compare with the results obtained without the H-S projection, please refer to the images directory.
Dihedral-Based States | Contact-Based States | |
---|---|---|
CK-test | ||
Implied Timescales | ||
Waiting Time Distribution | ||
Waiting Times | ||
Kinetic Networks |
All analysis tools are included in the Python package msmhelper and they can be used with its command-line interface. For more details and installation instructions please refer to the package documentation.
- Estimating the Chapman-Kolmogorov tests
python -m msmhelper ck-test --frames-per-unit 5 --unit ns \ # specify unit --max-time 35000 \ # limit of x-axis in [frames] --lagtimes 50 100 150 250 500 \ # lagtimes given in [frames] --grid 4 3 \ # number of rows and cols --filename macrostates \ # path tp macrostate trajectory --microfilename microstates # if this line is neglected, the HS-projection will not be used
- Estimating the implied timescales
python -m msmhelper implied-timescales --frames-per-unit 5 --unit ns \ # specify unit --max-lagtime 210 \ # limit of x-axis in [frames] --n-lagtimes 3 \ # no of timescales to plot --ylog \ # use logscale --filename macrostates \ # path tp macrostate trajectory --microfilename microstates # if this line is neglected, the HS-projection will not be used
- Estimating the waiting time distribution as a function of the lag time
python -m msmhelper waiting-time-dist --frames-per-unit 5 --unit ns \ # specify unit --nsteps 100000000 \ # number of steps to propagate MCMC --start 12 --final 1 \ # states to start and end in --max-lagtime 210 \ # limit of x-axis in [frames] --filename macrostates \ # path tp macrostate trajectory --microfilename microstates # if this line is neglected, the HS-projection will not be used
- Estimating the waiting time distribution for given lag times
python -m msmhelper waiting-times --frames-per-unit 5 --unit ns \ # specify unit --nsteps 100000000 \ # number of steps to propagate MCMC --start 12 --final 1 \ # states to start and end in --lagtimes 50 100 200 \ # lagtimes to estimate waiting times from, in [frames] --filename macrostates \ # path tp macrostate trajectory --microfilename microstates # if this line is neglected, the HS-projection will not be used
- Plotting the kinetic networks
./kinetic_network.py -u 8 -u 9 -u 10 -u 11 -f 0 -f 1 -f 2 -f 3 -f 4 \ # unfolded states and folded states (here contact-based) --tlag 50 \ # lag time, in [frames] --states_traj \ # path to macrostate trajectory --qoft \ # path to fraction of contacts file
To reproduce these results you simply have to run
# this will create automatically a new Python environment
bash perform_msm -c 1
This creates a Python environment
with all needed dependencies in the directory create_msm_nagel23
, and creates all figures. If more information on
the executed commands is needed, please run the script in the verbose mode
-v
.