Data Sets and Data Files

Description of data sets and data files.

In CPPTRAJ, Actions and Analyses can generate one or more data sets which are available for further processing. For example, the distance command creates a data set containing distances vs time. The data set can be named by the user simply by specifying a non-keyword string as an additional argument. If no name is given, a default one will be generated based on the action name and data set number. For example:

distance d1-2 :1 :2 out d1-2.dat

will create a data set named “d1-2”. If a name is not specified, e.g.:

distance :1 :2 out d1-2.dat

the data set will be named Dis_00000.

Data files are created automatically by most commands, usually via the out keyword. Data files can also be explicitly created with the write/writedata and create commands. Data can also be read in from files via the readdata command. CPPTRAJ currently recognizes the formats listed in the table below, although it cannot write in all formats. In addition, a data set must be valid for the data file format. For example, 3D data (such as a grid) can be written to an OpenDX format file but not a Grace format file.

The default file format is called ’Standard’, which simply has data in columns, like ptraj, although multiple data sets can be directed to the same output file. The format of a file can be changed either by specifying a recognized keyword (either on the command line itself or later via a datafile command) or by giving the file an extension corresponding to the format, so ’filename.agr’ will output in Grace format, and ’filename.gnu’ will output in Gnuplot contour, and so on. The xmgrace/gnuplot output is particularly nice for the secstruct sumout and rmsd perresout files. Additional options for data files can be found in the Data File Options section.

Any action using the out keyword will allow data sets from separate commands to be written into the same file. For example, the commands:

 dihedral phi :1@C :2@N :2@CA :2@C out phipsi.dat
 dihedral psi :2@N :2@CA :2@C :3@N out phipsi.dat

will assign the “phi” and “psi” data sets generated from each action to the standard data output file “phipsi.dat”:

#Frame phi psi

See also: Data set selection syntax  and Data set math

DataFile formats recognized by CPPTRAJ.
’Valid Dimensions’ shows what dimensions the format is valid for (e.g. you cannot write a 1D data set with OpenDX format).
Format Filename Extensions Keyword Valid Dimensions Notes
Standard .dat dat 1D, 2D, 3D
Grace .agr, .xmgr grace 1D
Gnuplot .gnu gnu 1D, 2D
Xplor .xplor, .grid xplor 3D
OpenDX .dx opendx 3D
Amber REM log .log remlog Read Only.
Amber MDOUT .mdout mdout Energy information, Read Only.
Amber Energy file .ene amberene 1D Read Only.
Amber Evecs .evecs evecs Modes data set only
Amber Constant pH output .cpout cpout pH data only
Density Peaks .peaks peaks 3D density peaks (spam/volmap)
Vector pseudo-traj .vectraj vectraj Vector data set only Write Only.
Gromacs XVG .xvg xvg Read Only.
CCP4 .ccp4 ccp4 3D
Charmm REPD log .exch charmmrepd Read Only.
Charmm Output .charmmout charmmout Energy information, Read Only.
Pairwise Cache (binary) .cmatrix cmatrix pairwise distances Used for cluster analysis.
Pairwise Cache (NetCDF) .nccmatrix nccmatris pairwise distances Used for cluster analysis.
NetCDF Data .nc netcdf All data Only state info saved for pH data
Amber Prep File .prepin prepin COORDS Read Only
Amber OFF Library File .off, .lib off, lib COORDS Read Only