@@ -0,0 +1,1065 @@
+%22%22%22%0AChord Diagram%0A=============%0A%22%22%22%0Afrom msmbuilder.example_datasets import FsPeptide%0Afrom msmbuilder.featurizer import DihedralFeaturizer%0Afrom msmbuilder.decomposition import tICA%0Afrom msmbuilder.cluster import MiniBatchKMeans%0Afrom msmbuilder.msm import MarkovStateModel%0A%0Aimport numpy as np%0A%0Aimport msmexplorer as msme%0A%0Ars = np.random.RandomState(42)%0A%0A# Load Fs Peptide Data%0Atrajs = FsPeptide().get().trajectories%0A%0A# Extract Backbone Dihedrals%0Afeaturizer = DihedralFeaturizer(types=%5B'chi1'%5D)%0Adiheds = featurizer.fit_transform(trajs)%0A%0A# Perform Dimensionality Reduction%0Atica_model = tICA(lag_time=2, n_components=2)%0Atica_trajs = tica_model.fit_transform(diheds)%0A%0A# Perform Clustering%0Aclusterer = MiniBatchKMeans(n_clusters=12, random_state=rs)%0Aclustered_trajs = clusterer.fit_transform(tica_trajs)%0A%0A# Construct MSM%0Amsm = MarkovStateModel(lag_time=2)%0Aassignments = msm.fit_transform(clustered_trajs)%0A%0A# Plot Stacked Distributions%0Aa = np.concatenate(assignments, axis=0)%0Ad = np.concatenate(diheds, axis=0)%0A%0Amsme.plot_stackdist(%5Bd%5Ba == i%5D%5B:, ::2%5D for i in %5B2, 5, 0%5D%5D)%0A

add example