Trajectory: combine two separate slices into one for other analysis

Skip to first unread message

Demian Riccardi

Jun 13, 2022, 4:59:00 PMJun 13
to MDnalysis discussion

is there a way to combine slices of trajectory without writing a new trajectory (to memory or a file)?  

to make question clearer, from examples in the docs combining multiple trajectories into a universe is straightforward:

u = mda.Universe(

but I didn't find anything about appending trajectories to a universe (i saw load_new clobbers to old).  can you do something like this to combine slices?

u_1 = mda.Universe(

u_2 = mda.Universe(

u_slice1_slice2 = mda.Universe("some.pdb", u_1.trajectory[ 30:59], u_2.trajectory[ 1:100])

Thank you for your help!


Demian Riccardi

Jun 21, 2022, 10:47:59 AMJun 21
to MDnalysis discussion
I should have included the word Ensemble in my OP

I see some related posts with reference to this open pull request:

Oliver Beckstein

Jun 21, 2022, 10:56:28 AMJun 21
Hi Damian,

As far as I know, we don’t have “append” functionality built in. 

You can also open an issue for the functionality.

Sorry to be not more helpful. 


Am 6/21/22 um 07:48 schrieb Demian Riccardi <>:

You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages