There are two types of trajecoties in pytraj
.
pytraj.TrajectoryIterator
(work-horse of pytraj).This class offers out-of-core data store with easiness to load data to memory.
pytraj.Trajectory
. This class hold in-memory data. It is suitable for loading a chunk of snapshots.See our rationale here Trajectory design
In [1]: import pytraj as pt
In [2]: traj = pt.iterload('data/tz2.ortho.nc', 'data/tz2.ortho.parm7')
In [3]: traj
Out[3]:
pytraj.TrajectoryIterator, 10 frames:
Size: 0.001183 (GB)
<Topology: 5293 atoms, 1704 residues, 1692 mols, PBC with box type = ortho>
In [4]: pt.rmsd(traj, ref=0, mask='@CA')