Contents
In [1]: import pytraj as pt
In [2]: traj = pt.iterload('tz2.nc', 'tz2.parm7')
In [3]: traj
Out[3]:
pytraj.TrajectoryIterator, 101 frames:
Size: 0.000503 (GB)
<Topology: 223 atoms, 13 residues, 1 mols, non-PBC>
# specify start=2, stop=50, step=2
In [4]: pt.iterload('tz2.nc', 'tz2.parm7', frame_slice=(2, 50, 2))
Out[4]:
pytraj.TrajectoryIterator, 24 frames:
Size: 0.000120 (GB)
<Topology: 223 atoms, 13 residues, 1 mols, non-PBC>
# skip every 2 frames with stride option
In [5]: pt.iterload('tz2.nc', 'tz2.parm7', stride=2)