Skip to content

Creating a universe from list of PDB files / np.hstack of trajectories #4637

Answered by marinegor
marinegor asked this question in Q&A
Discussion options

You must be logged in to vote

Turns out I can answer it myself after reading documentation of the Universe itself!

import MDAnalysis as mda

frames: list[str] = ...  # here we construct the list of frames in the right order
u = mda.Universe(frames[0], frames, format='PDB') 

assert len(u._trajectory) == len(frames)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marinegor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant