Path C - Module 47: Trajectory Management (Slicing)#
Filter the production structures of your drug simulation. In this module, you will learn to slice trajectories to focus on the binding event.
Tier-1 XYZ, DCD, and XTC conversion routes have exhaustive coordinate-trajectory reports. Atom selections are materialized in canonical increasing order, while structure_indices keeps the requested order; target formats that cannot carry a value report the omission explicitly.
import molsysmt as msm
from molsysmt import systems
villin = [systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.h5msm'], systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.dcd']]
short_traj = msm.extract(villin, structure_indices=range(0, 10))
WARNING: Structural attributes were dropped because only an item outside the structure axis of the molecular system provides them: atom_index, structure_chemical_state_index, structure_id, time. (Hint: A file holding a single reference conformation cannot supply a series for a whole trajectory. Take the attribute from the trajectory item, or convert first. Docs: https://www.uibcdf.org/MolSysMT)