pyemma_tutorials
pyemma_tutorials copied to clipboard
Error in plot_cktest Function,Maybe the version of Matplotlib Compatibility
I'm following the tutorial on your GitHub page, but I encountered an error when calling pyemma.plots.plot_cktest(). The error traceback indicates:
File "/mnt/WORKSPACE/xiongyq/AD/Tau/7p65_av1451/analyse/msm/test2.py", line 21, in
I suspect this may be related to my Matplotlib version (3.8.4). Here’s the code I used:
import matplotlib.pyplot as plt import numpy as np import pyemma import os
pdb = 'alanine-dipeptide-nowater.pdb' files = sorted([f for f in os.listdir('.') if f.startswith('alanine-dipeptide-') and f.endswith('-250ns-nowater.xtc')])
feat = pyemma.coordinates.featurizer(pdb) feat.add_backbone_torsions(periodic=False) data = pyemma.coordinates.load(files, features=feat) data_concatenated = np.concatenate(data)
cluster = pyemma.coordinates.cluster_kmeans(data, k=200, max_iter=50, stride=10) msm = pyemma.msm.estimate_markov_model(cluster.dtrajs, lag=10, dt_traj='1 ps') pyemma.plots.plot_cktest(msm.cktest(4), units='ps') plt.savefig('ck_test_result.png', bbox_inches='tight')
Could this be an issue with the Matplotlib version? And how can I resolve this problem? Thank you for your assistance!