These commands control the reading and writing of trajectory files. There are three trajectory types in CPPTRAJ: input, output, and reference. In cpptraj, trajectories are always associated with a topology file. If a topology file is not specified, a trajectory file will be associated with the first topology file loaded by default (this is true for both input and output trajectories.
CPPTRAJ currently understands the following trajectory file formats:
| Format | Keyword(s) | Extension | Notes |
| Amber Trajectory | crd | .crd | Default format if keywords/extensions not recognized |
| Amber NetCDF | cdf, netcdf | .nc | No compression. |
| Amber Restart | restart | .rst7, .rst | |
| Amber NetCDF Restart | ncrestart, restartnc | .ncrst | |
| Charmm DCD Trajectory | dcd, charmm | .dcd | |
| Charmm COORdinates | cor | .cor | |
| Charmm Restart | charmmres | .res | Read Only |
| PDB | pdb | .pdb | |
| Mol2 | mol2 | .mol2 | |
| Scripps Binpos | binpos | .binpos | |
| Gromacs TRR | trr | .trr | |
| Gromacs GRO | gro | .gro | Read Only |
| Gromacs XTC | xtc | .xtc | |
| Gromacs TNG | tng | .tng | Read Only |
| CIF | cif | .cif | Read Only |
| Tinker ARC | arc | .arc | Read Only |
| SQM Input | sqm | .sqm | Write Only |
| SDF | sdf | .sdf | Read Only |
| XYZ | xyz | .xyz | |
| Desmond DTR (Anton) | dtr | .dtr | Read Only |
| LMOD Conflib | conflib | .conflib | Read Only, Detection by extension |
The following trajectory-related commands are available:
| Command | Description |
| ensemble | Set up a trajectory ensemble for reading during a run. |
| ensemblesize | (MPI only) specify number of members expected in subsequent ensemble commands. |
| reference | Read in a reference structure. |
| trajin | Set up a trajectory for reading during a Run. |
| trajout | Set up an output trajectory or ensemble for writing during a Run. |
