pyemma.plots.scatter_contour produce an error
hima111997 opened this issue · 0 comments
hima111997 commented
-
Include a detailed description of the bug or suggestion:
i am watching this video https://youtu.be/zvgYjfQ9Vb8?list=PLych0HcnzSQIBl_AZN5L2cMZvOfyhzjd8&t=469 and trying to apply the code on my trajectory. in the part of Eigrnvector i am using the same code as in the video but it saysValueError: different number of values and points
-
pip list
orconda list
of the environment you are using (please attach a txt file to the issue).
conda_list.txt -
PyEMMA version and operating system versions
i am using ubuntu on WSL2 with windows 10 and operating from jupyter lab -
Minimal example if possible, a Python script, zipped input data (if not too large)
import pyemma.msm as msm
import pyemma.plots as mplt
path = 'path is here'
top = 'psf top file'
os.chdir(path)
feat = pyemma.coordinates.featurizer(top)
feat.add_backbone_torsions(periodic=False, selstr='index 0 to 6090')
trr = 'trr file with 4001 frame'
data = pyemma.coordinates.source(trr , features=feat)
lag = 10
tica = pyemma.coordinates.tica(data, dim=2, lag=lag, kinetic_map=False)
tica_Y = tica.get_output()[0]
cl = pyemma.coordinates.cluster_kmeans(data= tica_Y, k=200, stride=2, max_iter=40)
cl_dtrajs = cl.dtrajs
cc_x = cl.clustercenters[:,0]
cc_y = cl.clustercenters[:,1]
M = msm.estimate_markov_model(cl_dtrajs, lag=lag)
rn = M.eigenvectors_right()[:,3] # second motion
ax = mplt.scatter_contour(cc_x, cc_y, rn, cmap='seismic') # <-- this produces an error ( the number of elements in cc_x and cc_y is smaller than rn variable)