Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: largest specified index (9562.0 * stride=9562.0 * 1=9562) is larger than trajectory length #53

Open
Qianchen-Liu opened this issue May 4, 2023 · 2 comments

Comments

@Qianchen-Liu
Copy link

I have two trajectories:
trajj=['strip_prod.dcd','strip_prod2.dcd']; each trajectory file includes 4797 frames.
data = pyemma.coordinates.load(trajj, features=feat)
Then I did TICA and k-means clustering, and I would like to visualize the structure of each cluster using molPX.
tica = pyemma.coordinates.tica(data,lag=8)
tica_concatenated = np.concatenate(tica.get_output())
data_sample, geoms = molpx.generate.sample(trajj, pdb, cluster,
n_geom_samples=100,
#keep_all_samples=True # read the doc for this argument
)

I got the error:
ValueError: largest specified index (9493.0 * stride=9493.0 * 1=9493) is larger than trajectory length 'strip_prod.dcd' = 4797

I was wondering where the specified index comes from and how to solve it. Thank you in advance!!

@Qianchen-Liu
Copy link
Author

As the length of cluster and trajectories are different, I change the molpx.generate.sample as data_sample, geoms = molpx.generate.sample(trajj, pdb, Y_tica,
n_geom_samples=100,
#keep_all_samples=True # read the doc for this argument
)

And it works, but when I want to plot:
linked_ngl_wdg = molpx.visualize.sample(data_sample,
geoms.superpose(geoms[0]),
plt.gca(),
clear_lines=False,
#plot_path=True
)
linked_ngl_wdg

I got "ValueError: unitcell angle < 0". Could you help me with this? Thank you!!

@jackdmarquez
Copy link

@Qianchen-Liu did you get this working?

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

No branches or pull requests

2 participants