trajin

Set up a trajectory for reading during a Run.

trajin <filename> {[<start> [<stop> | last] [<offset>]]} | lastframe [parm <parmfile / tag> | parmindex <#>] 
       [mdvel <velocities>] 
       [mdfrc <forces>]
       [as <format keyword>]
       [ <Format Options> ] 
       [ remdtraj {remdtrajtemp <Temperature> | remdtrajidx <idx1, idx2, ...> | remdtrajvalues <value1, value2, ...>}
         [trajnames <file1>,<file2>,...,<fileN>] ]

<filename> Trajectory file to read in.
[<start>] Frame to begin reading at (default 1).
[<stop> | last] Frame to stop reading at; if not specified or ’last’ specified, end of trajectory.
[<offset>] Offset for reading in trajectory frames (default 1).
[lastframe] Select only the final frame of the trajectory.
[parm <parmfile/tag>] Topology filename/tag to associate with trajectory (default first topology).
[parmindex <#>] Index of Topology to associate with trajectory (default 0, first topology).
[mdvel <velocities>] Use velocities from specified file.
[mdfrc <forces>] Use forces from specified file.
[as <format keyword>] Force file to be read as specified format; overrides file autodetection.
[<Format Options>] See below.
[remdtraj] Read as the first replica in a group of replica trajectories.
remdtrajtemp | remdtrajidx <idx1,idx2,...> Use frames at (for temperature replica trajectories) or index <idx1,idx2,...> (for Hamiltonian replica trajectories); For Multidimensional REMD simulations, multiple values are comma-separated.
remdtrajvalues <value1,value2,...> Use frames at <value1,value2,...> (for Multidimensional REMD trajectories). Each value may correspond to either temperature, pH, Redox Potential or Hamiltonian index. The values need to be entered in the same order as the dimensions in the Multidimensional REMD simulation.
For example, for T,pH-REMD value1 would correspond to a temperature and value2 to a pH. In the command, the values are comma-separated.
[trajnames <file1>,...,<fileN>] Do not automatically search for additional replica trajectories; use comma-separated list of trajectory names.

Read in trajectory specified by filename. See recognized trajectory for currently recognized trajectory file formats. If just the <start> argument is given, all frames from <start> to the last frame of the trajectory will be read. To read in a trajectory with offsets where the last frame # is not known, specify the last keyword instead of a <stop> argument, e.g.

trajin Test1.crd 10 last 2

This will process Test1.crd from frame 10 to the last frame, skipping by 2 frames. To explicitly select only the last frame, specify the lastframe keyword:

trajin Test1.crd lastframe

Here is an example of loading in multiple trajectories which have difference topology files:

parm top0.parm7
parm top1.parm7
parm top2.parm7 [top2]
parm top3.parm7
trajin Test0.crd
trajin Test1.crd parm top1.parm7
trajin Test2.crd parm [top2]
trajin Test3.crd parmindex 3

Test0.crd is associated with top0.parm7; since no parm was specified it defaulted to the first parm read in. Test1.crd was associated with top1.parm7 by filename, Test2.crd was associated with top2.parm7 by its tag, and finally Test3.crd was associated with top3.parm7 by its index (based on the order it was read in).

Replica Trajectory Processing
If the remdtraj keyword is specified the trajectory is treated as belonging to the lowest # replica of a group of REMD trajectories. The remaining replicas can be either automatically detected by following a naming convention of <REMDFILENAME>.X, where X is the replica number, or explicitly specified in a comma-separated list following the trajnames keyword. All trajectories will be processed at the same time, but only frames with a temperature matching the one specified by remdtrajtemp or remdtrajidx will be processed.

For example, to process replica trajectories rem.001, rem.002, rem.003, and rem.004, grabbing only the frames at temperature 300.0 (assuming that this is a temperature in the ensemble):

trajin rem.001 remdtraj remdtrajtemp 300

or

trajin rem.001 remdtraj remdtrajtemp 300 trajnames rem.002,rem.003,rem.004

Note that the remdout keyword is deprecated. For this functionality see the ensemble keyword.

Options for Amber NetCDF, Amber NC Restart, Amber Restart:

[usevelascoords] [usefrcascoords]

usevelascoords Read in velocities in place of coordinates if present.
usefrcascoords Read in forces in place of coordinates if present.

Options for CHARMM DCD:

[{shape | namdcell | charmmcell}]

shape Force reading of box info as CHARMM shape matrix (XX XY YY XZ YZ ZZ).
namdcell Force reading of box info as NAMD unit cell (X cos(g) Y cos(b) cos(a) Z).
charmmcell Force reading of box info as old CHARMM unit cell (X Y Z a b g).

Note that CHARMM trajectories can have unit cell data stored in one of two ways. Older versions (<22) of charmm store the 3x lengths (X Y Z, in Angstroms) and 3x angles (alpha beta gamma, in degrees). Newer versions (>=22) store elements of the symmetric shape matrix (XX, XY, YY, XZ, YZ, ZZ). CPPTRAJ will attempt to automatically detect which type of parameters are present, but this can be overridden with the shape and charmmcell keywords. The namdcell keyword is provided for compatibility with DCD trajectories produced by VMD/NAMD, but note these trajectories only store a version of the shape matrix that is correct if the unit cell is also X-aligned.

Options for PDB files:

[keepaltloc <char>]

[keepaltloc <alt> ] If specified, only keep alternate atom location IDs matching the specified character <char>.

Note that if keepaltloc is specified, the associated topology should not have alternate location IDs, i.e. if the topology is from a PDB the keepaltloc keyword may need to be used with the parm command.