mdciao.fragments.fragment_slice

mdciao.fragments.fragment_slice(traj: mdtraj.Trajectory, fragments, keys_or_idxs=None)

Slice a geometry using arbitrary fragment definitions, a la mdtraj.Trajectory.atom_slice

Note

Regardless of the order in which the selection is done (e.g. keys_or_idxs=[1,0]) the returned sliced_traj will always be in ascending order atoms as they appear in traj

Parameters
Returns

sliced_traj – A copy of traj only with the atoms present in the selected fragments

Return type

mdtraj.Trajectory