Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Sampling conformations from microstates #1128

Open
rsatijaUT opened this issue Oct 6, 2019 · 0 comments
Open

Sampling conformations from microstates #1128

rsatijaUT opened this issue Oct 6, 2019 · 0 comments

Comments

@rsatijaUT
Copy link

Hi,

I find that the function sample_states() in io.sampling is useful for sampling conformations from each of N microstates in my MSM. Using the following code:

import mdtraj as md

from msmbuilder.io import load_trajs, save_generic, preload_top, backup, load_generic
from msmbuilder.io.sampling import sample_states

## Load
meta, ttrajs = load_trajs('ttrajs')
msm = load_generic('msm.pickl')
kmeans = load_generic('kmeans.pickl')

inds = sample_states(ttrajs, kmeans.cluster_centers_)
top = preload_top(meta)
traj = md.join(
md.load_frame(meta.loc[traj_i]['traj_fn'], index=frame_i, top=top)
for traj_i, frame_i in inds)

  1. Am I right in assuming that this picks a set of N "random" conformations each from every microstate in the same order as the rows/columns in the transition matrix?

  2. Is there a way for me to verify that each of these conformations adequately represents their respective microstate, such as a metric for RMSD variance in each cluster?

Just FYI, the msm itself was constructed using virtually identical protocol as in http://msmbuilder.org/3.8.0/tutorial.html.

Thanks in advance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant