Closed orthonalmatrix closed 3 years ago
It could be unsupported by the save_trajs function, as it expects the first element of the list to be a filename, not a nested element. ping @clonker
Yup pretty much what @marscher said. When dealing with fragmented trajectories the filenames attached to the source object (call data_source.filenames
) reflect the hierarchical structure. This is unsupported by save_trajs
. On the other hand the filenames
are really just used to obtain the output format (defaulting to input format). So one workaround is setting the fmt='dcd'
explicitly, i.e.,
pyemma.coordinates.save_trajs(data_source, np.array([ [0, 22],[0,146],[0,191],[0, 18]]), fmt='dcd')
Thanks! This worked. So is it a problem with the documentation listing: Nested lists (1 level) like), eg.: [[‘traj1_0.xtc’, ‘traj1_1.xtc’], ‘traj2_full.xtc’], [‘traj3_0.xtc, …]]?
The nesting is fine, it is more an incompatibility to how nested lists of trajectories are treated and the implementation of save_trajs
. In the linked PR I have proposed a fix so that specifying the fmt
explicitly is no longer necessary.
Ok. Thanks!
Hello, I have built and validated my hmm and would like to output sample conformations. I'm following the example in tutorial 7. I'm having errors when I specify that some trajectories should be treated as one in the coordinates.souce() function. Here is what works:
However, I want some of my trajectories to be joined so I put them as nested lists as specified here. Nested lists (1 level) like), eg.: [[‘traj1_0.xtc’, ‘traj1_1.xtc’], ‘traj2_full.xtc’], [‘traj3_0.xtc, …]]
But when I do that:
Any idea what I am doing incorrectly? Thanks!