CPPTRAJ is the main program in Amber for processing coordinate trajectories and data files.
CPPTRAJ has been developed to be almost completely backwards-compatible with ptraj input. In general, if a command in ptraj has been implemented in CPPTRAJ it should produce similar results, although the output format may be different. A notable exception is the hbond command, for which the syntax is quite different. Publications describing the main uses and analysis available from CPPTRAJ are located here and here.
First time users are encouraged to go to the Start here section for an introductory tutorial on how to use CPPTRAJ.
It is highly recommended to use the most recent version of CPPTRAJ available in the official GitHub website.
CPPTRAJ is at least as fast as ptraj was, and is in many cases significantly faster, particularly when processing NetCDF trajectories. In addition, several actions have been parallelized with OpenMP to take advantage of multi-core machines for even more speedup, and ensembles of trajectories can be processed in parallel with MPI (click here for more information).
Currently the only functionality from ptraj not implemented in CPPTRAJ are certain clustering algorithms.
Here are several notable features of CPPTRAJ:
- Trajectories with different topologies can be processed in the same run.
- Several actions/analyses in cpptraj are OpenMP parallelized.
- Trajectory and ensemble reads can be MPI parallelized.
- Almost any file read or written by CPPTRAJ can be compressed (with the exception of the NetCDF trajectory format). So for example gzipped/bzipped topology files can be read, and data files can be written out as gzip/bzip2 files. Compression is detected automatically when reading, and is determined by the filename extension (.gz and .bz2 respectively) on writing.
- The format of output data files can be specified by extension. For example, data files can be written in xmgrace format if the filename given has a ’.agr’ extension. A trajectory can be written in DCD format if the ’.dcd’ extension is used.
- Multiple output trajectories can be specified, and can be written during action processing (as opposed to only after) via the outtraj command. In addition, output files can be directed to write only specific frames from the input trajectories.
- Multiple reference structures can be specified. Specific frames from trajectories may be used as a reference structure.
- The rmsd action allows specification of a separate mask for the reference structure. In addition, per-residue RMSD can be calculated easily.
- Actions that modify coordinates and topology such as the strip/closest actions can often write an accompanying fully-functional stripped topology file.
- Users usually are able to fine-tune the output format of data files declared in actions using the “out” keyword (for example, the precision of the numbers can be changed). In addition, users can control which data sets are written to which files (e.g. if two actions specify the same data file with the ’out’ keyword, data from both actions will be written to that data file).
- Users can manipulate data sets using mathematical expressions (with some limitations).
Manual Syntax Format
The syntax presented in this manual uses the following conventions:
<>
Denotes a variable.
[]
Denotes something is optional.
{|}
Denotes several choices separated by the ’|’ character; one of the choices must be specified.
...
Denotes the preceding option can be repeated.
Everything else is as printed.