Command Line Syntax

cpptraj [-p <Top0>] [-i <Input0>] [-y <trajin>] [-x <trajout>][-ya <args>] [-xa <args>] [<file>] [-c <reference>] [-d <datain>] [-w <dataout>] [-o <output>]  [-h | --help] [-V | --version] [--defines] [-debug <#>] [--interactive]
 [--log <logfile>] [-tl] [-ms <mask>] [-mr <mask>] [--mask <mask>] [--resmask <mask>][--rng {marsaglia|stdlib|mt|pcg32|xo128}]

-p <Top0> Load <Top0> as a topology file. May be specified more than once.
-i <Input0> Read input from <Input0>. May be specified more than once.
-y <trajin> Read from trajectory file <trajin>; same as input ’trajin <trajin>’.
-x <trajout> Write trajectory file <trajout>; same as input ’trajout <trajout>’.
-ya <args> * Input trajectory file arguments.
-xa <args> * Output trajectory file arguments.
<file> * A topology, input trajectory, or file containing cpptraj input.
-d <datain> * Read data in from file (‘readdata ‘).
-w <dataout> Write data from as file (‘writedata ).
-o <output>  Write CPPTRAJ STDOUT output to file .
-c <reference> Read <reference> as reference coordinates; same as input ’reference <reference>’.
-h | –help Print command line help and exit.
-V | –version Print version and exit.
–defines Print compiler defines and exit.
-debug <#> Set global debug level to <#>; same as input ’debug <#>’.
–interactive Force interactive mode.
–log <logfile> Record commands to <logfile> (interactive mode only). Default is ’cpptraj.log’.
-tl Print length of trajectories specified with ’-y’ to STDOUT. The total number of frames is written out as ’Frames: <X>’
-ms <mask> Print selected atom numbers to STDOUT. Selected atoms are written out as ’Selected= 1 2 3 …’
-mr <mask> : Print selected residue numbers to STDOUT. Selected residues are written out as ’Selected= 1 2 3 …’
–mask <mask> Print detailed atom selection to STDOUT.
–resmask <mask> : Print detailed residue selection to STDOUT.
--rng <type> : Change default random number generator.

Examples of one-line commands are available here.

For backwards compatibility with ptraj, the following syntax is also accepted: cpptraj <Top> <Input>

Note that unlike ptraj, in cpptraj it is not required that a topology file be specified on the command line as long as one is specified in the input file with the ’parm’ keyword. Multiple topology/input files can be specified by use of multiple -p and -i flags.

All topology and coordinate flags will be processed before any input flags.