#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures false
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen true
\pdf_bookmarksopenlevel 0
\pdf_breaklinks true
\pdf_pdfborder true
\pdf_colorlinks true
\pdf_backref false
\pdf_pdfusetitle true
\pdf_quoted_options "linkcolor=blue,citecolor=blue,urlcolor=black"
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine natbib
\cite_engine_type numerical
\biblio_style plainnat
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Section
Introduction
\end_layout

\begin_layout Standard

\emph on
Cpptraj
\emph default

\begin_inset CommandInset citation
LatexCommand citep
key "Roe13"
literal "true"

\end_inset

 (the successor to 
\emph on
ptraj
\emph default
) is the main program in Amber for processing coordinate trajectories and
 data files.
 
\shape italic
Cpptraj
\shape default
 has a wide range of functionality, and makes use of OpenMP/MPI to speed
 up many calculations, including processing ensembles of trajectories and/or
 conducting multiple analyses in parallel with MPI.
\begin_inset CommandInset citation
LatexCommand citep
key "Roe2018"
literal "true"

\end_inset


\end_layout

\begin_layout Standard
Here are several notable features of 
\emph on
cpptraj
\emph default
:
\end_layout

\begin_layout Enumerate
Trajectories with different topologies can be processed in the same run.
\end_layout

\begin_layout Enumerate
Several actions/analyses in 
\emph on
cpptraj
\emph default
 are OpenMP parallelized; see section 
\begin_inset CommandInset ref
LatexCommand ref
reference "subsec:CpptrajOpenMP"

\end_inset

 for more details.
\end_layout

\begin_layout Enumerate
Trajectory and ensemble reads can be MPI parallelized.
\end_layout

\begin_layout Enumerate
Almost any file read or written by 
\emph on
cpptraj
\emph default
 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.
\end_layout

\begin_layout Enumerate
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.
\end_layout

\begin_layout Enumerate
Multiple output trajectories can be specified, and can be written during
 action processing (as opposed to only after) via the 
\series bold
\shape italic
outtraj
\series default
\shape default
 command.
 In addition, output files can be directed to write only specific frames
 from the input trajectories.
\end_layout

\begin_layout Enumerate
Multiple reference structures can be specified.
 Specific frames from trajectories may be used as a reference structure.
\end_layout

\begin_layout Enumerate
The 
\series bold
\shape italic
rmsd
\series default
\shape default
 action allows specification of a separate mask for the reference structure.
 In addition, per-residue RMSD can be calculated easily.
 
\end_layout

\begin_layout Enumerate
Actions that modify coordinates and topology such as the 
\series bold
\shape italic
strip
\series default
\shape default
/
\series bold
\shape italic
closest
\series default
\shape default
 actions can often write an accompanying fully-functional stripped topology
 file.
 
\end_layout

\begin_layout Enumerate
Users usually are able to fine-tune the output format of data files declared
 in actions using the 
\begin_inset Quotes eld
\end_inset


\series bold
out
\series default

\begin_inset Quotes erd
\end_inset

 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).
\end_layout

\begin_layout Enumerate
Users can manipulate data sets using mathematical expressions (with some
 limitations), see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

 for details.
\end_layout

\begin_layout Enumerate
There is some support for creating internal loops over e.g.
 mask expressions and setting internal variables (see 
\series bold
\emph on
for
\series default
\emph default
, 
\series bold
\emph on
set
\series default
\emph default
, and 
\series bold
\emph on
show
\series default
\emph default
 commands).
\end_layout

\begin_layout Standard
See the README.md file in the 
\emph on
cpptraj
\emph default
 home directory for information on how to build, authors, and so on.
\end_layout

\begin_layout Subsection
Manual Syntax Format
\end_layout

\begin_layout Standard
The syntax presented in this manual uses the following conventions:
\end_layout

\begin_layout Description
<> Denotes a variable.
\end_layout

\begin_layout Description
[] Denotes something is optional.
\end_layout

\begin_layout Description
{|} Denotes several choices separated by the '|' character; one of the choices
 must be specified.
\end_layout

\begin_layout Description
...
 Denotes the preceding option can be repeated.
\end_layout

\begin_layout Standard
Everything else is as printed.
 
\end_layout

\begin_layout Subsection
Installation
\end_layout

\begin_layout Standard
See instructions in the CPPTRAJ GitHub repository README.md file under 'Installat
ion & Testing': 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

https://github.com/Amber-MD/cpptraj
\end_layout

\end_inset


\end_layout

\begin_layout Section
Running Cpptraj
\end_layout

\begin_layout Standard

\shape italic
Cpptraj
\shape default
 can be run in either 
\begin_inset Quotes eld
\end_inset

interactive mode
\begin_inset Quotes erd
\end_inset

 or in 
\begin_inset Quotes eld
\end_inset

batch mode
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Subsection
Command Line Syntax
\end_layout

\begin_layout LyX-Code
cpptraj [-p <Top0>] [-i <Input0>] [-y <trajin>] [-x <trajout>]
\end_layout

\begin_layout LyX-Code
        [-ya <args>] [-xa <args>] [<file>]
\end_layout

\begin_layout LyX-Code
        [-c <reference>] [-d <datain>] [-w <dataout>] [-o <output>]
\end_layout

\begin_layout LyX-Code
        [-h | --help] [-V | --version] [--defines] [-debug <#>]
\end_layout

\begin_layout LyX-Code
        [--interactive] [--log <logfile>] [-tl]
\end_layout

\begin_layout LyX-Code
        [-ms <mask>] [-mr <mask>] [--mask <mask>] [--resmask <mask>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
        [--rng {marsaglia|stdlib|mt|pcg32|xo128}]
\end_layout

\begin_deeper
\begin_layout Standard

\series bold
*
\series default
 denotes a flag may be specified multiple times.
\end_layout

\begin_layout Description
-p
\begin_inset space ~
\end_inset

<Top0>* Load <Top0> as a topology file.
\end_layout

\begin_layout Description
-i
\begin_inset space ~
\end_inset

<Input0>* Read input from <Input0>.
\end_layout

\begin_layout Description
-y
\begin_inset space ~
\end_inset

<trajin>* Read from trajectory file <trajin>; same as input 'trajin <trajin>'.
\end_layout

\begin_layout Description
-x
\begin_inset space ~
\end_inset

<trajout>* Write trajectory file <trajout>; same as input 'trajout <trajout>'.
\end_layout

\begin_layout Description
-ya
\begin_inset space ~
\end_inset

<args>* Input trajectory file arguments.
\end_layout

\begin_layout Description
-xa
\begin_inset space ~
\end_inset

<args>* Output trajectory file arguments.
\end_layout

\begin_layout Description
<file>* A topology, input trajectory, or file containing cpptraj input.
\end_layout

\begin_layout Description
-c
\begin_inset space ~
\end_inset

<reference>* Read <reference> as reference coordinates; same as input 'reference
 <reference>'.
\end_layout

\begin_layout Description
-d
\begin_inset space ~
\end_inset

<datain>* Read data in from file <datain> ('readdata <datain>').
\end_layout

\begin_layout Description
-w
\begin_inset space ~
\end_inset

<dataout> Write data from <datain> as file <dataout> ('writedata <dataout>).
\end_layout

\begin_layout Description
-o
\begin_inset space ~
\end_inset

<output> Write CPPTRAJ STDOUT output to file <output>.
\end_layout

\begin_layout Description
-h
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

–help Print command line help and exit.
\end_layout

\begin_layout Description
-V
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

–version Print version and exit.
\end_layout

\begin_layout Description
–defines Print compiler defines and exit.
\end_layout

\begin_layout Description
-debug
\begin_inset space ~
\end_inset

<#> Set global debug level to <#>; same as input 'debug <#>'.
\end_layout

\begin_layout Description
–interactive Force interactive mode.
\end_layout

\begin_layout Description
–log
\begin_inset space ~
\end_inset

<logfile> Record commands to <logfile> (interactive mode only).
 Default is 'cpptraj.log'.
\end_layout

\begin_layout Description
-tl Print length of trajectories specified with '-y' to STDOUT.
 The total number of frames is written out as 'Frames: <X>'
\end_layout

\begin_layout Description
-ms
\begin_inset space ~
\end_inset

<mask> Print selected atom numbers to STDOUT.
 Selected atoms are written out as 'Selected= 1 2 3 ...'
\end_layout

\begin_layout Description
-mr <mask> : Print selected residue numbers to STDOUT.
 Selected residues are written out as 'Selected= 1 2 3 ...'
\end_layout

\begin_layout Description
–mask
\begin_inset space ~
\end_inset

<mask> Print detailed atom selection to STDOUT.
\end_layout

\begin_layout Description
–resmask <mask> : Print detailed residue selection to STDOUT.
\end_layout

\begin_layout Description
--rng <type> : Change default random number generator.
\end_layout

\end_deeper
\begin_layout Standard
Note that unlike 
\shape italic
ptraj
\shape default
, in 
\shape italic
cpptraj
\shape default
 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.
\end_layout

\begin_layout Subsection
Commands
\end_layout

\begin_layout Standard
Input to 
\shape italic
cpptraj
\shape default
 is in the form of commands, which can be categorized in to 2 types: immediate
 and queued.
 Immediate commands are executed as soon as they are encountered.
 Queued commands are initialized when they are encountered, but are not
 executed until a Run is executed via a 
\series bold
\shape italic
run
\series default
\shape default
 or 
\series bold
\shape italic
go
\series default
\shape default
 command.
 Actions, Analyses, and Trajectory commands (except 
\series bold
\emph on
reference
\series default
\emph default
) are queued commands; however, they can also be run immediately via commands
 such as 
\series bold
\shape italic
crdaction
\series default
,
\shape default
 
\series bold
\shape italic
runanalysis
\series default
,
\shape default
 
\series bold
\emph on
loadcrd
\series default
\emph default
, etc.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Coordinates-as-a"

\end_inset

 for more details.
\end_layout

\begin_layout Standard
Commands fall into seven categories:
\end_layout

\begin_layout Description
General (Immediate) These commands are executed immediately when entered.
\end_layout

\begin_layout Description
System (Immediate) These are unix system commands (e.g.
 'ls', 'pwd', etc).
\end_layout

\begin_layout Description
Coords (Immediate) These commands are used to manipulate COORDS data sets;
 see 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Coordinates-as-a"

\end_inset

 for more details.
\end_layout

\begin_layout Description
Trajectory (Queued) These commands prepare cpptraj for reading or writing
 trajectories during a Run.
\end_layout

\begin_layout Description
Topology (Immediate) These commands are used to read, write, and modify
 topology information.
\end_layout

\begin_layout Description
Action (Queued) These commands specify actions that will be performed on
 coordinate frames read in from trajectories during a Run.
\end_layout

\begin_layout Description
Analysis (Queued) These commands specify analyses that will be performed
 on data that has been either generated from a Run or read in from an external
 source.
\end_layout

\begin_layout Description
Control (Immediate) These commands set up control blocks that can be used
 to e.g.
 loop over a set of commands.
\end_layout

\begin_layout Standard
In addition to normal commands, 
\emph on
cpptraj
\emph default
 now has the ability to perform certain basic math operations, even on data
 sets.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

 for more details.
\end_layout

\begin_layout Standard
Commands in 
\shape italic
cpptraj
\shape default
 can be read in from an input file or from the interactive command prompt.
 A '#' anywhere on a line denotes a comment; anything after '#' will be
 ignored no matter where it occurs.
 A '
\backslash
' allows the continuation of one line to another.
 For example, the input:
\end_layout

\begin_layout LyX-Code
# Sample input
\end_layout

\begin_layout LyX-Code
trajin mdcrd # This is a trajectory
\end_layout

\begin_layout LyX-Code
rms first out rmsd.dat 
\backslash

\end_layout

\begin_layout LyX-Code
    :1-10
\end_layout

\begin_layout Standard
Translates to:
\end_layout

\begin_layout LyX-Code
trajin mdcrd
\end_layout

\begin_layout LyX-Code
rms first out rmsd.dat :1-10
\end_layout

\begin_layout Subsection
Getting Help
\end_layout

\begin_layout Standard
If in interactive mode, 'help <command>' can be used to get the associated
 keywords as well as an abbreviated description of the command.
 Most commands have a corresponding test which also serves as an example
 of how to use the command.
 See $AMBERHOME/AmberTools/test/cpptraj/README for more details.
\end_layout

\begin_layout Subsection
Batch mode
\end_layout

\begin_layout Standard
In 
\begin_inset Quotes eld
\end_inset

batch
\begin_inset Quotes erd
\end_inset

 mode, cpptraj is executed from the command line with one or more input
 files containing commands to be processed or STDIN.
 The syntax of <input file> is similar to that of 
\shape italic
ptraj
\shape default
.
 Keywords specifying different commands are given one per line.
 Lines beginning with '#' are ignored as comments.
 Lines can also be continued through use of the '
\backslash
' character.
 This is the only allowed mode for cpptraj.MPI.
\end_layout

\begin_layout Subsection
Interactive mode
\end_layout

\begin_layout Standard
In 
\begin_inset Quotes eld
\end_inset

interactive mode
\begin_inset Quotes erd
\end_inset

 users can enter commands in a UNIX-like shell.
 Interactive mode is useful for running short and simple analyses or for
 trying out new kinds of analyses.
 If 
\emph on
cpptraj
\emph default
 is run with '–interactive', no arguments, or no specified input file:
\end_layout

\begin_layout LyX-Code
cpptraj
\end_layout

\begin_layout LyX-Code
cpptraj --interactive
\end_layout

\begin_layout LyX-Code
cpptraj <parm file>
\end_layout

\begin_layout LyX-Code
cpptraj -p <parm file>
\end_layout

\begin_layout Standard
this brings up the interactive interface.
 This interface supports command history (via the up and down arrows) and
 tab completion for commands and file names.
 If no log file name has been given (with '–log <logfile>'), all commands
 used in interactive mode will be logged to a file named 'cpptraj.log', which
 can subsequently be used as input if desired.
 When starting cpptraj, command histories will be read from any existing
 logs.
\end_layout

\begin_layout Subsection
Trajectory Processing 
\begin_inset Quotes eld
\end_inset

Run
\begin_inset Quotes erd
\end_inset


\end_layout

\begin_layout Standard
Like 
\shape italic
ptraj
\shape default
, a trajectory processing 
\begin_inset Quotes eld
\end_inset

Run
\begin_inset Quotes erd
\end_inset

 is one of the main ways to run 
\shape italic
cpptraj
\shape default
.
 First the Run is set up via commands read in from an input file or the
 interactive prompt.
 Trajectories are then read in one frame at a time (or in the case of ensemble
 processing all frames from a given step are read).
 Actions are performed on the coordinates stored in the frame, after which
 any output coordinates are written.
 At the end of the run, any data sets generated are written, and any queued
 Analyses are performed.
\end_layout

\begin_layout Subsubsection
Actions and multiple topologies
\end_layout

\begin_layout Standard
Since 
\emph on
cpptraj
\emph default
 supports multiple topology files, during a Run actions are set up every
 time the topology changes in order to recalculate things like what atoms
 are in a mask etc.
 Actions that are not valid for the current topology are skipped for that
 topology.
 So for example given two topology files with 100 residues, if the first
 topology file processed includes a ligand named MOL and the second one
 does not, the action:
\end_layout

\begin_layout LyX-Code
distance :80 :MOL out D_80-to-MOL.dat
\end_layout

\begin_layout Standard
will be valid for the first topology but not for the second, so it will
 be skipped as long as the second topology is active.
\end_layout

\begin_layout Subsection
Parallelization
\end_layout

\begin_layout Standard

\emph on
Cpptraj
\emph default
 has many levels of parallelization that can be enabled via the '-mpi',
 '-openmp', and/or '-cuda' configure flags for MPI, OpenMP, and CUDA paralleliza
tion respectively.
 At the highest level, trajectory and ensemble reads are parallelized with
 MPI.
 In addition, certain time consuming actions have been parallelized with
 OpenMP and/or CUDA.
\end_layout

\begin_layout Standard
Note that any combination of the '-openmp', '-cuda', and '-mpi' flags may
 be used to generate a hybrid MPI/OpenMP/CUDA binary; however this may require
 additional runtime setup (e.g.
 setting OMP_NUM_THREADS for OpenMP) to work properly and not oversubscribe
 cores.
\end_layout

\begin_layout Subsubsection
MPI Trajectory Parallelization
\begin_inset CommandInset label
LatexCommand label
name "subsec:CpptrajMPI"

\end_inset


\end_layout

\begin_layout Standard

\shape italic
Cpptraj
\shape default
 has two levels of MPI parallelization for reading input trajectories.
 The first is for '
\series bold
\emph on
trajin
\series default
\emph default
' trajectory input, where the trajectory read is divided as evenly as possible
 among all input frames (across-trajectory parallelism).
 For example, if given two trajectories of 1000 frames each and 4 MPI processes,
 process 0 reads frames 1-500 of trajectory 1, process 1 reads frames 501-1000
 of trajectory 1, process 2 reads frames 1-500 of trajectory 2, and process
 3 reads frames 501-1000 of trajectory 2.
 Most Actions will work with across-trajectory parallelization with the
 exception of the following:
\end_layout

\begin_layout Standard
'clusterdihedral', 'contacts', 'createreservoir', 'gist', 'lipidorder',
 'pairwise', 'stfcdiffusion', 'unwrap', and 'xtalsymm'.
 Note that 'diffusion' will only work with across-trajectory parallelism
 if no imaging is to be performed.
\end_layout

\begin_layout Standard

\shape italic
\emph on
The second is for 
\series bold
\emph default
'ensemble'
\series default
\shape default
 trajectory input, where the reading/processing/writing of each member of
 the ensemble is divided up among MPI processes.
 The number of MPI processes must be a multiple of the ensemble size.
 If the number of processes is greater than the ensemble size then the processin
g of each ensemble member will be divided among MPI processes (i.e.
 across-trajectory parallelism will be used).
 For example, given an ensemble of 4 trajectories and 8 processes, processes
 0 and 1 are assigned to the first ensemble trajectory, processes 2 and
 3 are assigned to the second ensemble trajectory, and so on.
 When using ensemble mode in parallel it is recommended that the 
\series bold
\emph on
ensemblesize
\series default
\emph default
 command be used prior to any ensemble command as this will make set up
 far more efficient.
\end_layout

\begin_layout Standard
In order to use the MPI version, Amber/
\emph on
cpptraj
\emph default
 should be configured with the '-mpi' flag.
 You can tell if 
\emph on
cpptraj
\emph default
 has been compiled with MPI as it will print 'MPI' in the title, and/or
 by calling 'cpptraj —defines' and looking for '-DMPI'.
 
\end_layout

\begin_layout Subsubsection
OpenMP Parallelization
\begin_inset CommandInset label
LatexCommand label
name "subsec:CpptrajOpenMP"

\end_inset


\end_layout

\begin_layout Standard
Some of the more time-consuming actions/analyses in 
\shape italic
cpptraj
\shape default
 have been parallelized with OpenMP to take advantage of machines with multiple
 cores.
 In order to use OpenMP parallelization Amber/
\emph on
cpptraj
\emph default
 should be configured with the '-openmp' flag.
 You can easily tell if 
\shape italic
cpptraj
\shape default
 has been compiled with OpenMP as it will print 'OpenMP' in the title, and/or
 by calling 'cpptraj —defines' and looking for '-D_OPENMP'.
 The following actions/analyses have been OpenMP parallelized:
\end_layout

\begin_layout LyX-Code
2drms/rms2d
\end_layout

\begin_layout LyX-Code
atomiccorr
\end_layout

\begin_layout LyX-Code
checkstructure
\end_layout

\begin_layout LyX-Code
closest
\end_layout

\begin_layout LyX-Code
cluster (pair-wise distance calculation and sieved frame restore only)
\end_layout

\begin_layout LyX-Code
dssp/secstruct
\end_layout

\begin_layout LyX-Code
energy
\end_layout

\begin_layout LyX-Code
gist (non-bonded calculation)
\end_layout

\begin_layout LyX-Code
hbond
\end_layout

\begin_layout LyX-Code
kde
\end_layout

\begin_layout LyX-Code
lipidscd
\end_layout

\begin_layout LyX-Code
mask (distance-based masks only)
\end_layout

\begin_layout LyX-Code
matrix (coordinate covariance matrices only)
\end_layout

\begin_layout LyX-Code
minimage
\end_layout

\begin_layout LyX-Code
radial
\end_layout

\begin_layout LyX-Code
replicatecell
\end_layout

\begin_layout LyX-Code
rmsavgcorr
\end_layout

\begin_layout LyX-Code
spam
\end_layout

\begin_layout LyX-Code
surf
\end_layout

\begin_layout LyX-Code
velocityautocorr
\end_layout

\begin_layout LyX-Code
volmap
\end_layout

\begin_layout LyX-Code
watershell
\end_layout

\begin_layout LyX-Code
wavelet
\end_layout

\begin_layout Standard
By default OpenMP 
\shape italic
cpptraj
\shape default
 will use all available cores.
 The number of OpenMP threads can be controlled by setting the OMP_NUM_THREADS
 environment variable.
\end_layout

\begin_layout Subsubsection
CUDA Parallelization
\end_layout

\begin_layout Standard
Some time-consuming actions in cpptraj have been parallelized with CUDA
 to take advantage of machines with NVIDIA GPUs.
 In order to use CUDA parallelization Amber/cpptraj should be configured
 with the '-cuda' flag.
 You can easily tell if cpptraj has been compiled with CUDA as it will print
 'CUDA' and details on the current graphics device in the title, and/or
 by calling 'cpptraj —defines' and looking for '-DCUDA'.
 The following actions have been CUDA parallelized:
\end_layout

\begin_layout LyX-Code
closest
\end_layout

\begin_layout LyX-Code
watershell
\end_layout

\begin_layout LyX-Code
gist
\end_layout

\begin_layout Section
General Concepts
\end_layout

\begin_layout Subsection
Units
\end_layout

\begin_layout Standard
Cpptraj uses the AKMA system of units.
 The execption is time, which is typically expressed in ps (except where
 noted).
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Variable
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Unit
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Length
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Angstrom
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Energy
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
kcal/mol
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mass
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
AMU
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charge
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
electron
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Time
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ps (typically)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Force
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
kcal/mol*Angstrom
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
Atom Mask Selection Syntax
\end_layout

\begin_layout Standard
The mask syntax is similar to 
\shape italic
ptraj
\shape default
.
 Note that the characters '
\family typewriter
:
\family default
', '
\family typewriter
@
\family default
', and '
\family typewriter
*
\family default
' are reserved for masks and should not be used in output file or data set
 names.
 All masks are case-sensitive.
 Either names or numbers can be used.
 Masks can contain ranges (denoted with '
\family typewriter
-
\family default
') and comma separated lists.
 The logical operands '
\family typewriter
&
\family default
' (and), '
\family typewriter
|
\family default
' (or), and '
\family typewriter
!
\family default
' (not) are also supported.
 
\end_layout

\begin_layout Standard
The syntax for elementary selections is the following:
\end_layout

\begin_layout Description
@{atom
\begin_inset space ~
\end_inset

numlist} e.g.
 '@12,17', '@54-85', '@12,54-85,90'
\end_layout

\begin_layout Description
@{atom
\begin_inset space ~
\end_inset

namelist} e.g.
 '@CA', '@CA,C,O,N,H'
\end_layout

\begin_layout Description
@%{atom
\begin_inset space ~
\end_inset

type
\begin_inset space ~
\end_inset

name} e.g.
 '@%CT'
\end_layout

\begin_layout Description
@/{atom_element_name} e.g.
 '@/N'
\end_layout

\begin_layout Description
:{residue
\begin_inset space ~
\end_inset

numlist} e.g.
 ':1-10', ':1,3,5', ':1-3,5,7-9'
\end_layout

\begin_layout Description
:{residue
\begin_inset space ~
\end_inset

namelist} e.g.
 ':LYS', ':ARG,ALA,GLY'
\end_layout

\begin_layout Description
::{chain
\begin_inset space ~
\end_inset

id} e.g.
 '::B', '::A,D'.
 Requires chain ID information be present in the topology.
\end_layout

\begin_layout Description
:;{pdb
\begin_inset space ~
\end_inset

residue
\begin_inset space ~
\end_inset

number} e.g.
 ':;2-4,8'.
 Requires a PDB loaded as topology, or Amber topology with embedded PDB
 information (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:parmed_addPDB"

\end_inset

).
\end_layout

\begin_layout Description
^{molecule
\begin_inset space ~
\end_inset

numlist} e.g.
 '^1-10', ':23,84,111'
\end_layout

\begin_layout Description
<mask><distance
\begin_inset space ~
\end_inset

op><distance> Selection by distance, see below.
\end_layout

\begin_layout Standard
Several wildcard characters are supported:
\end_layout

\begin_layout Description
'*' Zero or more characters.
\end_layout

\begin_layout Description
'=' Same as '*'
\end_layout

\begin_layout Description
'?' One character.
\end_layout

\begin_layout Standard
The wildcards can also be used with numbers or other mask characters, e.g.
 ':?0' means 
\begin_inset Quotes eld
\end_inset

:10,20,30,40,50,60,70,80,90
\begin_inset Quotes erd
\end_inset

, ':*' means all residues and '@*' means all atoms.
 If the atom name (or type name) contains a wildcard character like an asterisk,
 it can be explictly selected by escaping (i.e.
 preceding) the wildcard character with a backslash '
\backslash
'.
 So for example:
\end_layout

\begin_layout LyX-Code
atoms @C?*
\end_layout

\begin_layout Standard
would select atoms named C5, C4*, C422, etc., but:
\end_layout

\begin_layout LyX-Code
atoms @C?
\backslash
*
\end_layout

\begin_layout Standard
would only select C4* out of the above 3 atoms.
\end_layout

\begin_layout Standard
Compound expressions of the following type are allowed:
\end_layout

\begin_layout LyX-Code
:{residue numlist | namelist}@{atom namelist | numlist}
\end_layout

\begin_layout Standard
and are processed as: 
\end_layout

\begin_layout LyX-Code
:{residue numlist | namelist} & @{atom namelist | numlist}
\end_layout

\begin_layout Standard
e.g.
 ':1-10@CA' is equivalent to 
\begin_inset Quotes eld
\end_inset

:1-10 & @CA
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
More examples: 
\end_layout

\begin_layout Description
:ALA,TRP All alanine and tryptophan residues.
 
\end_layout

\begin_layout Description
:5,10@CA CA carbon in residues 5 and 10.
\end_layout

\begin_layout Description
:*&!@H= All non-hydrogen atoms (equivalent to "!@H=").
 
\end_layout

\begin_layout Description
@CA,C,O,N,H All backbone atoms.
 
\end_layout

\begin_layout Description
!@CA,C,O,N,H All non-backbone atoms (=sidechains for proteins only).
 
\end_layout

\begin_layout Description
:1-500@O&!(:WAT|:LYS,ARG) All backbone oxygens in residues 1-500 but not
 in water, lysine or arginine residues.
\end_layout

\begin_layout Description
^1-2:ASP All residues named 'ASP' in the first two molecules.
\end_layout

\begin_layout Description
::A,D@CA All atoms named 'CA' in chains A and D.
\end_layout

\begin_layout Subsubsection*
Distance-based Masks
\end_layout

\begin_layout Standard
There are two very important things to keep in mind when using distance
 based masks:
\end_layout

\begin_layout Enumerate
Distance-based masks that update each frame are currently only supported
 by the 
\series bold
\shape italic
mask
\series default
\shape default
 action.
\end_layout

\begin_layout Enumerate
Selection by distance for everything but the 
\series bold
\shape italic
mask
\series default
\shape default
 action requires defining a reference frame with 
\series bold
\shape italic
reference
\series default
\shape default
; distances are then calculated using the 
\bar under
specified reference frame only
\bar default
.
 This reference frame can be changed using the 
\series bold
\emph on
activeref
\series default
\emph default
 command.
\end_layout

\begin_layout Standard
The syntax for selection by distance is a 
\series bold
<mask>
\series default
 expression followed by a 
\series bold
<distance operator>
\series default
 followed by a 
\series bold
<distance>
\series default
 (which is in Angstroms).
 The 
\series bold
<distance operator>
\series default
 consists of 2 characters: '
\series bold
<
\series default
' (within) or '
\series bold
>
\series default
' (without) followed by either '
\series bold
^
\series default
' (molecules), '
\series bold
:
\series default
' (residues), or '
\series bold
@
\series default
' (atoms).
 For example, '
\series bold
<:
\series default
3.0' means 
\begin_inset Quotes eld
\end_inset

residues within 3.0 Angstroms
\begin_inset Quotes erd
\end_inset

 etc.
 For residue- and molecule-based distance selection, if any atom in that
 residue/molecule matches the given distance criterion, the entire residue/molec
ule is selected.
\end_layout

\begin_layout Standard
In plain language, the entire distance mask can be read as 
\begin_inset Quotes eld
\end_inset

Select 
\series bold
<distance operator>
\series default
 
\series bold
<distance>
\series default
 of 
\series bold
<mask>
\series default

\begin_inset Quotes erd
\end_inset

.
 So for example, the mask expression:
\end_layout

\begin_layout LyX-Code
:11-17<@2.4
\end_layout

\begin_layout Standard
Means 
\begin_inset Quotes eld
\end_inset

Select atoms within 2.4 Å distance of atoms selected by ':11-17' (residues
 numbered 11 through 17)
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Standard
To strip everything outside 3.0 Å (i.e.
 without 3.0 Å) from residue 4 using specified reference coordinates:
\end_layout

\begin_layout LyX-Code
reference mol.rst7
\end_layout

\begin_layout LyX-Code
trajin mol.rst7
\end_layout

\begin_layout LyX-Code
strip !(:4<:3.0)
\end_layout

\begin_layout Subsection
Ranges
\end_layout

\begin_layout Standard
For several commands some arguments are ranges (e.g.
 'trajout onlyframes <range>', 'nastruct resrange <range>', 'rmsd perres
 range <range>'); 
\series bold
THESE ARE NOT ATOM MASKS
\series default
.
 They are simple number ranges using '-' to specify a range and ',' to separate
 different ranges.
 For example 1-2,4-6,9 specifies 1 to 2, 4 to 6, and 9, i.e.
 '1 2 4 5 6 9'.
\end_layout

\begin_layout Subsection
Parameter/Reference Tagging
\begin_inset CommandInset label
LatexCommand label
name "subsec:Parameter/Reference-Tagging"

\end_inset


\end_layout

\begin_layout Standard
Parameter and reference files may be 'tagged' (i.e.
 given a nickname); these tags can then be used in place of the file name
 itself.
 A tag in 
\shape italic
cpptraj
\shape default
 is recognized by being bounded by brackets ('[' and ']').
 This can be particularly useful when reading in many parameter or reference
 files.
 For example, when reading in multiple reference structures:
\end_layout

\begin_layout LyX-Code
trajin Test1.crd
\end_layout

\begin_layout LyX-Code
reference 1LE1.NoWater.Xray.rst7 [xray]
\end_layout

\begin_layout LyX-Code
reference Test1.crd lastframe [last]
\end_layout

\begin_layout LyX-Code
reference Test2.crd 225 [open]
\end_layout

\begin_layout LyX-Code
rms Xray ref [xray] :2-12@CA out rmsd.dat
\end_layout

\begin_layout LyX-Code
rms Last ref [last] :2-12@CA out rmsd.dat
\end_layout

\begin_layout LyX-Code
rms Open ref [open] :2-12@CA out rmsd.dat
\end_layout

\begin_layout Standard
This defines three reference structures and gives them tags [xray], [last],
 and [open].
 These reference structures can then be referred to by their tags instead
 of their filenames by any action that uses reference structures (in this
 case the RMSD action).
\end_layout

\begin_layout Standard
Similarly, this can be useful when reading in multiple parameter files:
\end_layout

\begin_layout LyX-Code
parm tz2.ff99sb.tip3p.truncoct.parm7 [tz2-water]
\end_layout

\begin_layout LyX-Code
parm tz2.ff99sb.mbondi2.parm7 [tz2-nowater]
\end_layout

\begin_layout LyX-Code
trajin tz2.run1.explicit.nc parm [tz2-water]
\end_layout

\begin_layout LyX-Code
reference tz2.dry.rst7 parm [tz2-nowater] [tz2]
\end_layout

\begin_layout LyX-Code
rms ref [tz2] !(:WAT) out rmsd.dat
\end_layout

\begin_layout Standard
This defines two parm files and gives them tags [tz2-water] and [tz2-nowater],
 then reads in a trajectory associated with one, and a reference structure
 associated with the other.
 Note that in the 'reference' command there are two tags; the first goes
 along with the 'parm' keyword and specifies what parameter file the reference
 should use, the second is the tag given to the reference itself (as in
 the previous example) and is referred to in the subsequent RMSD action.
\end_layout

\begin_layout Section
Variables and Control Structures
\end_layout

\begin_layout Standard
As of version 18, CPPTRAJ has limited support for 
\begin_inset Quotes eld
\end_inset

script
\begin_inset Quotes erd
\end_inset

 variables and 'for' loops.
 Script variables are referred to by a dollar sign ('$') prefix and are
 replaced when they are processed.
 These are stored in the master data set list like other data and are assigned
 the type 
\begin_inset Quotes eld
\end_inset

string variable
\begin_inset Quotes erd
\end_inset

.
 
\series bold
Note that to use script variables in CPPTRAJ input that is inside another
 script (e.g.
 a BASH script), they must be escaped with the '
\backslash
' character,
\series default
 e.g.
\end_layout

\begin_layout LyX-Code
#!/bin/bash
\end_layout

\begin_layout LyX-Code
TOP=MyTop.parm7
\end_layout

\begin_layout LyX-Code
cpptraj <<EOF
\end_layout

\begin_layout LyX-Code
set topname=$TOP # TOP is a BASH script variable
\end_layout

\begin_layout LyX-Code
parm 
\backslash
$topname   # topname is a CPPTRAJ script variable
\end_layout

\begin_layout LyX-Code
EOF
\end_layout

\begin_layout Standard
Note that regular CPPTRAJ 1D Data Sets that contain a single value can be
 used as script variables (if the Data Set contains more than 1 value only
 the first value will be used).
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
for
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a 'for' loop.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
set
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set or update a script variable.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
show
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show all current script variables and their values.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
for
\end_layout

\begin_layout LyX-Code
for { {atoms|residues|molecules|molfirstres|mollastres}
\end_layout

\begin_layout LyX-Code
	    <var> inmask <mask> [parm <name> | parmindex <#> | <#>] |
\end_layout

\begin_layout LyX-Code
      <var> in <list> |
\end_layout

\begin_layout LyX-Code
      <var> oversets <list> |
\end_layout

\begin_layout LyX-Code
      <var> datasetblocks <set> blocksize <#> [blockoffset <#>]
\end_layout

\begin_layout LyX-Code
        [cumulative [firstblock <#>]] |
\end_layout

\begin_layout LyX-Code
	  <var>=<start>;[<var><end OP><end>;]<var><increment OP>[<value>] ...
 }
\end_layout

\begin_layout LyX-Code
	END KEYWORD: 'done'
\end_layout

\begin_layout LyX-Code
  Available 'end OP'       : '<' '>' '<=' '>='
\end_layout

\begin_layout LyX-Code
  Available 'increment OP' : '++', '--', '+=', '-='
\end_layout

\begin_deeper
\begin_layout Description
atoms|residues|molecules|molfirstres|mollastres
\begin_inset space ~
\end_inset

<var>
\begin_inset space ~
\end_inset

inmask
\begin_inset space ~
\end_inset

<mask> Loop over atoms/residues/molecules/first residue in molecules/last
 residue in molecules selected by the given mask expression, set as script
 variable 
\series bold
<var>
\series default
.
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

<#> Select topology that 
\series bold
<mask>
\series default
 should be based on (default first topology).
\end_layout

\end_deeper
\begin_layout Description
<var>
\begin_inset space ~
\end_inset

in
\begin_inset space ~
\end_inset

<list> Loop over a comma-separated list of strings.
 File name wildcards can be used.
\end_layout

\begin_layout Description
<var>
\begin_inset space ~
\end_inset

oversets
\begin_inset space ~
\end_inset

<list> Loop over sets selected by comma-separated list of names.
 Data set wildcards can be used.
\end_layout

\begin_layout Description
<var>
\begin_inset space ~
\end_inset

datasetblocks
\begin_inset space ~
\end_inset

<set> Loop over blocks in specified DataSet.
\end_layout

\begin_deeper
\begin_layout Description
blocksize
\begin_inset space ~
\end_inset

<#> Size of blocks to use.
\end_layout

\begin_layout Description
[blockoffset
\begin_inset space ~
\end_inset

<#>] Offset between blocks.
\end_layout

\begin_layout Description
[cumulative] Instead of blocks of fixed size, use blocks of increasing size
 incremented by blocksize.
\end_layout

\begin_deeper
\begin_layout Description
[firstblock
\begin_inset space ~
\end_inset

<#>] When cumulative, the size of the first block (default is first data
 set element).
\end_layout

\end_deeper
\end_deeper
\begin_layout Description
<var>=<start>;[<var><end
\begin_inset space ~
\end_inset

OP><end>;]<var><increment
\begin_inset space ~
\end_inset

OP>[<value>] Loop over integer script variable 
\series bold
<var>
\series default
 starting from 
\series bold
<start>
\series default
, optionally ending at 
\series bold
<end>
\series default
, increment by 
\series bold
<value>
\series default
.
\end_layout

\begin_layout Standard
Data Sets Created (datasetblocks loops):
\end_layout

\begin_layout Description
<var>[block]:<start
\begin_inset space \space{}
\end_inset

idx> (Data set blocks only) Data set block of blocksize starting at <start
 idx>.
\end_layout

\begin_layout Description
<var>[cumul]:<end
\begin_inset space ~
\end_inset

idx> (Cumulative data set blocks only) Data set block starting at firstblock
 and ending at <end idx>.
\end_layout

\end_deeper
\begin_layout Standard
Create a for loop using one or more mask expressions, integers, etc.
 Loops can be nested inside each other.
 Integer loops may be used without an end condition, but in that case at
 least one descriptor in the loop should have an end condition or refer
 to a mask.
 Loops are ended by the 
\series bold
done
\series default
 keyword.
 
\end_layout

\begin_layout Standard
Note that non-integer variables (e.g.
 'inmask' loops) are NOT incremented after the final loop iteration, i.e.
 these loop variables always retain their final value.
\end_layout

\begin_layout Standard
For example:
\end_layout

\begin_layout LyX-Code
for atoms A0 inmask :1-3@CA i=1;i++
\end_layout

\begin_layout LyX-Code
  distance d$i :TCS $A0 out $i.dat
\end_layout

\begin_layout LyX-Code
done
\end_layout

\begin_layout Standard
This loops over all atoms in the mask expression ':1-3@CA' (all atoms named
 CA in residues 1 to 3) and creates a variable named 'i' that starts from
 1 and is incremented by 1 each iteration.
 Inside the loop, the mask selection is referred to by 
\series bold
$A0
\series default
 and the integer by 
\series bold
$i
\series default
.
 This is equivalent to doing 3 distance commands like so:
\end_layout

\begin_layout LyX-Code
distance d1 :TCS :1@CA out 1.dat
\end_layout

\begin_layout LyX-Code
distance d2 :TCS :2@CA out 2.dat
\end_layout

\begin_layout LyX-Code
distance d3 :TCS :3@CA out 3.dat
\end_layout

\begin_layout Standard
To loop over files named trajA*.nc and trajB*.nc:
\end_layout

\begin_layout LyX-Code
for TRAJ in trajA*.nc,trajB*.nc
\end_layout

\begin_layout LyX-Code
  trajin $TRAJ 1 last 10
\end_layout

\begin_layout LyX-Code
done 
\end_layout

\begin_layout Subsection
set
\end_layout

\begin_layout LyX-Code
set { <variable> <OP> <value> | 	  
\end_layout

\begin_layout LyX-Code
      <variable> <OP> {atoms|residues|molecules|atomnums|
\end_layout

\begin_layout LyX-Code
	                   resnums|oresnums|molnums} inmask <mask>
\end_layout

\begin_layout LyX-Code
	    [parm <name> | crdset <set> | parmindex <#> | <#>]
\end_layout

\begin_layout LyX-Code
	  <variable> <OP> trajinframes }
\end_layout

\begin_layout LyX-Code
  Available <OP> : '=', '+='
\end_layout

\begin_deeper
\begin_layout Description
<variable>
\begin_inset space ~
\end_inset

<OP>
\begin_inset space ~
\end_inset

<value> Set or append a script variable.
\end_layout

\begin_layout Description
<variable>
\begin_inset space ~
\end_inset

<OP>
\begin_inset space ~
\end_inset

{atoms|residues|molecules|atomnums|resnums|oresnums|molnums}
\begin_inset space ~
\end_inset

inmask
\begin_inset space ~
\end_inset

<mask> Set/append a script variable to/by the total number of atoms/residues/mol
ecules or a range expression of selected atom #s/residue #s/original residue
 #s/molecule #s in the given mask expression.
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#> Topology to which mask should correspond (default first).
\end_layout

\end_deeper
\begin_layout Description
<variable>
\begin_inset space ~
\end_inset

<OP>
\begin_inset space ~
\end_inset

trajinframes Set/append a script variable to/by the total number of frames
 in trajectories currently loaded by 
\series bold
\emph on
trajin
\series default
\emph default
 commands.
\end_layout

\end_deeper
\begin_layout Standard
Set (<OP> = '=') or append (<OP> = '+=') a script variable.
 Script variables are character strings, and are referred to in CPPTRAJ
 input by using a dollar sign '$' prefix.
\end_layout

\begin_layout Standard
For example, the following input will load files my.parm7 and my.rst7:
\end_layout

\begin_layout LyX-Code
set PREFIX = my
\end_layout

\begin_layout LyX-Code
trajin $PREFIX.parm7
\end_layout

\begin_layout LyX-Code
trajin $PREFIX.rst7
\end_layout

\begin_layout Standard
For example, the following input will print info for the last 10 atoms in
 a topology to 'last10.dat':
\end_layout

\begin_layout LyX-Code
set Natom = atoms inmask * 
\end_layout

\begin_layout LyX-Code
last10 = $Natom - 10
\end_layout

\begin_layout LyX-Code
show
\end_layout

\begin_layout LyX-Code
atoms "@$last10 - $Natom" out last10.dat
\end_layout

\begin_layout Standard
The following input will put a range of residues selected by :LYS:
\end_layout

\begin_layout LyX-Code
> set SELECTED1 = resnums inmask :LYS
\end_layout

\begin_layout LyX-Code
	Using topology: FtuFabI.NAD.TCL.parm7
\end_layout

\begin_layout LyX-Code
	Variable 'SELECTED1' set to '7-8,18,26,44,49,71,79,128,135,151,163,183,193,204-
205,217-218'
\end_layout

\begin_layout Subsection
show
\end_layout

\begin_layout LyX-Code
show [<var1> ...]
\end_layout

\begin_layout Standard
If no variable names specified, show all current script variables and their
 values.
 Otherwise, show the values of the specified script variables.
\end_layout

\begin_layout Section
Data Sets and Data Files
\end_layout

\begin_layout Standard
In 
\shape italic
cpptraj
\shape default
, Actions and Analyses can generate one or more data sets which are available
 for further processing.
 For example, the 
\series bold
\shape italic
distance
\series default
\shape default
 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:
\end_layout

\begin_layout LyX-Code
distance d1-2 :1 :2 out d1-2.dat
\end_layout

\begin_layout Standard
will create a data set named 
\begin_inset Quotes eld
\end_inset

d1-2
\begin_inset Quotes erd
\end_inset

.
 If a name is not specified, e.g.:
\end_layout

\begin_layout LyX-Code
distance :1 :2 out d1-2.dat
\end_layout

\begin_layout Standard
the data set will be named 
\begin_inset Quotes eld
\end_inset

Dis_00000
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
Data files are created automatically by most commands, usually via the 
\begin_inset Quotes eld
\end_inset


\series bold
out
\series default

\begin_inset Quotes erd
\end_inset

 keyword.
 Data files can also be explicitly created with the 
\series bold
\shape italic
write
\shape default
/
\shape italic
writedata
\series default
\shape default
 and 
\series bold
\shape italic
create
\series default
\shape default
 commands.
 Data can also be read in from files via the 
\series bold
\shape italic
readdata
\series default
\shape default
 command.
 Cpptraj currently recognizes the formats listed in 
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:cpptraj-DataFile-formats"

\end_inset

, 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.
 
\end_layout

\begin_layout Standard
The default file format is called 'Standard', which simply has data in columns,
 like 
\shape italic
ptraj
\shape default
, 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 te 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 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

.
\end_layout

\begin_layout Standard
Any action using the 
\begin_inset Quotes eld
\end_inset

out
\begin_inset Quotes erd
\end_inset

 keyword will allow data sets from separate commands to be written into
 the same file.
 For example, the commands:
\end_layout

\begin_layout LyX-Code
dihedral phi :1@C :2@N :2@CA :2@C out phipsi.dat
\end_layout

\begin_layout LyX-Code
dihedral psi :2@N :2@CA :2@C :3@N out phipsi.dat
\end_layout

\begin_layout Standard
will assign the 
\begin_inset Quotes eld
\end_inset

phi
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

psi
\begin_inset Quotes erd
\end_inset

 data sets generated from each action to the standard data output file 
\begin_inset Quotes eld
\end_inset

phipsi.dat
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
#Frame   phi   psi
\end_layout

\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="16" columns="5">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="20text%">
<column alignment="center" valignment="top" width="20text%">
<column alignment="center" valignment="top" width="20text%">
<column alignment="center" valignment="top" width="20text%">
<column alignment="center" valignment="top" width="20text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Format
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Filename Extensions
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Keyword
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Valid Dimensions
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Notes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Standard
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.dat
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dat
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D, 2D, 3D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Grace
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.agr, .xmgr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
grace
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gnuplot
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.gnu
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gnu
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D, 2D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Xplor
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.xplor, .grid
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
xplor
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
OpenDX
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.dx
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
opendx
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber REM log
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.log
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
remlog
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber MDOUT
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.mdout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mdout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Energy information, Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber Evecs
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.evecs
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
evecs
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Modes data set only
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber Constant pH output
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.cpout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cpout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pH data only
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Density Peaks
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.peaks
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
peaks
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3D density peaks (spam/volmap)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Vector pseudo-traj
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.vectraj
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
vectraj
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Vector data set only.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs XVG
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.xvg
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
xvg
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CCP4
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.ccp4
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ccp4
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3D
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm REPD log
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.exch
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
charmmrepd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm Output
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.charmmout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
charmmout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Energy information, Read Only
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption Standard

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "tab:cpptraj-DataFile-formats"

\end_inset

DataFile formats recognized by 
\shape italic
cpptraj
\shape default
.
 'Valid Dimensions' shows what dimensions the format is valid for (e.g.
 you cannot write a 1D data set with OpenDX format).
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Data Set Selection Syntax
\end_layout

\begin_layout Standard
Many analysis commands can be used to analyze multiple data sets.
 The general format for selecting data sets is:
\end_layout

\begin_layout LyX-Code
<name>[<aspect>]:<index>
\end_layout

\begin_layout Standard
The '*' character can be used as a wild-card for 
\shape italic
entire
\shape default
 names (no partial matches).
\end_layout

\begin_layout Itemize

\series bold
<name>:
\series default
 The data set name, usually specified in the action (e.g.
 in 'distance d0 @1 @2' the data set name is 
\begin_inset Quotes eld
\end_inset

d0
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
<aspect>:
\series default
 Optional; this is set for certain data sets internally in order to easily
 select subsets of data.
 
\series bold
The brackets are required
\series default
.
 For example, when using 'hbond series', both solute-solute and solute-solvent
 hydrogen bond time series may be generated.
 To select all solute-solute hydrogen bonds one would use the aspect 
\begin_inset Quotes eld
\end_inset

[solutehb]
\begin_inset Quotes erd
\end_inset

; to select solute-solvent hydrogen bonds the aspect 
\begin_inset Quotes eld
\end_inset

[solventhb]
\begin_inset Quotes erd
\end_inset

 would be used.
 Aspects are hard-coded and are listed in the commands that use them.
\end_layout

\begin_layout Itemize

\series bold
<index>:
\series default
 Optional; for actions that generate many data sets (such as 'rmsd perres')
 an index is used.
 Depending on the action, the index may correspond to atom #s, residue #s,
 etc.
 A number range (comma and/or dash separated) may be used.
\end_layout

\begin_layout Standard
For example: to select all data sets with aspect 
\begin_inset Quotes eld
\end_inset

[shear]
\begin_inset Quotes erd
\end_inset

 named NA_00000:
\end_layout

\begin_layout LyX-Code
NA_00000[shear]
\end_layout

\begin_layout Standard
To select all data sets with aspect 
\begin_inset Quotes eld
\end_inset

[stagger]
\begin_inset Quotes erd
\end_inset

 with any name, indices 1 and 3:
\end_layout

\begin_layout LyX-Code
*[stagger]:1,3
\end_layout

\begin_layout Standard
In ensemble mode, data set selection has additional syntax:
\end_layout

\begin_layout LyX-Code
<name>[<aspect>]:<index>%<member>
\end_layout

\begin_layout Standard
Where <member> is the ensemble member number starting from 0.
\end_layout

\begin_layout Subsection
Data Set Math
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-Data-Set-Math"

\end_inset


\end_layout

\begin_layout Standard
As of version 15, 
\emph on
cpptraj
\emph default
 can perform basic math operations, even on data sets (with some limitations).
 Currently recognized operations are:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Operation
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Symbol
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Minus
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Plus
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Divide
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
/
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Multiply
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
*
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Power
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
^
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Negate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assign
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
=
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Several functions are also supported:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="13" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Function
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Form
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Square Root
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sqrt()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Exponential
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
exp()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Natural Logarithm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ln()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Absolute Value
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
abs()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sine
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sin()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Cosine
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cos()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Tangent
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
tan()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Summation
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sum()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Average
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
avg()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Standard Deviation
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
stdev()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Minimum
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
min()
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Maximum
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
max()
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Numbers can be expressed in scientific notation using 
\begin_inset Quotes eld
\end_inset

E
\begin_inset Quotes erd
\end_inset

 notation, e.g.
 1E-5 = 0.00001.
 The parser also recognizes PI as the number pi.
 Expressions can also be enclosed in parentheses.
 So for example, the following expression is valid:
\end_layout

\begin_layout LyX-Code
> 1 - ln(sin(PI/4) * 2)^2 
\end_layout

\begin_layout LyX-Code
Result: 0.879887
\end_layout

\begin_layout Standard
Results of numerical calculations like the above can be assigned to a variable
 (essentially a data set of size 1) for use in subsequent calculations,
 e.g.
\end_layout

\begin_layout LyX-Code
> R = 1 - ln(sin(PI/4) * 2)^2 
\end_layout

\begin_layout LyX-Code
Result stored in 'R' 
\end_layout

\begin_layout LyX-Code
> R + 1 Result: 1.879887
\end_layout

\begin_layout Standard
Data sets can be specified in expressions as well.
 Currently data sets in an expression must be of the same type and only
 1D, 2D, and 3D data sets are supported.
 Functions are applied to each member of the data set.
 So for example, given two 1D data sets of the same size named D0 and D1,
 the following expression:
\end_layout

\begin_layout LyX-Code
> D2 = sqrt( D0 ) + D1
\end_layout

\begin_layout Standard
would take the square root of each member of D0, add it to the corresponding
 member of D1, and assign the result to D2.
 The following table lists which operations are valid for data set types.
 If a type is not listed it is not supported:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="5" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Data Set Type
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Supported Ops
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Supported Funcs
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Notes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D (integer, double, float)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
All
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
All
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D (vector)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+, -, *, /, =
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
None
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'*' is dot product
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2D (matrices)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+, -, /, *, =
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sum, avg, stdev, min, max
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3D (grids)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+, -, /, *, =
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sum, avg, stdev, min, max
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Section
Data File Options
\begin_inset CommandInset label
LatexCommand label
name "sec:Datafile-Commands"

\end_inset


\end_layout

\begin_layout Standard
Data file output can be handled multiple ways in cpptraj.
 Output data files can be created by Actions/Analyses/Commands, or can be
 explicitly created with 
\series bold
\emph on
writedata
\series default
\emph default
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_writedata"

\end_inset

) or 
\series bold
\emph on
create
\series default
\emph default
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_create"

\end_inset

) commands.
 Reading data from files is only done via the 
\series bold
\emph on
readdata
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_readdata"

\end_inset

).
\end_layout

\begin_layout Standard
In general, data files which have been declared with an 
\series bold
'out'
\series default
 keyword will recognize data file write keywords on the same command line.
 For example, the 
\series bold
'time'
\series default
 argument can be passed directly to the output from a 
\series bold
\shape italic
distance
\series default
\shape default
 command:
\end_layout

\begin_layout LyX-Code
distance d0 :1 :2 out d0.agr time 0.001
\end_layout

\begin_layout Standard
The data file format can be changed from standard implicitly by using specific
 filename extensions or keywords.
 If the extension is not recognized or no keyword is give the default format
 is 'Standard'.
 Keywords and extensions for data file formats recognized by 
\shape italic
cpptraj
\shape default
 are shown in 
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:cpptraj-DataFile-formats"

\end_inset

.
 Note that the use of certain options may be restricted for certain data
 file formats.
 These options can also be passed to data files via the 
\series bold
\emph on
datafile
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_datafile_command"

\end_inset

).
\end_layout

\begin_layout LyX-Code
[<format keyword>]
\end_layout

\begin_layout LyX-Code
[{xlabel|ylabel|zlabel} <label>] [{xmin|ymin|zmin} <min>] [sort]
\end_layout

\begin_layout LyX-Code
[{xstep|ystep|zstep} <step>] [time <dt>] [prec <width>[.<precision>]]
\end_layout

\begin_layout LyX-Code
[xprec <width>[.<precision>]] [xfmt {double|scientific|general}]
\end_layout

\begin_layout LyX-Code
[noensextension]
\end_layout

\begin_deeper
\begin_layout Description
{xlabel
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ylabel
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

zlabel}
\begin_inset space ~
\end_inset

<label> Set the x-axis label for the specified datafile to <label>.
 For regular data files this is the header for the first column of data.
 If the data is at least 2-dimensional 'datafile ylabel <label>' will likewise
 set the y-axis label.
\end_layout

\begin_layout Description
{xmin
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ymin
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

zmin}
\begin_inset space ~
\end_inset

<min> Set the starting X coordinate value to <min>.
 If the data is at least 2-dimensional 'datafile ymin <min>' will likewise
 set the starting Y coordinate value.
\end_layout

\begin_layout Description
sort Sort data sets prior to write.
 Ordering is by name, aspect, then index (all descending).
\end_layout

\begin_layout Description
{xstep
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ystep
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

zstep}
\begin_inset space ~
\end_inset

<step> Multiply each frame number by <step> (x coordinates).
 If the data is at least 2-dimensional 'datafile ystep <step>' will likewise
 multiply y coordinates by <step>.
\end_layout

\begin_layout Description
time
\begin_inset space ~
\end_inset

<dt> Equivalent to the 
\shape italic
ptraj
\shape default
 argument 'time' that could be specified with many actions.
 Multiplies frame numbers (x-axis) by <dt>.
\end_layout

\begin_layout Description
prec
\begin_inset space ~
\end_inset

<width>[.<precision>] Change the output format width (and optionally precision)
 of all sets 
\shape italic
subsequently
\shape default
 added to the data file (i.e.
 does not change the precision of any data sets currently in the file).
 For example,
\end_layout

\begin_layout LyX-Code
prec 12.4
\end_layout

\begin_layout LyX-Code
prec 10
\end_layout

\begin_layout Description
xprec
\begin_inset space ~
\end_inset

<width>[.<precision>] Change output ordinate width and precision.
\end_layout

\begin_layout Description
xfmt
\begin_inset space ~
\end_inset

{double|scientific|general} Change output ordinate format.
\end_layout

\begin_layout Description
[noensextension] Omit ensemble extension in ensemble processing mode.
 
\series bold
NOTE: THIS OPTION HAS NOT BEEN FULLY TESTED IN PARALLEL.
\end_layout

\end_deeper
\begin_layout Subsection
Standard Data File Options
\end_layout

\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[invert] [noxcol] [groupby <type>] [noheader] [square2d|nosquare2d]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
[nosparse|sparse [cut <cutoff>]]
\end_layout

\begin_deeper
\begin_layout Description
invert Normally, data is written out with X-values pertaining to frames
 (i.e.
 data over all trajectories is printed in columns).
 This command flips that behavior so that X-values pertain to data sets
 (i.e.
 data over all trajectories is printed in rows).
\end_layout

\begin_layout Description
groupby
\begin_inset space ~
\end_inset

<type> (1D) group data sets by <type>:
\end_layout

\begin_deeper
\begin_layout Description
name Group by name.
\end_layout

\begin_layout Description
aspect Group by aspect.
\end_layout

\begin_layout Description
idx Group by index.
\end_layout

\begin_layout Description
ens Group by ensemble number.
\end_layout

\begin_layout Description
dim Group by dimension.
\end_layout

\end_deeper
\begin_layout Description
xcol Write indices for the specified datafile.
 This is usually the default behavior.
\end_layout

\begin_layout Description
noxcol Prevent printing of indices (i.e.
 the #Frame column in most datafiles) for the specified datafile.
 Useful e.g.
 if one would like a 2D plot such as phi vs psi.
 For example, given the input:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout LyX-Code
dihedral phi :1@C :2@N :2@CA :2@C out phipsi.dat
\end_layout

\begin_layout LyX-Code
dihedral psi :2@N :2@CA :2@C :3@N out phipsi.dat
\end_layout

\begin_layout LyX-Code
datafile phipsi.dat noxcol
\end_layout

\begin_layout Standard

\shape italic
Cpptraj
\shape default
 will write a 2 column datafile containing only phi and psi, no frame numbers
 will be written.
\end_layout

\end_deeper
\begin_layout Description
header Write header line at beginning of data file.
 This is usually the default behavior.
\end_layout

\begin_layout Description
noheader Prevent printing of header line (e.g.
 '#Frame
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

D1') at the beginning of data file.
\end_layout

\begin_layout Description
square2d Write 2D data as a square matrix, e.g.:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout LyX-Code
<1,1> <2,1> <3,1>
\end_layout

\begin_layout LyX-Code
<1,2> <2,2> <3,2>
\end_layout

\end_deeper
\begin_layout Description
nosquare2d Write 2D data in 3 columns as:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout LyX-Code
<X> <Y> <Value>
\end_layout

\end_deeper
\begin_layout Description
sparse Only write 3D grid voxels with value > cutoff (default 0).
\end_layout

\begin_deeper
\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cut> Cutoff for 'sparse'; default 0.
\end_layout

\end_deeper
\begin_layout Description
nosparse Write all 3D voxels (default).
\end_layout

\end_deeper
\begin_layout LyX-Code

\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
[prec {flt|dbl}]
\end_layout

\begin_layout LyX-Code
{[read1d [index <col>] [onlycols <range>] [floatcols <range>]
\end_layout

\begin_layout LyX-Code
         [intcols <range>] [stringcols <range>]] |
\end_layout

\begin_layout LyX-Code
 [read2d [{square2d|nosquare2d}]] |
\end_layout

\begin_layout LyX-Code
 [vector] |
\end_layout

\begin_layout LyX-Code
 [mat3x3] |
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
 [read3d [dims <nx>,<ny>,<nz>] [origin <ox>,<oy>,<oz>]
\end_layout

\begin_layout LyX-Code
         [delta <dx>,<dy>,dz>] [prec {dbl|flt}] [bin {center|corner} ]
\end_layout

\begin_layout LyX-Code
}
\end_layout

\begin_deeper
\begin_layout Description
prec
\begin_inset space ~
\end_inset

{flt|dbl} Read 2d/3d data as single (flt) or double (dbl, default) precision.
\end_layout

\begin_layout Description
read1d Read data as 1D data sets (default).
\end_layout

\begin_deeper
\begin_layout Description
index
\begin_inset space ~
\end_inset

<col> Use column <col> (starting from 1) as index column (1D data only).
\end_layout

\begin_layout Description
onlycols
\begin_inset space ~
\end_inset

<range> Only read columns in range.
\end_layout

\begin_layout Description
floatcols
\begin_inset space ~
\end_inset

<range> Force specified columns to be read as single-precision floats.
\end_layout

\begin_layout Description
intcols
\begin_inset space ~
\end_inset

<range> Force specified columns to be read as integers.
\end_layout

\begin_layout Description
stringcols
\begin_inset space ~
\end_inset

<range> Force specified columns to be read as strings.
\end_layout

\end_deeper
\begin_layout Description
read2d Read data as 2D matrix.
\end_layout

\begin_deeper
\begin_layout Description
square2d Read data as square matrix (default).
\end_layout

\begin_layout Description
nosquare2d Read data as XYZ matrix (i.e.
 each line contains '<column> <row> <data>').
\end_layout

\end_deeper
\begin_layout Description
vector Read data as vector.
 If indices are present they will be skipped.
 Assume first 3 columns after the index volumn are vector X, Y, and Z, and
 (if present) the next 3 columns contain vector origin X, Y, and Z.
\end_layout

\begin_layout Description
mat3x3 Read data as 3x3 matrix.
 If indices are present they will be skipped.
 Assume matrices are in row major order on each line, i.e.
 M(1,1) M(1,2) ...
 M(3,2) M(3,3).
\end_layout

\begin_layout Description
read3d Read data as 3D grid.
 If no dimension data in file must also speify 'dims'.
\end_layout

\begin_deeper
\begin_layout Description
dims
\begin_inset space ~
\end_inset

<dx>,<dy>,<dz> Grid dimensions.
\end_layout

\begin_layout Description
origin
\begin_inset space ~
\end_inset

<ox>,<oy>,<oz> Grid origins (default 0,0,0).
\end_layout

\begin_layout Description
delta
\begin_inset space ~
\end_inset

<dx>,<dy>,dz> Grid spacings (default 1,1,1).
\end_layout

\begin_layout Description
prec
\begin_inset space ~
\end_inset

{dbl|flt} Grid precision, double or float (default float).
\end_layout

\begin_layout Description
bin
\begin_inset space ~
\end_inset

{center|corner} Coords specify bin centers or corners (default corners).
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
By default, standard data files are assumed to contain 1D data in columns.
 Data set legends will be read in if the file has a header line (denoted
 by '#').
 Columns labeled '#Frame' are automatically considered the 'index' column
 and skipped.
 Data sets are stored as <name>:<idx> where <name> is the given data set
 name (the file name if not specified) and <idx> corresponds to the column
 the data was read from starting from 1.
 
\shape italic
Cpptraj
\shape default
 assumes the data increases monotonically and will automatically attempt
 to determine the dimensions of the data set(s); a warning will be printed
 if this is not successful.
\end_layout

\begin_layout Subsection
Grace Data File Options
\end_layout

\begin_layout Standard
For more information on Grace see 
\begin_inset CommandInset href
LatexCommand href
name "http://plasma-gate.weizmann.ac.il/Grace/"
target "http://plasma-gate.weizmann.ac.il/Grace/"
literal "false"

\end_inset

.
\end_layout

\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[{invert|noinvert}] [{xydy|noxydy}] [<label set>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
invert Normally, data is written out with X-values pertaining to frames
 (i.e.
 data over all trajectories is printed in columns).
 This command flips that behavior so that X-values pertain to data sets.
\end_layout

\begin_layout Description
noinvert Do not flip X-Y axes (default).
\end_layout

\begin_layout Description
xydy Combine consecutive pairs of sets into XYDY sets.
\end_layout

\begin_layout Description
noxydy Do not combine consecutuve pairs of sets into XYDY sets (default).
\end_layout

\begin_layout Description
<label
\begin_inset space ~
\end_inset

set> If a string dataset is specified, assume it has data point labels.
\end_layout

\end_deeper
\begin_layout Standard
If a single string data set is specified when writing Grace format, it is
 assumed they are data point labels.
\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout Standard
Cpptraj will read set legends from grace files, and data sets are stored
 as <name>:<idx> where <name> is the given data set name (the file name
 if not specified) and <idx> corresponds to the set number the data was
 read from starting from 0.
\end_layout

\begin_layout Subsection
Gnuplot Data File Options
\end_layout

\begin_layout Standard
For more information on these options it helps to look at the PM3D options
 in the Gnuplot manual (see 
\begin_inset CommandInset href
LatexCommand href
name "http://www.gnuplot.info/"
target "http://www.gnuplot.info/"
literal "false"

\end_inset

).
\end_layout

\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[{nolabels|labels}] [{usemap|pm3d|nopm3d}] [title <title>]
\end_layout

\begin_layout LyX-Code
[jpeg] [noheader] [{xlabels|ylabels|zlabels} <labellist>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
nolabels Do not print axis labels.
\end_layout

\begin_layout Description
labels Print axis labels.
\end_layout

\begin_layout Description
usemap pm3d output with 1 extra empty row/col (may improve look).
\end_layout

\begin_layout Description
pm3d Normal pm3d map output.
\end_layout

\begin_layout Description
nopm3d Turn off pm3d 
\end_layout

\begin_layout Description
jpeg Plot will write to a JPEG file when used with gnuplot.
\end_layout

\begin_layout Description
title
\begin_inset space ~
\end_inset

<title> Set plot title (default is file name).
\end_layout

\begin_layout Description
binary Plot will be written in binary format.
\end_layout

\begin_layout Description
header Format the plot so it can be directly processed by gnuplot.
 This is usually the default behavior.
\end_layout

\begin_layout Description
noheader Do not format plot; data output only.
\end_layout

\begin_layout Description
palette
\begin_inset space ~
\end_inset

<arg> Change gnuplot pm3d palette to <arg>:
\end_layout

\begin_deeper
\begin_layout Description
'rgb' Red, yellow, green, cyan, blue, magenta, red.
\end_layout

\begin_layout Description
'kbvyw' Black, blue, violet, yellow, white.
\end_layout

\begin_layout Description
'bgyr' Blue, green, yellow, red.
\end_layout

\begin_layout Description
'gray' Grayscale.
 
\end_layout

\end_deeper
\begin_layout Description
xlabels|ylabels|zlabels
\begin_inset space ~
\end_inset

<labellist> Set x, y, or z axis labels with comma-separated list, e.g.
 'xlabels X1,X2,X3'.
\end_layout

\end_deeper
\begin_layout Subsection
Amber REM Log Options
\end_layout

\begin_layout Standard
Note that multiple REM logs can be specified in a single 
\series bold
\shape italic
readdata
\series default
\shape default
 command.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-remlog"

\end_inset

 for more on replica log analysis.
\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
[nosearch] [dimfile <file>] [crdidx <crd indices>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[nosearch] If specified do not automatically search for MREMD dimension
 logs.
\end_layout

\begin_layout Description
[dimfile
\begin_inset space ~
\end_inset

<file>] remd.dim file for processing MREMD logs.
\end_layout

\begin_layout Description
[crdidx
\begin_inset space ~
\end_inset

<crd
\begin_inset space ~
\end_inset

indices>] Use comma-separated list of indices as the initial coordinate
 indices (H-REMD only).
 For example (4 replicas):
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout LyX-Code
crdidx 4,2,3,1
\end_layout

\end_deeper
\end_deeper
\begin_layout Subsection
Amber MDOUT Options
\end_layout

\begin_layout Standard
Note that multiple MDOUT files can be specified in a single 
\series bold
\shape italic
readdata
\series default
\shape default
 command.
\end_layout

\begin_layout Subsection
Evecs File Options
\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
[ibeg <firstmode>] [iend <lastmode>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
ibeg
\begin_inset space ~
\end_inset

<firstmode> Number of the first mode (or principal component) to read from
 evecs file.
 Default 1.
\end_layout

\begin_layout Description
iend
\begin_inset space ~
\end_inset

<lastmode> Number of the last mode (or principal component) to read from
 evecs file.
 Default is to read all for newer evecs files (generated by 
\shape italic
cpptraj
\shape default
 version > 12), 50 for older evecs files.
\end_layout

\end_deeper
\begin_layout Subsection
Vector psuedo-traj Options
\end_layout

\begin_layout Standard
This can be used to write out a representation of a vector data set which
 can then be visualized.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-vector"

\end_inset

 for more on generating vector data sets.
\end_layout

\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[trajfmt <format>] [parmout <file>] [noorigin]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
trajfmt
\begin_inset space ~
\end_inset

<format> Output pseudo-trajectory format.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "tab:cpptraj-trajformats"

\end_inset

 for trajectory format keywords.
\end_layout

\begin_layout Description
parmout
\begin_inset space ~
\end_inset

<file> File to write pseudo-trajectory topology to.
\end_layout

\begin_layout Description
[noorigin] Do not write vector origin coordinates.
\end_layout

\end_deeper
\begin_layout Subsection
OpenDX file options
\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
[type {float|double}]
\end_layout

\begin_deeper
\begin_layout Description
type
\begin_inset space ~
\end_inset

{float|double} Precision to read in 3D grid (default float).
\end_layout

\end_deeper
\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[bincenter] [gridwrap] [gridext]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
bincenter Center grid points on bin centers instead of corners.
\end_layout

\begin_layout Description
gridwrap Like 
\series bold
'bincenter'
\series default
, but also wrap grid density.
 Useful when grid encompasses unit cell.
\end_layout

\begin_layout Description
gridext Like 
\series bold
'bincenter'
\series default
, but also print extra layer of empty bins.
\end_layout

\end_deeper
\begin_layout Subsection
CCP4 file options
\end_layout

\begin_layout Subsubsection*
Write
\end_layout

\begin_layout LyX-Code
[title <title>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[title
\begin_inset space ~
\end_inset

<title>] Set CCP4 output title.
\end_layout

\end_deeper
\begin_layout Subsection
Charmm REPD log options
\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
[nrep <#>] [crdidx <crd indices>]
\end_layout

\begin_deeper
\begin_layout Description
nrep
\begin_inset space ~
\end_inset

<#> Total number of replicas.
\end_layout

\begin_layout Description
crdidx
\begin_inset space ~
\end_inset

<crd
\begin_inset space ~
\end_inset

indices> Comma-separated list of indices to use as initial coordinate indices.
\end_layout

\end_deeper
\begin_layout Subsection
Amber Constant pH Out options
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_cphdatafile"

\end_inset


\end_layout

\begin_layout Subsubsection*
Read
\end_layout

\begin_layout LyX-Code
cpin <file>
\end_layout

\begin_deeper
\begin_layout Description
cpin
\begin_inset space ~
\end_inset

<file> Constant pH input (CPIN) file name.
\end_layout

\end_deeper
\begin_layout Standard
Note that when reading in constant pH data the data set aspect will be set
 to the residue name and the index will be set to the residue number.
 When reading in constant pH REMD data the data is unsorted, and sortensembledat
a should be used to create sorted constant pH data sets (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_sortensembledata"

\end_inset

).
\end_layout

\begin_layout Section
Coordinates (COORDS) Data Set Commands
\begin_inset CommandInset label
LatexCommand label
name "sec:Coordinates-as-a"

\end_inset


\end_layout

\begin_layout Standard
Coordinate I/O tends to be the most time-consuming part of trajectory analysis.
 In addition, many types of analyses (for example two-dimensional RMSD and
 cluster analysis) require using coordinate frames multiple times.
 To simplify this, trajectory coordinates may be saved as a separate data
 set via the 
\series bold
\shape italic
loadcrd
\series default
\shape default
 command or 
\series bold
\shape italic
createcrd
\series default
\shape default
 action.
 Any action can then be performed on the COORDS data set with the 
\series bold
\shape italic
crdaction
\series default
\shape default
 command.
 The 
\series bold
\shape italic
crdout
\series default
\shape default
 command can be used to write coordinates to an output trajectory (similar
 to 
\series bold
\shape italic
trajout
\series default
\shape default
).
\end_layout

\begin_layout Standard
Although COORDS data sets store everything internally with single-precision,
 they can still use a large amount of memory.
 Because of this there is a specialized type of COORDS data set called a
 TRAJ data set (trajectory), which functions exactly like a COORDS data
 set except all data is stored on disk.
 TRAJ data sets can be created with the 
\series bold
\shape italic
loadtraj
\series default
\shape default
 command.
 
\emph on
TRAJ data sets cannot be modified.
\end_layout

\begin_layout Standard
There are several analyses that can be performed using COORDS data sets,
 either as part of the normal analysis list or via the 
\series bold
\shape italic
runanalysis
\series default
\shape default
 command.
 Note that while these analyses can be run on specified COORDS data sets,
 if one is not specified a default COORDS data set will be created, made
 up of frames from 
\series bold
\shape italic
trajin
\series default
\shape default
 commands.
\end_layout

\begin_layout Standard
As an example of where this might be useful is in the calculation of atomic
 positional fluctuations.
 Previously this required two steps: one to generate an average structure,
 then a second to rms-fit to that average structure prior to calculating
 the fluctuations.
 This can now be done in one pass with the following input:
\end_layout

\begin_layout LyX-Code
parm topology.parm7
\end_layout

\begin_layout LyX-Code
loadcrd mdcrd.nc
\end_layout

\begin_layout LyX-Code
# Generate average structure PDB, @CA only
\end_layout

\begin_layout LyX-Code
crdaction mdcrd.nc average avg.pdb @CA
\end_layout

\begin_layout LyX-Code
# Load average structure PDB as reference
\end_layout

\begin_layout LyX-Code
parm avg.pdb
\end_layout

\begin_layout LyX-Code
reference avg.pdb parm avg.pdb
\end_layout

\begin_layout LyX-Code
# RMS-fit to average structure PDB
\end_layout

\begin_layout LyX-Code
crdaction mdcrd.nc rms reference @CA
\end_layout

\begin_layout LyX-Code
# Calculate atomic fluctuations for @CA only
\end_layout

\begin_layout LyX-Code
crdaction mdcrd.nc atomicfluct out fluct.dat bfactor @CA
\end_layout

\begin_layout Standard
The following COORDS data set commands are available:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="14" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="75text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
catcrd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Concatenate two or more COORDS sets.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
combinecrd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Combine two or more COORDS sets.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crdaction
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Run a single Action on a COORDS set.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crdout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write a COORDS set to a file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
createcrd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
(Action) Create a COORDS set during a Run.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
emin
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Run simple energy minimization on a frame of a COORDS set.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
graft
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Graft part of one COORDS set onto another COORDS set.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
loadcrd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create or append to a COORDS set from a file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
loadtraj
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create special COORDS set where frames remain on disk.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
permutedihedrals
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate specified dihedral(s) in given COORDS set by specific interval or
 to random values.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
reference
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Load a single trajectory frame as a reference.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rotatedihedral
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate specified dihedral to specified value or by given increment.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
splitcoords
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Split molecules in a COORDS set into a trajectory.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
catcrd
\end_layout

\begin_layout LyX-Code
catcrd <crd1> <crd2> ...
 name <name>
\end_layout

\begin_deeper
\begin_layout Description
<crdX> COORDS data sets to concatentate, specify 2 or more.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<name> New COORDS set name
\end_layout

\end_deeper
\begin_layout Standard
Concatentate two or more COORDS data sets into a single COORDS data set.
 The topologies must have the same number of atoms for this to work.
 If the topologies differ in other ways, the topology of the first COORDS
 set takes priority.
\end_layout

\begin_layout Subsection
combinecrd
\end_layout

\begin_layout LyX-Code
combinecrd <crd1> <crd2> ...
 [parmname <topname>] [crdname <crdname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<crdX> COORDS data sets to combine, specify 2 or more.
\end_layout

\begin_layout Description
[parmname
\begin_inset space ~
\end_inset

<topname>] Name of combined Topology.
\end_layout

\begin_layout Description
[crdname
\begin_inset space ~
\end_inset

<crdname>] Name of combined COORDS data set.
\end_layout

\end_deeper
\begin_layout Standard
Combined two or more COORDS data sets into a single COORDS data set.
 Note that the resulting topology will most likely 
\series bold
not
\series default
 be usable for MD simulations.
 Box information will be retained - the largest box dimensions will be used.
\end_layout

\begin_layout Standard
For example, to load two MOL2 files as COORDS data sets, combine them, and
 write them out as a single MOL2:
\end_layout

\begin_layout LyX-Code
loadcrd Tyr.mol2 CRD1
\end_layout

\begin_layout LyX-Code
loadcrd Pry.mol2 CRD2
\end_layout

\begin_layout LyX-Code
combinedcrd CRD1 CRD2 parmname Parm-1-2 crdname CRD-1-2
\end_layout

\begin_layout LyX-Code
crdout CRD-1-2 Tyr.Pry.mol2
\end_layout

\begin_layout Subsection
crdaction
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_crdaction"

\end_inset


\end_layout

\begin_layout LyX-Code
crdaction <crd set> <actioncmd> [<action args>] [crdframes <start>,<stop>,<offse
t>]
\end_layout

\begin_layout Standard
Perform action <actioncmd> on COORDS data set <crd set>.
 A subset of frames in the COORDS data set can be specified with 'crdframes'.
\end_layout

\begin_layout Standard
For example, to calculate RMSD for a previously created COORDS data set
 named crd1 using frames 1 to the last, skipping every 10:
\end_layout

\begin_layout LyX-Code
crdaction crd1 rmsd first @CA out rmsd-ca.agr crdframes 1,last,10
\end_layout

\begin_layout Subsection
crdout
\end_layout

\begin_layout LyX-Code
crdout <crd set> <filename> [<trajout args>] [crdframes <start>,<stop>,<offset>]
\end_layout

\begin_layout Standard
Write COORDS data set <crd set> to trajectory named <filename>.
 A subset of frames in the COORDS data set can be specified with 'crdframes'.
\end_layout

\begin_layout Standard
For example, to write frames 1 to 10 from a previously created COORDS data
 set named 
\begin_inset Quotes eld
\end_inset

crd1
\begin_inset Quotes erd
\end_inset

 to separate PDB files:
\end_layout

\begin_layout LyX-Code
crdout crd1 crd1.pdb multi crdframes 1,10
\end_layout

\begin_layout Subsection
createcrd
\end_layout

\begin_layout Standard
This command is actually an Action that can be used to create COORDS data
 sets during trajectory processing, see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_createcrd"

\end_inset

.
\end_layout

\begin_layout Subsection
emin
\end_layout

\begin_layout LyX-Code
emin crdset <name> [trajoutname <name>] [rmstol <tol>] [nsteps <#>]
\end_layout

\begin_layout LyX-Code
 	[<mask>] [frame <#>] [dx0 <step0>] [out <file>]
\end_layout

\begin_layout LyX-Code
 	[{nonbond|openmm}] [<potential options>]
\end_layout

\begin_deeper
\begin_layout Description
crdset
\begin_inset space ~
\end_inset

<name> COORDS set to use.
\end_layout

\begin_layout Description
[trajoutname
\begin_inset space ~
\end_inset

<name>] Optional output trajectory for minimization steps.
\end_layout

\begin_layout Description
[rmstol
\begin_inset space ~
\end_inset

<tol>] Minimum RMS tolerance (default 1E-4).
\end_layout

\begin_layout Description
[nsteps
\begin_inset space ~
\end_inset

<#>] Number of minimization steps (default 1).
\end_layout

\begin_layout Description
[<mask>] Atoms to minimize (default all).
\end_layout

\begin_layout Description
[frame
\begin_inset space ~
\end_inset

<#>] Frame from COORDS set to minimize (default 1).
\end_layout

\begin_layout Description
[dx0
\begin_inset space ~
\end_inset

<step0>] Size of initial minimization step (default 0.01).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write energies to.
\end_layout

\begin_layout Description
[nonbond] If specified, use simple nonbonded potential term in additon to
 bonded terms.
\end_layout

\begin_layout Description
[openmm] If specified and if CPPTRAJ was compiled with OpenMM support, use
 OpenMM to calculate the forces.
\end_layout

\begin_layout Standard
<potential options>
\end_layout

\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cutoff> Set nonbonded interaction cutoff in Ang.
 (electrostatics and vdW).
 Default 8.0.
 
\end_layout

\begin_layout Description
nexclude
\begin_inset space ~
\end_inset

<#> Number of bonded atoms within which nonbonded interactions are excluded.
 Default 4.
\end_layout

\end_deeper
\begin_layout Standard
THIS COMMAND IS STILL IN DEVELOPMENT AS OF VERSION 5.0.2.
\end_layout

\begin_layout Standard
Perform steepest descent minimization on a frame in a COORDS set using a
 very basic force field (bonds, angles, dihedrals).
 A simple nonbonded term can be added as well if desired.
\end_layout

\begin_layout Subsection
graft
\end_layout

\begin_layout LyX-Code
graft src <source COORDS> [srcframe <#>] [srcfitmask <mask>] [srcmask <mask>]
\end_layout

\begin_layout LyX-Code
  	tgt <target COORDS> [tgtframe <#>] [tgtfitmask <mask>] [tgtmask <mask>]
\end_layout

\begin_layout LyX-Code
  	name <output COORDS> [bond <tgt>,<src> ...]
\end_layout

\begin_deeper
\begin_layout Description
src
\begin_inset space ~
\end_inset

<source
\begin_inset space ~
\end_inset

COORDS> Source coordinates.
\end_layout

\begin_layout Description
[srcframe
\begin_inset space ~
\end_inset

<#>] Frame # from source coordinates to use (default 1).
\end_layout

\begin_layout Description
[srcfitmask
\begin_inset space ~
\end_inset

<mask>] Atoms from source to use if RMS-fitting source onto target.
\end_layout

\begin_layout Description
[srcmask
\begin_inset space ~
\end_inset

<mask>] Atoms to keep from source (default all).
\end_layout

\begin_layout Description
tgt
\begin_inset space ~
\end_inset

<target
\begin_inset space ~
\end_inset

COORDS> Target coordinates that will be grafted onto.
\end_layout

\begin_layout Description
[tgtframe
\begin_inset space ~
\end_inset

<#> Frame # from target coordinates to use (default 1).
\end_layout

\begin_layout Description
[tgtfitmask
\begin_inset space ~
\end_inset

<mask>] Atoms from target to use if RMS-fitting source onto target.
\end_layout

\begin_layout Description
[tgtmask
\begin_inset space ~
\end_inset

<mask>] Atoms to keep from target (default all).
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

COORDS> Name of output COORDS set containing source grafted onto target.
\end_layout

\begin_layout Description
[bond
\begin_inset space ~
\end_inset

<tgt>,<src>] Create a bond between target atom selected by <tgt> and source
 atoms selected by <src> in the final structure.
 May be specified multiple times.
\end_layout

\end_deeper
\begin_layout Standard
Graft one COORDS set onto another.
 If 
\series bold
srcfitmask
\series default
 and/or 
\series bold
tgtfitmask
\series default
 is specified, the source coordinates will be RMS best-fit onto target using
 the specified atoms.
 Only the atoms specified by 
\series bold
srcmask
\series default
 and 
\series bold
tgtmask
\series default
 will be kept.
 The 
\series bold
bond
\series default
 keyword can be used to create bonds between target and source in the final
 structure.
\end_layout

\begin_layout Subsection
loadcrd
\end_layout

\begin_layout LyX-Code
loadcrd <filename> [parm <parm> | parmindex<#>] [<trajin args>] [name <name>]
\end_layout

\begin_layout Standard
Immediately load trajectory <filename> as a COORDS data set named <name>
 (default base name of <filename>).
 If <name> is already present the coordinates will be appended to the existing
 data set.
\end_layout

\begin_layout Standard
For example, to load frames from trajectories named 'traj1.nc' and 'traj2.nc'
 into a COORDS data set named Crd1:
\end_layout

\begin_layout LyX-Code
loadcrd traj1.nc name Crd1
\end_layout

\begin_layout LyX-Code
loadcrd traj2.nc name Crd2
\end_layout

\begin_layout Subsection
loadtraj
\end_layout

\begin_layout LyX-Code
loadtraj name <setname> [<filename>]
\end_layout

\begin_layout Standard
This command functions in two ways.
 If <filename> is not provided, all currently loaded input trajectories
 (from 
\series bold
\shape italic
trajin
\series default
\shape default
 commands) are added to TRAJ data set named <setname>.
 
\series bold
Note that if the input trajectory list is cleared (via 'clear trajin') this
 will invalidate the TRAJ data set.

\series default
 In addition, currently all trajectories must have the same number of atoms.
 Otherwise add trajectory <filename> to TRAJ data set <setname>.
\end_layout

\begin_layout Standard
TRAJ data sets cannot be modified.
\end_layout

\begin_layout Subsection
permutedihedrals
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_permutedihedrals"

\end_inset


\end_layout

\begin_layout LyX-Code
permutedihedrals crdset <COORDS set> resrange <range> [{interval | random}]
\end_layout

\begin_layout LyX-Code
             	[outtraj <filename> [<outfmt>]] [crdout <output COORDS>] 
\end_layout

\begin_layout LyX-Code
                 [<dihedral types>]
\end_layout

\begin_layout LyX-Code
  Options for 'random':
\end_layout

\begin_layout LyX-Code
	[rseed <rseed>] [out <# problems file> [<set name>]]
\end_layout

\begin_layout LyX-Code
	[ check [cutoff <cutoff>] [rescutoff <rescutoff>] [maxfactor <max_factor>]
\end_layout

\begin_layout LyX-Code
	 [backtrack <backtrack> [checkallresidues] [increment <increment>]] ]
\end_layout

\begin_layout LyX-Code
  Options for 'interval':
\end_layout

\begin_layout LyX-Code
	<interval deg>
\end_layout

\begin_layout LyX-Code
  <dihedral types> =  alpha beta gamma delta epsilon zeta nu1 nu2 h1p c2p
 chin 
\end_layout

\begin_layout LyX-Code
                      phi psi chip omega     
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
crdset
\begin_inset space ~
\end_inset

<COORDS
\begin_inset space ~
\end_inset

set> COORDS data set to operate on.
\end_layout

\begin_layout Description
resrange
\begin_inset space ~
\end_inset

<range> Residue range to search for dihedrals.
\end_layout

\begin_layout Description
interval Rotate found dihedrals by <interval>.
 This is done in an ordered fashion so that every combination of dihedral
 rotations is sampled at least once.
\end_layout

\begin_layout Description
random Rotate each found dihedral randomly.
\end_layout

\begin_layout Description
[outtraj
\begin_inset space ~
\end_inset

<filename>] Trajectory file to write coordinates to.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<outfmt>] Trajectory file format.
\end_layout

\end_deeper
\begin_layout Description
[crdout
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

COORDS>] COORDS data set to write coordinates to.
\end_layout

\begin_layout Description
<dihedral
\begin_inset space ~
\end_inset

type> One or more dihedral types to search for.
\end_layout

\begin_layout Standard
Options for 'interval:
\end_layout

\begin_layout Description
<interval
\begin_inset space ~
\end_inset

deg> Amount to rotate dihedral by each step.
\end_layout

\begin_layout Standard
Options for 'random':
\end_layout

\begin_layout Description
[rseed
\begin_inset space ~
\end_inset

<rseed>] Random number seed.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<#
\begin_inset space ~
\end_inset

problems
\begin_inset space ~
\end_inset

file>] File to write number of problems (clashes) each frame to.
\end_layout

\begin_layout Description
[<set
\begin_inset space ~
\end_inset

name>] Number of problems data set name.
\end_layout

\begin_layout Description
[check] Check randomly rotated structure for clashes.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[cutoff
\begin_inset space ~
\end_inset

<cutoff>] Atom cutoff for checking for clashes (default 0.8 Å).
\end_layout

\begin_layout Description
[rescutoff
\begin_inset space ~
\end_inset

<cutoff>] Residue cutoff for checking for clashes (defualt 10.0 Å).
\end_layout

\begin_layout Description
[maxfactor
\begin_inset space ~
\end_inset

<max_factor>] The maximum number of total attempted rotations will be <max_facto
r> * <total # of dihedrals> (default 2).
\end_layout

\begin_layout Description
[backtrack
\begin_inset space ~
\end_inset

<backtrack>] (No longer recommended as of version 5.1.0).
 If a clash is encountered at dihedral N and cannot be resolved, go to dihedral
 N-<backtrack> to try and resolve the clash (default is no backtracking).
\end_layout

\begin_deeper
\begin_layout Description
[checkallresidues] If specified all residues checked for clashes, otherwise
 only residues up to the currently rotated dihedral check.
\end_layout

\begin_layout Description
[increment
\begin_inset space ~
\end_inset

<increment>] If a clash is encountered, first attempt to rotate dihedral
 by increment to resolve it; if it cannot be resolved by a full rotation
 the calculation will backtrack (default 1).
 
\end_layout

\end_deeper
\end_deeper
\end_deeper
\begin_layout Standard
Create a trajectory by rotating specified dihedrals in a structure by regular
 intervals (
\series bold
interval
\series default
), or create 1 structure by randomly rotating specified dihedrals (
\series bold
random
\series default
).
 When randomly rotating dihedrals steric clashes will be checked if 
\series bold
check
\series default
 is specified; in such cases the algorithm will attempt to resolve the clash
 as best it can.
 If clashes are not being resolved you can increase the number of rotation
 attempts 
\family typewriter
\shape italic
cpptraj
\family default
\shape default
 will make by increasing 
\series bold
maxfactor
\series default
.
\end_layout

\begin_layout Standard
For example, to rotate all backbone dihedrals in a protein with coordinates
 in a file named tz2.rst7 in -120 degree intervals and write the resulting
 trajectory in Amber format to rotations.mdcrd:
\end_layout

\begin_layout LyX-Code
reference tz2.rst7 [TZ2]
\end_layout

\begin_layout LyX-Code
permutedihedrals crdset [TZ2] interval -120 outtraj rotations.mdcrd phi psi
\end_layout

\begin_layout Standard
To randomly rotate backbone dihedrals for the same structure and write to
 file random.mol2 in MOL2 format:
\end_layout

\begin_layout LyX-Code
reference tz2.rst7 [TZ2]
\end_layout

\begin_layout LyX-Code
permutedihedrals crdset [TZ2] random rseed 1 check maxfactor 10 phi psi
 
\backslash

\end_layout

\begin_layout LyX-Code
                 outtraj random.mol2 multi
\end_layout

\begin_layout Subsection
reference
\end_layout

\begin_layout Standard
Reference coordinates can now be used and manipulated like COORDS data sets.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_reference"

\end_inset

 for command syntax.
\end_layout

\begin_layout Subsection
rotatedihedral
\end_layout

\begin_layout LyX-Code
rotatedihedral crdset <COORDS set> [frame <#>] [name <output set name>]
\end_layout

\begin_layout LyX-Code
               {value <value> | increment <increment>}
\end_layout

\begin_layout LyX-Code
               { <mask1> <mask2> <mask3> <mask4> |
\end_layout

\begin_layout LyX-Code
                 res <#> type <dih type> }
\end_layout

\begin_layout LyX-Code
<dih type> = alpha beta gamma delta epsilon zeta nu1 nu2 h1p c2p chin
\end_layout

\begin_layout LyX-Code
             phi psi chip omega
\end_layout

\begin_deeper
\begin_layout Description
crdset
\begin_inset space ~
\end_inset

<COORDS
\begin_inset space ~
\end_inset

set> Coordinates data set to work on.
 If a TRAJ data set is specified, 
\series bold
name
\series default
 must also be specified.
\end_layout

\begin_layout Description
[frame
\begin_inset space ~
\end_inset

<#>] Frame of the COORDS set to work on.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name>] Output COORDS set.
 If not specified the input COORDS set will be modified.
\end_layout

\begin_layout Description
value
\begin_inset space ~
\end_inset

<value> Set specified dihedral to given value in degrees.
\end_layout

\begin_layout Description
increment
\begin_inset space ~
\end_inset

<increment> Increment specified dihedral by increment in degrees.
\end_layout

\begin_layout Description
<mask1>
\begin_inset space ~
\end_inset

<mask2>
\begin_inset space ~
\end_inset

<mask3>
\begin_inset space ~
\end_inset

<mask4> Define dihedral by atom masks.
 Each mask should only select one atom.
\end_layout

\begin_layout Description
res
\begin_inset space ~
\end_inset

<#> Rotate dihedral specified by type in residue number <#>.
\end_layout

\begin_layout Description
type
\begin_inset space ~
\end_inset

<dih
\begin_inset space ~
\end_inset

type> Dihedral type to rotate in specified residue.
\end_layout

\end_deeper
\begin_layout Standard
Rotate the specified dihedral in given COORDS set to a target value or by
 given increment.
 For example, to set the protein chi dihedral in residue 8 to 35 degrees
 and write out to a mol2 file:
\end_layout

\begin_layout LyX-Code
parm ../tz2.parm7
\end_layout

\begin_layout LyX-Code
loadcrd ../tz2.nc 1 1 name TZ2
\end_layout

\begin_layout LyX-Code
rotatedihedral crdset TZ2 value 35 res 8 type chip
\end_layout

\begin_layout LyX-Code
crdout TZ2 tz2.rotate.1.mol2
\end_layout

\begin_layout Subsection
splitcoords
\end_layout

\begin_layout LyX-Code
splitcoords <crd set> name <output set name>
\end_layout

\begin_deeper
\begin_layout Description
<crd
\begin_inset space ~
\end_inset

set> COORDS set to split.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name> Name of new set to create.
\end_layout

\end_deeper
\begin_layout Standard
Split trajectory specified by <crd set> by molecule into a new COORDS set.
 All molecules in <crd set> must be the same size.
 For example, if there are 10 molecules and 10 frames in COORDS set 
\begin_inset Quotes eld
\end_inset

Set0
\begin_inset Quotes erd
\end_inset

, the following would create a new COORDS set with 100 frames (original
 molecules 1-10 frame 1, original molecules 1-10 frame 2, etc):
\end_layout

\begin_layout LyX-Code
splitcoords Set0 name Set0Split
\end_layout

\begin_layout Section
General Commands
\end_layout

\begin_layout Standard
The following general commands are available:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="34" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
activeref
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Select the reference for distance-based masks.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
calc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Evaluate the given mathematical expression.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
clear
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Clear various objects from the cpptraj state.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
create
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create (but do not yet write) a data file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
createset
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a dataset from a simple mathematical expression.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
datafile
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Used to manipulate data files.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
datafilter
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Filter data sets based on given criteria.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dataset
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Use to manipulate data sets.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
debug | prnlev
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set debug level.
 Higher levels give more info.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ensextension
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enable/disable ensemble number extension for files in ensemble mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
exit | quit
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quit cpptraj.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
flatten
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Distribute elements of 2d matrix across 1d array.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
go | run
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Start a trajectory processing Run.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
help
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Provide help for commands.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
list
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
List various objects in the cpptraj state.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
noexitonerror
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Attempt to continue even if errors are encountered.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
noprogress
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Do not print a progress bar during a Run.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parallelanalysis
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
(MPI only) Divide current Analyses among MPI processes.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
precision
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Change the output precision of data sets.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
printdata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print data set to screen.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
random
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Change default random number generator, create random sets.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
readdata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read data sets from files.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
readensembledata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read data files in ensemble mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
readinput
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read cpptraj input from a file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
removedata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove specified data set(s).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rst
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Generate Amber-style distance/angle/torsion restraints.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
runanalysis
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Run an analysis immediately or run all queued analyses.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
select
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print the results of an atom mask expression.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
selectds
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print the results of a data set selection expression.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
silenceactions
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Prevent Actions from writing information to STDOUT.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sortensembledata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sort data sets using replica information (currently constant pH only).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
usediskcache
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Turn caching of data sets to disk on or off.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
write | writedata
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Immediately write data to a file or write to all current data files.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
activeref
\end_layout

\begin_layout LyX-Code
activeref
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
activeref
\end_layout

\end_inset

 <#>
\end_layout

\begin_layout Standard
Set which reference structure should be used when setting up distance-based
 masks for everything but the 'mask' action.
 Numbering starts from 0, so 'activeref 0' selects the first reference structure
 read in, 'activeref 1' selects the second, and so on.
\end_layout

\begin_layout Subsection
calc
\end_layout

\begin_layout LyX-Code
calc <expression>
\end_layout

\begin_layout LyX-Code
	[prec <width>.<precision>] [format {double|general|scientific}]
\end_layout

\begin_deeper
\begin_layout Description
<expression> Mathematical expression to evaluate.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

 for details.
\end_layout

\begin_layout Description
prec
\begin_inset space ~
\end_inset

<width>.<precision> Set the width and precision of the result.
\end_layout

\begin_layout Description
format
\begin_inset space ~
\end_inset

{double|general|scientific} Set the format of the result.
\end_layout

\end_deeper
\begin_layout Standard
Evaluate the given mathematical expression.
 This version gives more control over the format of the output.
\end_layout

\begin_layout Subsection
clear
\end_layout

\begin_layout LyX-Code
clear [{all | <type>}]
\end_layout

\begin_layout LyX-Code
      (<type> = actions,trajin,trajout,ref,parm,analysis,datafile,dataset)
\end_layout

\begin_layout Standard
Clear list of indicated type, or all lists if 'all' specified.
 Note that when clearing actions or analyses, associated data sets and data
 files are not cleared and vice versa.
\end_layout

\begin_layout Subsection
create
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_create"

\end_inset


\end_layout

\begin_layout LyX-Code
create
\begin_inset Index idx
status open

\begin_layout Plain Layout
create
\end_layout

\end_inset

 <filename> <datasetname0> [<datasetname1> ...] [<DataFile Options>]
\end_layout

\begin_layout Standard
Add specified data sets to the data file named <filename>; if the file does
 not exist, it will be added to the DataFileList.
 Data files created in this way are only written at the end of coordinate
 processing, analyses, or via the 
\series bold
\emph on
'writedata'
\series default
\emph default
 command.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

 for more data file format options.
\end_layout

\begin_layout Subsection
createset
\end_layout

\begin_layout LyX-Code
createset <expression> [xmin <min>] xstep <step> nx <nxvals>
\end_layout

\begin_deeper
\begin_layout Description
expression Simple mathematical expression, must contain equals sign, can
 contain X (e.g.
 Y=2*X).
 If not enclosed in quotes must not contain whitespace.
\end_layout

\begin_layout Description
xmin
\begin_inset space ~
\end_inset

<min> Minimum X value.
\end_layout

\begin_layout Description
xstep
\begin_inset space ~
\end_inset

<step> X step.
\end_layout

\begin_layout Description
nx
\begin_inset space ~
\end_inset

<nxvals> Number of X values.
\end_layout

\end_deeper
\begin_layout Standard
Generate a data set from a simple mathematical expression.
\end_layout

\begin_layout Subsection
datafile
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_datafile_command"

\end_inset


\end_layout

\begin_layout LyX-Code
datafile
\begin_inset Index idx
status open

\begin_layout Plain Layout
datafile
\end_layout

\end_inset

 <filename> <datafile arg>
\end_layout

\begin_layout Standard
Pass <datafile arg> to data file <filename>.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

 for more details.
\end_layout

\begin_layout Subsection
datafilter
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-datafilter"

\end_inset


\end_layout

\begin_layout LyX-Code
datafilter {<dataset arg> min <min> max <max> ...} [out <file>] [name <setname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
           {[multi] | [filterset <set> [newset <newname>]] [countout <countfile>
]}
\end_layout

\begin_deeper
\begin_layout Description
<dataset
\begin_inset space ~
\end_inset

arg>
\begin_inset space ~
\end_inset

min
\begin_inset space ~
\end_inset

<min>
\begin_inset space ~
\end_inset

max
\begin_inset space ~
\end_inset

<max> Data set name and min/max cutoffs to use; can specify more than one.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] Write out to file named <file>.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Name of filter data set containing 1 when cutoffs satisfied,
 0 otherwise.
\end_layout

\begin_layout Description
[multi] Filter each set separately instead of all together (creates filter
 set for each input set).
 Cannot be used with 'filterset'.
\end_layout

\begin_layout Description
[filterset
\begin_inset space ~
\end_inset

<set>] If specified, <set> will be filtered to only contain data that satisfies
 cutoffs.
 Cannot be used with 'multi'.
\end_layout

\begin_deeper
\begin_layout Description
[newset
\begin_inset space ~
\end_inset

<newname>] If specified a new set will be created from 'filterset' instead
 of replacing 'filterset'.
\end_layout

\end_deeper
\begin_layout Description
[countout
\begin_inset space ~
\end_inset

<count>] If specified, write number of elements passed and filtered to <countfil
e>.
 Cannot be used with 'multi'.
\end_layout

\begin_layout Standard
Sets Created (not 'multi')
\end_layout

\begin_layout Description
<setname> For each input element contains 1 for elements that 
\begin_inset Quotes eld
\end_inset

passed
\begin_inset Quotes erd
\end_inset

, 0 otherwise.
\end_layout

\begin_layout Description
<setname>[npassed] Number of elements that passed.
\end_layout

\begin_layout Description
<setname>[nfiltered] Number of elements filtered out.
\end_layout

\begin_layout Standard
Sets Created ('multi')
\end_layout

\begin_layout Description
<setname>:<idx> For each input set (number with <idx>, starting from 0)
 contains 1 for elements that 
\begin_inset Quotes eld
\end_inset

passed
\begin_inset Quotes erd
\end_inset

, 0 otherwise.
\end_layout

\end_deeper
\begin_layout Standard
Create a data set (optionally named <setname>) containing 1 for data within
 given 
\series bold
<min>
\series default
 and 
\series bold
<max>
\series default
 criteria for each specified data set.
 There must be at least one 
\series bold
<min>
\series default
 and 
\series bold
<max>
\series default
 argument, and can be as many as there are specified data sets.
 If 
\series bold
'multi'
\series default
 is specified then only filter data sets will be created for each data set
 instead.
 If 
\series bold
'filterset'
\series default
 is specified, the specified 
\series bold
<set>
\series default
 will be modified to only contain '1' frames; cannot be used with 
\series bold
'multi'
\series default
.
 If 
\series bold
'newset'
\series default
 is also specified, a new set will be created containing the '1' frames
 instead.
 The 'filterset' functionality only works for 1D scalar sets.
 If 
\series bold
'countout'
\series default
 is specified, the final number of elements passed and filtered out will
 be written to <countfile>.
\end_layout

\begin_layout Standard
For example, to read in data from two separate files (d1.dat and a1.dat) and
 generate a filter data set named FILTER having 1 when d1 is between 0.0
 and 3.0 and a1 is between 135.0 and 180.0:
\end_layout

\begin_layout LyX-Code
readdata a1.dat name a1
\end_layout

\begin_layout LyX-Code
readdata d1.dat name d1
\end_layout

\begin_layout LyX-Code
datafilter d1 min 0.0 max 3.0 a1 min 135.0 max 180.0 out filter.dat name FILTER
\end_layout

\begin_layout Standard
Note that a similar command that can be used with data generated by Actions
 during trajectory processing is 
\series bold
\shape italic
filter
\series default
\shape default
 (see page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "subsec:cpptraj-filter"

\end_inset

).
\end_layout

\begin_layout Subsection
dataset
\end_layout

\begin_layout LyX-Code
dataset { legend <legend> <set> |
\end_layout

\begin_layout LyX-Code
          makexy <Xset> <Yset> [name <name>] |
\end_layout

\begin_layout LyX-Code
          vectorcoord {X|Y|Z} <set> [name <name>] |
\end_layout

\begin_layout LyX-Code
    	  cat <set0> <set1> ...
 [name <name>] [nooffset] |
\end_layout

\begin_layout LyX-Code
          make2d <1D set> cols <ncols> rows <nrows> [name <name>] |
\end_layout

\begin_layout LyX-Code
          {drop|keep}points {range <range arg> | [start <#>] [stop <#>]
 [offset <#>]}
\end_layout

\begin_layout LyX-Code
                   [name <output set>] <set arg1> ...
 |
\end_layout

\begin_layout LyX-Code
          remove <criterion> <select> <value> [and <value2>] [<set selection>]
 |
\end_layout

\begin_layout LyX-Code
          dim {xdim|ydim|zdim|ndim <#>} [label <label>] [min <min>] [step
 <step>] |
\end_layout

\begin_layout LyX-Code
          outformat {double|scientific|general} <set arg1> [<set arg 2>
 ...] |
\end_layout

\begin_layout LyX-Code
          invert <set arg0> ...
 name <new name> [legendset <set>] |
\end_layout

\begin_layout LyX-Code
          shift [above <value> by <offset>] [below <value> by <offset>]
 <set arg0> ...
\end_layout

\begin_layout LyX-Code
    	  [mode <mode>] [type <type>] <set arg1> [<set arg 2> ...]
\end_layout

\begin_layout LyX-Code
        }
\end_layout

\begin_layout LyX-Code
  <mode>:  'distance' 'angle' 'torsion' 'pucker' 'rms' 'matrix' 'vector'
\end_layout

\begin_layout LyX-Code
  <type>:  'alpha' 'beta' 'gamma' 'delta' 'epsilon' 'zeta' 'nu0' 'nu1' 'nu2'
 'nu3'
\end_layout

\begin_layout LyX-Code
           'nu4' 'h1p' 'c2p' 'chin' 'phi' 'psi' 'chip' 'omega' 'chi2' 'chi3'
 'chi4'
\end_layout

\begin_layout LyX-Code
           'chi5' 'pucker' 'noe' 'distance' 'covariance' 'mass-weighted
 covariance'
\end_layout

\begin_layout LyX-Code
           'correlation' 'distance covariance' 'IDEA' 'IRED' 'dihedral covarianc
e'
\end_layout

\begin_layout LyX-Code
	    Options for 'type noe':
\end_layout

\begin_layout LyX-Code
    	  [bound <lower> bound <upper>] [rexp <expected>] [noe_strong] [noe_medium]
\end_layout

\begin_layout LyX-Code
          [noe_weak]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[name
\begin_inset space ~
\end_inset

<name>] New data set name for 
\series bold
makexy
\series default
/
\series bold
vectorcoord/cat
\series default
/
\series bold
make2d
\series default
/
\series bold
droppoints
\series default
/
\series bold
keeppoints
\series default
.
\end_layout

\begin_layout Description
legend
\begin_inset space ~
\end_inset

<legend>
\begin_inset space ~
\end_inset

<set> Set the legend for data set <set> to <legend>.
\end_layout

\begin_layout Description
makexy
\begin_inset space ~
\end_inset

<Xset>
\begin_inset space ~
\end_inset

<Yset> Create a new data set (optionally named <name>) with X values from
 <Xset> and Y values from <Yset>.
\end_layout

\begin_layout Description
vectorcoord
\begin_inset space ~
\end_inset

{X|Y|Z}
\begin_inset space ~
\end_inset

<set> Extract X/Y/Z coordinates from vector data set into a new 1D data
 set.
\end_layout

\begin_layout Description
cat
\begin_inset space ~
\end_inset

<set0>
\begin_inset space ~
\end_inset

<set1>
\begin_inset space ~
\end_inset

...
 Concatenate two or more data sets into a new data set (optionally named
 <name>).
\end_layout

\begin_layout Description
make2d
\begin_inset space ~
\end_inset

<1D
\begin_inset space ~
\end_inset

set>
\begin_inset space ~
\end_inset

cols
\begin_inset space ~
\end_inset

<ncols>
\begin_inset space ~
\end_inset

rows
\begin_inset space ~
\end_inset

<nrows> Convert 1D data set into row-major 2D data set with specified number
 of rows and columns.
\end_layout

\begin_layout Description
{drop|keep}points
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

arg1>
\begin_inset space ~
\end_inset

...
 Drop or keep specified points from data set(s), optionally creating a new
 data set.
\end_layout

\begin_deeper
\begin_layout Description
range
\begin_inset space ~
\end_inset

<range
\begin_inset space ~
\end_inset

arg> Range of points to drop/keep.
\end_layout

\begin_layout Description
[start
\begin_inset space ~
\end_inset

<#>]
\begin_inset space ~
\end_inset

[stop
\begin_inset space ~
\end_inset

<#>]
\begin_inset space ~
\end_inset

[offset
\begin_inset space ~
\end_inset

<#>] Start/stop/offset values of points to drop/keep.
\end_layout

\end_deeper
\begin_layout Description
remove
\begin_inset space ~
\end_inset

<criterion>
\begin_inset space ~
\end_inset

<select>
\begin_inset space ~
\end_inset

<value>
\begin_inset space ~
\end_inset

[and
\begin_inset space ~
\end_inset

<value2>]
\begin_inset space ~
\end_inset

[<set
\begin_inset space ~
\end_inset

selection>] Remove data sets from <set selection> according to specified
 criterion and selection.
\end_layout

\begin_layout LyX-Code
<criterion>:  'ifaverage' 'ifsize' 'ifmode' 'iftype'
\end_layout

\begin_layout LyX-Code
<select>   :  'equal' '==' 'notequal' '!=' 'lessthan' '<' 
\end_layout

\begin_layout LyX-Code
              'greaterthan' '>' 'between' 'outside'
\end_layout

\begin_layout Description
dim
\begin_inset space ~
\end_inset

{xdim|ydim|zdim|ndim
\begin_inset space ~
\end_inset

<#>} Change specified dimension in set(s).
\end_layout

\begin_deeper
\begin_layout Description
label
\begin_inset space ~
\end_inset

<label> Change dimension label to <label>
\end_layout

\begin_layout Description
min
\begin_inset space ~
\end_inset

<min> Change dimension minimum to <min>.
\end_layout

\begin_layout Description
step
\begin_inset space ~
\end_inset

<step> Change dimension step to <step>.
\end_layout

\end_deeper
\begin_layout Description
invert
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

arg0>
\begin_inset space ~
\end_inset

...
\begin_inset space ~
\end_inset

name
\begin_inset space ~
\end_inset

<new
\begin_inset space ~
\end_inset

name>
\begin_inset space ~
\end_inset

[legendset
\begin_inset space ~
\end_inset

<set>]
\end_layout

\begin_deeper
\begin_layout Description
<set
\begin_inset space ~
\end_inset

arg0>
\begin_inset space ~
\end_inset

...
 Specify sets to invert.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<new
\begin_inset space ~
\end_inset

name> Inverted output set name.
\end_layout

\begin_layout Description
[legendset
\begin_inset space ~
\end_inset

<set>] String data set containing legends
\end_layout

\end_deeper
\begin_layout Description
shift
\begin_inset space ~
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[above
\begin_inset space ~
\end_inset

<value>
\begin_inset space ~
\end_inset

by
\begin_inset space ~
\end_inset

<offset>] Values in set(s) above <value> will be shifted by <offset>.
\end_layout

\begin_layout Description
[below
\begin_inset space ~
\end_inset

<value>
\begin_inset space ~
\end_inset

by
\begin_inset space ~
\end_inset

<offset>] Values in set(s) below <value> will be shifted by <offset>.
\end_layout

\begin_layout Description
<set
\begin_inset space ~
\end_inset

arg0>
\begin_inset space ~
\end_inset

...
 Set(s) to shift.
\end_layout

\end_deeper
\begin_layout Description
[mode
\begin_inset space ~
\end_inset

<mode>] Set data set(s) mode to <mode>.
\end_layout

\begin_layout Description
[type
\begin_inset space ~
\end_inset

<type>] Set data set(s) type to 'type', useful for e.g.
 analysis with 
\series bold
\shape italic
statistics
\series default
\shape default
.
 Note this can also be done with 'type <type>' for certain commands (
\series bold
\shape italic
distance
\series default
\shape default
, 
\series bold
\shape italic
dihedral
\series default
\shape default
, 
\series bold
\shape italic
pucker
\series default
\shape default
 etc).
 Note that not every <type> is compatible with a given <mode>.
\end_layout

\begin_layout Standard
Options for type noe only:
\end_layout

\begin_layout Description
[bound
\begin_inset space ~
\end_inset

<lower>
\begin_inset space ~
\end_inset

bound
\begin_inset space ~
\end_inset

<upper>] Lower and upper bounds for NOE (in Angstroms); must specify both.
\end_layout

\begin_layout Description
[rexp
\begin_inset space ~
\end_inset

<expected>] Expected value for NOE (in Angstroms); if not given '(<lower>
 + <upper>)' / 2.0 is used.
\end_layout

\begin_layout Description
[noe_strong] Set lower and upper bounds to 1.8 and 2.9 Å respectively.
\end_layout

\begin_layout Description
[noe_medium] Set lower and upper bounds to 2.9 and 3.5 Å respectively.
\end_layout

\begin_layout Description
[noe_weak] Set lower and upper bounds to 3.5 and 5.0 Å respectively.
\end_layout

\end_deeper
\begin_layout Standard
Either set the legend for a single data set, create a new set with X values
 from one set and Y values from another, concatenate 2 or more sets, make
 a 2D set from 1D set, remove sets according to a certain criterion, or
 change the mode/type for one or more data sets.
\end_layout

\begin_layout Standard
Setting the mode/type can be useful for cases where the data set is being
 read in from a file; for example when reading in a dihedral data set the
 type can be set to 'dihedral' so that various Analysis routines like 
\series bold
\shape italic
statistics
\series default
\shape default
 know to treat it as periodic.
 A brief description of possible modes and types follows:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="29" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Mode
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Type
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
distance
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
noe
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
NOE distance.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
angle
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Angle.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
torsion
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
alpha
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid alpha.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
beta
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid beta.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gamma
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid gamma.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
delta
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid delta.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
epsilon
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid epsilon.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
zeta
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid zeta.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
nu1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic pucker (O4').
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
nu2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic pucker (C4').
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
h1p
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid H1'.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
c2p
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid C2'.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chin
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nucleic acid chi.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
phi
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Protein Phi.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
psi
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Protein psi.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chip
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Protein chi.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
omega
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Protein omega.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pucker
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pucker
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sugar pucker.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rms
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RMSD.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
matrix
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
distance
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Distance matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
covariance
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Cartesian covariance matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'mass-weighted covariance'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mass weighted Cartesian covariance matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
correlation
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Dynamic cross correlation matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'distance covariance'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Distance covariance matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IDEA
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IDEA matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IRED
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IRED matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'dihedral covariance'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Dihedral covariance matrix.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
vector
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IRED
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IRED vector.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
The invert mode takes a group of M 1D data sets of size N and create N new
 "inverted" data sets of size M.
 This is similar to the invert keyword already available for standard and
 Grace data writes, but operates directly on data sets.
 For example, given the following two data sets:
\end_layout

\begin_layout LyX-Code
D0 D1
\end_layout

\begin_layout LyX-Code
 1  4
\end_layout

\begin_layout LyX-Code
 2  5
\end_layout

\begin_layout LyX-Code
 3  6
\end_layout

\begin_layout Standard
The new data sets will be laid out like so:
\end_layout

\begin_layout LyX-Code
N0 N1 N2
\end_layout

\begin_layout LyX-Code
 1  2  3
\end_layout

\begin_layout LyX-Code
 4  5  6
\end_layout

\begin_layout Standard
The dataset invert command can be useful if you want to easily view output
 from multiple analysis commands in a single graph.
 For example, to view state counts from two different simulations side by
 side:
\end_layout

\begin_layout LyX-Code
calcstate name Sim1 state bound1,dist1,0.0,2.0
\end_layout

\begin_layout LyX-Code
calcstate name Sim2 state bound1,dist1,0.0,2.0
\end_layout

\begin_layout LyX-Code
runanalysis dataset invert Sim*[Count] name Inverted legendset Sim1[Name]
\end_layout

\begin_layout LyX-Code
dataset dim xdim label Simulation min 1 step 1 Inverted*
\end_layout

\begin_layout LyX-Code
writedata statecount.agr Inverted* 
\end_layout

\begin_layout Standard
The dataset shift command can be used for wrapping circular values, such
 as torsions.
 For example, to ensure a pucker has a range from 0 to 360 instead of -180
 to 180:
\end_layout

\begin_layout LyX-Code
pucker Furanoid @C2 @C3 @C4 @C5 @O2 cremer out CremerF.dat amplitude
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
dataset shift Furanoid below 0 by 360
\end_layout

\begin_layout Subsection
debug | prnlev
\end_layout

\begin_layout LyX-Code
debug
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
debug
\end_layout

\end_inset

 [<type>] <#>
\end_layout

\begin_layout LyX-Code
      (<type> = actions,trajin,trajout,ref,parm,analysis,datafile,dataset)
\end_layout

\begin_layout Standard
Set the level of debug information to print.
 In general the higher the <#> the more information that is printed.
 If <type> is specified only set the debug level for a specific area of
 
\shape italic
cpptraj.
\end_layout

\begin_layout Subsection
ensextension
\end_layout

\begin_layout LyX-Code
ensextension {on|off}
\end_layout

\begin_layout Standard
Turn printing of ensemble member number filename extensions on or off.
 By default ensemble extensions are printed in parallel and not in serial.
\end_layout

\begin_layout Standard

\series bold
NOTE: THE 'ensextension off' OPTION HAS NOT BEEN FULLY TESTED IN PARALLEL
 AND IS NOT CURRENTLY RECOMMENDED.
\end_layout

\begin_layout Subsection
exit | quit
\end_layout

\begin_layout Standard
Exit normally.
\end_layout

\begin_layout Subsection
flatten
\end_layout

\begin_layout LyX-Code
flatten name <output set name> [mode {sum|avg}] <input set args>
\end_layout

\begin_deeper
\begin_layout Description
name
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name> Name of 
\begin_inset Quotes eld
\end_inset

flattened
\begin_inset Quotes erd
\end_inset

 1D output set(s).
\end_layout

\begin_layout Description
mode
\begin_inset space ~
\end_inset

{sum|avg} If sum, matrix elements will be summed.
 If avg, matrix elements will be averaged.
\end_layout

\begin_layout Description
<input
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

args> Specify matrices to 
\begin_inset Quotes eld
\end_inset

flatten
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
DataSets Created
\end_layout

\begin_layout Description
<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name> Flattened 1D set if only one input matrix.
\end_layout

\begin_layout Description
<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name>:<idx> Flattened 1D sets when more than one input matrix; index starts
 from 1.
\end_layout

\end_deeper
\begin_layout Standard
Flatten 1 or more matrices into 1D array(s) by summing or averaging elements.
 For example, given a matrix with values like this:
\end_layout

\begin_layout LyX-Code
X Y Value
\end_layout

\begin_layout LyX-Code
1 3 5.0
\end_layout

\begin_layout LyX-Code
1 4 4.0
\end_layout

\begin_layout LyX-Code
2 3 2.0
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

flattened
\begin_inset Quotes erd
\end_inset

 1D array with mode SUM would be determined as follows:
\end_layout

\begin_layout LyX-Code
Element 1 = (5.0/2) + (4.0/2) = 4.5
\end_layout

\begin_layout LyX-Code
Element 2 = (2.0/2) = 1.0
\end_layout

\begin_layout LyX-Code
Element 3 = (5.0/2) + (2.0/2) = 3.5
\end_layout

\begin_layout LyX-Code
Element 4 = (4.0/2) = 2.0
\end_layout

\begin_layout Standard
And the final 1D array would look like so:
\end_layout

\begin_layout LyX-Code
Index Value
\end_layout

\begin_layout LyX-Code
1     4.5
\end_layout

\begin_layout LyX-Code
2     1.0
\end_layout

\begin_layout LyX-Code
3     3.5
\end_layout

\begin_layout LyX-Code
4     2.0 
\end_layout

\begin_layout Subsection
go | run
\end_layout

\begin_layout Standard
Begin trajectory processing, followed by analysis and datafile write.
\end_layout

\begin_layout Subsection
help
\end_layout

\begin_layout LyX-Code
help
\begin_inset Index idx
status open

\begin_layout Plain Layout
help
\end_layout

\end_inset

 [ { All |
\end_layout

\begin_layout LyX-Code
	     <cmd> |
\end_layout

\begin_layout LyX-Code
 	    <command category> |
\end_layout

\begin_layout LyX-Code
 	    Form[ats] [{read|write}] |
\end_layout

\begin_layout LyX-Code
 	    Form[ats] [{trajin|trajout|readdata|writedata|parm|parmwrite} [<fmt
 key>]] |
\end_layout

\begin_layout LyX-Code
 	    Mask 	   } ]
\end_layout

\begin_layout LyX-Code
	Command Categories: Gen[eral] Sys[tem] Coor[ds] Traj[ectory] Top[ology]
\end_layout

\begin_layout LyX-Code
	                    Act[ion] Ana[lysis] Con[trol]
\end_layout

\begin_layout LyX-Code
  All                : Print all known commands.
\end_layout

\begin_layout LyX-Code
  <cmd>              : Print help for command <cmd>.
\end_layout

\begin_layout LyX-Code
  <command category> : Print all commands in specified category.
\end_layout

\begin_layout LyX-Code
  Form[ats]          : Help for file formats.
\end_layout

\begin_layout LyX-Code
  Mask               : Help for mask syntax.
\end_layout

\begin_layout Standard
If 'All' is specifed, list all commands known to 
\shape italic
cpptraj
\shape default
.
 If given with a command, print help for that command.
 Otherwise, list all commands of a certain category (General, System, Coords,
 Trajectory, Topology, Action, Analysis, or Control), help for various file
 formats, or help with atom mask syntax.
\end_layout

\begin_layout Subsection
list
\end_layout

\begin_layout LyX-Code
list <type>
\end_layout

\begin_layout LyX-Code
     (<type> = actions,trajin,trajout,ref,parm,analysis,datafile,dataset)
\end_layout

\begin_layout Standard
List the currently loaded objects of <type>.
 If no type is given then list all loaded objects.
\end_layout

\begin_layout Subsection
noexitonerror
\end_layout

\begin_layout LyX-Code
noexitonerror
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
noexitonerror
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Normally 
\shape italic
cpptraj
\shape default
 will exit if actions fail to initialize properly.
 If 
\series bold
\shape italic
noexitonerror
\series default
\shape default
 is specified, 
\shape italic
cpptraj
\shape default
 will attempt to continue past such errors.
 This is the default if in interactive mode.
\end_layout

\begin_layout Subsection
noprogress
\end_layout

\begin_layout LyX-Code
noprogress
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
noprogress
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Do not display read progress during trajectory processing.
\end_layout

\begin_layout Subsection
parallelanalysis
\end_layout

\begin_layout LyX-Code
parallelanalysis [sync]
\end_layout

\begin_layout Standard
MPI only.
 Divide all currently set up analyses as evenly as possible among available
 MPI processes and execute.
 Each analysis will get a single MPI process.
 If 
\series bold
sync
\series default
 is specified all data will be synced back to the master thread (for e.g.
 subsequent analysis).
 For an example of how to use the parallelanalysis command, see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_hausdorff"
plural "false"
caps "false"
noprefix "false"

\end_inset

.
\end_layout

\begin_layout Subsection
precision
\end_layout

\begin_layout LyX-Code
precision
\begin_inset Index idx
status open

\begin_layout Plain Layout
precision
\end_layout

\end_inset

 {<filename> | <dataset arg>} [<width>] [<precision>]
\end_layout

\begin_layout Standard
Set the precision for all data sets in data file <filename> or data set(s)
 specified by <dataset arg> to 
\shape italic
width.precision
\shape default
, where width is the column width and precision is the number of digits
 after the decimal point.
 Note that the <precision> argument only applies to floating-point data
 sets.
\end_layout

\begin_layout Standard
For example, if one wanted to set the precision of the output of an Rmsd
 calculation to 8.3, the input could be:
\end_layout

\begin_layout LyX-Code
trajin ../run0.nc 
\end_layout

\begin_layout LyX-Code
rms first :10-260 out prec.dat 
\end_layout

\begin_layout LyX-Code
precision prec.dat 8 3
\end_layout

\begin_layout Standard
and the output would look like:
\end_layout

\begin_layout LyX-Code
#Frame RMSD_00000
\end_layout

\begin_layout LyX-Code
1 0.000
\end_layout

\begin_layout LyX-Code
2 0.630
\end_layout

\begin_layout Subsection
random
\end_layout

\begin_layout LyX-Code
random [setdefault {marsaglia|stdlib|mt|pcg32|xo128}]
\end_layout

\begin_layout LyX-Code
   	[createset <name> count <#> [seed <#>]
\end_layout

\begin_layout LyX-Code
        settype {int|float01|gauss [mean <mean>] [sd <SD>]}]
\end_layout

\begin_deeper
\begin_layout Description
setdefault If specified, change the default random number generator (RNG).
\end_layout

\begin_deeper
\begin_layout Description
marsaglia Use the Marsaglia RNG that is used in the Amber MD programs sander/pme
md.
\end_layout

\begin_layout Description
stdlib Use the C standard library RNG.
\end_layout

\begin_layout Description
mt Use the C++11 implementation of the Mersenne twister (mt19937); only
 available with C++11 support.
\end_layout

\begin_layout Description
pcg32 Use the 32 bit version of the Permuted Congruential Generator.
\begin_inset CommandInset citation
LatexCommand citep
key "Oneill2014"
literal "true"

\end_inset


\end_layout

\begin_layout Description
xo128 Use the Xoshiro128++ RNG.
\begin_inset CommandInset citation
LatexCommand citep
key "Vigna2017"
literal "true"

\end_inset


\end_layout

\end_deeper
\begin_layout Description
createset If specified, create a 1D data set filled with random numbers
 of the specified type.
\end_layout

\begin_deeper
\begin_layout Description
<name> Name of created set.
\end_layout

\begin_layout Description
count
\begin_inset space ~
\end_inset

<#> The number of elements to put into the set.
\end_layout

\begin_layout Description
settype
\begin_inset space ~
\end_inset

{int|float01|gauss} Type of numbers to use; integer, floating point between
 0 and 1, Gaussian distribution.
\end_layout

\begin_deeper
\begin_layout Description
mean
\begin_inset space ~
\end_inset

<mean> Mean of distribution for 'gauss'.
\end_layout

\begin_layout Description
sd
\begin_inset space ~
\end_inset

<SD> Standard deviation of distribution for 'gauss'.
\end_layout

\end_deeper
\begin_layout Description
seed
\begin_inset space ~
\end_inset

<#> Optional seed for the RNG.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
This command can be used to set the default random number generator used
 in CPPTRAJ, and/or create a 1D data set filled with random values.
\end_layout

\begin_layout Subsection
readdata
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_readdata"

\end_inset


\end_layout

\begin_layout LyX-Code
readdata
\begin_inset Index idx
status open

\begin_layout Plain Layout
readdata
\end_layout

\end_inset

 <filename>  [name <dsname>] [as <fmt>] [separate] [<format options>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
name
\begin_inset space ~
\end_inset

<dsname> Name for read-in data set(s).
 Default is <filename>.
\end_layout

\begin_layout Description
as
\begin_inset space ~
\end_inset

<fmt> Force <filename> to be read as a specific format using given format
 keyword.
\end_layout

\begin_layout Description
separate Read each file specified into separate data sets indexed from 0.
\end_layout

\end_deeper
\begin_layout Standard
Read data from file <filename> and store as data sets.
 For more information on formats currently recognized by cpptraj see 
\begin_inset CommandInset ref
LatexCommand vref
reference "tab:cpptraj-DataFile-formats"

\end_inset

.
 For format-specific options see 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Datafile-Commands"

\end_inset

.
 For example, given the file calc.dat:
\end_layout

\begin_layout LyX-Code
#Frame  R0   D1
\end_layout

\begin_layout LyX-Code
1      1.7 2.22
\end_layout

\begin_layout Standard
The command '
\family typewriter
readdata calc.dat
\family default
' would read data into two data sets, calc.dat:2 (legend set to 
\begin_inset Quotes eld
\end_inset

R0
\begin_inset Quotes erd
\end_inset

) and calc.dat:3 (legend set to 
\begin_inset Quotes eld
\end_inset

D1
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Subsection
readensembledata
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_readensembledata"

\end_inset


\end_layout

\begin_layout LyX-Code
readensembledata <filename> [filenames <additional files>] [<readdata args>]
\end_layout

\begin_deeper
\begin_layout Description
<filename> Lowest replica file name.
\end_layout

\begin_layout Description
filenames
\begin_inset space ~
\end_inset

<additional
\begin_inset space ~
\end_inset

files> Specified additional members of the ensemble.
 If not specified ensemble members will be search for using numerical extensions.
\end_layout

\begin_layout Description
<readdata
\begin_inset space ~
\end_inset

args> Additional data file arguments.
\end_layout

\end_deeper
\begin_layout Standard
Read data sets as an ensemble, i.e.
 each file is a different member of an ensemble.
 This command is MPI-aware.
\end_layout

\begin_layout Standard
If one filename is given, it is assumed it is the "lowest" member of an
 ensemble with a numerical extension, e.g.
 'file.001' and the remaining files are searched for automatically.
 Otherwise all other members of the ensemble can be specified with 
\series bold
'filenames'
\series default
 and a comma-separated list e.g.
 'file.001 filenames file.002,file.003,file.004.
 For additional 'readdata' arguments that can be passed in see 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

.
\end_layout

\begin_layout Standard
For example, to read in data files named cpout.001 to cpout.006 automatically:
\end_layout

\begin_layout LyX-Code
readensembledata cpout.001 cpin cpin name PH
\end_layout

\begin_layout Standard
Or specified:
\end_layout

\begin_layout LyX-Code
readensembledata cpout.001 
\backslash

\end_layout

\begin_layout LyX-Code
                 filenames cpout.002,cpout.003,cpout.004,cpout.005,cpout.006
 
\backslash

\end_layout

\begin_layout LyX-Code
                 cpin cpin name PH 
\end_layout

\begin_layout Subsection
readinput
\end_layout

\begin_layout LyX-Code
readinput
\begin_inset Index idx
status open

\begin_layout Plain Layout
readinput
\end_layout

\end_inset

 <filename>
\end_layout

\begin_layout Standard
Read 
\shape italic
cpptraj
\shape default
 commands from file <filename>.
\end_layout

\begin_layout Subsection
removedata
\end_layout

\begin_layout LyX-Code
removedata <arg>
\end_layout

\begin_layout Standard
Remove data set corresponding to <arg>.
\end_layout

\begin_layout Subsection
rst
\end_layout

\begin_layout LyX-Code
rst <mask1> <mask2> [<mask3>] [<mask4>]
\end_layout

\begin_layout LyX-Code
    r1 <r1> r2 <r2> r3 <r3> r4 <r4> rk2 <rk2> rk3 <rk3>
\end_layout

\begin_layout LyX-Code
    {[parm <parmfile / tag> | parmindex <#>]}
\end_layout

\begin_layout LyX-Code
    [{ref <refname> | refindex <#> | reference} [offset <off>] [width <width>]]
\end_layout

\begin_layout LyX-Code
    [out <outfile>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<mask1> (Required) First atom mask.
\end_layout

\begin_layout Description
<mask2> (Required) Second atom mask.
 If only two masks assume distance restraint.
\end_layout

\begin_layout Description
[<mask3>] (Optional) Third atom mask.
 If 3 atom masks assume angle restraint.
\end_layout

\begin_layout Description
[<mask4>] (Optional) Fourth atom mask.
 If 4 atom masks assume dihedral restraint.
\end_layout

\begin_layout Description
rX
\begin_inset space ~
\end_inset

<rX> Value of RX (X=1-4, default 0.0)
\end_layout

\begin_layout Description
rk2
\begin_inset space ~
\end_inset

<rk2> Value of RK2 (force constant to be applied when R is R1 <= R < R2)
\end_layout

\begin_layout Description
rk3
\begin_inset space ~
\end_inset

<rk3> Value of RK3 (force constant to be applied when R is R3 <= R < R4)
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile
\begin_inset space ~
\end_inset

/
\begin_inset space ~
\end_inset

tag>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>] Topology to be used for atom masks.
\end_layout

\begin_layout Description
{ref
\begin_inset space ~
\end_inset

<refname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

reference} Use distance/angle/dihedral in reference structure to determine
 values for r1, r2, r3, and r4.
 The value of r2 is set to <r2> + <off>, r3 = r2, r1 = r2 - <width>, r4
 = r3 + <width>.
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<off>] (Reference only) Value to offset distance/angle/torsion in reference
 by (default 0.0).
\end_layout

\begin_layout Description
[width
\begin_inset space ~
\end_inset

<width>] (Reference only) Width between r1 and r2, r3 and r4 (default 0.5).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfile>] Write restraints to outfile.
 If not specified, write to STDOUT.
\end_layout

\end_deeper
\begin_layout Standard
Generate Amber-style distance restraints for use with nmropt=1.
 This is particularly useful for generating distance restraints based off
 of reference coordinates.
 For example to generate a distance restraint between two C5' atoms using
 the current distance between them in a reference structure, offsetting
 the distance by 1.0 Ang.:
\end_layout

\begin_layout LyX-Code
parm 30bp-longbox-tip3p-na.parm7
\end_layout

\begin_layout LyX-Code
reference 30bp-longbox.rst7 
\end_layout

\begin_layout LyX-Code
rst :1@C5' :31@C5' reference offset 1.0 rk2 10.0 rk3 10.0 out output
\end_layout

\begin_layout Subsection
runanalysis
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_runanalysis"

\end_inset


\end_layout

\begin_layout LyX-Code
runanalysis [<analysiscmd> [<analysis args>]]
\end_layout

\begin_layout Standard
Run given analysis command immediately and write any data generated.
 If no command is given run any analysis currently set up.
 NOTE: When 'runanalysis' is specified alone, data is not automatically
 written; to write data generated with 'runanalysis' use the 'writedata'
 command (this allows multiple analysis runs between output if desired).
\end_layout

\begin_layout Subsection
select
\end_layout

\begin_layout LyX-Code
select
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
select
\end_layout

\end_inset

 <mask>
\end_layout

\begin_layout Standard
Prints the number of selected atoms corresponding to the given mask, as
 well as the atom numbers with format:
\end_layout

\begin_layout LyX-Code
Selected= <#atom1> <#atom2> ...
\end_layout

\begin_layout Standard
This does not affect the state in any way, but is intended for use in scripts
 etc.
 for testing the results of a mask expression.
\end_layout

\begin_layout Subsection
selectds
\end_layout

\begin_layout LyX-Code
selectds <dataset arg>
\end_layout

\begin_layout Standard
Show the results of a data set selection.
 Data set selection has the format:
\end_layout

\begin_layout LyX-Code
<name>[<aspect>]:<index>
\end_layout

\begin_layout Standard
Either the [<aspect>] or the <index> arguments may be omitted.
 A '*' can be used in place of <name> or [<aspect>] as a wildcard.
 The <index> argument can be a single number or a range separated by '-'
 and ','.
\end_layout

\begin_layout Standard
This command does not affect the state in any way, but is particularly useful
 in interactive mode for determining the results of a dataset argument.
\end_layout

\begin_layout Subsection
sortensembledata
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_sortensembledata"

\end_inset


\end_layout

\begin_layout LyX-Code
sortensembledata <dset arg0> [<dset arg1> ...]
\end_layout

\begin_deeper
\begin_layout Description
<dset
\begin_inset space ~
\end_inset

arg0>
\begin_inset space ~
\end_inset

[<dset
\begin_inset space ~
\end_inset

arg1>
\begin_inset space ~
\end_inset

...] Data set(s) to sort.
\end_layout

\end_deeper
\begin_layout Standard
Sort unsorted data sets.
 Currently only works for constant pH REMD data.
\end_layout

\begin_layout Subsection
usediskcache
\end_layout

\begin_layout LyX-Code
usediskcache {on|off}
\end_layout

\begin_layout Standard
If on, CPPTRAJ will attempt to cache data sets to disk if possible.
 This currently only works for integer data sets (e.g.
 
\series bold
\emph on
hbond
\series default
\emph default
 
\series bold
series
\series default
 data sets, etc).
\end_layout

\begin_layout Subsection
write | writedata
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_writedata"

\end_inset


\end_layout

\begin_layout LyX-Code
write [<filename> <datasetname0> [<datasetname1> ...]] [<DataFile Options>]
\end_layout

\begin_layout Standard
With no arguments, write all files currently in the data file list.
 Otherwise, write specified data set(s) to <filename>.
 This is like the 'create' command except a data file is not added to the
 data file list; it is written immediately.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

 for more data file format options.
\end_layout

\begin_layout Subsection
System Commands
\end_layout

\begin_layout Standard
These commands call the equivalent external system commands.
 
\end_layout

\begin_layout Description
gnuplot
\begin_inset space ~
\end_inset

<args> Call 
\family typewriter
gnuplot
\family default
 (if it is installed on your system) with the given arguments.
\end_layout

\begin_layout Description
head
\begin_inset space ~
\end_inset

<args> Call 
\family typewriter
head
\family default
, which lists the first few lines of a file.
\end_layout

\begin_layout Description
less
\begin_inset space ~
\end_inset

<args> Call 
\family typewriter
less
\family default
, which can be used to view the contents of a file.
\end_layout

\begin_layout Description
ls
\begin_inset space ~
\end_inset

<args> List the contents of a directory.
\end_layout

\begin_layout Description
pwd
\begin_inset space ~
\end_inset

<args> Print the current working directory.
\end_layout

\begin_layout Description
xmgrace
\begin_inset space ~
\end_inset

<args> Call 
\family typewriter
xmgrace
\family default
 (if it is installed on your system) with the given arguments.
\end_layout

\begin_layout Section
Topology File Commands
\end_layout

\begin_layout Standard
These commands control the reading and writing of topology files.
 Cpptraj supports the following topology file formats:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Format
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Keyword
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Extension
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Notes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber Topology
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
amber
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.parm7
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Only fully-supported format for write.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PDB 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pdb
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.pdb
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CIF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cif
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.cif
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm PSF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
psf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.psf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Limited Write
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs Topology
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gromacs
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.top
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SDF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.sdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Tinker ARC
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
arc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.arc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\begin_inset CommandInset label
LatexCommand label
name "tab:cpptraj-Topology-formats"

\end_inset


\end_layout

\begin_layout Standard
For most commands that require a topology one can be specified via two keywords:
\end_layout

\begin_layout Description
parm
\begin_inset space ~
\end_inset

[<name>] Select topology corresponding to given file name, tag, or name.
\end_layout

\begin_layout Description
parmindex
\begin_inset space ~
\end_inset

[<#>] Select topology by order in which it was loaded, starting from 0.
\end_layout

\begin_layout Standard
The following topology related commands are available:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="21" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
angleinfo, angles, printangles
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print angle info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
atominfo, atoms, printatoms
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print details for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bondinfo, bonds, printbonds
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print bond info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
change
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Change specified parts of a topology.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
charge
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print total charge for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
comparetop
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Compare two topologies and report differences.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dihedralinfo, dihedrals, printdihedrals
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print dihedral info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
improperinfo, impropers, printimpropers
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print improper info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mass
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print total mass for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
molinfo
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print molecule info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Load a topology file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parmbox
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Modify box info for a loaded topology.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parminfo
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print details for selected topology.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parmstrip
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove selected atoms from topology.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
parmwrite
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write selected topology to file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
printub, ubinfo
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print Urey-Bradley info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
resinfo
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print residue info for selected atoms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
scaledihedralk
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Scale selected dihedral force constants.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
solvent
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Change which molecules are considered solvent.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
updateparameters
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Update/add parameters in/to a topology.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
angleinfo | angles | printangles
\end_layout

\begin_layout LyX-Code
angleinfo [parm <name> | parmindex <#> | <#>] [<mask1>] [<mask2> <mask3>]
\end_layout

\begin_layout LyX-Code
          [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask1>] Mask to print angle info for.
\end_layout

\begin_layout Description
[<mask2>
\begin_inset space ~
\end_inset

<mask3>] If specified, angles must match all masks.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
Print angle information of atoms in <mask> for selected topology (first
 loaded topology by default) with format:
\end_layout

\begin_layout LyX-Code
# Angle Kthet degrees atom names (numbers)
\end_layout

\begin_layout Standard
Where 
\family typewriter
Angle
\family default
 is the internal angle index, 
\family typewriter
Kthet
\family default
 is the angle force constant, 
\family typewriter
degrees
\family default
 is the angle equilibrium value, 
\family typewriter
atom names
\family default
 shows the atoms involved in the angle with format 
\family typewriter
:<residue num>@<atom name>
\family default
, and 
\family typewriter
(numbers)
\family default
 shows the atom indices involved in a comma-separated list.
 Atom types will be shown in the last column.
\end_layout

\begin_layout Standard
If 3 masks are given instead of 1, print info for angles with first atom
 in <mask1>, second atom in <mask2>, and third atom in <mask3>.
\end_layout

\begin_layout Subsection
atominfo | atoms | printatoms
\end_layout

\begin_layout LyX-Code
atominfo [parm <name> | parmindex <#> | <#>] [<mask>] [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask>] Mask selecting atoms to print info for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
Print information on atoms in <mask> for selected topology (first loaded
 topology by default) with format:
\end_layout

\begin_layout LyX-Code
#Atom Name #Res Name #Mol Type Charge Mass GBradius El [rVDW] [eVDW]
\end_layout

\begin_layout Standard
where 
\family typewriter
#Atom
\family default
 is the internal atom index, the first 
\family typewriter
Name
\family default
 column is the atom name, 
\family typewriter
#Res
\family default
 is the atom's residue number, the second 
\family typewriter
Name
\family default
 column is residue name, 
\family typewriter
#Mol
\family default
 is the atom's molecule number, 
\family typewriter
Type
\family default
 is the atom's type (certain topologies only), 
\family typewriter
Charge
\family default
 is the atom charge (in units of electron charge), 
\family typewriter
Mass
\family default
 is the atom's mass (in amu), 
\family typewriter
GBradius
\family default
 is the generalized Born radius of the atom (Amber topologies only), and
 
\family typewriter
El
\family default
 is the 2 character element string.
 The final two columns are only shown if the topology contains non-bonded
 parameters: 
\family typewriter
rVDW
\family default
 is the atom's Lennard-Jones radius and 
\family typewriter
eVDW
\family default
 is the atom's Lennard-Jones epsilon.
\end_layout

\begin_layout Subsection
bondinfo | bonds | printbonds
\end_layout

\begin_layout LyX-Code
bondinfo [parm <name> | parmindex <#> | <#>] 
\end_layout

\begin_layout LyX-Code
         [<mask1>] [<mask2>] [out <file>] [nointrares]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask1>] Mask to print bond info for.
\end_layout

\begin_layout Description
[<mask2>] If specified, bonds must match both masks.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\begin_layout Description
[nointrares] Do not print intra-residue bonds.
\end_layout

\end_deeper
\begin_layout Standard
Print bond information for atoms in <mask> for selected topology (first
 loaded topology by default) with format:
\end_layout

\begin_layout LyX-Code
# Bond Kb Req atom names (numbers)
\end_layout

\begin_layout Standard
where 
\family typewriter
Bond
\family default
 is the internal bond index, 
\family typewriter
Kb
\family default
 is the bond force constant, 
\family typewriter
Req
\family default
 is the bond equilibrium value (in Angstroms), 
\family typewriter
atom names
\family default
 shows both atom names with format 
\family typewriter
:<residue num>@<atom name>
\family default
, and 
\family typewriter
(numbers)
\family default
 shows both atom numbers in a comma-separated list.
 Atom types will be shown in the last column.
\end_layout

\begin_layout Standard
If 2 masks are given instead of 1, print info for bonds with first atom
 in <mask1> and second atom in <mask2>.
\end_layout

\begin_layout Subsection
change
\end_layout

\begin_layout LyX-Code
change [parm <name> | parmindex <#> | <#> |
\end_layout

\begin_layout LyX-Code
        crdset <COORDS set> ]
\end_layout

\begin_layout LyX-Code
	{ resname from <mask> to <value> |
\end_layout

\begin_layout LyX-Code
      chainid of <mask> to <value> |
\end_layout

\begin_layout LyX-Code
      oresnums of <mask> min <range min> max <range max> |
\end_layout

\begin_layout LyX-Code
	  icodes of <mask> min <char min> max <char max> resnum <#> |
\end_layout

\begin_layout LyX-Code
	  atomname from <mask> to <value> |
\end_layout

\begin_layout LyX-Code
      addbond <mask1> <mask2> [req <length> <rk> <force constant>]
\end_layout

\begin_layout LyX-Code
      removebonds <mask1> [<mask2>] [out <file>] }
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

crdset
\begin_inset space ~
\end_inset

<COORDS
\begin_inset space ~
\end_inset

set> Topology to change.
\end_layout

\begin_layout Description
resname
\begin_inset space ~
\end_inset

from
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

to
\begin_inset space ~
\end_inset

<value> Change residue names for residues in <mask> to the given <value>.
\end_layout

\begin_layout Description
chainid
\begin_inset space ~
\end_inset

of
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

to
\begin_inset space ~
\end_inset

<value> Change the chain ID of residues in <mask> to given <value>.
\end_layout

\begin_layout Description
oresnums
\begin_inset space ~
\end_inset

of
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

min
\begin_inset space ~
\end_inset

<range
\begin_inset space ~
\end_inset

min>
\begin_inset space ~
\end_inset

max
\begin_inset space ~
\end_inset

<range
\begin_inset space ~
\end_inset

max> Change original residue numbers (to e.g.
 original PDB numbers) of residues in <mask> to a range starting from <min>
 and ending with <max>.
\end_layout

\begin_layout Description
icode
\begin_inset space ~
\end_inset

of
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

min
\begin_inset space ~
\end_inset

<char
\begin_inset space ~
\end_inset

min>
\begin_inset space ~
\end_inset

max
\begin_inset space ~
\end_inset

<char
\begin_inset space ~
\end_inset

max>
\begin_inset space ~
\end_inset

<resnum>
\begin_inset space ~
\end_inset

<#> Change residue insertion codes of residues in <mask> to a range of character
s starting from <min> and ending with <max>; set the original residue number
 to <resnum>.
\end_layout

\begin_layout Description
atomname
\begin_inset space ~
\end_inset

from
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

to
\begin_inset space ~
\end_inset

<value> Change atom names for atoms in <mask> to the given <value>.
\end_layout

\begin_layout Description
addbond
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

<mask2> Add bond between atom specified by <mask1> and atom specified by
 <mask2>.
\end_layout

\begin_deeper
\begin_layout Description
[req
\begin_inset space ~
\end_inset

<length>] The equilibrium bond length in Angstroms.
\end_layout

\begin_layout Description
[rk
\begin_inset space ~
\end_inset

<force
\begin_inset space ~
\end_inset

constant>] The bond force constant in kcal/mol*Angstrom.
\end_layout

\end_deeper
\begin_layout Description
removebonds
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

[<mask2>] Remove bonds from atoms in <mask1>.
 If <mask2> also given, remove bonds between atoms in <mask1> and atoms
 in <mask2>.
\end_layout

\begin_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] If specified, write removed bonds to <file> with format '<residue
 name> <residue num> <atom name> <atom num>'.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Change specified parts of the specified topology.
 For example, to change atoms named 'HN' to 'H' in topology 0:
\end_layout

\begin_layout LyX-Code
change parmindex 0 atomname from @HN to H
\end_layout

\begin_layout Subsection
charge
\end_layout

\begin_layout LyX-Code
charge [parm <name> | parmindex <#> | <#>] [<mask>] [out <file>] [name <set>]
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> Topology to calculate charge from.
\end_layout

\begin_layout Description
[<mask>] Atom(s) to calculate total charge for (default all).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write total charge to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<set>] If specified, a data set named <set> will be cretaed containing total
 charge.
\end_layout

\end_deeper
\begin_layout Standard
Print the total charge of atoms in <mask> (in units of electron charge)
 for selected topology (first loaded topology by default).
\end_layout

\begin_layout Subsection
comparetop
\end_layout

\begin_layout LyX-Code
comparetop {parm <name> | parmindex <#>} {parm <name> | parmindex <#>} [out
 <file>]
\end_layout

\begin_layout LyX-Code
           [atype] [lj] [bnd] [ang] [dih] [atoms]
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> Topologies to compare.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<file> Print results to file instead of screen.
\end_layout

\begin_layout Description
[atype] Only report atom type differences.
\end_layout

\begin_layout Description
[lj] Only report differences in Lennard-Jones parameters.
\end_layout

\begin_layout Description
[bnd] Only report differences in bond parameters.
\end_layout

\begin_layout Description
[ang] Only report differences in angle parameters.
\end_layout

\begin_layout Description
[dih] Only report differences in dihedral parmeters.
\end_layout

\begin_layout Description
[atoms] Only report differences in atom properties.
\end_layout

\end_deeper
\begin_layout Standard
Compare and report differences in atoms/parameters between two topologies.
 Differences are reported in standard 'diff' format, with '<' prefix indicating
 the parameter is from the first topology and '>' prefix indicating the
 parameter is from the second topology.
\end_layout

\begin_layout Subsection
dihedralinfo | dihedrals | printdihedrals
\end_layout

\begin_layout LyX-Code
dihedralinfo [parm <name> | parmindex <#> | <#>] [<mask1>] [<mask2> <mask3>
 <mask4>]
\end_layout

\begin_layout LyX-Code
             [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask1>] Mask to print dihedral info for.
\end_layout

\begin_layout Description
[<mask2>
\begin_inset space ~
\end_inset

<mask3>
\begin_inset space ~
\end_inset

<mask4>] If specified, dihedrals must match all masks.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
Print dihedral information of atoms in <mask> for selected topology (first
 loaded topology by default) with format:
\end_layout

\begin_layout LyX-Code
#Dihedral pk phase pn atoms
\end_layout

\begin_layout Standard
where 
\family typewriter
#Dihedral
\family default
 is the internal dihedral index, 
\family typewriter
pk
\family default
 is the dihedral force constant, 
\family typewriter
phase
\family default
 is the dihedral phase, 
\family typewriter
pn
\family default
 is the dihedral periodicity, and 
\family typewriter
atoms
\family default
 shows the names of the atoms involved in the angle with format 
\family typewriter
:<residue num>@<atom name>
\family default
, followed by the atom indices involved in a comma-separated list.
 In addition if the dihedral is an end dihedral, improper dihedral, or both
 it will be prefaced with an 
\family typewriter
E
\family default
, 
\family typewriter
I
\family default
, or 
\family typewriter
B
\family default
 respectively.
 Atom types will be shown in the last column.
\end_layout

\begin_layout Standard
If 4 masks are given instead of 1, print info for dihedrals with first atom
 in <mask1>, second atom in <mask2>, third atom in <mask3>, and fourth atom
 in <mask4>.
\end_layout

\begin_layout Subsection
improperinfo | impropers | printimpropers
\end_layout

\begin_layout LyX-Code
improperinfo [parm <name> | parmindex <#> | <#>] [<mask1>] [<mask2> <mask3>
 <mask4>]
\end_layout

\begin_layout LyX-Code
             [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask1>] Mask to print improper info for.
\end_layout

\begin_layout Description
[<mask2>
\begin_inset space ~
\end_inset

<mask3>
\begin_inset space ~
\end_inset

<mask4>] If specified, impropers must match all masks.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
For specified topology (first by default) either print CHARMM improper info
 for all atoms in <mask1>, or print info for dihedrals with first atom in
 <mask1>, second atom in <mask2>, third atom in <mask3>, and fourth atom
 in <mask4>.
\end_layout

\begin_layout Subsection
mass
\end_layout

\begin_layout LyX-Code
[<parmindex>] [parm <name> | parmindex <#> | <#>] [<mask>] [out <file>]
 [name <set>]
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> Topology to calculate mass from.
\end_layout

\begin_layout Description
[<mask>] Atom(s) to calculate total mass for (default all).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write total mass to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<set>] If specified, a data set named <set> will be cretaed containing total
 mass.
\end_layout

\end_deeper
\begin_layout Standard
Print the total mass of atoms in <mask> (in amu) for selected topology (first
 loaded topology by default).
\end_layout

\begin_layout Subsection
molinfo
\end_layout

\begin_layout LyX-Code
molinfo [parm <name> | parmindex <#> | <#>] [<mask>] [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask>] Mask selecting molecules to print info for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
Print molecule information for atoms in <mask> for selected topology (first
 loaded topology by default) with format:
\end_layout

\begin_layout LyX-Code
#Mol  Natom  #Res Name C [SOLVENT]
\end_layout

\begin_layout Standard
where 
\family typewriter
#Mol
\family default
 is the molecule number, 
\family typewriter
Natom
\family default
 is the number of atoms in the molecule, 
\family typewriter
#Res
\family default
 and 
\family typewriter
Name
\family default
 are the residue number and residue name of the first residue in the molecule
 respectively, and C is the chain ID of the first residue.
 
\family typewriter
SOLVENT
\family default
 will be printed if the molecule is currently considered a solvent molecule.
\end_layout

\begin_layout Subsection
parm
\end_layout

\begin_layout LyX-Code
parm
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parm
\end_layout

\end_inset

 <filename> [{[TAG] | name <setname>}] 
\end_layout

\begin_layout LyX-Code
     [{ nobondsearch |
\end_layout

\begin_layout LyX-Code
        [bondsearch <offset>] [searchtype {grid|pairlist}]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
      }] [nomolsearch] [renumresidues]
\end_layout

\begin_deeper
\begin_layout Description

\series bold
<filename>
\series default
 Parameter file to read in; format is auto-detected.
\end_layout

\begin_layout Description

\series bold
'[TAG]'
\series default
 Optional tag (bounded in brackets) which can be referred to in place of
 the topology file name in order to simplify references to it (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:Parameter/Reference-Tagging"

\end_inset

 for examples of how to use tags).
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Optional name that can be used to refer to the topology in place
 of the file name.
\end_layout

\begin_layout Description

\series bold
[bondsearch <offset>]
\series default
 Optional; when searching for bonds via geometry search (default for Topologies
 without bond information) add <offset> to distances (default 0.2 Å).
 Increase this if your system includes unusually long bonds.
\end_layout

\begin_layout Description
[searchtype
\begin_inset space ~
\end_inset

{grid|pairlist}] Change search algorithm from the default search between
 residues algorithm:
\end_layout

\begin_deeper
\begin_layout Description
grid Uses a grid when searching for bonds between residues.
 This can find bonds between residues that are not sequential (e.g.
 disulfide bonds).
\end_layout

\begin_layout Description
pairlist Uses a pair list to search for bonds between atoms.
 This can potentially find bonds across periodic boundaries, but is the
 more experimental of the two.
\end_layout

\end_deeper
\begin_layout Standard

\series bold
Advanced Options - Not recommended for general use
\end_layout

\begin_layout Description

\series bold
[nobondsearch]
\series default
 If specified do not search for bonds via geometry if Topology does not
 include bond information.
 May cause some Actions to fail.
\end_layout

\begin_layout Description
[nomolsearch] If specified do not search for molecule information.
 May cause some Actions to fail.
\end_layout

\begin_layout Description
[renumresidues] If specified, ensure that any residue cannot be part of
 more than 1 molecule (can occur with e.g.
 alternate sites).
 Residues will be renumbered according to molecule information in that case.
\end_layout

\end_deeper
\begin_layout Standard
Read in parameter file.
 The file format will be auto-detected.
 Current formats recognized by cpptraj are listed 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "tab:cpptraj-Topology-formats"

\end_inset

.
 If the file does not contain bond information, cpptraj will attempt to
 assign bonds based on a simple distance search of atoms within and between
 residues.
 The distance cutoff for determining bonds between atoms depends on the
 elements of the two atoms in question, augmented by <offset>.
 Molecule information is then determined from bond information.
\end_layout

\begin_layout Subsubsection

\emph on
PDB format:
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-parm-pdb"

\end_inset


\end_layout

\begin_layout LyX-Code
[pqr] [readbox] [conect] [noconect] [link] [nolink] [keepaltloc <char>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[pqr] Read charge and radius information from the occupancy and B-factor
 columns.
\end_layout

\begin_layout Description
[readbox] Read unit cell information from CRYST1 record if present.
\end_layout

\begin_layout Description
[conect] Read CONECT records if present (default).
\end_layout

\begin_layout Description
[noconect] Do not read in CONECT records from PDB file.
\end_layout

\begin_layout Description
[link] Read LINK records if present.
 
\end_layout

\begin_layout Description
[nolink] Do not read LINK records if present (default).
\end_layout

\begin_layout Description
[keepaltloc
\begin_inset space ~
\end_inset

<char>] If specified, only keep alternate atom location IDs matching the
 specified character 
\series bold
<char>
\series default
.
\end_layout

\end_deeper
\begin_layout Paragraph*

\series bold
IMPORTANT NOTES FOR PDB FILES
\end_layout

\begin_layout Standard
Sometimes PDB files can contain alternate coordinates for the same atom
 in a residue, e.g.:
\end_layout

\begin_layout LyX-Code
ATOM    806  CA ACYS A 105       6.460 -34.012 -21.801  0.49 32.23 
\end_layout

\begin_layout LyX-Code
ATOM    807  CB ACYS A 105       6.054 -33.502 -20.415  0.49 35.28
\end_layout

\begin_layout LyX-Code
ATOM    808  CA BCYS A 105       6.468 -34.015 -21.815  0.51 32.42
\end_layout

\begin_layout LyX-Code
ATOM    809  CB BCYS A 105       6.025 -33.499 -20.452  0.51 35.38
\end_layout

\begin_layout Standard
If this is the case 
\shape italic
cpptraj
\shape default
 will print a warning about alternate location IDs being present but will
 take no other action.
 Both residues are considered 'CYS' and the mask ':CYS@CA' would select
 both atom 806 and 808.
 If desired, a specific location ID can be kept via the 
\series bold
keepaltloc
\series default
 keyword.
 If 
\series bold
keepaltloc
\series default
 is specified, it should also be specified for any 
\series bold
trajin
\series default
 commands (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-trajin-pdb"
plural "false"
caps "false"
noprefix "false"

\end_inset

).
 Residue insertion codes are read in but also not used by the mask parser.
\end_layout

\begin_layout Subsubsection
Charmm PSF:
\end_layout

\begin_layout LyX-Code
[param <file>]
\end_layout

\begin_deeper
\begin_layout Description
[param
\begin_inset space ~
\end_inset

<file>] Read CHARMM parameters from given file.
 Can do multiple times.
\end_layout

\end_deeper
\begin_layout Subsection
parmbox
\end_layout

\begin_layout LyX-Code
parmbox
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parmbox
\end_layout

\end_inset

 [parm <name> | parmindex <#> | <#>] [nobox] [truncoct]
\end_layout

\begin_layout LyX-Code
    	[x <xval>] [y <yval>] [z <zval>] [alpha <a>] [beta <b>] [gamma <g>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology to modify.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[nobox] Remove box information.
\end_layout

\begin_layout Description
[truncoct] Set truncated octahedon angles with lengths equal to <xval>.
\end_layout

\begin_layout Description
[x
\begin_inset space ~
\end_inset

<xval>] Box X length.
\end_layout

\begin_layout Description
[y
\begin_inset space ~
\end_inset

<yval>] Box Y length.
\end_layout

\begin_layout Description
[z
\begin_inset space ~
\end_inset

<zval>] Box Z length.
\end_layout

\begin_layout Description
[alpha
\begin_inset space ~
\end_inset

<a>] Box alpha angle.
\end_layout

\begin_layout Description
[beta
\begin_inset space ~
\end_inset

<b>] Box beta angle.
\end_layout

\begin_layout Description
[gamma
\begin_inset space ~
\end_inset

<g>] Box gamma angle.
\end_layout

\end_deeper
\begin_layout Standard
Modify the box information for specified topology.
 Overwrites any box information if present with specified values; any that
 are not specified will remain unchanged.
 Note that unlike the 
\series bold
\shape italic
box
\series default
\shape default
 action this command affect box information immediately.
 This can be useful for e.g.
 removing box information from a parm when stripping solvent:
\end_layout

\begin_layout LyX-Code
parm mol.water.parm7
\end_layout

\begin_layout LyX-Code
parmstrip :WAT
\end_layout

\begin_layout LyX-Code
parmbox nobox
\end_layout

\begin_layout LyX-Code
parmwrite out strip.mol.nobox.parm7
\end_layout

\begin_layout Subsection
parminfo 
\end_layout

\begin_layout LyX-Code
parminfo
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parminfo
\end_layout

\end_inset

 [parm <name> | parmindex <#> | <#>] [<mask>]
\end_layout

\begin_layout Standard
Print a summary of information contained in the specified topology (first
 loaded topology by default) .
\end_layout

\begin_layout Subsection
parmstrip
\end_layout

\begin_layout LyX-Code
parmstrip
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parmstrip
\end_layout

\end_inset

 <mask> [parm <name> | parmindex <#> | <#>]
\end_layout

\begin_layout Standard
Strip atoms in 
\series bold
<mask>
\series default
 from specified topology (by default the first topology loaded).
 Note that unlike the 
\series bold
\emph on
strip
\series default
\emph default
 Action, this permanently modifies the topology for as long as 
\emph on
cpptraj
\emph default
 is running, so this should not be used if the topology is being used to
 read or write a trajectory via 
\series bold
\emph on
trajin
\series default
\emph default
/
\series bold
\emph on
trajout
\series default
\emph default
.
 This command can be used to quickly created stripped Amber topology files.
 For example, to strip all residues name WAT from a topology and write a
 new topology:
\end_layout

\begin_layout LyX-Code
parm mol.water.parm7
\end_layout

\begin_layout LyX-Code
parmstrip :WAT
\end_layout

\begin_layout LyX-Code
parmwrite out strip.mol.parm7
\end_layout

\begin_layout Subsection
parmwrite
\end_layout

\begin_layout LyX-Code
parmwrite
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parmwrite
\end_layout

\end_inset

 out <filename> [{parm <name> | parmindex <#> | <#> | crdset <setname>}]
\end_layout

\begin_layout LyX-Code
          [<fmt>] [nochamber]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> File to write to.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Topology to write out.
\end_layout

\begin_layout Description
[crdset
\begin_inset space ~
\end_inset

<setname>] Write topology from specified COORDS data set.
\end_layout

\begin_layout Description
[<fmt>] Format keyword.
 If not specified the file name extension will be used.
 Default is Amber Topology.
\end_layout

\begin_layout Description
[nochamber] (Amber topology only) Remove any CHAMBER information from the
 topology.
\end_layout

\end_deeper
\begin_layout Standard
Write out specified topology (first topology loaded by default) to 
\series bold
<filename>
\series default
 with format 
\series bold
<fmt>
\series default
 (Amber topology if not specified).
 Note that the Amber topology format is the only fully supported format
 for topology writes.
\end_layout

\begin_layout Subsubsection
Amber Topology
\end_layout

\begin_layout LyX-Code
[nochamber] [writeempty] [nopdbinfo]
\end_layout

\begin_deeper
\begin_layout Description
[nochamber] Do not write CHAMBER information to topology (useful for e.g.
 using topology for visualization with older versions of VMD).
\end_layout

\begin_layout Description
[writeempty] Write Amber tree, join, and rotate info even if not present.
\end_layout

\begin_layout Description
[nopdbinfo] Do not write "PDB" info (e.g.
 chain IDs, original res #s, etc).
\end_layout

\end_deeper
\begin_layout Subsubsection
Charmm PSF
\end_layout

\begin_layout LyX-Code
[oldpsf] [ext]
\end_layout

\begin_deeper
\begin_layout Description
[oldpsf] Write atom type indices instead of type names (not recommended).
\end_layout

\begin_layout Description
[ext] Use extended format.
\end_layout

\end_deeper
\begin_layout Subsection
printub | ubinfo
\end_layout

\begin_layout LyX-Code
printub [parm <name> | parmindex <#> | <#>] [<mask1>] [<mask2>] [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask1>] Atoms to print UB info for.
\end_layout

\begin_layout Description
[<mask2>] If specified, UB info must match both masks.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
For specified topology (first by default) either print CHARMM Urey-Bradley
 info for all atoms in <mask1>, or print info for bonds with first atom
 in <mask1> and second atom in <mask2>.
\end_layout

\begin_layout Subsection
resinfo
\end_layout

\begin_layout LyX-Code
resinfo
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
parmresinfo
\end_layout

\end_inset

 [parm <name> | parmindex <#> | <#>] [<mask>] [short [maxwidth <#res>]]
\end_layout

\begin_layout LyX-Code
        [out <file>]
\end_layout

\begin_deeper
\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

<#>] Name/tag or index of topology.
 Default is first loaded topology.
\end_layout

\begin_layout Description
[<mask>] Mask selecting residues to print info for.
\end_layout

\begin_layout Description
[short] Use a short 1 character residue name format
\end_layout

\begin_deeper
\begin_layout Description
[maxwidth
\begin_inset space ~
\end_inset

<#res>] Max # of residues to print in one line (default 50).
\end_layout

\end_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to print to (default STDOUT).
\end_layout

\end_deeper
\begin_layout Standard
Print residue information for atoms in <mask> for selected topology (first
 loaded topology by default) with format:
\end_layout

\begin_layout LyX-Code
#Res  Name First  Last Natom #Orig #Mol C
\end_layout

\begin_layout Standard
where 
\family typewriter
#Res
\family default
 is the residue number, 
\family typewriter
Name
\family default
 is the residue name, 
\family typewriter
First
\family default
 and 
\family typewriter
Last
\family default
 are the first and last atom numbers of the residue, 
\family typewriter
Natom
\family default
 is the total number of atoms in the residue, 
\family typewriter
#Orig
\family default
 is the original residue number (in PDB files), #Mol is the molecule number,
 and C is the chain ID.
\end_layout

\begin_layout Standard
If 
\series bold
short
\series default
 is specified then residues will be printed out in a condensed format.
 Each residue name will be shortened to 1 character, and residues are printed
 out in groups of 10, 5 groups to a line, with each line beginning with
 a residue number, e.g.
\end_layout

\begin_layout LyX-Code
> resinfo short 4 
\end_layout

\begin_layout LyX-Code
1        MGFLAGKKIL ITGLLSNKSI AYGIAKAMHR EGAELAFTYV GQFKDRVEKL 
\end_layout

\begin_layout LyX-Code
51       CAEFNPAAVL PCDVISDQEI KDLFVELGKV WDGLDAIVHS IAFAPRDQLE 
\end_layout

\begin_layout Standard
If the 1 character name for a residue is unknown it will be shown as the
 first letter of the residue name in lower-case.
\end_layout

\begin_layout Subsection
scaledihedralk
\end_layout

\begin_layout LyX-Code
scaledihedralk [parm <name> | parmindex <#>] <scale factor> [<mask> [useall]]
\end_layout

\begin_layout Standard
Scale dihedral force constants for dihderals selected by <mask> for specified
 topology.
 If 
\series bold
useall
\series default
 is specified all atoms in <mask> must be present to select a dihedral,
 otherwise any atom in <mask> will selected a dihedral.
\end_layout

\begin_layout Subsection
solvent
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_solvent"

\end_inset


\end_layout

\begin_layout LyX-Code
solvent [parm <name> | parmindex <#> | <#>] { <mask> | none }
\end_layout

\begin_layout Standard
Set solvent for selected topology (first loaded topology by default) based
 on 
\series bold
<mask>
\series default
, or set nothing as solvent if 
\series bold
none
\series default
 is specified.
\end_layout

\begin_layout Subsection
updateparameters
\end_layout

\begin_layout LyX-Code
parm <name> | parmindex <#> setname <parm set>
\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> Topology to update.
\end_layout

\begin_layout Description
setname
\begin_inset space ~
\end_inset

<parm
\begin_inset space ~
\end_inset

set> Topology or parameter data set containing parameters to use.
\end_layout

\end_deeper
\begin_layout Standard

\emph on
NOTE: This command is provided for convenience only.
 For editing topology files, ParmEd is a much better alternative.
\end_layout

\begin_layout Standard
Update parameters in specified topology with those from <parm set>.
 <parm set> can either be a parameter set or a topology.
 If a parameter from <parm set> does not exist in the topology it will be
 added.
\end_layout

\begin_layout Standard
For example, to modify parameters in a topology file named lys.parm7 with
 those from parameter file kcx.str:
\end_layout

\begin_layout LyX-Code
# Read Topology to modify
\end_layout

\begin_layout LyX-Code
parm lys.parm7
\end_layout

\begin_layout LyX-Code
# Read CHARMM parameters
\end_layout

\begin_layout LyX-Code
readdata kcx.str as charmmrtfprm name MyParm
\end_layout

\begin_layout LyX-Code
# Update parameters in Topology with those from kcx.str
\end_layout

\begin_layout LyX-Code
updateparameters parmindex 0 setname MyParm
\end_layout

\begin_layout LyX-Code
# Write out the updated Topology
\end_layout

\begin_layout LyX-Code
parmwrite out lys.kcx.parm7 
\end_layout

\begin_layout Section
Trajectory File Commands
\end_layout

\begin_layout Standard
These commands control the reading and writing of trajectory files.
 There are three trajectory types in 
\shape italic
cpptraj
\shape default
: input, output, and reference.
 In 
\shape italic
cpptraj
\shape default
, 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.
\end_layout

\begin_layout Standard
Cpptraj currently understands the following trajectory file formats:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="22" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="25text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Format
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Keyword(s)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Extension
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Notes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber Trajectory
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.crd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Default format if keywords/extensions not recognized.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber NetCDF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cdf, netcdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.nc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
No compression.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber Restart
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
restart
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.rst7, .rst
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Amber NetCDF Restart
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ncrestart, restartnc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.ncrst
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm 
\begin_inset Quotes eld
\end_inset

DCD
\begin_inset Quotes erd
\end_inset

 Trajectory
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dcd, charmm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.dcd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm COORdinates
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cor
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.cor
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Charmm Restart
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
charmmres
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.res
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PDB
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pdb
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.pdb
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.mol2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Scripps Binpos
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
binpos
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.binpos
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs TRR
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
trr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.trr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs GRO
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gro
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.gro
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs XTC
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
xtc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.xtc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gromacs TNG
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
tng
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.tng
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CIF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cif
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.cif
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Tinker ARC
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
arc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.arc
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SQM Input
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sqm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.sqm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SDF
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.sdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XYZ
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
xyz
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.xyz
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Desmond DTR (Anton)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dtr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.dtr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LMOD Conflib
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
conflib
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.conflib
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read Only, Detection by extension
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\begin_inset CommandInset label
LatexCommand label
name "tab:cpptraj-trajformats"

\end_inset


\end_layout

\begin_layout Standard
The following trajectory-related commands are available:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ensemble
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set up a trajectory ensemble for reading during a run.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ensemblesize
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
(MPI only) specify number of members expected in subsequent 
\series bold
\emph on
ensemble
\series default
\emph default
 commands.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
reference
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Read in a reference structure.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
trajin
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set up a trajectory for reading during a Run.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
trajout
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set up an output trajectory or ensemble for writing during a Run.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
ensemble
\end_layout

\begin_layout LyX-Code
ensemble <file0> {[<start>] [<stop> | last] [offset]} | lastframe
\end_layout

\begin_layout LyX-Code
         [parm <parmfile / tag> | parmindex <#>]
\end_layout

\begin_layout LyX-Code
         [trajnames <file1>,<file2>,...,<fileN>
\end_layout

\begin_layout LyX-Code
         [remlog <remlogfile> [nstlim <nstlim> ntwx <ntwx>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<file0> Lowest replica filename.
\end_layout

\begin_layout Description
[<start>] Frame to begin reading ensemble at (default 1).
\end_layout

\begin_layout Description
[<stop>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

last] Frame to stop reading ensemble at; if not specified or 'last' specified,
 end of trajectories.
\end_layout

\begin_layout Description
[<offset>] Offset for reading in trajectory frames (default 1).
\end_layout

\begin_layout Description
[lastframe] Select only the final frame of the trajectories.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile>] Topology filename/tag to associate with trajectories (default
 first topology).
\end_layout

\begin_layout Description
[parmindex
\begin_inset space ~
\end_inset

<#>] Index of Topology to associate with trajectories (default 0, first
 topology).
\end_layout

\begin_layout Description
[trajnames
\begin_inset space ~
\end_inset

<file1>,...,<fileN>] Do not automatically search for additional replica trajectorie
s; use comma-separated list of trajectory names.
\end_layout

\begin_layout Description
[remlog
\begin_inset space ~
\end_inset

<remlogfile>] For H-REMD trajectories only, use specified REMD log file
 to sort trajectories by coordinate index (instead of by Hamiltonian).
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[nstlim
\begin_inset space ~
\end_inset

<nstlim>
\begin_inset space ~
\end_inset

ntwx
\begin_inset space ~
\end_inset

<ntwx>] If trajectory and REMD log were not written at the same rate, these
 are the values for nstlim (steps between each exchange) and ntwx (steps
 between trajectory write) used in the REMD simulation.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Read in and process trajectories as an ensemble.
 Similar to '
\series bold
\shape italic
trajin
\series default
\shape default
 remdtraj', except instead of processing one frame at a target temperature,
 process all frames.
 This means that action and trajout commands apply to the entire ensemble;
 note however that not all actions currently function in 
\series bold
\shape italic
'ensemble'
\series default
\shape default
 mode.
 For example, to read in a replica ensemble, convert it to temperature trajector
ies, and calculate a distance at each temperature:
\end_layout

\begin_layout LyX-Code
parm ala2.99sb.mbondi2.parm7
\end_layout

\begin_layout LyX-Code
ensemble rem.crd.000 trajnames rem.crd.001,rem.crd.002,rem.crd.003  
\end_layout

\begin_layout LyX-Code
trajout temp.crd
\end_layout

\begin_layout LyX-Code
distance d1 out d1.ensemble.dat @1 @21
\end_layout

\begin_layout Standard
This will output 4 temperature trajectories named 'temp.crd.X', where X ranges
 from 0 to 3 with 0 corresponding to the lowest temperature, and 'd1.ensemble.dat'
 containing 4 columns, each corresponding to a temperature.
 If run with MPI, data will be written to separate files named 'd1.ensemble.dat.X',
 similar to the output trajectories.
\end_layout

\begin_layout Standard
Note that in parallel (i.e.
 MPI) users should specify the 
\series bold
\emph on
ensemblesize
\series default
\emph default
 command prior to 
\series bold
\emph on
ensemble
\series default
\emph default
 in order to improve set up efficiency.
\end_layout

\begin_layout Subsection
ensemblesize
\end_layout

\begin_layout LyX-Code
ensemblesize <#>
\end_layout

\begin_layout Standard
This command is MPI only.
 It is used to set the expected number of members in any subsequent 
\series bold
\emph on
ensemble
\series default
\emph default
 command, which dramatically improves set up efficiency.
\end_layout

\begin_layout Subsection
reference
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_reference"

\end_inset


\end_layout

\begin_layout LyX-Code
reference
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
reference
\end_layout

\end_inset

 <name> [<frame#>] [<mask>] ([tag]) [lastframe] [crdset]
\end_layout

\begin_layout LyX-Code
          [parm <parmfile / tag> | parmindex <#>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> File name (or COORDS set name if 'crdset' specified) to read in as
 reference; any trajectory recognized by 'trajin' can be used.
\end_layout

\begin_layout Description
[<frame#>] Frame number to use (default 1).
\end_layout

\begin_layout Description
[<mask>] Only load atoms corresponding to <mask> from reference.
\end_layout

\begin_layout Description
([tag]) Tag to give this reference file, e.g.
 
\begin_inset Quotes eld
\end_inset

[MyRef]
\begin_inset Quotes erd
\end_inset

; BRACKETS MUST BE INCLUDED.
\end_layout

\begin_layout Description
[lastframe] Use last frame of reference.
\end_layout

\begin_layout Description
[crdset] Use for COORDS data set named <name> instead of file.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile/tag>] Topology filename/tag to associate with reference (default
 first topology).
\end_layout

\begin_layout Description
[parmindex
\begin_inset space ~
\end_inset

<#>] Index of Topology to associate with reference (default 0, first topology).
\end_layout

\end_deeper
\begin_layout Standard
Use specified trajectory as reference coordinates.
 For trajectories with multiple frames, the first frame is used if a specific
 frame is not specified.
 An optional tag can be given (bounded in brackets) which can then be used
 in place of the name (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:Parameter/Reference-Tagging"

\end_inset

 for examples of how to use tags).
 If desired, an atom mask can be used to read in only specified atoms from
 a reference.
\end_layout

\begin_layout Standard
Reference coordinates are now considered COORDS data sets and can be used
 anywhere a COORDS data set could, which allows reference structures to
 be manipulated once they are loaded.
 For example, a reference structure could be centered on the origin like
 so:
\end_layout

\begin_layout LyX-Code
reference tz2.rst7 [MyRef]
\end_layout

\begin_layout LyX-Code
crdaction [MyRef] center origin
\end_layout

\begin_layout Standard
Note that the 'average' keyword has been deprecated for reference.
 If desired, an averaged reference COORDS data set can be created from a
 trajectory using the 'average' command like so:
\end_layout

\begin_layout LyX-Code
parm myparm.parm7
\end_layout

\begin_layout LyX-Code
trajin mytraj.nc
\end_layout

\begin_layout LyX-Code
rms first :1-12
\end_layout

\begin_layout LyX-Code
average crdset RefAvg
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
rms ToAvg reference :1-12 out ToAvg.dat
\end_layout

\begin_layout Subsection
trajin 
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_trajin"

\end_inset


\end_layout

\begin_layout LyX-Code
trajin
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
trajin
\end_layout

\end_inset

 <filename> {[<start> [<stop> | last] [<offset>]]} | lastframe
\end_layout

\begin_layout LyX-Code
       [parm <parmfile / tag> | parmindex <#>]
\end_layout

\begin_layout LyX-Code
       [mdvel <velocities>] [mdfrc <forces>]
\end_layout

\begin_layout LyX-Code
       [as <format keyword>] [ <Format Options> ]
\end_layout

\begin_layout LyX-Code
       [ remdtraj {remdtrajtemp <Temperature> | remdtrajidx <idx1,idx2,...>
 
\end_layout

\begin_layout LyX-Code
                   | remdtrajvalues <value1,value2,...>}
\end_layout

\begin_layout LyX-Code
                  [trajnames <file1>,<file2>,...,<fileN>] ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> Trajectory file to read in.
\end_layout

\begin_layout Description
[<start>] Frame to begin reading at (default 1).
 If a negative value is given it means 
\begin_inset Quotes eld
\end_inset

<start> frames before <stop>
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description
[<stop>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

last] Frame to stop reading at; if not specified or 'last' specified, end
 of trajectory.
\end_layout

\begin_layout Description
[<offset>] Offset for reading in trajectory frames (default 1).
\end_layout

\begin_layout Description
[lastframe] Select only the final frame of the trajectory.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile/tag>] Topology filename/tag to associate with trajectory (default
 first topology).
\end_layout

\begin_layout Description
[parmindex
\begin_inset space ~
\end_inset

<#>] Index of Topology to associate with trajectory (default 0, first topology).
\end_layout

\begin_layout Description
[mdvel
\begin_inset space ~
\end_inset

<velocities>] Use velocities from specified file.
\end_layout

\begin_layout Description
[mdfrc
\begin_inset space ~
\end_inset

<forces>] Use forces from specified file.
\end_layout

\begin_layout Description
[as
\begin_inset space ~
\end_inset

<format
\begin_inset space ~
\end_inset

keyword>] Force file to be read as specified format; overrides file autodetectio
n.
\end_layout

\begin_layout Description
[<Format
\begin_inset space ~
\end_inset

Options>] See below.
\end_layout

\begin_layout Description
[remdtraj] Read <filename> as the first replica in a group of replica trajectori
es.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
remdtrajtemp
\begin_inset space ~
\end_inset

<Temperature>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

remdtrajidx
\begin_inset space ~
\end_inset

<idx1,idx2,...> Use frames at <Temperature> (for temperature replica trajectories)
 or index <idx1,idx2,...> (for Hamiltonian replica trajectories); For Multidimensio
nal REMD simulations, multiple values are comma-separated.
\end_layout

\begin_layout Description
remdtrajvalues
\begin_inset space ~
\end_inset

<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.
\end_layout

\begin_layout Description
[trajnames
\begin_inset space ~
\end_inset

<file1>,...,<fileN>] Do not automatically search for additional replica trajectorie
s; use comma-separated list of trajectory names.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Read in trajectory specified by filename.
 See page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "tab:cpptraj-trajformats"

\end_inset

 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 
\series bold
last
\series default
 keyword instead of a <stop> argument, e.g.
\end_layout

\begin_layout LyX-Code
trajin Test1.crd 10 last 2
\end_layout

\begin_layout Standard
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 
\series bold
lastframe
\series default
 keyword:
\end_layout

\begin_layout LyX-Code
trajin Test1.crd lastframe
\end_layout

\begin_layout Standard
Here is an example of loading in multiple trajectories which have difference
 topology files:
\end_layout

\begin_layout LyX-Code
parm top0.parm7
\end_layout

\begin_layout LyX-Code
parm top1.parm7
\end_layout

\begin_layout LyX-Code
parm top2.parm7 [top2]
\end_layout

\begin_layout LyX-Code
parm top3.parm7
\end_layout

\begin_layout LyX-Code
trajin Test0.crd
\end_layout

\begin_layout LyX-Code
trajin Test1.crd parm top1.parm7
\end_layout

\begin_layout LyX-Code
trajin Test2.crd parm [top2]
\end_layout

\begin_layout LyX-Code
trajin Test3.crd parmindex 3
\end_layout

\begin_layout Standard
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).
\end_layout

\begin_layout Subsubsection*
Replica Trajectory Processing
\end_layout

\begin_layout Standard
If the 
\series bold
remdtraj
\series default
 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 
\series bold
trajnames
\series default
 keyword.
 All trajectories will be processed at the same time, but only frames with
 a temperature matching the one specified by 
\series bold
remdtrajtemp
\series default
 or 
\series bold
remdtrajidx
\series default
 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):
\end_layout

\begin_layout LyX-Code
trajin rem.001 remdtraj remdtrajtemp 300
\end_layout

\begin_layout Standard
or
\end_layout

\begin_layout LyX-Code
trajin rem.001 remdtraj remdtrajtemp 300 trajnames rem.002,rem.003,rem.004
\end_layout

\begin_layout Standard
Note that the 
\series bold
remdout
\series default
 keyword is deprecated.
 For this functionality see the 
\series bold
ensemble
\series default
 keyword.
\end_layout

\begin_layout Subsubsection

\emph on
Options for Amber NetCDF, Amber NC Restart, Amber Restart:
\end_layout

\begin_layout LyX-Code
  [usevelascoords] [usefrcascoords]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
usevelascoords Read in velocities in place of coordinates if present.
\end_layout

\begin_layout Description
usefrcascoords Read in forces in place of coordinates if present.
\end_layout

\end_deeper
\begin_layout Subsubsection

\emph on
Options for CHARMM DCD:
\end_layout

\begin_layout LyX-Code
[{ucell | shape}]
\end_layout

\begin_deeper
\begin_layout Description
ucell Force reading of box information as unit cell (for e.g.
 NAMD DCD trajectories).
\end_layout

\begin_layout Description
shape Force reading of box information as shape matrix.
\end_layout

\end_deeper
\begin_layout Subsubsection
Options for PDB files:
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-trajin-pdb"

\end_inset


\end_layout

\begin_layout LyX-Code
[keepaltloc <char>]
\end_layout

\begin_deeper
\begin_layout Description
[keepaltloc
\begin_inset space ~
\end_inset

<char>] If specified, only keep alternate atom location IDs matching the
 specified character 
\series bold
<char>
\series default
.
\end_layout

\end_deeper
\begin_layout Standard
Note that if 
\series bold
keepaltloc
\series default
 is specified, the associated topology should not have alternate location
 IDs, i.e.
 if the topology is from a PDB the 
\series bold
keepaltloc
\series default
 keyword may need to be used with the 
\series bold
parm
\series default
 command (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-parm-pdb"
plural "false"
caps "false"
noprefix "false"

\end_inset

).
\end_layout

\begin_layout Subsection
trajout
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-trajout"

\end_inset


\end_layout

\begin_layout LyX-Code
trajout
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
trajout
\end_layout

\end_inset

 <filename> [<format>] [append] [nobox] [novelocity]
\end_layout

\begin_layout LyX-Code
        [notemperature] [notime] [noforce] [noreplicadim]
\end_layout

\begin_layout LyX-Code
        [parm <parmfile> | parmindex <#>] [onlyframes <range>] [title <title>]
\end_layout

\begin_layout LyX-Code
        [onlymembers <memberlist>]
\end_layout

\begin_layout LyX-Code
        [start <start>] [stop <stop>] [offset <offset>]
\end_layout

\begin_layout LyX-Code
        [ <Format Options> ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> Trajectory file to write to.
\end_layout

\begin_layout Description
[<format>] Keyword specifying output format (see Table 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "tab:cpptraj-trajformats"

\end_inset

).
 If not specified format will be determined from extension, otherwise default
 to Amber trajectory.
\end_layout

\begin_layout Description
[append] If <filename> exists, frames will be appended to <filename>.
\end_layout

\begin_layout Description
[nobox] Do not write box coordinates to trajectory.
\end_layout

\begin_layout Description
[novelocity] Do not write velocities to trajectory.
\end_layout

\begin_layout Description
[notemperature] Do not write temperature to trajectory.
\end_layout

\begin_layout Description
[notime] Do not write time to trajectory.
\end_layout

\begin_layout Description
[noreplicadim] Do not write replica dimensions to trajectory.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile>] Topology filename/tag to associate with trajectory (default
 first topology).
\end_layout

\begin_layout Description
[parmindex
\begin_inset space ~
\end_inset

<#>] Index of Topology to associate with trajectory (default 0, first topology).
\end_layout

\begin_layout Description
[onlyframes
\begin_inset space ~
\end_inset

<range>] Write only the specified input frames to <filename>.
\end_layout

\begin_layout Description
[title
\begin_inset space ~
\end_inset

<title>] Output trajectory title.
\end_layout

\begin_layout Description
[onlymembers
\begin_inset space ~
\end_inset

<memberlist>] Ensemble processing only; only write from specified members
 (starting from 0).
\end_layout

\begin_layout Description
[start
\begin_inset space ~
\end_inset

<start>] Begin output at frame <start> (1 by default).
\end_layout

\begin_layout Description
[stop
\begin_inset space ~
\end_inset

<stop>] End output at frame <stop> (last frame by default).
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<offset>] Skip <offset> frames between each output (1 by default).
\end_layout

\end_deeper
\begin_layout Standard
During a run, write frames to trajectory specified by filename in specified
 file format (Amber trajectory if none specified) after all Action processing
 has occurred.
 To write out trajectories within the Action queue see the outtraj Action
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_outtraj"

\end_inset

).
 See page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "tab:cpptraj-trajformats"

\end_inset

 for currently recognized output trajectory formats and their associated
 keyword(s).
 Note that now the file type can be determined from the output extension
 if not specified by a keyword.
 Multiple output trajectories of any format can be specified.
 
\end_layout

\begin_layout Standard

\series bold
Frames will be written to the output trajectory when the parameter file
 being processed matches the parameter file the output trajectory was set
 up with.

\series default
 So given the input:
\end_layout

\begin_layout LyX-Code
parm top0.parm7
\end_layout

\begin_layout LyX-Code
parm top1.parm7 [top1]
\end_layout

\begin_layout LyX-Code
trajin input0.crd
\end_layout

\begin_layout LyX-Code
trajin input1.crd parm [top1]
\end_layout

\begin_layout LyX-Code
trajout output.crd parm [top1]
\end_layout

\begin_layout Standard
only frames read in from input1.crd (which is associated with top1.parm7)
 will be written to output.crd.
 The trajectory input0.crd is associated with top0.parm7; since no output
 trajectory is associated with top0.parm7 no frames will be written when
 processing top0.parm7/input0.crd.
\end_layout

\begin_layout Standard
If 
\series bold
onlyframes
\series default
 is specified, only input frames matching the specified range will be written
 out.
 For example, given the input:
\end_layout

\begin_layout LyX-Code
trajin input.crd 1 10
\end_layout

\begin_layout LyX-Code
trajout output.crd onlyframes 2,5-7
\end_layout

\begin_layout Standard
only frames 2, 5, 6, and 7 from input.crd will be written to output.crd.
\end_layout

\begin_layout Subsubsection*
Cell not X-aligned Warning
\end_layout

\begin_layout Standard
Certain Actions (e.g.
 
\series bold
\emph on
align
\series default
\emph default
, 
\series bold
\emph on
rms
\series default
\emph default
, 
\series bold
\emph on
principal
\series default
\emph default
, etc.) can rotate the unit cell vectors (i.e.
 the box) if they are present.
 Some trajectory formats do not support writing out box coordinates if the
 unit cell is not 
\begin_inset Quotes eld
\end_inset

X-aligned
\begin_inset Quotes erd
\end_inset

; in other words, if the unit cell 
\begin_inset Quotes eld
\end_inset

A
\begin_inset Quotes erd
\end_inset

 vector is not aligned with the coordinate X-axis and the 
\begin_inset Quotes eld
\end_inset

B
\begin_inset Quotes erd
\end_inset

 vector is not in the X-Y plane.
 If this is the case, the following warnings may appear:
\end_layout

\begin_layout LyX-Code
Warning: Unit cell is not X-aligned.
 Box cannot be properly stored as <format>.
\end_layout

\begin_layout LyX-Code
Warning: Set <#>; unit cell is not X-aligned.
 Box cannot be properly stored as <format>.
\end_layout

\begin_layout Standard
This means that the frame will be written with the X-aligned unit cell instead
 of the actual unit cell.
 Imaging will not be possible with a trajectory written this way.
 Currently the only trajectory formats that support writing non-X-aligned
 cells are the Gromacs TRR and XTC formats.
\end_layout

\begin_layout Standard
If unit cell information is no longer needed, it can be removed (via e.g.
 the 
\series bold
\emph on
box
\series default
\emph default
 action, the 
\series bold
\emph on
strip
\series default
\emph default
 action with the 
\series bold
'nobox'
\series default
 keyword, etc.) to prevent these warnings from triggering.
\end_layout

\begin_layout Subsubsection

\shape italic
Options for pdb format
\end_layout

\begin_layout LyX-Code
  [dumpq | parse | vdw] [pdbres] [pdbatom]
\end_layout

\begin_layout LyX-Code
  [pdbv3] [teradvance] [terbyres | pdbter | noter] 
\end_layout

\begin_layout LyX-Code
  [model | multi] [chainid <ID>] [sg <group>]
\end_layout

\begin_layout LyX-Code
  [include_ep] [conect] [conectmode <m>] [keepext] [usecol21]
\end_layout

\begin_layout LyX-Code
  [bfacdefault <#>] [occdefault <#>]
\end_layout

\begin_layout LyX-Code
  [bfacdata <set>] [occdata <set>] [bfacbyres] [occbyres]
\end_layout

\begin_layout LyX-Code
  [bfacscale] [occscale] [bfacmax <max>] [occmax <max>]
\end_layout

\begin_layout LyX-Code
  [adpdata <set>]
\end_layout

\begin_deeper
\begin_layout Description
dumpq PQR format; write charges (in units of e-) and GB radii to occupancy
 and B-factor columns respectively.
\end_layout

\begin_layout Description
parse PQR format; write charges and PARSE radii to occupancy/B-factor columns.
\end_layout

\begin_layout Description
vdw PQR format; write charges and vdW radii to occupancy/B-factor columns.
\end_layout

\begin_layout Description
pdbres Use PDB V3 residue names.
 Will write a default chain ID ('Z') for each residue if the corresponding
 topology does not have chain ID information.
\end_layout

\begin_layout Description
pdbatom Use PDB V3 atom names.
\end_layout

\begin_layout Description
pdbv3 Use PDB V3 residue/atom names.
 Same as specifying 'pdbres' and 'pdbatom'.
\end_layout

\begin_layout Description
topresnum Use topology residue numbers; otherwise use original residue numbers.
\end_layout

\begin_layout Description
teradvance Increment record (atom) number for TER records (not done by default).
\end_layout

\begin_layout Description
terbyres Print TER cards based on residue sequence instead of molecules.
\end_layout

\begin_layout Description
pdbter Print TER cards according to original PDB TER (if available).
\end_layout

\begin_layout Description
noter Do not write TER cards.
\end_layout

\begin_layout Description
model (Default) Frames will be written to a single PDB file separated by
 MODEL/ENDMDL keywords.
\end_layout

\begin_layout Description
multi Each frame will be written to a separate file with the frame # appended
 to <filename>.
\end_layout

\begin_layout Description
chainid
\begin_inset space ~
\end_inset

<ID> Write PDB file with chain ID <ID>.
\end_layout

\begin_layout Description
sg
\begin_inset space ~
\end_inset

<group> Space group for CRYST1 record; only used if box coordinates written.
\end_layout

\begin_layout Description
include_ep Include extra points.
\end_layout

\begin_layout Description
conect Write CONECT records for all bonds.
\end_layout

\begin_layout Description
conectmode
\begin_inset space ~
\end_inset

<m> Write CONECT records for <m>='all' (all bonds), 'het' (HETATM only),
 'none' (no CONECT).
\end_layout

\begin_layout Description
keepext Keep filename extension; write '<name>.<num>.<ext>' instead (implies
 'multi').
\end_layout

\begin_layout Description
usecol21 Use column 21 for 4-letter residue names.
\end_layout

\begin_layout Description
bfacdefault
\begin_inset space ~
\end_inset

<#> Default value to use in B-factor column (default 0.0).
\end_layout

\begin_layout Description
occdefault
\begin_inset space ~
\end_inset

<#> Default value to use in occupancy column (default 1.0).
\end_layout

\begin_layout Description
bfacdata
\begin_inset space ~
\end_inset

<set> Use data in <set> for B-factor column.
\end_layout

\begin_layout Description
occdata
\begin_inset space ~
\end_inset

<set> Use data in <set> for occupancy column.
\end_layout

\begin_layout Description
bfacbyres If specified assume X values in B-factor data set are residue
 numbers.
\end_layout

\begin_layout Description
occbyres If specified assume X values in occupancy data set are residue
 numbers.
\end_layout

\begin_layout Description
bfacscale If specified scale values in B-factor column between 0 and <bfacmax>.
\end_layout

\begin_layout Description
occscale If specified scale values in occupancy column between 0 and <occmax>.
\end_layout

\begin_layout Description
bfacmax
\begin_inset space ~
\end_inset

<max> Max value for bfacscale.
\end_layout

\begin_layout Description
occmax
\begin_inset space ~
\end_inset

<max> Max value for occscale.
\end_layout

\begin_layout Description
adpdata
\begin_inset space ~
\end_inset

<set> Use data in <set> (e.g.
 from the 
\series bold
\emph on
atomicfluct
\series default
\emph default
 command, 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj_atomicfluct"
plural "false"
caps "false"
noprefix "false"

\end_inset

) for anisotropic B-factors.
\end_layout

\end_deeper
\begin_layout Subsubsection

\shape italic
Options for Amber ASCII format:
\end_layout

\begin_layout LyX-Code
  [remdtraj] [highprecision] [mdvel|mdfrc]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
remdtraj Write REMD header to trajectory that includes temperature: 'REMD
 <Replica> <Step> <Total_Steps> <Temperature>'.
 Since 
\shape italic
cpptraj
\shape default
 has no concept of replica number, 0 is printed for <Replica>.
 <Step> and <Total_Steps> are set to the current frame #.
\end_layout

\begin_layout Description
highprecision (EXPERT USE ONLY) Write with 8.6 precision instead of 8.3.
 Note that since the width does not change, the precision of large coords
 may be lower than 6.
\end_layout

\begin_layout Description
mdvel Write velocities instead of coordinates.
\end_layout

\begin_layout Description
mdfrc Write forces instead of coordinates.
\end_layout

\end_deeper
\begin_layout Subsubsection

\shape italic
Options for Amber NetCDF format:
\end_layout

\begin_layout LyX-Code
  [remdtraj] [mdvel] [mdfrc] [mdcrd]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
remdtraj Write replica temperature to trajectory.
\end_layout

\begin_layout Description
mdvel Write only velocity information in trajectory.
\end_layout

\begin_layout Description
mdfrc Write only force information in trajectory.
\end_layout

\begin_layout Description
mdcrd Write coordinates to trajectory (only required with mdvel/mdfrc).
\end_layout

\end_deeper
\begin_layout Subsubsection

\shape italic
Options for Amber Restart/NetCDF Restart format:
\end_layout

\begin_layout LyX-Code
  [remdtraj] [novelocity] [notime] [time0 <initial time>] [dt <timestep>]
 [keepext]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
remdtraj Write replica temperature to restart.
 Note that this will automatically include time in the restart file (see
 the 
\series bold
time0
\family typewriter
\series default
 keyword
\family default
).
\end_layout

\begin_layout Description
time0
\begin_inset space ~
\end_inset

<initial
\begin_inset space ~
\end_inset

time> Time for first frame (default 1.0).
\end_layout

\begin_layout Description
dt
\begin_inset space ~
\end_inset

<timestep> Time step between frames (default 1.0).
 Time is calculated as t=(time0+frame)*dt.
\end_layout

\begin_layout Description
keepext Keep filename extension; write '<name>.<num>.<ext>' instead.
\end_layout

\end_deeper
\begin_layout Subsubsection

\emph on
Options for CHARMM COORdinates:
\end_layout

\begin_layout LyX-Code
[keepext] [ext] [segid <segid>] [segmask <mask> <segid> ...]
\end_layout

\begin_deeper
\begin_layout Description
keepext Keep filename extension; write '<name>.<num>.<ext>'
\end_layout

\begin_layout Description
ext Use 'extended' format (default when > 99999 atoms).
\end_layout

\begin_layout Description
segid
\begin_inset space ~
\end_inset

<segid> Use <segid> as segment ID for all atoms.
\end_layout

\begin_layout Description
segmask
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

<segid> Use <segid> as segment ID for atoms selected by <mask>.
 Can be specified more than once.
\end_layout

\end_deeper
\begin_layout Subsubsection

\emph on
Options for CHARMM DCD:
\end_layout

\begin_layout LyX-Code
[x64] [ucell] [veltraj]
\end_layout

\begin_deeper
\begin_layout Description
x64 Use 8 byte block size (default 4 bytes).
\end_layout

\begin_layout Description
ucell Write older (v21) format trajectory that stores unit cell params instead
 of shape matrix.
\end_layout

\begin_layout Description
veltraj Write velocity trajectory instead of coordinates.
\end_layout

\end_deeper
\begin_layout Standard
Note that by default CPPTRAJ will try to write the symmetric shape matrix
 if box information is present.
 If this is not possible, CPPTRAJ will fall back to writing unit cell parameters
 (lengths and angles) as long as the cell is X-aligned.
\end_layout

\begin_layout Subsubsection

\emph on
Options for GROMACS TRX/XTC format:
\end_layout

\begin_layout LyX-Code
[dt <time step>]
\end_layout

\begin_deeper
\begin_layout Description
dt Time step tp multiply set numbers by (default 1.0).
 Ignored if time already present.
\end_layout

\end_deeper
\begin_layout Standard
Note: these formats can write rotated (i.e.
 non-X-aligned) unit cells.
\end_layout

\begin_layout Subsubsection

\shape italic
Options for mol2 format:
\end_layout

\begin_layout LyX-Code
  [single | multi] [sybyltype] [sybylatom <file>] [sybylbond <file>] [keepext]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
single (Default) Frames will be written to a single Mol2 file separated
 by MOLECULE keywords.
\end_layout

\begin_layout Description
multi Each frame will be written to a separate file with the frame # appended
 to <filename>.
\end_layout

\begin_layout Description
sybyltype Convert Amber atom types (if present) to SYBYL types.
 Requires $AMBERHOME is set.
\end_layout

\begin_layout Description
sybylatom File containing Amber to SYBYL atom type correspondance (optional).
\end_layout

\begin_layout Description
sybylbond File containing Amber to SYBYL bond type correspondance (optional).
\end_layout

\begin_layout Description
keepext Keep filename extension; write '<name>.<num>.<ext>' instead (implies
 'multi').
\end_layout

\end_deeper
\begin_layout Subsubsection
Options for SQM input format:
\end_layout

\begin_layout LyX-Code
  [charge <c>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
charge
\begin_inset space ~
\end_inset

<c> Set total integer charge.
 If not specified it will be calculated from atomic charges.
\end_layout

\end_deeper
\begin_layout Subsubsection
Options for XYZ format:
\end_layout

\begin_layout LyX-Code
ftype {atomxyz|xyz} titletype {none|single|perframe} width <#> prec <#>
\end_layout

\begin_deeper
\begin_layout Description
ftype
\begin_inset space ~
\end_inset

{atomxyz|xyz} Choose either 'ATOM X Y Z' (default) or 'X Y Z' output format.
\end_layout

\begin_layout Description
titletype
\begin_inset space ~
\end_inset

{none|single|perframe} No title, one title (default), or title before every
 frame.
\end_layout

\begin_layout Description
width
\begin_inset space ~
\end_inset

<#> Output format width.
\end_layout

\begin_layout Description
prec
\begin_inset space ~
\end_inset

<#> Output format precision.
\end_layout

\end_deeper
\begin_layout Section
Action Commands
\begin_inset CommandInset label
LatexCommand label
name "sec:cpptraj_actions"

\end_inset


\end_layout

\begin_layout Standard
Actions in 
\emph on
cpptraj
\emph default
 operate on frames read in by the 
\series bold
\emph on
trajin
\series default
\emph default
 or 
\series bold
\emph on
ensemble
\series default
\emph default
 commands one at a time and extract derived data, modify the coordinates/topolog
y in some way, or both.
 Most Actions in 
\shape italic
cpptraj
\shape default
 function exactly the way they do in 
\shape italic
ptraj
\shape default
 and are backwards-compatible.
 Some Action commands in 
\emph on
cpptraj
\emph default
 have extra functionality compared to 
\emph on
ptraj
\emph default
 (such as the per-residue RMSD function of the 
\series bold
\emph on
rmsd
\series default
\emph default
 Action, or the ability to write out stripped topologies for visualization
 in the 
\series bold
\emph on
strip
\series default
\emph default
 Action), while other Actions produce slightly different output (like the
 
\series bold
\emph on
hbond
\series default
\emph default
/
\series bold
\emph on
secstruct
\series default
\emph default
 Actions).
\end_layout

\begin_layout Standard
Unlike some other command types, when an Action command is issued it is
 by default added to the Action queue and is not executed until trajectory
 processing is started (e.g.
 by a 
\series bold
\emph on
run
\series default
\emph default
 or 
\series bold
\emph on
go
\series default
\emph default
 command).
 However, Actions can be executed immediately on COORDS data sets via the
 
\series bold
\emph on
crdaction
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_crdaction"

\end_inset

).
\end_layout

\begin_layout Standard
When a frame is modified by an Action, it is modified for every Action that
 follows them during trajectory processing.
 For example, given a solvated system with water residues named WAT and
 the following Action commands:
\end_layout

\begin_layout LyX-Code
rmsd R1 first :WAT out water-rmsd.dat
\end_layout

\begin_layout LyX-Code
strip :WAT
\end_layout

\begin_layout LyX-Code
rmsd R2 first :WAT out water-rmsd-2.dat
\end_layout

\begin_layout Standard
the first 
\series bold
\emph on
rms
\series default
\emph default
 command will be valid, but the second 
\series bold
\emph on
rms
\series default
\emph default
 command will not since all residues named WAT are removed from the state
 by the 
\series bold
\emph on
strip
\series default
\emph default
 command.
\end_layout

\begin_layout Standard
Note that for commands which can use a reference mask as well as a target
 mask (e.g.
 
\series bold
\emph on
rms
\series default
\emph default
, 
\series bold
\emph on
drmsd
\series default
\emph default
, 
\series bold
\emph on
symmrmsd
\series default
\emph default
, etc.) there must be a 1 to 1 correspondence between the atoms in each mask,
 i.e.
 the 
\emph on
number of atoms and the ordering of selected atoms must be the same
\emph default
.
\end_layout

\begin_layout Standard
The following Actions are available.
 If an Action may modify coordinate/topology information for subsequent
 Actions it is denoted with an X in the 
\family typewriter
\series bold
Mod
\family default
\series default
 column.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="87" columns="3">
<features islongtable="true" longtabularalignment="center">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="65text%">
<column alignment="center" valignment="top" width="10text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Mod
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
align
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Align structure to a reference.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
angle
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the angle between three points.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
areapermol
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate area per molecule for molecules in a specified plane.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
atomiccorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate average correlation between motions of specified atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
atomicfluct, rmsf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate root mean square fluctuation of specified atoms/residues.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
atommap
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Attempt to create a map between atoms in molecules with different atom ordering.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
autoimage
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Automatically re-image coordinates.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
average
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate average structure.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bounds
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the min/max coordinates for specified atoms.
 Can be used to create grid data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
box
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set or overwrite box information for frames.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
center
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Center specified coordinates to box center or onto reference structure.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
check, checkoverlap,
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Check for bad atomic overlaps or bond lengths.
 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 checkstructure
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Can be used to skip corrupted frames.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
checkchirality
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Report chirality around alpha carbons in amino acids (L, D).
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
closest, closestwaters
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Retain only the specified number of solvent molecules closest to specified
 solute.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
clusterdihedral
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assign frames into clusters based on binning of backbone dihedral angles
 in amino acids.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
contacts
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Older version of 
\series bold
\emph on
nativecontacts
\series default
\emph default
, retained for backwards compatibility.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
createcrd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a COORDS data set from input frames.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
createreservoir
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a structure reservoir for use with reservoir REMD simulations.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
density
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate density along a coordinate.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
diffusion
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate translational diffusion of molecules.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dihedral
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the dihedral angle using four points.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dihrms
\end_layout

\begin_layout Plain Layout
dihedralrms
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the RMSD of dihedrals to dihedrals in a reference structure.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dipole
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Bin dipoles of solvent molecules in 3D grid.
 Not well tested, may be obsolete.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
distance
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the distance between two points.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
drms, drmsd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the RMSD of distance pairs within selected atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dssp, secstruct
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate secondary structure content using the DSSP algorithm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
energy
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate simple bond, angle, dihedral, and non-bonded energy terms (no
 PME).
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
esander
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate energies using via SANDER; requires compilation with the SANDER
 API.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
filter
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Filter frames for subsequent Actions using data sets and user defined criteria.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
fixatomorder
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Fix atom ordering so that all atoms in molecules are sequential.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
fiximagedbonds
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Fix bonds which have been split across periodic boundaries by imaging.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gist
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform grid inhomogenous solvation theory.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
grid
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Bin selected atoms on a 3D grid.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hbond
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate hydrogen bonds using geometric criteria.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
image
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Re-image coordinates.
 The 
\series bold
\emph on
autoimage
\series default
\emph default
 command typically provides better results.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
jcoupling
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate J-coupling values from specified dihedral angles.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lessplit
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Split/average frames from LES trajectories.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lie
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate linear interaction energy between user-specified ligand and surroundin
gs.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lipidorder
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate order parameters for lipids in planar membranes.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lipidscd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate lipid order parameters SCD (|<P2>|) for lipid chains.
 Automatically identifies lipids.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
makestructure
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Modify structure by applying dihedral values to specified residues.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mask
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print the results of selection by specified atom mask.
 Good for distnace-based masks.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
matrix
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate a matrix of the specified type from input coordinates.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
minimage
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate minimum non-self imaged distance between atoms in specified masks.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
molsurf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate Connolly surface area of specified atoms.
 Cannot do partial surface areas.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multidihedral
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate multiple dihedral angles of specified/given types.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multivector
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate multiple vectors between specified atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
nastruct
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform nucelic acid structure analysis.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
nativecontacts
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate native contacts within a region or between two regions using a
 given reference.
 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Can also be used to get min/max distances between groups of atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
outtraj
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write frames to a trajectory file within a list of Actions.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pairdist
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate pair distribution function.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pairwise
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate pair-wise non-bonded energies.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
principal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate and optionally align system along principal axes.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
projection
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Project coordinates along given eigenvectors.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pucker
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate ring pucker using five or six points.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
radgyr, rog
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate radius of gyration (and optionally tensor) for specified atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
radial, rdf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate radial distribution function.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
randomizeions
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Swap specified ions with randomly selected solvent molecules.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
remap
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Re-map atoms according to a given data set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
replicatecell
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Replicate unit cell in specified (or all) directions for specfied atoms
 and write to trajectory.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rms, rmsd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform best fit of coordinates to reference and calculate coordinate RMSD.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 Fitting can be disabled.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rotate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate the system around X/Y/Z axes, a specified axis, or via given rotation
 matrices.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
runavg, 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the running average of coordinates over specified window size.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
runningaverage
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
scale
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Scale coordinates in X/Y/Z directions by specified factors.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
setvelocity
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
Set velocities for specified atoms using Maxwellian distribution
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
 based on given temperature.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
spam
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SPAM method for estimating relative free energies of waters in hydration
 shell around proteins.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
stfcdiffusion
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Alternative translational diffusion calculation which can calculate diffusion
 in specified regions.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
strip
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove specified atoms from the system.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
surf
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the LCPO surface area of specified atoms.
 Can do partial surface areas.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
symmrmsd
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate symmetry-corrected RMSD.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
temperature
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate system temperature using velocities of specified atoms.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
time
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add/remove/modify time information in frames.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
trans, translate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Translate specified atoms by specified amounts in X/Y/Z directions.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
unstrip
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Undo all previous 
\series bold
\emph on
strip
\series default
\emph default
 Action commands.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
unwrap
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Reverse of 
\series bold
\emph on
image
\series default
\emph default
; unwrap selected atoms so they have continuous trajectories.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
vector
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate various types of vector quantities.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
velocityautocorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate velocity autocorrelation function.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
volmap
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create volumetric map for specified coordinates; similar to 
\series bold
\emph on
grid
\series default
\emph default
 but takes
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 into account atomic radii.
 Similar to VMD 
\series bold
\emph on
volmap
\series default
\emph default
.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
volume
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate unit cell volume.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
watershell
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the number of waters in the first and second solvation shells
 based on distance critera.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
xtalsymm
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Re-image coordinates based on crystal space group symmetry operations and
 asymmetric unit volume.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
align
\end_layout

\begin_layout LyX-Code
align <mask> [<refmask>] [move <mask>] [mass]
\end_layout

\begin_layout LyX-Code
  	[ first | reference | ref <name> | refindex <#> | previous |
\end_layout

\begin_layout LyX-Code
        reftraj <name> [parm <name> | parmindex <#>] ]
\end_layout

\begin_deeper
\begin_layout Description
<mask> Target atoms to fit.
\end_layout

\begin_layout Description
[<refmask>] Reference atoms to fit (default is target mask).
\end_layout

\begin_layout Description
[move
\begin_inset space ~
\end_inset

<mask>] Atoms to move when aligning (default is target mask).
\end_layout

\begin_layout Description
[mass] Mass-weight the fit.
\end_layout

\begin_layout Standard
Reference keywords:
\end_layout

\begin_layout Description

\series bold
first
\series default
 Use the first trajectory frame processed as reference.
\end_layout

\begin_layout Description

\series bold
reference
\series default
 Use the first previously read in reference structure (refindex 0).
\end_layout

\begin_layout Description

\series bold
ref
\begin_inset space ~
\end_inset

<name>
\series default
 Use previously read in reference structure specified by filename/tag.
\end_layout

\begin_layout Description

\series bold
refindex
\begin_inset space ~
\end_inset

<#>
\series default
 Use previously read in reference structure specified by <#> (based on order
 read in).
\end_layout

\begin_layout Description
previous Use frame prior to current frame as reference.
\end_layout

\begin_layout Description

\series bold
reftraj
\series default

\begin_inset space ~
\end_inset

<name> Use frames from COORDS set <name> or read in from trajectory file
 <name> as references.
 Each frame from <name> is used in turn, so that frame 1 is compared to
 frame 1 from <name>, frame 2 is compared to frame 2 from <name> and so
 on.
 If <trajname> runs out of frames before processing is complete, the last
 frame of <trajname> continues to be used as the reference.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<parmname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> If 
\series bold
reftraj
\series default
 specifies a trajectory file, associate it with specified topology; if not
 specified the first topology is used.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Align structure using specified <mask> onto reference.
 If 'move' is specified, only move atoms in the move mask.
\end_layout

\begin_layout Subsection
angle
\end_layout

\begin_layout LyX-Code
angle
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
angle
\end_layout

\end_inset

 [<dataset name>] <mask1> <mask2> <mask3> [out <filename>] [mass]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<dataset
\begin_inset space ~
\end_inset

name>] Output data set name.
\end_layout

\begin_layout Description
<maskX> Three atom masks selecting atom(s) to calculate angle for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[mass] Use center of mass of atoms in <maskX> instead of geometric center.
\end_layout

\end_deeper
\begin_layout Standard
Calculate angle (in degrees) between atoms in <mask1>, <mask2>, and <mask3>.
 For example, to calculate the angle between the first three atoms in the
 system:
\end_layout

\begin_layout LyX-Code
angle A123 @1 @2 @3 out A123.agr
\end_layout

\begin_layout Subsection
areapermol
\end_layout

\begin_layout LyX-Code
areapermol [<name>] {[<mask1>] [nlayers <#>] | nmols <#>} [out <filename>]
\end_layout

\begin_layout LyX-Code
           [{xy | xz | yz}]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[<mask1>] Atom mask for selecting molecules.
 If any atom in a molecule is selected the whole molecule is selected.
\end_layout

\begin_layout Description
[nlayers
\begin_inset space ~
\end_inset

<#>] Number of layers of molecules.
 Total number of molecules used will be # molecules divided by # layers.
\end_layout

\begin_layout Description
[nmols
\begin_inset space ~
\end_inset

<#>] If <mask1> is not specified, the number of molecules to use when calculatin
g area per molecule.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[{xy|xz|yz}] Cross-section of box to calculate area of.
 Default is X-Y.
\end_layout

\end_deeper
\begin_layout Standard
Calculate area per molecule as Area / # molecules.
 The area is determined from the specified cross-section of the box (X-Y
 by default).
 Currently the calculation is only guaranteed to work properly with orthorhombic
 unit cells.
 For example, to get the area per molecule of residues named 
\begin_inset Quotes eld
\end_inset

OL
\begin_inset Quotes erd
\end_inset

 which are arranged in 2 layers:
\end_layout

\begin_layout LyX-Code
areapermol OL_area :OL nlayers 2 out apm.dat
\end_layout

\begin_layout Subsection
atomiccorr
\end_layout

\begin_layout LyX-Code
atomiccorr [<mask>] out <filename> [cut <cutoff>] [min <min spacing>]
\end_layout

\begin_layout LyX-Code
           [byatom | byres]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<mask> Atoms to calculate motion vectors for.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> File to write results to.
\end_layout

\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cutoff> Only print correlations with absolute value greater than <cutoff>.
\end_layout

\begin_layout Description
min
\begin_inset space ~
\end_inset

<min
\begin_inset space ~
\end_inset

spacing> Only calculate correlations for motion vectors spaced <min spacing>
 apart.
\end_layout

\begin_layout Description
byatom Default; calculate atomic motion vectors.
\end_layout

\begin_layout Description
byres Calculate motion vectors for entire residues (selected atoms in residues
 only).
\end_layout

\end_deeper
\begin_layout Standard
Calculate average correlations between the motion of atoms in <mask>.
 For each frame, a motion vector is calculated for each selected atom from
 its previous position to its current position.
 For each pair of motion vectors 
\shape italic
Va
\shape default
 and 
\shape italic
Vb
\shape default
, the average correlation between those vectors is calculated as the average
 of the dot product of those vectors over all 
\shape italic
N
\shape default
 frames.
 
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Formula $AvgCorr(a,b)=\frac{\sum V_{a}(i)\cdot V_{b}(i)}{N}$
\end_inset


\end_layout

\begin_layout Standard
The value of AvgCorr can range from 1.0 (correlated) to 0.0 (no correlation)
 to -1.0 (anti-correlated).
 For example, to calculate the correlation of motion vectors between residues
 1 to 13, writing to a Gnuplot-readable formatted file:
\end_layout

\begin_layout LyX-Code
atomiccorr :1-13 out acorr.gnu byres
\end_layout

\begin_layout Subsection
atomicfluct | rmsf
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_atomicfluct"

\end_inset


\end_layout

\begin_layout LyX-Code
atomicfluct
\begin_inset Index idx
status open

\begin_layout Plain Layout
atomicfluct
\end_layout

\end_inset

 [<name>] [out <filename>] [<mask>] [byres | byatom | bymask]
\end_layout

\begin_layout LyX-Code
            [bfactor] [calcadp [adpout <file>]]
\end_layout

\begin_layout LyX-Code
            [start <start>] [stop <stop>] [offset <offset>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> Output data set name.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> Write data to file named <filename>
\end_layout

\begin_layout Description
[<mask>] Calculate fluctuations for atoms in <mask> (all if not specified).
\end_layout

\begin_layout Description
byres Output the average (mass-weighted) fluctuation by residue.
\end_layout

\begin_layout Description
bymask Output the average (mass-weighted) fluctuation for all atoms in <mask>.
\end_layout

\begin_layout Description
byatom
\begin_inset space ~
\end_inset

(default) Output the fluctuation by atom.
\end_layout

\begin_layout Description
[bfactor] Calculate atomic positional fluctuations squared and weight by
 
\begin_inset Formula $\frac{8}{3}\pi^{2}$
\end_inset

; this is similar but not necessarily equivalent to the calculation of crystallo
graphic B-factors.
\end_layout

\begin_layout Description
[calcadp
\begin_inset space ~
\end_inset

[adpout
\begin_inset space ~
\end_inset

<file>]] Calculate anisotropic displacement parameters and optionally output
 them to <file>.
\end_layout

\begin_layout Description
[<start>] Frame to begin calculation at (default 1).
\end_layout

\begin_layout Description
[<stop>] Frame to end calculation at (default last).
\end_layout

\begin_layout Description
[<offset>] Frames to skip between calculations (default 1).
\end_layout

\begin_layout Standard
DataSets created
\end_layout

\begin_layout Description
<name> Hold atomic fluctuations.
\end_layout

\begin_layout Description
<name>[ADP] Hold anisotropic displacement parameters if 'calcadp' specified.
\end_layout

\end_deeper
\begin_layout Standard
Compute the atomic positional fluctuations (also referred to as root-mean-square
 fluctuations, RMSF) for atoms specified in the 
\series bold
<mask>
\series default
.
 The RMSF of a given atom 
\emph on
i
\emph default
 is calculated as:
\end_layout

\begin_layout Standard
\align center
\begin_inset Formula $RMSF_{i}=\sqrt{\left\langle \left(x_{i}-\left\langle x_{i}\right\rangle \right)^{2}\right\rangle }$
\end_inset


\end_layout

\begin_layout Standard
where 
\emph on
x
\emph default
 denotes atomic positions and the averages are over all input frames.
\end_layout

\begin_layout Standard
Note that RMS fitting is not done implicitly.
 If you want fluctuations without rotations or translations (for example
 to the average structure), perform an RMS fit to the average structure
 (best) or the first structure (see 
\series bold
\shape italic
rmsd
\series default
\shape default
) prior to this calculation.
 The units are (Å) for RMSF or Å
\begin_inset Formula $^{\text{2}}$
\end_inset

 × 
\begin_inset Formula $\frac{8}{3}$
\end_inset


\begin_inset Formula $\pi^{2}$
\end_inset

 if 
\series bold
bfactor
\series default
 is specified.
\end_layout

\begin_layout Standard
If 
\series bold
byres
\series default
 or 
\series bold
bymask
\series default
 are specified, the mass-weighted average of atomic fluctuations of each
 atom for either each residue or the entire mask will be calculated respectively
:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Formula $\left\langle Fluct\right\rangle =\frac{\sum AtomFluct_{i}*Mass_{i}}{\sum Mass_{i}}$
\end_inset


\end_layout

\begin_layout Standard
If 
\series bold
calcadp
\series default
 is specified, anisotropic displacement factors for atoms will be calculated
 and written to the file specified by 
\series bold
adpout
\series default
 (or STDOUT if not specified) using PDB ANISOU record format.
 The displacement factors will be saved to a data set.
 Note that 
\series bold
calcadp
\series default
 automatically implies 
\series bold
bfactor
\series default
.
\end_layout

\begin_layout Standard
With 
\emph on
cpptraj
\emph default
 it is possible to perform coordinate averaging, the fit to average coordinates,
 and the atomic fluctuation calculation in a single execution like so:
\end_layout

\begin_layout LyX-Code
parm myparm.parm7
\end_layout

\begin_layout LyX-Code
trajin mytrajectory.crd
\end_layout

\begin_layout LyX-Code
rms first
\end_layout

\begin_layout LyX-Code
average crdset MyAvg
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
rms ref MyAvg
\end_layout

\begin_layout LyX-Code
atomicfluct out fluct.agr
\end_layout

\begin_layout Standard
To write the mass-weighted B-factors for the protein backbone atoms C, CA,
 and N, averaged by residue use the command:
\end_layout

\begin_layout LyX-Code
atomicfluct out back.agr @C,CA,N byres bfactor
\end_layout

\begin_layout Standard
To write the RMSF or atomic positional fluctuations of the same atoms, use
 the command:
\end_layout

\begin_layout LyX-Code
atomicfluct out backbone-atoms.agr @C,CA,N
\end_layout

\begin_layout Standard
To write a PDB of averaged coordinates (after fitting to the first frame)
 with both B-factors and anisotropic temperature factors:
\end_layout

\begin_layout LyX-Code
parm myparm.parm7
\end_layout

\begin_layout LyX-Code
trajin mytraj.nc
\end_layout

\begin_layout LyX-Code
rms first
\end_layout

\begin_layout LyX-Code
average crdset MyAvg
\end_layout

\begin_layout LyX-Code
atomicfluct MyFluct calcadp
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
crdout MyAvg mypdb.pdb adpdata MyFluct[ADP] bfacdata MyFluct
\end_layout

\begin_layout Subsection
atommap
\end_layout

\begin_layout LyX-Code
atommap
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
atommap
\end_layout

\end_inset

 <target> <reference> [mapout <filename>] [maponly]
\begin_inset Newline newline
\end_inset

        [rmsfit [ rmsout <rmsout> ]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<target> Reference structure whose atoms will be remapped.
\end_layout

\begin_layout Description
<reference> Reference structure that 
\series bold
<target>
\series default
 should be mapped to.
\end_layout

\begin_layout Description
mapout
\begin_inset space ~
\end_inset

<filename> Write atom map to <filename> with format:
\begin_inset Newline newline
\end_inset

TargetAtomNumber TargetAtomName ReferenceAtomNumber ReferenceAtomName
\begin_inset Newline newline
\end_inset

Target atoms that cannot be mapped to a reference atom are denoted 
\begin_inset Quotes eld
\end_inset

—
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description
maponly Write atom map but do not reorder atoms.
\end_layout

\begin_layout Description
rmsfit Any input frames using the same topology as <target> will be RMS
 fit to <reference> using whatever atoms could be mapped.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
rmsout
\begin_inset space ~
\end_inset

<rmsout> If rmsfit specified, write resulting RMSDs to <rmsout>.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Attempt to map the atoms of <target> to those of <reference> based on structural
 similarity.
 This is useful e.g.
 when there are two files containing the same structure but with different
 atom names or atom ordering.
 Both <target> and <reference> need to have been read in with a previous
 
\series bold
\shape italic
reference
\series default
\shape default
 command.
 The state will then be modified so that any trajectory read in with the
 same parameter file as <target> will have its atoms mapped (i.e.
 reordered) to match those of <reference>.
 If the number of atoms that can be mapped in <target> are less than those
 in <reference>, the reference structure specified by <reference> will be
 modified to include only mapped atoms; this is useful if for example the
 reference structure is protonated with respect to the target.
 The 
\series bold
rmsfit
\series default
 keyword is useful in cases where the atom mapping will not be complete
 (e.g.
 two ligands with the same scaffold but different substituents).
\end_layout

\begin_layout Standard
For example, say you have the same ligand structure in two files, Ref.mol2
 and Lig.mol2, but the atom ordering in each file is different.
 To map the atoms in Lig.mol2 onto those of Ref.mol2 so that Lig.mol2 has the
 same ordering as Ref.mol2:
\end_layout

\begin_layout LyX-Code
parm Lig.mol2 
\end_layout

\begin_layout LyX-Code
reference Lig.mol2
\end_layout

\begin_layout LyX-Code
parm Ref.mol2 
\end_layout

\begin_layout LyX-Code
reference Ref.mol2 parmindex 1
\end_layout

\begin_layout LyX-Code
atommap Lig.mol2 Ref.mol2 mapout atommap.dat
\end_layout

\begin_layout LyX-Code
trajin Lig.mol2 
\end_layout

\begin_layout LyX-Code
trajout Lig.reordered.mol2 mol2
\end_layout

\begin_layout Subsection
autoimage
\end_layout

\begin_layout LyX-Code
autoimage [<mask> | anchor <mask> [fixed <mask>] [mobile <mask>]]
\end_layout

\begin_layout LyX-Code
          [origin] [firstatom] [familiar | triclinic]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

anchor
\begin_inset space ~
\end_inset

<mask>] Atoms to image around; this is the region that will be centered.
 Default is the entire first molecule.
\end_layout

\begin_layout Description
[fixed
\begin_inset space ~
\end_inset

<mask>] Molecules that should remain 'fixed' to the anchor region; default
 is all non-ion/non-solvent molecules.
\end_layout

\begin_layout Description
[mobile
\begin_inset space ~
\end_inset

<mask>] Molecules that can be freely imaged; default is all ion/solvent
 molecules.
\end_layout

\begin_layout Description
[origin] Center anchor region at the origin; if not specified, center at
 box center.
\end_layout

\begin_layout Description
[firstatom] Image based on molecule first atom; default is to image by molecule
 center of mass.
\end_layout

\begin_layout Description
[familiar] Image to familiar truncated-octahedral shape; this is on by default
 if the original cell is truncated octahedron.
\end_layout

\begin_layout Description
[triclinic] Force general triclinic imaging.
\end_layout

\end_deeper
\begin_layout Standard
Automatically center and image (by molecule) a trajectory with periodic
 boundaries.
 For most cases just specifying 
\series bold
\shape italic
'autoimage'
\series default
\shape default
 alone is sufficient.
 The atoms of the 
\series bold
'anchor'
\series default
 region (default the entire first molecule) will be centered; all 
\series bold
'fixed'
\series default
 molecules will be imaged only if imaging brings them closer to the 
\series bold
'anchor'
\series default
 molecule (default for 
\series bold
'fixed'
\series default
 molecules is all non-solvent non-ion molecules).
 All other molecules (referred to as 
\series bold
'mobile'
\series default
) will be imaged freely.
\end_layout

\begin_layout Standard
The autoimage command works for the majority of systems; however, for very
 densely packed systems the default anchor (entire first molecule) may not
 be appropriate.
 In these cases, it is recommended to choose as the anchor a small region
 which should lie near the center of your system.
 For example, in a protein dimer system one could choose a single residue
 that is near the center of the interface between the two monomers.
\end_layout

\begin_layout Subsection
average
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-average"

\end_inset


\end_layout

\begin_layout LyX-Code
average
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
average
\end_layout

\end_inset

 {crdset <set name> | <filename>} [<mask>]
\end_layout

\begin_layout LyX-Code
        [start <start>] [stop <stop>] [offset <offset>]
\end_layout

\begin_layout LyX-Code
        [Trajout Args]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> If specified, write averaged coordinates to <filename> (not compatibl
e with crdset).
\end_layout

\begin_layout Description
crdset
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name> If specified, save averaged coordinates to COORDS set <set name> (not
 compatible with <filename>).
\end_layout

\begin_layout Description
[<mask>] Average coordinates in <mask> (all atoms if not specified).
\end_layout

\begin_layout Description
[<start>] Frame to begin calculation at (default 1).
\end_layout

\begin_layout Description
[<stop>] Frame to end calculation at (default last).
\end_layout

\begin_layout Description
[<offset>] Frames to skip between calculations (default 1).
\end_layout

\begin_layout Description
[Trajout
\begin_inset space ~
\end_inset

args] Output trajectory format argument(s) (default Amber Trajectory).
\end_layout

\end_deeper
\begin_layout Standard
Calculate the average of input coordinates and write out to file named 
\series bold
<filename>
\series default
 or save to COORDS set named 
\series bold
<set name>
\series default
 in any trajectory format 
\shape italic
cpptraj
\shape default
 recognizes (Amber Trajectory if not specified).
 If the number of atoms in 
\series bold
<mask>
\series default
 are less than the total number of atoms, the topology will be stripped
 to match 
\series bold
<mask>
\series default
.
 
\end_layout

\begin_layout Standard
Note that since coordinates are being averaged over many frames, resulting
 structures may appear distorted.
 For example, if one averages the coordinates of a freely rotating methyl
 group the average position of the hydrogen atoms will be close to the center
 of rotation.
 Also note that typically one will want to remove global rotational and
 translation movement prior to this command by using e.g.
 the 
\series bold
\emph on
rms
\series default
\emph default
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-rmsd"

\end_inset

) command.
\end_layout

\begin_layout Standard
Any arguments that are valid for the 
\series bold
\shape italic
trajout
\series default
\shape default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-trajout"

\end_inset

) can be passed to this command in order to control the format of the output
 coordinates.
 For example, to write out a PDB file containing the averaged coordinates
 over all frames:
\end_layout

\begin_layout LyX-Code
average test.pdb pdb
\end_layout

\begin_layout Standard
To write out a mol2 file containing only the averaged coordinates of residues
 1 to 10 for frames 1 to 100:
\end_layout

\begin_layout LyX-Code
average test.mol2 mol2 start 1 stop 100 :1-10
\end_layout

\begin_layout Standard
To create an average structure of atoms named CA and then use it as a reference
 for an rms command in a subsequent run:
\end_layout

\begin_layout LyX-Code
trajin Input.nc
\end_layout

\begin_layout LyX-Code
average crdset MyAvg @CA
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
rms ref MyAvg @CA out RmsToAvg.dat
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout Subsection
avgcoord
\end_layout

\begin_layout Standard
This command is deprecated.
 Use 'vector center' (optionally with keyword 'magnitude') instead.
\end_layout

\begin_layout Subsection
bounds
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-bounds"

\end_inset


\end_layout

\begin_layout LyX-Code
bounds [<mask>] [out <filename>]
\end_layout

\begin_layout LyX-Code
       [dx <dx> [dy <dy>] [dz <dz>] name <gridname> [offset <bin offset>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>] Mask of atoms to determine bounds of.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write bounds to (default STDOUT if not specified).
\end_layout

\begin_layout Description
[dx
\begin_inset space ~
\end_inset

<dx>
\begin_inset space ~
\end_inset

[dy
\begin_inset space ~
\end_inset

<dy>]
\begin_inset space ~
\end_inset

[dz
\begin_inset space ~
\end_inset

<dz>]] Triggers creation of a grid data set from bounds.
 Spacings of generated grid in the X, Y and Z directions.
 If only dx is specified <dx> will be used for <dy> and <dz> as well.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<gridname>] Name of generated data sets.
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<bin
\begin_inset space ~
\end_inset

offset>] Number of bins to add/subtract in each direction to generated grid.
\end_layout

\begin_layout Standard
DataSets Generated
\end_layout

\begin_layout Description
<gridname> The 3D grid (only if 'dx' etc specified).
\end_layout

\begin_layout Description
<gridname>[xmin] The minimum x coordinate encountered.
\end_layout

\begin_layout Description
<gridname>[xmax] The maximum x coordinate encountered.
\end_layout

\begin_layout Description
<gridname>[ymin] The minimum y coordinate encountered.
\end_layout

\begin_layout Description
<gridname>[ymax] The maximum y coordinate encountered.
\end_layout

\begin_layout Description
<gridname>[zmin] The minimum z coordinate encountered.
\end_layout

\begin_layout Description
<gridname>[zmax] The maximum z coordinate encountered.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the boundaries (i.e.
 the max/min X/Y/Z coordinates) of atoms in 
\series bold
<mask>
\series default
 and write to 
\series bold
<filename>
\series default
 (STDOUT if not specified).
 Useful for determining dimensions for the 
\series bold
\shape italic
grid
\series default
\shape default
 command, and can be used to generate a grid data set that can be used by
 
\series bold
\shape italic
grid
\series default
\shape default
 (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_grid"

\end_inset

).
\end_layout

\begin_layout Subsection
box
\end_layout

\begin_layout LyX-Code
box {[x <xval>] [y <yval>] [z <zval>] {[alpha <a>] [beta <b>] [gamma <g>]
\end_layout

\begin_layout LyX-Code
	 [truncoct]} | nobox | auto [offset <offset>] [radii {vdw|gb|parse|none}]}
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[x
\begin_inset space ~
\end_inset

<xval>]
\begin_inset space ~
\end_inset

[y
\begin_inset space ~
\end_inset

<yval>]
\begin_inset space ~
\end_inset

[z
\begin_inset space ~
\end_inset

<zval>]
\series bold
 
\series default
Change box length(s) to specified value(s).
\end_layout

\begin_layout Description
[alpha
\begin_inset space ~
\end_inset

<a>]
\begin_inset space ~
\end_inset

[beta
\begin_inset space ~
\end_inset

<b>]
\begin_inset space ~
\end_inset

[gamma
\begin_inset space ~
\end_inset

<g>] Change box angle(s) to specified value(s).
\end_layout

\begin_layout Description
[truncoct] Set box angles to truncated octahedron.
\end_layout

\begin_layout Description
[nobox] Remove any existing box information.
\end_layout

\begin_layout Description
auto Set an orthogonal bounding box enclosing all atoms by the specified
 radii and an optional offset.
\end_layout

\begin_deeper
\begin_layout Description
offset
\begin_inset space ~
\end_inset

<offset> Offset in Angstroms to add to each box length (both + and -).
\end_layout

\begin_layout Description
radii
\begin_inset space ~
\end_inset

{vdw|gb|parse|none} Radii to use for each atom: van der Waals, generalized
 Born, PARSE, or no radii.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Modify box information during trajectory processing.
 Note that this will permanently modify the box information for topology
 files during trajectory processing as well.
 It is possible to modify any number of the box parameters (e.g.
 only the Z length can be modified if desired while leaving all other parameters
 intact).
 If no box is present, an orthogonal bounding box enclosing all atoms can
 be created with the 
\series bold
auto
\series default
 keyword.
\end_layout

\begin_layout Subsection
center
\end_layout

\begin_layout LyX-Code
center
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
center
\end_layout

\end_inset

 [<mask>] [origin] [mass] 
\end_layout

\begin_layout LyX-Code
       [ reference | ref <name> | refindex <#> [<refmask>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>] Center based on atoms in mask; default is all atoms.
\end_layout

\begin_layout Description
[origin] Center to origin (0, 0, 0); default is center to box center (X/2,
 Y/2, Z/2).
\end_layout

\begin_layout Description
[mass] Use center of mass instead of geometric center.
\end_layout

\begin_layout Description
[reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

[<refmask]] Center using coordinates in specified reference structure selected
 by <refmask> (<mask> if not specified.
\end_layout

\end_deeper
\begin_layout Standard
Move all atoms so that the center of the atoms in 
\series bold
<mask>
\series default
 is centered at the specified location: box center (default), coordinate
 origin, or reference coordinates.
\end_layout

\begin_layout Standard
For example, to move all coordinates so that the center of mass of residue
 1 is at the center of the box:
\end_layout

\begin_layout LyX-Code
center :1 mass
\end_layout

\begin_layout Subsection
check | checkoverlap | checkstructure
\end_layout

\begin_layout LyX-Code
check
\begin_inset Index idx
status open

\begin_layout Plain Layout
check
\end_layout

\end_inset

 [<mask>] [around <mask2>] [reportfile <report>] [noimage]
\end_layout

\begin_layout LyX-Code
      [skipbadframes] [offset <offset>] [minoffset <minoffset>]
\end_layout

\begin_layout LyX-Code
      [cut <cut>] [nobondcheck] [silent] [plcut <cut>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>] Check structure of atoms in <mask> (all if not specified).
\end_layout

\begin_layout Description
[around
\begin_inset space ~
\end_inset

<mask2>] If specified, only check for problems between atoms in <mask> and
 atoms in <mask2>.
\end_layout

\begin_layout Description
[reportfile
\begin_inset space ~
\end_inset

<report>] Write any problems found to <report> (STDOUT if not specified).
\end_layout

\begin_layout Description
[noimage] Do not image distances.
\end_layout

\begin_layout Description
[skipbadframes] If errors are encountered for a frame, subsequent actions/trajec
tory output will be skipped.
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<offset>] Report bond lengths greater than the equilibrium value plus <offset>
 (default 1.15 Å).
\end_layout

\begin_layout Description
[minoffset
\begin_inset space ~
\end_inset

<minoffset>] Report bond lengths less than the equilibrium value minus <minoffse
t> (default 0.5 Å).
\end_layout

\begin_layout Description
[cut
\begin_inset space ~
\end_inset

<cut>] Report atoms closer than <cut> (default 0.8 Å).
\end_layout

\begin_layout Description
[nobondcheck] Check overlaps only.
\end_layout

\begin_layout Description
[silent] Do not print information for bad frames - useful in conjunction
 with the 
\series bold
skipbadframes
\series default
 option.
\end_layout

\begin_layout Description
[plcut
\begin_inset space ~
\end_inset

<cut>] Pair list cutoff (default 4.0 Å); only matters if box is present.
\end_layout

\end_deeper
\begin_layout Standard
Check the structure and report problems related to atomic overlap/unusual
 bond length.
 Problems are reported when any two atoms in 
\series bold
<mask>
\series default
 (or between 
\series bold
<mask>
\series default
 and 
\series bold
<mask2>
\series default
 if using 
\series bold
'around'
\series default
) are closer than 
\series bold
<cut>
\series default
; atoms that are bonded to each other are ignored (except if using the 
\series bold
'around'
\series default
 mask).
 If bonds are being checked then bond lengths greater than their equilibrium
 value plus 
\series bold
<offset>
\series default
 and less than their equilibrium value minus 
\series bold
<minoffset>
\series default
 are reported as well.
 If box information is present and not using the 
\series bold
'around'
\series default
 mask, a pairlist will be used to speed up the calculation.
\end_layout

\begin_layout Standard
This command can also be used to skip corrupted frames in a trajectory during
 processing.
 For example, if this message is encountered:
\end_layout

\begin_layout LyX-Code
Warning: Frame 10 coords 1 & 2 overlap at origin; may be corrupt.
\end_layout

\begin_layout Standard
One could use 
\series bold
\shape italic
check
\series default
\shape default
 so that e.g.
 a subsequent 
\series bold
\shape italic
distance
\series default
\shape default
 command is not processed for bad frames:
\end_layout

\begin_layout LyX-Code
check @1,2 skipbadframes silent
\end_layout

\begin_layout LyX-Code
distance d1 :1 :10
\end_layout

\begin_layout Standard
Usually frame corruption can be detected using only a few atoms, but this
 may not catch all types of corruption.
 The more atoms that are used the better the corruption detection will be,
 but the slower it will be to process the command.
 Typically a good procedure to follow when corruption is suspected is to
 run 
\series bold
\shape italic
check
\series default
\shape default
 using all important atoms (e.g.
 all solute heavy atoms) with the 
\series bold
skipbadframes
\series default
 keyword followed by a 
\series bold
\shape italic
trajout
\series default
\shape default
 command to write all non-corrupt frames, for example:
\end_layout

\begin_layout LyX-Code
trajin corrupted.crd
\end_layout

\begin_layout LyX-Code
check :1-13 skipbadframes silent
\end_layout

\begin_layout LyX-Code
trajout fixed.corrupted.nc
\end_layout

\begin_layout Subsection
checkchirality
\end_layout

\begin_layout LyX-Code
checkchirality [<name>] [<mask>] [out <filename>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[<mask>] Atoms to check.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write results to.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[L] Number of frames 'L' for each residue.
\end_layout

\begin_layout Description
[D] Number of frames 'D' for each residue.
\end_layout

\end_deeper
\begin_layout Standard
Check the chirality around the alpha carbon in amino acid residues selected
 by <mask>.
 Note that cpptraj expects atom names to correspond to the PDB V3 standard:
 N, CA, C, CB.
 For each residue, the number of frames in which the amino acid is 'L' or
 'D' will be recorded.
 For example, to check the chirality of all amino acids in a system and
 write to a file named chiral.dat with data set name DPDP:
\end_layout

\begin_layout LyX-Code
checkchirality DPDP out chiral.dat
\end_layout

\begin_layout Standard
Output will have format similar to:
\end_layout

\begin_layout LyX-Code
#Res      DPDP[L]  DPDP[D]
\end_layout

\begin_layout LyX-Code
   2.000      100        0
\end_layout

\begin_layout Standard
So in this example residue 2 was 'L' for 100 frames and 'D' for 0 frames.
\end_layout

\begin_layout Subsection
closest | closestwaters
\end_layout

\begin_layout LyX-Code
closest
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
closest
\end_layout

\end_inset

 <# to keep> <mask> [solventmask <solvent mask>] [noimage]
\end_layout

\begin_layout LyX-Code
    	[first | oxygen] [center] [closestout <filename> [name <setname>]]
\end_layout

\begin_layout LyX-Code
    	[outprefix <prefix>] [parmout <filename>]
\end_layout

\begin_layout LyX-Code
    	[parmopts <comma-separated-list>]
\end_layout

\begin_deeper
\begin_layout Description
<#
\begin_inset space ~
\end_inset

to
\begin_inset space ~
\end_inset

keep> Number of solvent molecules to keep around <mask>
\end_layout

\begin_layout Description
<mask> Mask of atoms to search for closest waters around.
\end_layout

\begin_layout Description
[solventmask
\begin_inset space ~
\end_inset

<solvent
\begin_inset space ~
\end_inset

mask>] Optional mask for selecting solvent atoms.
 If not specified, atoms in all molecules marked as 
\begin_inset Quotes eld
\end_inset

solvent
\begin_inset Quotes erd
\end_inset

 will be used.
\end_layout

\begin_layout Description
[noimage] Do not perform imaging; only recommended if trajectory has previously
 been imaged.
\end_layout

\begin_layout Description
[first
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

oxygen] Calculate distances between all atoms in 
\series bold
<mask>
\series default
 and the first atom of solvent only (recommended for standard water models
 as it will increase speed of calculation).
\end_layout

\begin_layout Description
[center] Search for waters closest to geometric center of 
\series bold
<mask>
\series default
 instead of each atom in 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Description
[closestout
\begin_inset space ~
\end_inset

<filename>] Write information on the closest solvent molecules to 
\series bold
<filename>
\series default
.
\end_layout

\begin_layout Description
[outprefix
\begin_inset space ~
\end_inset

<prefix>] Write corresponding topology to file with name prefix 
\series bold
<prefix>
\series default
.
\end_layout

\begin_layout Description
[parmout
\begin_inset space ~
\end_inset

<file>] Write corresponding topology to file with name 
\series bold
<file>
\series default
.
\end_layout

\begin_layout Description
[parmopts
\begin_inset space ~
\end_inset

<list>] Comma-separated list of options for writing the topology file.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[Frame] Frame number.
\end_layout

\begin_layout Description
[Mol] Original solvent molecule number.
\end_layout

\begin_layout Description
[Dist] Solvent molecule distance in Å.
\end_layout

\begin_layout Description
[FirstAtm] First atom number of original solvent molecule.
\end_layout

\end_deeper
\begin_layout Standard
Similar to the 
\series bold
\shape italic
strip
\series default
\shape default
 command, but modify coordinate frame and topology by keeping only the specified
 number of closest solvent molecules to the region specified by the given
 mask.
 Solvent molecules can be determined automatically by 
\shape italic
cpptraj
\shape default
 (by default residues named WAT, HOH, or TIP3), can be specified prior via
 the 
\series bold
\shape italic
solvent
\series default
\shape default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_solvent"

\end_inset

), or can be selected by 
\series bold
solventmask
\series default
.
\end_layout

\begin_layout Standard
The format of the 
\series bold
closestout
\series default
 file is:
\end_layout

\begin_layout LyX-Code
Frame    Molecule    Distance    FirstAtom#
\end_layout

\begin_layout Standard
For example, to obtain the 10 closest waters to residues 1-268 by distance
 to the first atom of the waters, write out which waters were closest for
 each frame to a file called 
\begin_inset Quotes eld
\end_inset

closestmols.dat
\begin_inset Quotes erd
\end_inset

, and write out the stripped topology with prefix 
\begin_inset Quotes eld
\end_inset

closest
\begin_inset Quotes erd
\end_inset

 containing only the solute and 10 waters:
\end_layout

\begin_layout LyX-Code
closest 10 :1-268 first closestout closestmols.dat outprefix closest
\end_layout

\begin_layout Standard
As of version 17 this command is CUDA-enabled in CUDA versions of CPPTRAJ.
\end_layout

\begin_layout Subsection
cluster
\end_layout

\begin_layout Standard
Although the 
\series bold
'cluster'
\series default
 command can still be specified as an action, it is now considered an analysis.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-cluster-analysis"

\end_inset

.
\end_layout

\begin_layout Subsection
clusterdihedral
\end_layout

\begin_layout LyX-Code
clusterdihedral
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
clusterdihedral
\end_layout

\end_inset

 [phibins <N>] [psibins <M>] [out <outfile>] 
\end_layout

\begin_layout LyX-Code
                [dihedralfile <dfile> | <mask>]
\end_layout

\begin_layout LyX-Code
                [framefile <framefile>] [clusterinfo <infofile>]
\end_layout

\begin_layout LyX-Code
                [clustervtime <cvtfile>] [cut <CUT>]
\end_layout

\begin_layout Standard
Cluster frames in a trajectory using dihedral angles.
 To define which dihedral angles will be used for clustering either an atom
 mask or an input file specified by the 
\series bold
dihedralfile
\series default
 keyword should be used.
 If dihedral file is used, each line in the file should contain a dihedral
 to be binned with format:
\end_layout

\begin_layout LyX-Code
ATOM#1 ATOM#2 ATOM#3 ATOM#4 #BINS
\end_layout

\begin_layout Standard
where the ATOM arguments are the atom numbers (starting from 1) defining
 the dihedral and #BINS is the number of bins to be used (so if #BINS=10
 the width of each bin will be 36º).
 If an atom mask is specified, only protein backbone dihedrals (Phi and
 Psi defined using atom names C-N-CA-C and N-CA-C-N) within the mask will
 be used, with the bin sizes specified by the phibins and psibins keywords
 (default for each is 10 bins).
\end_layout

\begin_layout Standard
Output will either be written to STDOUT or the file specified by the 
\series bold
out
\series default
 keyword.
 First, information about which dihedrals were clustered will be printed.
 Then the number of clusters will be printed, followed by detailed information
 of each cluster.
 The clusters are sorted from most populated to least populated.
 Each cluster line has format
\end_layout

\begin_layout LyX-Code
Cluster CLUSTERNUM CLUSTERPOP [ dihedral1bin, dihedral2bin ...
 dihedralNbin ]
\end_layout

\begin_layout Standard
followed by a list of frame numbers that belong to that cluster.
 If a cutoff is specified by 
\series bold
cut
\series default
, only clusters with population greater than CUT will be printed.
\end_layout

\begin_layout Standard
If specified by the 
\series bold
clustervtime
\series default
 keyword, the number of clusters for each frame will be printed to <cvtfile>.
 If specified by the 
\series bold
framefile
\series default
 keyword, a file containing cluster information for each frame will be written
 with format
\end_layout

\begin_layout LyX-Code
Frame CLUSTERNUM CLUSTERSIZE DIHEDRALBINID
\end_layout

\begin_layout Standard
where DIHEDRALBINID is a number that identifies the unique combination of
 dihedral bins this cluster belongs to (specifically it is a 3*number-of-dihedra
l-characters long number composed of the individual dihedral bins).
\end_layout

\begin_layout Standard
If specified by the 
\series bold
clusterinfo
\series default
 keyword, a file containing information on each dihedral and each cluster
 will be printed.
 This file can be read by SANDER for use with REMD with a structure reservoir
 (-rremd=3).
 The file, which is essentially a simplified version of the main output
 file, has the following format:
\end_layout

\begin_layout LyX-Code
#DIHEDRALS
\end_layout

\begin_layout LyX-Code
dihedral1_atom1 dihedral1_atom2 dihedral1_atom3 dihedral1_atom4
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout LyX-Code
#CLUSTERS
\end_layout

\begin_layout LyX-Code
CLUSTERNUM1 CLUSTERSIZE1 DIHEDRALBINID1
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout Subsection
contacts
\end_layout

\begin_layout LyX-Code
contacts [ first | reference | ref <ref> | refindex <#> ] [byresidue]
\end_layout

\begin_layout LyX-Code
         [out <filename>] [time <interval>] [distance <cutoff>] [<mask>]
\end_layout

\begin_layout Standard
NOTE: Users are encouraged to try the 
\series bold
\emph on
nativecontacts
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj-nativecontacts"

\end_inset

), an update version of this command.
\end_layout

\begin_layout Standard
For each atom given in 
\shape italic
mask
\shape default
, calculate the number of other atoms (contacts) within the distance 
\shape italic
cutoff
\shape default
.
 The default cutoff is 7.0 A.
 Only atoms in 
\shape italic
mask
\shape default
 are potential interaction partners (e.g., a mask @CA will evaluate only contacts
 between CA atoms).
 The results are dumped to 
\shape italic
filename
\shape default
 if the keyword 
\begin_inset Quotes eld
\end_inset


\family typewriter
out
\family default

\begin_inset Quotes erd
\end_inset

 is specified.
 Thereby, the time between snapshots is taken to be 
\shape italic
interval
\shape default
.
 In addition to the number of overall contacts, the number of native contacts
 is also determined.
 Native contacts are those that have been found either in the first snapshot
 of the trajectory (if the keyword 
\begin_inset Quotes eld
\end_inset


\family typewriter
first
\family default

\begin_inset Quotes erd
\end_inset

 is specified) or in a reference structure (if the keyword 
\begin_inset Quotes eld
\end_inset


\family typewriter
reference
\family default

\begin_inset Quotes erd
\end_inset

 is specified).
 Finally, if the keyword 
\begin_inset Quotes eld
\end_inset


\family typewriter
byresidue
\family default

\begin_inset Quotes erd
\end_inset

 is provided, results are output on a per-residue basis for each snapshot,
 whereby the number of native contacts is written to 
\shape italic
filename
\shape default
.native.
\end_layout

\begin_layout Subsection
createcrd
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_createcrd"

\end_inset


\end_layout

\begin_layout LyX-Code
createcrd [<name>] [ parm <name> | parmindex <#> ]
\end_layout

\begin_layout Standard
This command creates a COORDS data set named <name> using trajectory frames
 that are associated with the specified topology.
\end_layout

\begin_layout Standard
For example, to save frames that have been previously RMS-fit to a reference
 structure into a COORDS set named MyCrd you would use the input:
\end_layout

\begin_layout LyX-Code
rms reference :1-12@CA
\end_layout

\begin_layout LyX-Code
createcrd MyCrd
\end_layout

\begin_layout LyX-Code
strip :6-8
\end_layout

\begin_layout Standard
Note that here the 
\series bold
\emph on
strip
\series default
\emph default
 command will have no effect on the coordinates saved in MyCrd since it
 occurs after the 
\series bold
\emph on
createcrd
\series default
\emph default
 command.
\end_layout

\begin_layout Subsection
createreservoir
\end_layout

\begin_layout LyX-Code
createreservoir <filename> ene <energy data set> [bin <cluster bin data
 set>]
\end_layout

\begin_layout LyX-Code
                temp0 <temp0> iseed <iseed> [velocity]
\end_layout

\begin_layout LyX-Code
                [parm <parmfile> | parmindex <#>] [title <title>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> File name of the reservoir to create.
\end_layout

\begin_layout Description
ene
\begin_inset space ~
\end_inset

<energy
\begin_inset space ~
\end_inset

data
\begin_inset space ~
\end_inset

set> Data set with energies corresponding to frames.
\end_layout

\begin_layout Description
[bin
\begin_inset space ~
\end_inset

<cluster
\begin_inset space ~
\end_inset

bin
\begin_inset space ~
\end_inset

data
\begin_inset space ~
\end_inset

set>] Data set with bin numbers (for RREMD=3).
\end_layout

\begin_layout Description
temp0
\begin_inset space ~
\end_inset

<temp0> Reservoir temperature.
\end_layout

\begin_layout Description
iseed
\begin_inset space ~
\end_inset

<iseed> Reservoir random number seed.
\end_layout

\begin_layout Description
[velocity] Include velocities in the reservoir.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>] Associated topology.
\end_layout

\begin_layout Description
[title
\begin_inset space ~
\end_inset

<title>] Reservoir title.
\end_layout

\end_deeper
\begin_layout Standard
Create structure reservoir for use with reservoir REMD simulations using
 energies in <energy data set>, temperature <temp0> and random seed <iseed>
 Include velocities if [velocity] is specified.
 If <cluster bin data set> is specified from e.g.
 a previous 'clusterdihedral' command, the reservoir can be used for non-Boltzma
nn reservoir REMD (rremd==3).
\end_layout

\begin_layout Subsection
density
\end_layout

\begin_layout LyX-Code
density [out <filename>] [name <set name>]
\end_layout

\begin_layout LyX-Code
        [ <mask1> ...
 <maskN> [delta <resolution>] [{x|y|z}]
\end_layout

\begin_layout LyX-Code
          [{number|mass|charge|electron}] [{bincenter|binedge}]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
          [restrict {cylinder|square} cutoff <cut>] ]
\end_layout

\begin_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file for histogram(s) (relative distances vs.
 densities for each mask) or total density.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name>] Output data set name.
\end_layout

\begin_layout Description
<mask1>
\begin_inset space ~
\end_inset

...
\begin_inset space ~
\end_inset

<maskN> Arbitrary number of masks for atom selection; a dataset is created
 and the output will contain entries for each mask.
\end_layout

\begin_deeper
\begin_layout Description
[delta
\begin_inset space ~
\end_inset

<resolution>] Resolution, i.e.
 determines number of slices (i.e.
 histogram bins).
 (default 0.25 Å)
\end_layout

\begin_layout Description
[{x|y|z}] Coordinate (axis) for density calculation.
 (default z)
\end_layout

\begin_layout Description
[{number|mass|charge|electron}] Number, mass, partial charge (q) or electron
 (Ne - q) density.
 Electron density will be converted to e-/Å3 by dividing the average area
 spanned by the other two dimensions.
 (default number)
\end_layout

\begin_layout Description
[{bincenter|binedge}] Determine whether histogram bin coordinates will be
 based on bin center (default) or bin edges.
\end_layout

\begin_layout Description
[restrict
\begin_inset space ~
\end_inset

{cylinder|square}] If 
\series bold
'restrict'
\series default
 is specified, only calculate the density that is within a cylinder or square
 shape from the specified axis as defined by a distance cutoff.
\end_layout

\begin_deeper
\begin_layout Description
cutoff
\begin_inset space ~
\end_inset

<cut> The distance cutoff for 
\series bold
'restrict'
\series default
.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
DataSets Created if masks specified:
\end_layout

\begin_layout Description
<set
\begin_inset space ~
\end_inset

name>[avg]:<idx> Average density over coordinate for mask number <idx>.
\end_layout

\begin_layout Description
<set
\begin_inset space ~
\end_inset

name>[sd]:<idx> Standard deviation of density over coordinate for mask number
 <idx>.
\end_layout

\begin_layout Standard
DataSets Created if no masks specified:
\end_layout

\begin_layout Description
<set
\begin_inset space ~
\end_inset

name> Total system density each frame.
\end_layout

\end_deeper
\begin_layout Standard
If no atom masks are specified, calculate the total system density.
 Otherwise, calculate specified density along the given axis for atoms in
 specified mask(s).
 Defaults are shown in parentheses above.
 The format of the file is as follows.
 Comments are lines starting with '#' or empty lines.
 All other lines must contain the atom type followed by an integer number
 for the electron number.
 Entries must be separated by spaces or '='.
 Example input:
\end_layout

\begin_layout LyX-Code
density out number_density.dat number delta 0.25 ":POPC@P1" ":POPC@N" 
\backslash

\end_layout

\begin_layout LyX-Code
        ":POPC@C2" ":POPC"
\end_layout

\begin_layout LyX-Code
density out mass_density.dat mass delta 0.25 ":POPC@P1" ":POPC@N" 
\backslash

\end_layout

\begin_layout LyX-Code
        ":POPC@C2" ":POPC"
\end_layout

\begin_layout LyX-Code
density out charge_density.dat charge delta 0.25 ":POPC@P1" ":POPC@N" 
\backslash

\end_layout

\begin_layout LyX-Code
        ":POPC@C2" ":POPC"
\end_layout

\begin_layout LyX-Code
density out electron_density.dat electron delta 0.25 efile Nelec.in 
\backslash

\end_layout

\begin_layout LyX-Code
        ":POPC@P1" ":POPC@N" ":POPC@C2" ":POPC" ":TIP3" 
\backslash

\end_layout

\begin_layout LyX-Code
        ":POPC | :TIP3" "*"
\end_layout

\begin_layout LyX-Code
density out ion_density.dat number delta 0.25 ":SOD" ":CLA"
\end_layout

\begin_layout Standard
See also $AMBERHOME/AmberTools/test/cpptraj/Test_Density.
\end_layout

\begin_layout Standard
It can be useful to write out the average and standard deviation as an XYDY
 set to a Grace data file, e.g.
\end_layout

\begin_layout LyX-Code
density :WAT@O out wato.agr xydy
\end_layout

\begin_layout Subsection
diffusion
\end_layout

\begin_layout Standard

\emph on
Note that although the syntax for 
\series bold
diffusion
\series default
 has changed as of version 16, the old syntax is still supported.
\end_layout

\begin_layout LyX-Code
diffusion [{out <filename> | separateout <suffix>}] [time <time per frame>]
 [noimage]
\end_layout

\begin_layout LyX-Code
      	[<mask>] [<set name>] [individual] [diffout <filename>] [nocalc]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write mean-square displacement (MSD) data set output to file
 specified by <filename>.
\end_layout

\begin_layout Description
[separateout
\begin_inset space ~
\end_inset

<suffix>] Write each MSD data set type to files with suffix <suffix>; see
 description below.
\end_layout

\begin_layout Description
[time
\begin_inset space ~
\end_inset

<time_per_frame>] Time in-between each coordinate frame in ps; default is
 1.0.
\end_layout

\begin_layout Description
[noimage] If specified do not perform imaging.
 If this is specified coordinates should be unwrapped prior to this command.
\end_layout

\begin_layout Description
[<mask>] Mask of atoms to calculate diffusion for; default all atoms.
\end_layout

\begin_layout Description
[<set
\begin_inset space ~
\end_inset

name>] MSD data set name.
\end_layout

\begin_layout Description
[individual] Write diffusion for each individual atom as well as average
 diffusion for atoms in mask.
\end_layout

\begin_layout Description
[diffout
\begin_inset space ~
\end_inset

<filename>] Write diffusion contants calculated from fits of MSD data sets
 to <filename>.
\end_layout

\begin_layout Description
[nocalc] Do not calculate diffusion constants.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[X] MSD(s) in the X direction.
\end_layout

\begin_layout Description
[Y] MSD(s) in the Y direction.
\end_layout

\begin_layout Description
[Z] MSD(s) in the Z direction.
\end_layout

\begin_layout Description
[R] Overall MSD(s).
\end_layout

\begin_layout Description
[A] Overall displacement(s).
\end_layout

\begin_layout Description
[D] Diffusion constants.
\end_layout

\begin_layout Description
[Label] Diffusion constant lablels.
\end_layout

\begin_layout Description
[Slope] Linear regression slopes.
\end_layout

\begin_layout Description
[Intercept] Linear refression Y-intercepts.
\end_layout

\begin_layout Description
[Corr] Linear regression correlation coefficients.
\end_layout

\end_deeper
\begin_layout Standard
Compute mean square displacement (MSD) plots (using distance traveled from
 initial position) for the atoms in 
\series bold
<mask>
\series default
.
 By default only the diffusion averaged over all atoms in 
\series bold
<mask>
\series default
 is calculated; if 
\series bold
individual
\series default
 is specified diffusion for individual atoms is calculated as well.
 
\end_layout

\begin_layout Standard
In order to correctly calculate diffusion molecules should take continuous
 paths, so imaging of atoms is autoimatically performed.
 If the trajectory is already unwrapped (or the unwrap command is used prior
 to this command) the 
\series bold
noimage
\series default
 keyword can be used.
 
\end_layout

\begin_layout Standard
The following types of displacements are calculated.
 If 
\series bold
separateout
\series default
 is specfied the following files will be created:
\end_layout

\begin_layout Description
x_<suffix> Mean square displacement(s) in the X direction (in Å
\begin_inset Formula $^{\text{2}}$
\end_inset

/ps).
\end_layout

\begin_layout Description
y_<suffix> Mean square displacement(s) in the Y direction (in Å
\begin_inset Formula $^{\text{2}}$
\end_inset

/ps).
\end_layout

\begin_layout Description
z_<suffix> Mean square displacement(s) in the Z direction (in Å
\begin_inset Formula $^{\text{2}}$
\end_inset

/ps).
\end_layout

\begin_layout Description
r_<suffix> Overall mean square displacement(s) (in Å
\begin_inset Formula $^{\text{2}}$
\end_inset

/ps).
\end_layout

\begin_layout Description
a_<suffix> Total distance traveled (in Å/ps).
\end_layout

\begin_layout Standard
The diffusion coefficient 
\series bold
\shape italic
D
\series default
\shape default
 can be calculated using the Einstein relation:
\end_layout

\begin_layout Standard
\begin_inset Formula 
\[
2nD=\lim_{t\rightarrow\infty}\frac{MSD}{t}
\]

\end_inset


\end_layout

\begin_layout Standard
Where 
\series bold
\shape italic
n
\series default
\shape default
 is the number of dimensions; for overall MSD n = 3, for single dimension
 MSD (e.g.
 X) n = 1, etc.
 Unless 
\series bold
nocalc
\series default
 is specified, the diffusion constant is calculated automatically from MSD
 data sets (and written to the file specified by 
\series bold
diffout
\series default
) in the following manner.
 The slope the plot of MSD versus time is obtained via linear regression.
 To convert from units of Å
\begin_inset Formula $^{\text{2}}$
\end_inset

/ps to 1x10
\begin_inset script superscript

\begin_layout Plain Layout
-5
\end_layout

\end_inset

 cm
\begin_inset script superscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

/s, the slope is multiplied by 10.0/(2n).
 Both the calculated diffusion constants as well as the results of the fit
 are reported.
\end_layout

\begin_layout Standard
Due to the fact that diffusion is currently calculated from initial positions
 only, diffusion calculated for small numbers of atoms will be inherently
 stochastic, so the results are most sensible when averaged over many atoms;
 for example, the diffusion of water should be calculated using all waters
 in the system.
\end_layout

\begin_layout Standard
For example, to calculate the diffusion of water in a system:
\end_layout

\begin_layout LyX-Code
diffusion :WAT@O out WAT_O.agr WAT_O diffout DC.dat
\end_layout

\begin_layout Subsection
dihedral 
\end_layout

\begin_layout LyX-Code
dihedral
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
dihedral
\end_layout

\end_inset

 [<name>] <mask1> <mask2> <mask3> <mask4> [out <filename>] [mass]
\end_layout

\begin_layout LyX-Code
         [type {alpha|beta|gamma|delta|epsilon|zeta|chi|c2p|h1p|phi|psi|omega|pc
hi}]
\end_layout

\begin_layout LyX-Code
         [range360]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
<maskX> Four atom masks selecting atom(s) to calculate dihedral for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[mass] Use center of mass of atoms in <maskX>; default is geometric center.
\end_layout

\begin_layout Description
[range360] Output dihedral angle values from 0 to 360 degrees instead of
 -180 to 180 degrees.
\end_layout

\begin_layout Description
[type
\begin_inset space ~
\end_inset

<type>] Label dihedral as <type> for use with 
\series bold
\shape italic
statistics
\series default
\shape default
 analysis; note 'chi' is nucleic acid chi and 'pchi' is protein chi.
\end_layout

\end_deeper
\begin_layout Standard
Calculate dihedral angle (in degrees) between the planes defined by atoms
 in <mask1>, <mask2>, <mask3> and <mask2>, <mask3>, <mask4>.
 To calculate multiple dihedral angles see the 
\series bold
\emph on
multidihedral
\series default
\emph default
 command on page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "subsec:cpptraj_multidihedral"
plural "false"
caps "false"
noprefix "false"

\end_inset

.
\end_layout

\begin_layout Subsection
dihedralrms | dihrms
\end_layout

\begin_layout LyX-Code
	dihedralrms [<name>] <dihedral types> [out <file>]
\end_layout

\begin_layout LyX-Code
            	[ first | reference | ref <name> | refindex <#> | previous
 |
\end_layout

\begin_layout LyX-Code
            	  reftraj <name> [parm <name> | parmindex <#>] ]
\end_layout

\begin_layout LyX-Code
            	[dihtype <name>:<a0>:<a1>:<a2>:<a3>[:<offset>] ...]
\end_layout

\begin_layout LyX-Code
                [tgtrange <range> [refrange <range>]]
\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
<dihedral
\begin_inset space ~
\end_inset

types> Dihedral types to look for.
 Note that chip is 'protein chi', chin is 'nucleic chi'.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[dihtype
\begin_inset space ~
\end_inset

<name>:<a0>:<a1>:<a2>:<a3>[:<offset>] Search for a custom dihedral type
 called <name> using atom names <a0>, <a1>, <a2>, and <a3>.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
Offset: -2=<a0><a1> in previous res, -1=<a0> in previous res, 0=All <aX>
 in single res, 1=<a3> in next res, 2=<a2><a3> in next res.
\end_layout

\end_deeper
\begin_layout Description
[tgtrange
\begin_inset space ~
\end_inset

<range>] Residue range to look for target dihedrals in.
 Default is all solute residues.
\end_layout

\begin_layout Description
[refrange
\begin_inset space ~
\end_inset

<range>] Residues range to look for reference dihedrals in.
 If not specified, use target range.
\end_layout

\end_deeper
\begin_layout Standard
Calculate RMSD of selected dihedrals to dihedrals in a reference structure.
 See the 
\series bold
\emph on
multidihedral
\series default
\emph default
 command syntax on page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "subsec:cpptraj_multidihedral"
plural "false"
caps "false"
noprefix "false"

\end_inset

 for a list of all available dihedral types.
\end_layout

\begin_layout Subsection
dihedralscan
\end_layout

\begin_layout Standard
This command has been replaced by 
\series bold
\emph on
permutedihedrals
\series default
\emph default
; see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_permutedihedrals"

\end_inset

.
\end_layout

\begin_layout Subsection
dipole
\end_layout

\begin_layout LyX-Code
dipole <filename> {data <dsname> | <nx> <dx> <ny> <dy> <nz> <dz> 
\end_layout

\begin_layout LyX-Code
       [gridcenter <cx> <cy> <cz>]}
\end_layout

\begin_layout LyX-Code
   	[box|origin|center <mask>] [negative] [name <gridname>]
\end_layout

\begin_layout LyX-Code
       <mask1> {origin | box} [max <max_percent>]
\end_layout

\begin_layout Standard
NOTE: This command is not well-tested and may be obsolete.
\end_layout

\begin_layout Standard
Same as 
\family sans
\series bold
grid
\family default
\series default
 (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_grid"

\end_inset

 below) except that dipoles of the solvent molecules are binned.
 The output file format is for Chris Bayly's discern delegate program that
 comes with Midas/Plus.
 Consult the code in Action_Dipole.cpp for more information.

\shape italic
 
\end_layout

\begin_layout Subsection
distance 
\end_layout

\begin_layout LyX-Code
distance
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
distance
\end_layout

\end_inset

 [<name>] <mask1> [<mask2>] [point <X> <Y> <Z>]
\end_layout

\begin_layout LyX-Code
         [ reference | ref <name> | refindex <#> ]
\end_layout

\begin_layout LyX-Code
     	[out <filename>] [geom] [noimage] [type noe]
\end_layout

\begin_layout LyX-Code
	Options for 'type noe':
\end_layout

\begin_layout LyX-Code
	  [bound <lower> bound <upper>] [rexp <expected>] [noe_strong] [noe_medium]
 [noe_weak]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name
\end_layout

\begin_layout Description
<mask1> Atom mask selecting atom(s) to calculate distance between.
\end_layout

\begin_layout Description
<mask2> If specified, second atom mask selection atom(s) to calculate distance
 from <mask1>.
\end_layout

\begin_layout Description
point
\begin_inset space ~
\end_inset

<X>
\begin_inset space ~
\end_inset

<Y>
\begin_inset space ~
\end_inset

<Z> If specified instead of second mask, calculate distance between <mask1>
 and specified XYZ coordinates.
\end_layout

\begin_layout Description
reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#> If specified, calculate distance between <mask1> in each input frame
 and <mask2> in the specified reference.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output filename.
\end_layout

\begin_layout Description
[geom] Use geometric center of atoms in <mask1>/<mask2>; default is to use
 center of mass.
\end_layout

\begin_layout Description
[noimage] Do not image distances across periodic boundaries.
\end_layout

\begin_layout Description
[type
\begin_inset space ~
\end_inset

noe] Mark distance as 'noe' for use with 
\series bold
\shape italic
statistics
\series default
\shape default
 analysis.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[bound
\begin_inset space ~
\end_inset

<lower>
\begin_inset space ~
\end_inset

bound
\begin_inset space ~
\end_inset

<upper>] Lower and upper bounds for NOE (in Angstroms); must specify both.
\end_layout

\begin_layout Description
[rexp
\begin_inset space ~
\end_inset

<expected>] Expected value for NOE (in Angstroms); if not given '(<lower>
 + <upper>)' / 2.0 is used.
\end_layout

\begin_layout Description
[noe_strong] Set lower and upper bounds to 1.8 and 2.9 Å respectively.
\end_layout

\begin_layout Description
[noe_medium] Set lower and upper bounds to 2.9 and 3.5 Å respectively.
\end_layout

\begin_layout Description
[noe_weak] Set lower and upper bounds to 3.5 and 5.0 Å respectively.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Calculate distance between the center of mass of atoms in <mask1> to atoms
 in <mask2>, between atoms in <mask1> from each input frame and atoms in
 <mask2> in specified reference, or atoms in <mask1> and the specified point.
 If 
\series bold
geom
\series default
 is specified use the geometric center instead.
 For periodic systems imaging is turned on by default; the 
\series bold
noimage
\series default
 keyword disables imaging.
\end_layout

\begin_layout Standard
A distance can be labeled using '
\family typewriter
type noe
\family default
' for further analysis as an NOE using the 
\series bold
\shape italic
'statistics'
\series default
\shape default
 analysis command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_statistics"

\end_inset

).
\end_layout

\begin_layout Subsection
drms | drmsd (distance RMSD)
\end_layout

\begin_layout LyX-Code
drmsd
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
drmsd
\end_layout

\end_inset

 [<dataset name>] [<mask> [<refmask>]] [out <filename>]
\begin_inset Newline newline
\end_inset

      [ first | ref <refname> | refindex <#> | 
\begin_inset Newline newline
\end_inset

        reftraj <trajname> [parm <trajparm> | parmindex <parm#>] ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<dataset
\begin_inset space ~
\end_inset

name>] Output data set name.
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate DRMSD for.
\end_layout

\begin_layout Description
[<refmask>] Mask corresponding to atoms in reference; if not specified,
 <mask> is used.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[first] Use the first trajectory frame processed as reference.
\end_layout

\begin_layout Description

\series bold
[reference]
\series default
 Use the first previously read in reference structure.
\end_layout

\begin_layout Description

\series bold
[ref
\series default

\begin_inset space ~
\end_inset

<refname>] Use previously read in reference structure specified by <refname>.
\end_layout

\begin_layout Description

\series bold
[refindex
\series default

\begin_inset space ~
\end_inset

<#>] Use previously read in reference structure specified by <#> (based
 on order read in).
\end_layout

\begin_layout Description
previous Use frame prior to current frame as reference.
\end_layout

\begin_layout Description

\series bold
reftraj
\series default

\begin_inset space ~
\end_inset

<name> Use frames from COORDS set <name> or read in from trajectory file
 <name> as references.
 Each frame from <name> is used in turn, so that frame 1 is compared to
 frame 1 from <name>, frame 2 is compared to frame 2 from <name> and so
 on.
 If <trajname> runs out of frames before processing is complete, the last
 frame of <trajname> continues to be used as the reference.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<parmname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> If 
\series bold
reftraj
\series default
 specifies a file associate trajectory <name> with specified topology; if
 not specified the first topology is used.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Calculate the distance RMSD (i.e.
 the RMSD of all pairs of internal distances) between atoms in the frame
 defined by 
\series bold
<mask>
\series default
 (all if no 
\series bold
<mask>
\series default
 specified) to atoms in a reference defined by 
\series bold
<refmask>
\series default
 (
\series bold
<mask>
\series default
 if 
\series bold
<refmask>
\series default
 not specified).
 Both 
\series bold
<mask>
\series default
 and 
\series bold
<refmask>
\series default
 must specify the same number of atoms, otherwise an error will occur.
 
\end_layout

\begin_layout Standard
Because this method compares pairs of internal distances and not absolute
 coordinates, it is not sensitive to translations and rotations the way
 that a no-fit RMSD calculation is.
 It can be more time consuming however, as (N
\begin_inset script superscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

-N)/2 distances must be calculated and compared for both the target and
 reference structures.
 
\end_layout

\begin_layout Standard
For example, to get the DRMSD of a residue named LIG to its structure in
 the first frame read in:
\end_layout

\begin_layout LyX-Code
drmsd :LIG first out drmsd.dat
\end_layout

\begin_layout Subsection
dssp
\end_layout

\begin_layout Standard
See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-secstruct"

\end_inset

.
\end_layout

\begin_layout Subsection
energy
\end_layout

\begin_layout LyX-Code
energy [<name>] [<mask1>] [out <filename>]
\end_layout

\begin_layout LyX-Code
   	[bond] [angle] [dihedral] {[nb14] | [e14] | [v14]}
\end_layout

\begin_layout LyX-Code
   	{[nonbond] | [elec] [vdw]} [kinetic [ketype {vel|vv}] [dt <dt>]]
\end_layout

\begin_layout LyX-Code
   	[ etype { simple |
\end_layout

\begin_layout LyX-Code
   	          directsum [npoints <N>] |
\end_layout

\begin_layout LyX-Code
   	          ewald [cut <cutoff>] [dsumtol <dtol>] [rsumtol <rtol>]
\end_layout

\begin_layout LyX-Code
   	                [ewcoeff <coeff>] [maxexp <max>] [skinnb <skinnb>]
\end_layout

\begin_layout LyX-Code
   	                [mlimits <X>,<Y>,<Z>] [erfcdx <dx>]
\end_layout

\begin_layout LyX-Code
   	          pme [cut <cutoff>] [dsumtol <dtol>] [order <order>] [ljswidth
 <width>]
\end_layout

\begin_layout LyX-Code
   	              [ewcoeff <coeff>] [ljpme] [ewcoefflj] [skinnb <skinnb>]
\end_layout

\begin_layout LyX-Code
   	              [nfft <nfft1>,<nfft2>,<nfft3>] [erfcdx <dx>]
\end_layout

\begin_layout LyX-Code
   	        } ] 
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[<mask1>] Mask of atoms to calculate energy for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write results to.
\end_layout

\begin_layout Description
[bond] Calculate bond energy.
\end_layout

\begin_layout Description
[angle] Calculate angle energy.
\end_layout

\begin_layout Description
[dihedral] Calculate dihedral energy.
\end_layout

\begin_layout Description
[nb14] Calculate nonbonded 1-4 energy.
\end_layout

\begin_layout Description
[e14] Calculate 1-4 electrostatics.
\end_layout

\begin_layout Description
[v14] Calculate 1-4 van der Waals.
\end_layout

\begin_layout Description
[nonbond] Calculate nonbonded energy (electrostatics and van der Waals).
\end_layout

\begin_layout Description
[elec] Calculate electrostatic energy (Coulomb potential).
\end_layout

\begin_layout Description
[vdw] Calculate van der Waals energy (Lennard-Jones 6-12 potential).
\end_layout

\begin_layout Description
[etype
\begin_inset space ~
\end_inset

<type>] Calculate electrostatics via specified type.
\end_layout

\begin_layout Description
[simple] Use simple Coulomb term for electrostatics, no cutoff.
\end_layout

\begin_layout Description
[directsum] Use direct summation method for electrostatics.
\end_layout

\begin_deeper
\begin_layout Description
[npoints
\begin_inset space ~
\end_inset

<N>] Number of cells in each direction to calculate the direct sum.
\end_layout

\end_deeper
\begin_layout Description
[ewald] Use Ewald summation for electrostatics.
 If van der Waals energy will be calculated a long-range correction for
 periodicity will be applied.
\end_layout

\begin_deeper
\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cutoff> Direct space cutoff in Angstroms (default 8.0).
\end_layout

\begin_layout Description
dsumtol
\begin_inset space ~
\end_inset

<dtol> Direct sum tolerance (default 0.00001).
 Used to determine Ewald coefficient.
\end_layout

\begin_layout Description
rsumtol
\begin_inset space ~
\end_inset

<rtol> Reciprocal sum tolerance (default 0.00005).
 Used to determine number of reciprocal space vectors.
\end_layout

\begin_layout Description
ewcoeff
\begin_inset space ~
\end_inset

<coeff> Ewald coefficient in 1/Ang.
\end_layout

\begin_layout Description
skinnb Used to determine pairlist atoms (added to cut, so pairlist cutoff
 is 
\series bold
cut
\series default
 + 
\series bold
skinnb
\series default
); included in order to maintain consistency with results from sander.
\end_layout

\begin_layout Description
mlimits
\begin_inset space ~
\end_inset

<X>,<Y>,<Z> Explicitly set the number of reciprocal space vectors in each
 dimension.
 Will be determined automatically if not specified.
\end_layout

\begin_layout Description
erfcdx
\begin_inset space ~
\end_inset

<dx> Spacing to use for the ERFC splines (default 0.0002 Ang.).
\end_layout

\end_deeper
\begin_layout Description
[pme] Use particle mesh Ewald for electrostatics.
 If van der Waals energy will be calculated a long-range correction for
 periodicity will be applied.
\end_layout

\begin_deeper
\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cutoff> Direct space cutoff in Angstroms (default 8.0).
\end_layout

\begin_layout Description
dsumtol
\begin_inset space ~
\end_inset

<dtol> Direct sum tolerance (default 0.00001).
 Used to determine Ewald coefficient.
\end_layout

\begin_layout Description
order
\begin_inset space ~
\end_inset

<order> Spline order for charges.
\end_layout

\begin_layout Description
ljswidth
\begin_inset space ~
\end_inset

<width> If specified, use a force-switching form for the Lennard-Jones calculati
on from <cutoff>-<width> to <cutoff>.
\end_layout

\begin_layout Description
ewcoeff
\begin_inset space ~
\end_inset

<coeff> Ewald coefficient in 1/Ang.
\end_layout

\begin_layout Description
ljpme If specified use particle mesh Ewald for calculating Lennard-Jones
 interactions.
\end_layout

\begin_layout Description
ewcoefflj Ewald coefficient for Lennard-Jones PME.
\end_layout

\begin_layout Description
skinnb Used to determine pairlist atoms (added to cut, so pairlist cutoff
 is 
\series bold
cut
\series default
 + 
\series bold
skinnb
\series default
); included in order to maintain consistency with results from sander.
\end_layout

\begin_layout Description
nfft
\begin_inset space ~
\end_inset

<nfft1>,<nfft2>,<nfft3> Explicitly set the number of FFT grid points in
 each dimension.
 Will be determined automatically if not specified.
\end_layout

\begin_layout Description
erfcdx
\begin_inset space ~
\end_inset

<dx> Spacing to use for the ERFC splines (default 0.0002 Ang.).
\end_layout

\end_deeper
\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[bond] Bond energy.
\end_layout

\begin_layout Description
[angle] Angle energy.
\end_layout

\begin_layout Description
[dih] Dihedral energy.
\end_layout

\begin_layout Description
[vdw14] 1-4 van der Waals energy.
\end_layout

\begin_layout Description
[elec14] 1-4 electrostatic energy.
\end_layout

\begin_layout Description
[vdw] van der Waals energy.
\end_layout

\begin_layout Description
[elec] Electrostatic energy.
\end_layout

\begin_layout Description
[total] Total energy.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the energy for atoms in <mask>.
 If no terms are specified, all terms are calculated.
 Note that the non-bonded energy terms for 
\series bold
'simple'
\series default
 do not take into account periodicity and there is no distance cut-off.
 Electrostatics can also be determined via the direct sum, Ewald, or particle-me
sh Ewald summation procedures.
 The particle mesh Ewald functionality requires that CPPTRAJ be compiled
 with FFTW and a C++11 compliant compiler.
\end_layout

\begin_layout Standard
Calculation of energy terms requires that the associated topology file have
 parameters for any of the calculated terms, so for example angle calculations
 are not possible when using a PDB file as a topology, etc.
 All nonbonded calculations methods other than 
\series bold
simple
\series default
 require unit cell parameters.
\end_layout

\begin_layout Standard
For example, to calculate all energy terms and write to a Grace-format file:
\end_layout

\begin_layout LyX-Code
parm DPDP.parm7 
\end_layout

\begin_layout LyX-Code
trajin DPDP.nc 
\end_layout

\begin_layout LyX-Code
energy DPDP out ene.agr 
\end_layout

\begin_layout Subsection
esander
\end_layout

\begin_layout LyX-Code
esander [<name>] [out <filename>] [saveforces] [parmname <file>] [keepfiles]
\end_layout

\begin_layout LyX-Code
        [<namelist vars> ...]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write results to.
\end_layout

\begin_layout Description
[saveforces] If specified, save forces to frames.
 Requires writing frames in NetCDF format.
\end_layout

\begin_layout Description
[parmname
\begin_inset space ~
\end_inset

<file>] Name of temporary topology file (default: 'CpptrajEsander.parm7').
\end_layout

\begin_layout Description
[keepfiles] Keep temporary topology file after program execution.
\end_layout

\begin_layout Description
[<namelist
\begin_inset space ~
\end_inset

vars>] Namelist variables supported by the sander API in format 'var <value>';
 see below.
\end_layout

\end_deeper
\begin_layout Standard
Calculate energies for input frames using the sander API.
 It requires compilation with the SANDER API (sanderlib).
 This can be considered as a faster alternative to energy post-processing
 with sander (imin = 5).
 Currently the following sander namelist variables are supported: 
\series bold
extidel
\series default
, 
\series bold
intdiel
\series default
, 
\series bold
rgbmax
\series default
, 
\series bold
saltcon
\series default
, 
\series bold
cut
\series default
, 
\series bold
dielc
\series default
, 
\series bold
igb
\series default
, 
\series bold
alpb
\series default
, 
\series bold
gbsa
\series default
, 
\series bold
lj1264
\series default
, 
\series bold
ipb
\series default
, 
\series bold
inp
\series default
, 
\series bold
vdwmeth
\series default
, 
\series bold
ew_type
\series default
, 
\series bold
ntb
\series default
, 
\series bold
ntf
\series default
, 
\series bold
ntc
\series default
.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "chap:sander"

\end_inset

 for details.
\end_layout

\begin_layout Standard
If ntb/cut/igb are not specified cpptraj will attempt to pick reasonable
 values based on the input system.
 The defaults for a non-periodic system are ntb=0, cut=9999.0, igb=1.
 The defaults for a periodic system are ntb=1, cut=8.0, igb=0.
 This currently requires writing a temporary Amber topology, the name of
 which can be set by 
\series bold
parmname
\series default
.
 If 
\series bold
keepfiles
\series default
 is specified this temporary topology will not be deleted after execution.
\end_layout

\begin_layout Standard
For example, to calculate energies for a non-periodic system using igb=1
 (the default) with GB surface area turned on (gbsa=1):
\end_layout

\begin_layout LyX-Code
parm DPDP.parm7
\end_layout

\begin_layout LyX-Code
trajin DPDP.nc
\end_layout

\begin_layout LyX-Code
esander DPDP out Edpdp.dat gbsa 1 
\end_layout

\begin_layout Subsection
filter
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-filter"

\end_inset


\end_layout

\begin_layout LyX-Code
filter {<dataset arg> min <min> max <max> ...} [out <file>] [name <setname>]
\end_layout

\begin_layout LyX-Code
  	{[multi] | [filterset <set> [newset <newname>]] [countout <countfile>]}
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dataset
\begin_inset space ~
\end_inset

arg> Data set name(s) to use for filtering
\end_layout

\begin_layout Description
min
\begin_inset space ~
\end_inset

<min> Allow values greater than <min> in dataset(s).
\end_layout

\begin_layout Description
max
\begin_inset space ~
\end_inset

<max> Allow values greater than <max> in dataset(s).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File containing 1 for frames that were allowed, 0 for frames that
 were filtered.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Filtered data set name containing 1 for allowed frames, 0 for
 filtered frames.
\end_layout

\begin_layout Description
[multi] Filter each set separately instead of all together (creates filter
 set for each input set).
 Cannot be used with 'filterset'.
\end_layout

\begin_layout Description
[filterset
\begin_inset space ~
\end_inset

<set>] If specified, <set> will be filtered to only contain data that satisfies
 cutoffs.
 Cannot be used with 'multi'.
\end_layout

\begin_deeper
\begin_layout Description
[newset
\begin_inset space ~
\end_inset

<newname>] If specified a new set will be created from 'filterset' instead
 of replacing 'filterset'.
\end_layout

\end_deeper
\begin_layout Description
[countout
\begin_inset space ~
\end_inset

<count>] If specified, write number of elements passed and filtered to <countfil
e>.
 Cannot be used with 'multi'.
\end_layout

\begin_layout Standard
Sets Created (not 'multi')
\end_layout

\begin_layout Description
<setname> For each input element contains 1 for elements that 
\begin_inset Quotes eld
\end_inset

passed
\begin_inset Quotes erd
\end_inset

, 0 otherwise.
\end_layout

\begin_layout Description
<setname>[npassed] Number of elements that passed.
\end_layout

\begin_layout Description
<setname>[nfiltered] Number of elements filtered out.
\end_layout

\begin_layout Standard
Sets Created ('multi')
\end_layout

\begin_layout Description
<setname>:<idx> For each input set (number with <idx>, starting from 0)
 contains 1 for elements that 
\begin_inset Quotes eld
\end_inset

passed
\begin_inset Quotes erd
\end_inset

, 0 otherwise.
\end_layout

\end_deeper
\begin_layout Standard
For all following actions, only include frames that are between 
\series bold
<min>
\series default
 and 
\series bold
<max>
\series default
 of data sets in 
\series bold
<dataset arg>
\series default
.
 There must be at least one 
\series bold
<min>
\series default
 and 
\series bold
<max>
\series default
 argument, and there must be as many 
\series bold
<min>
\series default
/
\series bold
<max>
\series default
 arguments as there are specified data sets.
 If 
\series bold
'multi'
\series default
 is specified then only filter data sets will be created for each data set
 instead.
 If 
\series bold
'filterset'
\series default
 is specified, the specified <set> will be modified to only contain '1'
 frames; cannot be used with 
\series bold
'multi'
\series default
.
 If 
\series bold
'newset'
\series default
 is also specified, a new set will be created containing the '1' frames
 instead.
 The 
\series bold
'filterset'
\series default
 functionality only works for 1D scalar sets.
 If 
\series bold
'countout'
\series default
 is specified, the final number of elements passed and filtered out will
 be written to <countfile>.
\end_layout

\begin_layout Standard
For example, to write only frames in-between an RMSD of 0.7-0.8 Angstroms
 for a given input trajectory:
\end_layout

\begin_layout LyX-Code
trajin ../tz2.truncoct.nc
\end_layout

\begin_layout LyX-Code
rms R1 first :2-11
\end_layout

\begin_layout LyX-Code
filter R1 min 0.7 max 0.8 out filter.dat
\end_layout

\begin_layout LyX-Code
outtraj maxmin.crd
\end_layout

\begin_layout Standard
The output trajectory will only contain frames that meet the RMSD requirement,
 and the 
\emph on
filter.dat
\emph default
 file can be used to see which frames those were that were output.
\end_layout

\begin_layout Standard
A similar command that can be used with data that already exists (e.g.
 it has been read in with 
\series bold
\shape italic
readdata
\series default
\shape default
) is 
\series bold
\shape italic
datafilter
\series default
\shape default
 (see page 
\begin_inset CommandInset ref
LatexCommand pageref
reference "subsec:cpptraj-datafilter"

\end_inset

).
\end_layout

\begin_layout Subsection
fixatomorder
\end_layout

\begin_layout LyX-Code
fixatomorder [outprefix <prefix>] [parmout <filename>] 
\end_layout

\begin_layout LyX-Code
             [parmopts <comma-separated-list>]
\end_layout

\begin_layout LyX-Code
             [pdborder [hetatm <mask>]] (EXPERIMENTAL)
\end_layout

\begin_deeper
\begin_layout Description
outprefix
\begin_inset space ~
\end_inset

<prefix> Write re-ordered topology to <prefix>.<originalname>
\end_layout

\begin_layout Description
parmout
\begin_inset space ~
\end_inset

<filename> Write re-ordered topology to <filename>
\end_layout

\begin_layout Description
parmopts
\begin_inset space ~
\end_inset

<list> Options for writing topology file
\end_layout

\begin_layout Description
pdborder (EXPERIMENTAL) Try to reorder atoms according to PDB information.
\end_layout

\begin_deeper
\begin_layout Description
hetatm
\begin_inset space ~
\end_inset

<mask> Mark atoms in mask as HETATM, order them after other atoms.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Cpptraj (and most of Amber) expects that atom indices in molecules to increase
 monotonically.
 However, occasionally atom indices in molecules can become disordered or
 non-sequential, in which case cpptraj will print an error message such
 as the following:
\end_layout

\begin_layout LyX-Code
Error: Atom 45 was assigned a lower molecule # (1) than previous atom (2).
\end_layout

\begin_layout Standard
and:
\end_layout

\begin_layout LyX-Code
Error: Could not determine molecule information for <topology file>.
\end_layout

\begin_layout Standard
.
 This command fixes atom ordering so that all atoms in molecules are sequential.
 The 
\series bold
outprefix
\series default
 keyword will write out the re-ordered topology with name 
\series bold
<name>.<original name>
\series default
.
\end_layout

\begin_layout Standard
For example, given an out of order topology named 'outoforder.parm7' and
 a corresponding trajectory 'min1.crd', the following will produce a reordered
 topology named 'reorder.outoforder.parm7' and a reordered trajectory named
 'reorder.mdcrd':
\end_layout

\begin_layout LyX-Code
parm outoforder.parm7
\end_layout

\begin_layout LyX-Code
trajin min1.crd 1 10
\end_layout

\begin_layout LyX-Code
fixatomorder outprefix reorder
\end_layout

\begin_layout LyX-Code
trajout reorder.mdcrd 
\end_layout

\begin_layout Standard
If 
\series bold
'pdborder'
\series default
 is specified, attempt to organize atoms by PDB information (i.e.
 Chain ID, original residue numbering, and insertion codes).
 Atoms optionally specified by 
\series bold
'hetatm
\series default
 
\series bold
<mask>
\series default
' will be placed after all other atoms.
 
\emph on
Note that the 'pdborder' keyword is still experimental, and requires that
 the Topology have PDB-type information present.
\end_layout

\begin_layout Subsection
fiximagedbonds
\end_layout

\begin_layout LyX-Code
fiximagedbonds [<mask>]
\end_layout

\begin_deeper
\begin_layout Description
<mask> Mask expression of atoms to check.
\end_layout

\end_deeper
\begin_layout Standard
Fix bonds that have been split across periodic boundary conditions by imaging.
 It may be desirable to reimage the coordinates after this with 
\series bold
\emph on
autoimage
\series default
\emph default
.
\end_layout

\begin_layout Subsection
gist (Grid Inhomogeneous Solvation Theory)
\end_layout

\begin_layout LyX-Code
gist
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
gist
\end_layout

\end_inset

 [doorder] [doeij] [skipS] [skipE] [refdens <rdval>] [temp <tval>]
\end_layout

\begin_layout LyX-Code
     [noimage] [gridcntr <xval> <yval> <zval>] [excludeions]
\end_layout

\begin_layout LyX-Code
     [griddim <xval> <yval> <zval>] [gridspacn <spaceval>]
\end_layout

\begin_layout LyX-Code
     [prefix <filename prefix>] [ext <grid extension>] [out <output>]
\end_layout

\begin_layout LyX-Code
     [info <info>]
\end_layout

\begin_deeper
\begin_layout Description

\series bold
[doorder]
\series default
 Calculate the water order parameter 
\begin_inset CommandInset citation
LatexCommand citep
key "Chatterjee"
literal "true"

\end_inset

 for each voxel.
\end_layout

\begin_layout Description

\series bold
[doeij]
\series default
 Calculate the triangular matrix representing the water-water interactions
 between pairs of voxels (see below).
\end_layout

\begin_layout Description
[skipE] Skip all energy calculations (cannot be specified with 
\series bold
'doeij'
\series default
).
\end_layout

\begin_layout Description
[skipS] Skip all entropy calculations.
\end_layout

\begin_layout Description

\series bold
[refdens
\begin_inset space ~
\end_inset

rdval>]
\series default
 Reference density of bulk water, used in computing
\series bold
 g_O
\series default
,
\series bold
 g_H
\series default
, and the translational entropy.
 Default is 0.0334 molecules/Å
\begin_inset Formula $^{3}$
\end_inset

.
\end_layout

\begin_layout Description
[temp
\begin_inset space ~
\end_inset

<tval>] Temperature of the input trajectory.
\end_layout

\begin_layout Description
[noimage] Disable distance imaging in energy calculation.
\end_layout

\begin_layout Description
[excludeions] If specified, exclude any ions from the calculation.
\end_layout

\begin_layout Description

\series bold
[gridcntr
\begin_inset space ~
\end_inset

<xval>
\begin_inset space ~
\end_inset

<yval>
\begin_inset space ~
\end_inset

<zval>]
\series default
 Coordinates (Å) of the center of the grid (default 0.0, 0.0, 0.0).
\end_layout

\begin_layout Description

\series bold
[griddim
\begin_inset space ~
\end_inset

<xval>
\begin_inset space ~
\end_inset

<yval>
\begin_inset space ~
\end_inset

<zval>]
\series default
 Grid dimensions along each coordinate axis (default 40, 40, 40).
\end_layout

\begin_layout Description

\series bold
[gridspacn
\begin_inset space ~
\end_inset

<spaceval>]
\series default
 Grid spacing (linear dimension of each voxel) in Angstroms.
 Values greater than 0.75 Å are not recommended (default 0.5 Å).
\end_layout

\begin_layout Description
[prefix
\begin_inset space ~
\end_inset

<filename
\begin_inset space ~
\end_inset

prefix>] Output file name prefix (default 
\begin_inset Quotes eld
\end_inset

gist
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Description
[ext
\begin_inset space ~
\end_inset

<grid
\begin_inset space ~
\end_inset

extension>] Output grid file name extension (default 
\begin_inset Quotes eld
\end_inset

.dx
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<output>]
\series default
 Name of the main GIST output file.
 If not specified set to '<prefix>-output.dat'.
\end_layout

\begin_layout Description
[info
\begin_inset space ~
\end_inset

<info>] Name of main GIST info file.
 If not specified info is written to standard output.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[gO] Number density of oxygen centers found in the voxel, in units of the
 bulk density.
\end_layout

\begin_layout Description
[gH] Number density of hydrogen centers found in the voxel in units of the
 reference bulk density.
\end_layout

\begin_layout Description
[Esw] Mean solute-water interaction energy density.
\end_layout

\begin_layout Description
[Eww] Mean water-water interaction energy density.
\end_layout

\begin_layout Description
[dTStrans] First order translational entropy density.
\end_layout

\begin_layout Description
[dTSorient] First order orientational entropy density .
\end_layout

\begin_layout Description
[neighbor] Mean number of waters neighboring the water molecules found in
 this voxel multiplied by the voxel number density.
\end_layout

\begin_layout Description
[dipole] Magnitude of mean dipole moment (polarization).
\end_layout

\begin_layout Description
[order] Average Tetrahedral Order Parameter.
\end_layout

\begin_layout Description
[dipolex] x-component of the mean water dipole moment density
\end_layout

\begin_layout Description
[dipoley] y-component of the mean water dipole moment density
\end_layout

\begin_layout Description
[dipolez] z-component of the mean water dipole moment density
\end_layout

\begin_layout Description
[Eij] Water-water interaction matrix.
\end_layout

\end_deeper
\begin_layout Standard
Grid Inhomogeneous Solvation Theory 
\begin_inset CommandInset citation
LatexCommand citep
key "Lazaridis,Nguyen-gist"
literal "true"

\end_inset

 (GIST) is a method for analyzing the structure and thermodynamics of solvent
 in the vicinity of a solute molecule.
 The current implementation works for only water, but the method can be
 generalized to other solvents whose molecules are rigid like water, such
 as chloroform or dimethylsulfoxide (DMSO).
 GIST post-processes explicit solvent simulation data to create a three-dimensio
nal mapping of water density and thermodynamic properties within a region
 of interest, which is defined by a user-specified 3D rectangular grid.
 The small grid boxes are referred to as voxels, and each voxel is associated
 with solvent properties.
 (See Fig.
 
\begin_inset CommandInset ref
LatexCommand ref
reference "gist-1-1"

\end_inset

.) The GIST implementation incorporated into AmberTools 
\emph on
cpptraj
\emph default
 also calculates a number of other local water properties, as listed below.
 GIST works for the nonpolarizable water models currently supported by AMBER.
\end_layout

\begin_layout Standard
In order to carry out a GIST calculation, you must have a trajectory file
 generated with explicit water, as well as the corresponding topology file.
 To generate the most readily interpretable results, it is recommended that
 the solute (e.g., a protein) be restrained into essentially one conformation.
 GIST will then provide information about the structure and thermodynamics
 of the solvent for that conformation.
 For a room-temperature simulation of a solvent-exposed binding site, and
 a grid-spacing of 0.5 Å, it is recommended that the simulation be at least
 10-20 ns in duration, and it is also a good idea to check for convergence
 of the GIST properties you are interested in by loading and then processing
 successively more frames of your trajectory file.
 Because GIST assumes that the solute of interest comprises all molecules
 in the simulation that are not waters, it is a good idea to remove all
 counterions and cosolutes with cpptraj's strip command before running GIST.
 A sample series of cpptraj commands for running GIST is provided below.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\begin_inset Graphics
	filename gist.png
	width 70text%

\end_inset

 
\begin_inset Caption Standard

\begin_layout Plain Layout
Diagram, in 2D, of GIST's gridded water properties in a binding site.
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "gist-1-1"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Although it is not mandatory to supply values of 
\series bold
gridcntr
\series default
, 
\series bold
griddim
\series default
 and 
\series bold
gridspcn
\series default
, these parameters should be carefully chosen, because they determine the
 region to be analyzed (
\series bold
gridcntr
\series default
 and 
\series bold
griddim
\series default
) and the spatial resolution and convergence properties of the results (
\series bold
gridspcn
\series default
).
 In particular, although smaller grid spacings will give finer spatial resolutio
n, longer simulation times will be needed to converge the properties in
 the smaller voxels that result.
 A larger grid spacing will allow earlier convergence, but will smooth the
 spatial distributions and hence can reduce accuracy.
 
\end_layout

\begin_layout Standard
The reference density of water (
\series bold
rdval
\series default
) is taken by default to be the experimental number density of pure water
 at 300 K and 1 atm.
 However, different water models may yield slightly different bulk densities
 under these conditions, and the density also depends on T and P.
 If you know that the bulk density of the water model you are using, at
 the T and P of your simulation, deviates significantly from 0.0334 water
 molecules/Å
\begin_inset Formula $^{3}$
\end_inset

, it would be advisable to supply the actual value with the 
\series bold
refdens
\series default
 keyword, instead of allowing GIST to supply the default value.
\end_layout

\begin_layout Standard
For GIST, a GPU accelerated version is available, in which the interaction
 energy is calculated using CUDA.
 When using the GPU accelerated version of GIST, the 
\series bold
doeij 
\series default
keyword is not available.
 It is recommended to use a grid covering the entire box, when using the
 GPU implementation.
 You may also choose a smaller grid, but all interaction energies, i.e., each
 atom with each atom, will always be calculated independent of the chosen
 grid.
 This ensures optimum performance when calculating the interaction energies.
 Thus, the additional time required to calculate the order parameters (
\series bold
doorder
\series default
) is negligible.
\end_layout

\begin_layout Subsubsection*
\paragraph_spacing other 3
\noindent

\series bold
GIST Output
\series default
 
\end_layout

\begin_layout Standard
GIST generates a main output file and a collection of grid data files that
 by default are in Data Explorer format (.dx); this can be changed via the
 
\series bold
ext
\series default
 keyword.
 These grid files enable visualization of the various gridded quantities,
 such as with the program VMD 
\begin_inset CommandInset citation
LatexCommand citep
key "humprey"
literal "true"

\end_inset

.
 If the 
\series bold
doeij
\series default
 keyword is provided, GIST also writes out a matrix of water-water interactions
 between pairs of voxels.
 In addition, run details are written to stdout, which can be redirected
 into a log file.
 
\end_layout

\begin_layout Standard
Note that a number of quantities are written out as both densities and normalize
d quantities.
 For example, the output file includes both the solute-water energy density
 and the normalized (per water) solute-water energy.
 In all cases, the normalized quantity at voxel 
\begin_inset Formula $i$
\end_inset

, 
\begin_inset Formula $X_{i,norm}$
\end_inset

 is related to the corresponding density, 
\begin_inset Formula $X_{i,dens}$
\end_inset

, by the relationship 
\begin_inset Formula $X_{i,norm}=\rho_{i}X_{i,dens}$
\end_inset

, where 
\begin_inset Formula $\rho_{i}$
\end_inset

 is the number density of water in the voxel.
 The normalized quantity provides information regarding the nature of the
 water found in the voxel.
 The density has the property that, if the grid extended over the entire
 simulation volume, the total system quantity would be given by 
\begin_inset Formula $X_{tot}=V_{voxel}\sum_{i}X_{i,dens}$
\end_inset

, where 
\begin_inset Formula $V_{voxel}$
\end_inset

 is the volume of one grid voxel.
 
\end_layout

\begin_layout Standard
The main output file takes the form of a space-delimited-variable file,
 where each row corresponds to one voxel of the grid.
 This file can easily be opened with and manipulated with spreadsheet programs
 like Excel and LibreOffice Calc.
 The columns are as follows.
 
\end_layout

\begin_layout Itemize

\series bold
index
\series default
 - A unique, sequential integer assigned to each voxel
\end_layout

\begin_layout Itemize

\series bold
xcoord
\series default
 - x coordinate of the center of the voxel (Å)
\end_layout

\begin_layout Itemize

\series bold
ycoord
\series default
 - y coordinate of the center of the voxel (Å)
\end_layout

\begin_layout Itemize

\series bold
zcoord
\series default
 - z coordinate of the center of the voxel (Å)
\end_layout

\begin_layout Itemize

\series bold
population 
\series default
- Number of water molecule, 
\begin_inset Formula $n_{i}$
\end_inset

, found in the voxel over the entire simulation.
 A water molecule is deemed to populate a voxel if its oxygen coordinates
 are inside the voxel.
 The expectation value of this quantity increases in proportion to the length
 of the simulation.
\end_layout

\begin_layout Itemize

\series bold
g_O
\series default
 - Number density of oxygen centers found in the voxel, in units of the
 bulk density (rdval).
 Thus, the expectation value of 
\series bold
g_O
\series default
 for a neat water system is unity.
\end_layout

\begin_layout Itemize

\series bold
g_H
\series default
 - Number density of hydrogen centers found in the voxel in units of the
 reference bulk density (2
\begin_inset Formula $\times$
\end_inset

rdval).
 Thus, the expectation value of 
\series bold
g_H
\series default
 for a neat water system would be unity.
\end_layout

\begin_layout Itemize

\series bold
dTStrans-dens
\series default
 - First order translational entropy density (kcal/mole/Å
\begin_inset Formula $^{3}$
\end_inset

), referenced to the translational entropy of bulk water, based on the value
 rdval.
\end_layout

\begin_layout Itemize

\series bold
dTStrans-norm
\series default
 - First order translational entropy per water molecule (kcal/mole/molecule),
 referenced to the translational entropy of bulk water, based on the value
 rdval.
 The quantity
\series bold
 dTStrans-norm
\series default
 equals 
\series bold
dTStrans-dens
\series default
 divided by the number density of the voxel.
\end_layout

\begin_layout Itemize

\series bold
dTSorient-dens
\series default
 - First order orientational entropy density (kcal/mole/Å
\begin_inset Formula $^{3}$
\end_inset

), referenced to bulk solvent (see below).
\end_layout

\begin_layout Itemize

\series bold
dTSorient-norm
\series default
 - First order orientational entropy per water molecule (kcal/mole/water),
 referenced to bulk solvent (see below).
 This quantity equals
\series bold
 dTSorient-dens
\series default
 divided by the number density of the voxel.
\end_layout

\begin_layout Itemize

\series bold
Esw-dens
\series default
 - Mean solute-water interaction energy density (kcal/mole/Å
\begin_inset Formula $^{3}$
\end_inset

).
 This is the interaction of the solvent in a given voxel with the entire
 solute.
 Both Lennard-Jones and electrostatic interactions are computed without
 any cutoff, within the minimum image convention but without Ewald summation.
 This quantity is referenced to bulk, in the trivial sense that the solute-solve
nt interaction energy is zero in bulk.
\end_layout

\begin_layout Itemize

\series bold
Esw-norm
\series default
 - Mean solute-water interaction energy per water molecule.
 This equals
\series bold
 Esw-dens
\series default
 divided by the number density of the voxel (kcal/mole/molecule).
\end_layout

\begin_layout Itemize

\series bold
Eww-dens
\series default
 - Mean water-water interaction energy density, scaled by ½ to prevent double-co
unting, and not referenced to the corresponding bulk value of this quantity
 (see below).
 This quantity is one half of the mean interaction energy of the water in
 a given voxel with all other waters in the system, both on and off the
 GIST grid, divided by the volume of the voxel (kcal/mole/Å
\begin_inset Formula $^{3}$
\end_inset

).
 Again, both Lennard-Jones and electrostatic interactions are computed without
 any cutoff, within the minimum image convention.
\end_layout

\begin_layout Itemize

\series bold
Eww-norm
\series default
 - Mean water-water interaction energy, normalized to the mean number of
 water molecules in the voxel (kcal/mole/water).
 See prior column definition for details.
\end_layout

\begin_layout Itemize

\series bold
Dipole_x-dens
\series default
 - x-component of the mean water dipole moment density (Debye/Å
\begin_inset Formula $^{3}$
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
Dipole_y-dens
\series default
 - y-component of the mean water dipole moment density (Debye/Å
\begin_inset Formula $^{3}$
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
Dipole_z-dens
\series default
 - z-component of the mean water dipole moment density (Debye/Å
\begin_inset Formula $^{3}$
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
Dipole-dens
\series default
 - Magnitude of mean dipole moment (polarization) (Debye/Å
\begin_inset Formula $^{3}$
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
Neighbor-dens
\series default
 - Mean number of waters neighboring the water molecules found in this voxel
 multiplied by the voxel number density.
 Two waters are considered neighbors if their oxygens are within 3.5 angstroms
 of each other.
 For any given frame, the contribution to the average is set to zero if
 no water is found in the voxel (units of number/Å
\begin_inset Formula $^{3}$
\end_inset

).
\end_layout

\begin_layout Itemize

\series bold
Neighbor-norm
\series default
 - Mean number of neighboring water molecules, per water molecule found
 in the voxel (units of number per water).
\end_layout

\begin_layout Itemize

\series bold
Order-norm
\series default
 - Average Tetrahedral Order Parameter 
\begin_inset CommandInset citation
LatexCommand citep
key "Chatterjee"
literal "true"

\end_inset

, 
\begin_inset Formula $q_{tet}$
\end_inset

, for water molecules found in the voxel, normalized by the number of waters
 in the voxel.
 The order parameter for water 
\begin_inset Formula $i$
\end_inset

 in a given frame is given by: 
\begin_inset Formula $q_{tet}(i)=1-\frac{3}{8}\sum_{j=1}^{3}\sum_{k=j+1}^{4}(cos\phi_{ijk}+\frac{1}{3})^{2}$
\end_inset

 where 
\begin_inset Formula $j$
\end_inset

 and 
\begin_inset Formula $k$
\end_inset

 index the 4 closest water neighbors to water 
\begin_inset Formula $i$
\end_inset

, and 
\begin_inset Formula $\phi_{ijk}$
\end_inset

 is the angle formed by water 
\begin_inset Formula $i$
\end_inset

, 
\begin_inset Formula $j$
\end_inset

, and 
\begin_inset Formula $k$
\end_inset

.
 If the doorder keyword is not provided or is set to FALSE, then this calculatio
n will not be done, and the entries in this column will be set to zero.
\end_layout

\begin_layout Standard
Grid files are provided for all computed quantities listed above, except
 that the normalized quantities are not included.
 The filenames are as follows: gist-gO.dx, gist-gH.dx, gist-dTStrans-dens.dx,
 gist-dTSorient-dens.dx, gist-Esw-dens.dx, gist-Eww-dens.dx, gist-dipolex-dens.dx,
 gist-dipoley-dens.dx, gist-dipolez-dens.dx, gist-dipole-dens.dx, gist-neighbor-den
s.dx, gist-neighbor-norm.dx, gist-order-norm.dx.
 If the 
\series bold
doorder
\series default
 keyword is not provided, then the data in gist-order-norm.dx will all be
 zeroes.
 Note that the file of voxel water densities, gist-gO.dx, can be used as
 input to the program Placevent 
\begin_inset CommandInset citation
LatexCommand citep
key "Sindhikara"
literal "true"

\end_inset

, in order to define spherical hydration sites based on the density distribution.
\end_layout

\begin_layout Standard
Similar grid files with other computed quantities can be generated by reading
 the gist.out file into a spreadsheet program, processing the numbers to
 generate a new column of voxel data of interest, and writing this column
 to an ascii text file.
 Then the Perl script write_dx_file.pl, which should be available on the
 GIST tutorial web-site, may be used to read in the column of data and create
 the corresponding dx file.
 The input format, and an example, are as follows: 
\end_layout

\begin_layout LyX-Code
./write_dx_file.pl [filename] [x-dimension y-dimension z-dimension]
\end_layout

\begin_layout LyX-Code
[x-origin y-origin z-origin] [grid spacing]
\end_layout

\begin_layout LyX-Code
./write_dx_file.pl file.dat 40 40 40 13.0 13.0 13.0 0.75
\end_layout

\begin_layout Standard
If the doeij keyword is provided, GIST also writes a large file, Eww_ij.dat,
 containing the mean water-water interaction energies between pairs of voxels,
 scaled by ½.
 (See below.) This file has three columns.
 The first two columns are voxel indexes, 
\begin_inset Formula $i$
\end_inset

, 
\begin_inset Formula $j$
\end_inset

, where 
\begin_inset Formula $j>i$
\end_inset

, so that no pair appears more than once, and the third column is the mean
 interaction energy (kcal/mole) of water in voxels 
\begin_inset Formula $i$
\end_inset

 and
\begin_inset Formula $j$
\end_inset

, scaled by ½.
 If the occupancy of either voxel is 0, such as for voxels covered by solute
 atoms, then the interaction energy is zero.
 In order to save space, such interactions are omitted from the file.
 
\end_layout

\begin_layout Standard
\paragraph_spacing other 3
\noindent

\series bold
Sample cpptraj input file to run GIST 
\end_layout

\begin_layout Standard
The following input file, gist.in, causes cpptraj to read a parameter file
 named topology.top; read in the first 5000 frames of the trajectory file
 named trajectoryfile.mdcrd; strip out all Na and Cl ions; and carry out
 a GIST run which computes order parameters, uses a 41x41x45 grid centered
 at (25.0, 31.0, 30.0) with a spacing of 0.5 Å, uses the default bulk water
 density of 0.0334 molecules/Å
\begin_inset Formula $^{3}$
\end_inset

, and generates the main output file gist.out.
 
\end_layout

\begin_layout LyX-Code
parm topology.top
\end_layout

\begin_layout LyX-Code
trajin trajectoryfile.mdcrd 1 5000
\end_layout

\begin_layout LyX-Code
strip @Na
\end_layout

\begin_layout LyX-Code
strip @Cl
\end_layout

\begin_layout LyX-Code
gist doorder doeij gridcntr 25.0 31.0 30.0 griddim 41 41 45 
\end_layout

\begin_layout LyX-Code
    gridspacn 0.50 out gist.out
\end_layout

\begin_layout LyX-Code
go
\end_layout

\begin_layout Standard
To execute this run in the background, use 
\end_layout

\begin_layout LyX-Code
cpptraj<gist.in>gist.log& or cpptraj –i gist.in>gist.log& 
\end_layout

\begin_layout Standard
\paragraph_spacing other 3
\noindent

\series bold
Referencing GIST results to unperturbed (bulk) water
\series default
 
\end_layout

\begin_layout Standard
Inhomogeneous fluid solvation theory, which is the basis of GIST, is designed
 to provide information on how water structure and thermodynamics around
 a solute molecule, such as a protein, are changed relative to the structure
 and thermodynamics of unperturbed (bulk) water.
 Accordingly, the quantities reported by GIST are most informative when
 the results are referenced to the corresponding bulk water properties.
 For the orientational entropy, the reference value is the same regardless
 of water model or conditions, because the first order orientational distributio
n of water in the bulk is always uniform.
 Therefore, the GIST results for orientational entropies are already referenced
 to bulk.
 However, cpptraj reports unreferenced values for those GIST quantities
 whose reference values depend upon the water model and the simulation condition
s; i.e., the energies.
 The translational entropy as well as the number densities will be referenced
 to bulk using the input referenced density or the default density value
 of 0.0334.
 The table below provides useful reference values for these quantities,
 computed for various water models at P=1atm, T=300K, using GIST in order
 to ensure a consistent minimum image treatment of periodic boundary conditions.
 
\end_layout

\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Water Model
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 Mean Energy (Eww-norm) (kcal/mol/water) 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Number Density (Å
\begin_inset Formula $^{-3}$
\end_inset

)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TIP3P
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-9.533
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0329
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TIP4PEW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-11.036
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0332
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TIP4P
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-9.856
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0332
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TIP5P
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-9.596
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0329
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Tip3PFW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-11.369
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0334
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SPCE
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-11.123
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0333
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SPCFW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-11.873
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0.0329
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption Standard

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "tab:cpptraj-gist-1"

\end_inset

Water model energy and density.
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Users running calculations under significantly different conditions, or
 with different water models, should consider generating their own reference
 quantities by applying GIST to a simulation of pure water under their condition
s of interest.
 The quantities of interest can then be obtained in their most precise available
 form by averaging over voxels, for the pure water simulation.
 If the quantity of interest is 
\begin_inset Formula $Q$
\end_inset

, then its average reference value is 
\begin_inset Formula $Q_{reference}=\frac{\sum n_{i}Q_{i}}{\sum n_{i}}$
\end_inset

, where 
\begin_inset Formula $Q_{i}$
\end_inset

 and 
\begin_inset Formula $n_{i}$
\end_inset

 are, respectively, GIST's reported values of the quantity and the population
 in voxel 
\begin_inset Formula $i$
\end_inset

.
 The densities, 
\begin_inset Formula $\rho_{i}$
\end_inset

, are referenced to the corresponding bulk densities, 
\begin_inset Formula $\rho^{o}$
\end_inset

, as 
\begin_inset Formula $g_{i}=\rho_{i}/\rho^{o}$
\end_inset

, while the energy and entropy terms are referenced by subtracting their
 bulk values.
\end_layout

\begin_layout Standard
\paragraph_spacing other 3
\noindent

\series bold
Interpreting GIST results
\series default
 
\end_layout

\begin_layout Standard
GIST provides access to the first order entropies and the first- and second-orde
r energies of inhomogeneous fluid solvation theory.
 Non-zero higher-order entropies exist but are not yet computationally accessibl
e.
 However, for a pairwise additive force-field, such as those listed in the
 Table above, the energy is fully described at the second order provided
 by GIST.
 
\end_layout

\begin_layout Standard
GIST is a research tool, and its applications (to, for example, protein-ligand
 binding and protein function) are still being explored.
 The following general comments may be helpful to users studying GIST results.
 
\end_layout

\begin_layout Standard
1.
 The water in voxels near a solute (e.g., a protein) almost always has unfavorable
 water-water interaction energies, relative to bulk, simply because the
 solute displaces water, resulting in fewer proximal water-water interactions.
 
\end_layout

\begin_layout Standard
2.
 The unfavorable water-water energies mentioned in 
\begin_inset CommandInset citation
LatexCommand citep
key "Lazaridis"
literal "true"

\end_inset

 may be balanced by favorable water-solute interactions.
 If they are not, as may occur especially for voxels in small, hydrophobic
 pockets, then the net energy of the water in the voxel may be unfavorable
 relative to bulk, in which case a ligand which displaces water from the
 voxel into bulk may get a boost in affinity.
 
\end_layout

\begin_layout Standard
3.
 Because the first order orientational distribution of bulk water is uniform,
 and a nonuniform distribution always has lower entropy than a uniform one,
 the solute can only lower the orientational entropy of water, relative
 to bulk.
 Thus, this term always opposes solvation, and displacing oriented water
 into the bulk is always favorable from the standpoint of orientational
 entropy.
 
\end_layout

\begin_layout Standard
4.
 Localized water, which corresponds to voxels with high water density, has
 a low first order translational entropy, and the translational entropy
 around a solute is lower than that in bulk, as a nonuniform translational
 distribution takes the place of the uniform translational distribution
 of bulk water.
 
\end_layout

\begin_layout Standard
5.
 The displacement of highly oriented (low orientational entropy) and localized
 (low translational entropy) water into bulk leads to a favorable increase
 in these entropy terms.
 
\end_layout

\begin_layout Standard
6.
 However, highly oriented and localized water is often the consequence of
 strongly favorable polar interactions, such as hydrogen-bonding, between
 water and the solute.
 As a consequence, the net favorability of displacing such water is frequently
 a balance between favorable entropic consequences and unfavorable energetic
 consequences.
 
\end_layout

\begin_layout Standard
7.
 The water-water energy associated with a given voxel accounts for the interacti
ons of the waters in this voxel with all other waters in the system, including
 waters in other voxels.
 This quantity is multiplied by ½, so that, in a pure-water system where
 the GIST grid covers the entire simulation box, the sum over all voxels
 equals the correct mean water-water interaction energy.
 Note that Reference 
\begin_inset CommandInset citation
LatexCommand citep
key "Nguyen-gist"
literal "true"

\end_inset

 does not include this factor of ½.
 
\end_layout

\begin_layout Standard
8.
 For a typical GIST application, in which the grid occupies only part of
 the simulation box, the energy bookkeeping can become complicated, as discussed
 in Section II.B.3 (page 044101-6) of Reference 
\begin_inset CommandInset citation
LatexCommand citep
key "Nguyen-gist"
literal "true"

\end_inset

.
 That section also explains how one can compute the water-water energy associate
d with a region 
\begin_inset Formula $R$
\end_inset

 defined by a set of voxels, 
\begin_inset Formula $E_{WW}^{R}$
\end_inset

.
 The regional water-water energy, on a normalized (per water) basis, is
 given by 
\begin_inset Formula $E_{WW}^{R}=2(\sum_{i\in R}E_{i,WW}-\sum_{i\in R}\sum_{j\in R,j>i}E_{i,j,WW})$
\end_inset

 where 
\begin_inset Formula $i\in R$
\end_inset

 means that voxel 
\begin_inset Formula $i$
\end_inset

 is in region 
\begin_inset Formula $R$
\end_inset

, 
\begin_inset Formula $E_{i,WW}$
\end_inset

 is the value of Eww-norm for voxel 
\begin_inset Formula $i$
\end_inset

, and 
\begin_inset Formula $E_{i,j,WW}$
\end_inset

 is the value of the water-water interaction energy between voxels 
\begin_inset Formula $i$
\end_inset

 and 
\begin_inset Formula $j$
\end_inset

, taken from the file Eww_ij.dat.
 The extra factor of 2 in the present formula, relative to that in the paper,
 results from application of an extra factor of ½ to the reported water-water
 interaction energies here.
 
\end_layout

\begin_layout Subsection
grid
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_grid"

\end_inset


\end_layout

\begin_layout LyX-Code
grid <filename>
\end_layout

\begin_layout LyX-Code
 	{ data <dsname> | boxref <ref name/tag> <nx> <ny> <nz> |
\end_layout

\begin_layout LyX-Code
 	  <nx> <dx> <ny> <dy> <nz> <dz> [gridcenter <cx> <cy> <cz>] }
\end_layout

\begin_layout LyX-Code
 	[box|origin|center <mask>] [negative] [name <gridname>]
\end_layout

\begin_layout LyX-Code
 	<mask> [normframe | normdensity [density <density>]]
\end_layout

\begin_layout LyX-Code
	 [pdb <pdbout> [max <fraction>]] [{byres|mymol}]
\end_layout

\begin_layout LyX-Code
 	[[smoothdensity <value>] [invert]] [madura <madura>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> File to write out grid to.
 Use 
\begin_inset Quotes eld
\end_inset

.grid
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

.xplor
\begin_inset Quotes erd
\end_inset

 extension for XPLOR format, 
\begin_inset Quotes eld
\end_inset

.dx
\begin_inset Quotes erd
\end_inset

 for OpenDX format.
\end_layout

\begin_layout Standard
Options for setting up grid:
\end_layout

\begin_layout Description
data
\begin_inset space ~
\end_inset

<dsname> Use previously calculated/loaded grid data set named <dsname>.
 When using this option there is no need to specify grid bins/spacing/center.
\end_layout

\begin_layout Description
boxref
\begin_inset space ~
\end_inset

<ref
\begin_inset space ~
\end_inset

name/tag>
\begin_inset space ~
\end_inset

<nx>
\begin_inset space ~
\end_inset

<ny>
\begin_inset space ~
\end_inset

<nz> Set up grid using box information from a previously loaded reference
 structure.
 Currently the only way to set up non-orthogonal grids.
\end_layout

\begin_layout Description
<nx>
\begin_inset space ~
\end_inset

<dx>
\begin_inset space ~
\end_inset

<ny>
\begin_inset space ~
\end_inset

<dy>
\begin_inset space ~
\end_inset

<nz>
\begin_inset space ~
\end_inset

<dz> Number of grid bins and spacing in the X/Y/Z directions.
\end_layout

\begin_layout Description
[gridcenter
\begin_inset space ~
\end_inset

<cx>
\begin_inset space ~
\end_inset

<cy>
\begin_inset space ~
\end_inset

<cz>] Location of grid center, default is origin (0.0, 0.0, 0.0).
\end_layout

\begin_layout Standard
Options for offset during grid binning (must center grid at origin):
\end_layout

\begin_layout Description
[box] Offset each point by location of box center prior to gridding.
 Cannot be used with 'gridcenter'.
\end_layout

\begin_layout Description
[origin] No offset (default)
\end_layout

\begin_layout Description
[center
\begin_inset space ~
\end_inset

<mask>] Offset each point by center of atoms in <mask> prior to gridding.
 Cannot be used with 'gridcenter'.
\end_layout

\begin_layout Standard
Other options:
\end_layout

\begin_layout Description
[negative] Grid negative density instead of positive density.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<gridname>] Grid data set name.
\end_layout

\begin_layout Description
<mask> Mask of atoms to grid.
\end_layout

\begin_layout Description
[normframe] Normalize grid bins by the number of frames.
\end_layout

\begin_layout Description
[normdensity
\begin_inset space ~
\end_inset

[density
\begin_inset space ~
\end_inset

<density>]] Normalize grid bins by density: GridBin = GridBin / (Nframes
 * BinVolume * density).
 Default particle density (molecules/Ang^3) for water based on 1.0 g/mL.
\end_layout

\begin_layout Description
[pdb
\begin_inset space ~
\end_inset

<pdbout>
\begin_inset space ~
\end_inset

[max
\begin_inset space ~
\end_inset

<fraction>]] Write a pseudo-PDB of grid points that have density greater
 than <fraction> (default 0.80) of the grid max value.
\end_layout

\begin_layout Description
[{byres|bymol}] Grid the centers of mass of residues or molecules selected
 by <mask>.
\end_layout

\begin_layout Standard
Less common options:
\end_layout

\begin_layout Description
[smoothdensity
\begin_inset space ~
\end_inset

<smooth>] Used to smooth density.
 The smoothing takes the form of GridBin = 0 if GridBin < smooth, otherwise
 GridBin = GridBin - (GridBin * exp[-(GridBin - smooth)^2 / (0.2 * smooth^2)]).
\end_layout

\begin_layout Description
[invert] (Only used if smoothdensity also used) Do inverse smoothing (i.e.
 if GridBin > smooth).
\end_layout

\begin_layout Description
[madura
\begin_inset space ~
\end_inset

<madura>] Grid values lower than <madura> become flipped in sign, exposes
 low density.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<dsname> Grid data set.
\end_layout

\end_deeper
\begin_layout Standard
Create a grid representing the histogram of atoms in 
\shape italic
mask1
\shape default
 on the 3D grid that is "
\shape italic
nx
\shape default
 * 
\shape italic
x_spacing
\shape default
 by 
\shape italic
ny
\shape default
 * 
\shape italic
y_spacing
\shape default
 by 
\shape italic
nz
\shape default
 * 
\shape italic
z_spacing
\shape default
 angstroms (cubed).
 By default the grid is centered at the origin unless 
\series bold
gridcenter
\series default
 is specified.
 Grid points can be offset by either the box center (using 
\series bold
box
\series default
) or the center of specified atoms (using 
\series bold
center <mask>
\series default
); if either of these options are used the grid must be centered at the
 origin.
 Note that the 
\series bold
\shape italic
bounds
\series default
\shape default
 command (
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj-bounds"

\end_inset

) can be very useful for determining grid dimensions.
\end_layout

\begin_layout Standard
Note that when calculating grid densities for things like solvent/ions,
 the solute of interest (about which the atomic densities are binned) should
 be rms fit, centered and imaged prior to the 
\family sans
\series bold
\shape italic
grid
\family default
\series default
\shape default
 call in order to provide any meaningful representation of the density.
 If the optional keyword 
\family typewriter
\series bold
negative
\family default
\series default
 is also specified, then these density will be stored as negative numbers.
 Output can be in the XPLOR or OpenDX data formats.
\end_layout

\begin_layout Subsubsection*
Examples
\end_layout

\begin_layout Standard
Grid water density around a solute.
\end_layout

\begin_layout LyX-Code
trajin tz2.truncoct.nc
\end_layout

\begin_layout LyX-Code
autoimage origin
\end_layout

\begin_layout LyX-Code
rms first :1-13
\end_layout

\begin_layout LyX-Code
# Create average of solute to view with grid.
\end_layout

\begin_layout LyX-Code
average avg.mol2 :1-13 
\end_layout

\begin_layout LyX-Code
grid out.dx 20 0.5 20 0.5 20 0.5 :WAT@O 
\end_layout

\begin_layout Standard
Generate grid from bounds command.
\end_layout

\begin_layout LyX-Code
trajin tz2.ortho.nc 
\end_layout

\begin_layout LyX-Code
autoimage 
\end_layout

\begin_layout LyX-Code
rms first :1-13&!@H= mass
\end_layout

\begin_layout LyX-Code
bounds :1-13 dx .5 name MyGrid out bounds.dat 
\end_layout

\begin_layout LyX-Code
average bounds.mol2 :1-13
\end_layout

\begin_layout LyX-Code
# Save coordinates for second pass.
\end_layout

\begin_layout LyX-Code
createcrd MyCoords
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
# Grid using grid data set from bounds command.
\end_layout

\begin_layout LyX-Code
crdaction MyCoords grid bounds.xplor data MyGrid :WAT@O
\end_layout

\begin_layout Standard
Create non-orthogonal grid:
\end_layout

\begin_layout LyX-Code
trajin tz2.truncoct.nc
\end_layout

\begin_layout LyX-Code
reference ../tz2.truncoct.nc [REF]
\end_layout

\begin_layout LyX-Code
autoimage triclinic
\end_layout

\begin_layout LyX-Code
grid nonortho.dx boxref [REF] 50 50 50 :WAT@O pdb nonortho.pdb
\end_layout

\begin_layout Subsection
hbond
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-hbond"

\end_inset


\end_layout

\begin_layout LyX-Code
hbond
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
hbond
\end_layout

\end_inset

 [<dsname>] [out <filename>] [<mask>] [angle <acut>] [dist <dcut>]
\end_layout

\begin_layout LyX-Code
      [donormask <dmask> [donorhmask <dhmask>]] [acceptormask <amask>]
\end_layout

\begin_layout LyX-Code
      [avgout <filename>] [printatomnum] [nointramol] [image]
\end_layout

\begin_layout LyX-Code
      [solventdonor <sdmask>] [solventacceptor <samask>]
\end_layout

\begin_layout LyX-Code
      [solvout <filename>] [bridgeout <filename>] [bridgebyatom]
\end_layout

\begin_layout LyX-Code
      [series [uuseries <filename>] [uvseries <filename>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<dsname>] Data set name.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write # of solute-solute hydrogen bonds (aspect [UU]) vs time
 to this file.
 If searching for solute-solvent hydrogen bonds, write # of solute-solvent
 hydrogen bonds (aspect [UV]) and # of bridging solvent molecules (aspect
 [Bridge]), as well as the residue # of the bridging solvent and the solute
 residues being bridged with format '<solvent resnum>(<solute res1>+<solute
 res2>+...+),...' (aspect [ID]).
\end_layout

\begin_layout Description
[<mask>] Atoms to search for solute hydrogen bond donors/acceptors.
\end_layout

\begin_layout Description
[angle
\begin_inset space ~
\end_inset

<acut>] Angle cutoff for hydrogen bonds (default 135°).
 Can be disabled by specifying -1.
\end_layout

\begin_layout Description
[dist
\begin_inset space ~
\end_inset

<dcut>] Distance cutoff for hydrogen bonds (acceptor to donor heavy atom,
 default 3.0 Å).
\end_layout

\begin_layout Description
[donormask
\begin_inset space ~
\end_inset

<dmask>] Use atoms in <dmask> as solute donor heavy atoms.
 If 'donorhmask' not specified only atoms bonded to hydrogen will be considered
 donors.
\end_layout

\begin_layout Description
[donorhmask
\begin_inset space ~
\end_inset

<dhmask>] Use atoms in <dmask> as solute donor hydrogen atoms.
 Should only be specified if 'donormask' is.
 Should be a 1 to 1 correspondence between donormask and donorhmask.
\end_layout

\begin_layout Description
[acceptormask
\begin_inset space ~
\end_inset

<amask>] Use atoms in <amask> as solute acceptor atoms.
\end_layout

\begin_layout Description
[avgout
\begin_inset space ~
\end_inset

<filename>] Write solute-solute hydrogen bond averages to <filename>.
\end_layout

\begin_layout Description
[printatomnum] Add atom numbers to the output, in addtion to residue name,
 residue number and atom name.
\end_layout

\begin_layout Description
[nointramol] Ignore intramolecular hydrogen bonds.
\end_layout

\begin_layout Description
[image] Turn on imaging of distances/angles.
\end_layout

\begin_layout Description
[solventdonor
\begin_inset space ~
\end_inset

<sdmask>] Use atoms in <sdmask> as solvent donors.
 Can specify ions as well.
\end_layout

\begin_layout Description
[solventacceptor
\begin_inset space ~
\end_inset

<samask>] Use atoms in <samask> as solvent acceptors.
 Can specify ions as well.
\end_layout

\begin_layout Description
[solvout
\begin_inset space ~
\end_inset

<filename>] Write solute-solvent hydrogen bond averages to <filename>.
 If not specified and 'avgout' is, solute-solvent hydrogen bonds averages
 will be written to that file.
\end_layout

\begin_layout Description
[bridgeout
\begin_inset space ~
\end_inset

<filename>] Write information on detected solvent bridges to <filename>.
 If not specified, will be written to same place as 'solvout'.
\end_layout

\begin_layout Description
[bridgebyatom] Report bridging results by atom instead of by residue.
\end_layout

\begin_layout Description
[series] Save hydrogen bond formed (1.0) or not formed (0.0) per frame for
 any detected hydrogen bond.
 Solute-solute hydrogen bonds are saved with aspect [solutehb], solute-solvent
 hydrogen bonds are saved with aspect [solventhb].
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[uuseries
\begin_inset space ~
\end_inset

<filename>] File to write solute-solute hbond time series data to.
\end_layout

\begin_layout Description
[uvseries
\begin_inset space ~
\end_inset

<filename>] File to write solute-solvent hbond time series data to.
\end_layout

\end_deeper
\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<dsname>[UU] Number of solute-solute hydrogen bonds.
\end_layout

\begin_layout Description
<dsname>[UV] (only for 
\series bold
solventdonor
\series default
/
\series bold
solventacceptor
\series default
) Number of solute-solvent hydrogen bonds.
\end_layout

\begin_layout Description
<dsname>[Bridge] (only for 
\series bold
solventdonor
\series default
/
\series bold
solventacceptor
\series default
) Number of bridging solvent molecules.
\end_layout

\begin_layout Description
<dsname>[ID] (only for 
\series bold
solventdonor
\series default
/
\series bold
solventacceptor
\series default
) String identifying bridging solvent residues and the solute residues they
 bridge.
\end_layout

\begin_layout Description
<dsname>[solutehb] (
\series bold
series
\series default
 only) Time series for solute-solute hydrogen bonds; 1 for present, 0 for
 not present.
\end_layout

\begin_layout Description
<dsname>[solventhb] (
\series bold
series
\series default
 only) Time series for solute-solvent hydrogen bonds; 1 for present, 0 for
 not present.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note that 
\series bold
series
\series default
 data sets are not generated until hydrogen bonds are actually determined
 (i.e.
 
\series bold
run
\series default
 is called).
\end_layout

\begin_layout Standard
Determine hydrogen bonds in each coordinate frame using simple geometric
 criteria.
 A hydrogen bond is defined as being between an acceptor heavy atom A, a
 donor hydrogen atom H, and a donor heavy atom D.
 If the A to D distance is less than the distance cutoff and the A-H-D angle
 is greater than the angle cutoff a hydrogen bond is considered formed.
 Imaging of distances/angles is not performed by default, but can be turned
 on using the 
\series bold
image
\series default
 keyword.
\end_layout

\begin_layout Standard
Potential hydrogen bond donor/acceptor atoms are searched for as follows:
\end_layout

\begin_layout Enumerate
If just 
\series bold
<mask>
\series default
 is specified donors and acceptors will be automatically determined from
 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Enumerate
If 
\series bold
donormask
\series default
 is specified donors will be determined from 
\series bold
<dmask>
\series default
 (only atoms bonded to hydrogen will be considered valid).
 Optionally, 
\series bold
donorhmask
\series default
 can be used in conjunction with 
\series bold
donormask
\series default
 to explicitly specify the hydrogen atoms bonded to donor atoms.
 Acceptors will be automatically determined from 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Enumerate
If 
\series bold
acceptormask
\series default
 is specified acceptors will be determined from 
\series bold
<amask>
\series default
.
 Donors will be automatically determined from 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Enumerate
If both 
\series bold
acceptormask
\series default
 and 
\series bold
donormask
\series default
 are specified only 
\series bold
<amask>
\series default
 and 
\series bold
<dmask>
\series default
 will be used; no searching will occur in 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Standard
Automatic determination of hydrogen bond donors/acceptors uses the simplistic
 criterion that 
\begin_inset Quotes eld
\end_inset

hydrogen bonds are FON
\begin_inset Quotes erd
\end_inset

, i.e., hydrogens bonded to F, O, and N atoms are considered donors, and F,
 O, and N atoms are considered acceptors.
 Intra-molecular hydrogen bonds can be ignored using the 
\series bold
nointramol
\series default
 keyword.
\end_layout

\begin_layout Standard
The number of hydrogen bonds present at each frame will be determined and
 written to the file specified by 
\series bold
out
\series default
.
 If the 
\series bold
series
\series default
 keyword is specified the time series for each hydrogen bond (1 for present,
 0 for not present) will also be saved for subsequent analysis (e.g.
 with 
\series bold
\shape italic
lifetime
\series default
\shape default
, see 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj-lifetime"

\end_inset

); solute-solute hydrogen bonds will be saved to '<dataset name>[solutehb]'
 and solute-solvent hydrogen bonds will be saved to '<dataset name>[solventhb]'.
 The data set legends are set with the residues and atoms involved in the
 hydrogen bonds.
 In the case of solute to non-specific solvent hydrogen bonds, a V is used
 in place of solvent.
\end_layout

\begin_layout Standard
If 
\series bold
avgout
\series default
 is specified the average of each solute-solute hydrogen bond (sorted by
 population) formed over the course of the trajectory is printed with the
 format:
\end_layout

\begin_layout LyX-Code
Acceptor   DonorH   Donor   Frames   Frac   AvgDist   AvgAng
\end_layout

\begin_layout Standard
where 
\shape italic
Acceptor
\shape default
, 
\shape italic
DonorH
\shape default
, and 
\shape italic
Donor
\shape default
 are the residue and atom name of the atoms involved in the hydrogen bond,
 
\shape italic
Frames
\shape default
 is the number of frames the bond is present, 
\shape italic
Frac
\shape default
 is the fraction of frames the bond is present, 
\shape italic
AvgDist
\shape default
 is the average distance of the bond when present, and 
\shape italic
AvgAng
\shape default
 is the average angle of the bond when present.
 The 
\series bold
printatomnum
\series default
 keyword can be used to print atom numbers as well.
\end_layout

\begin_layout Standard
Solute to non-specific solvent hydrogen bonds can be tracked by using the
 
\series bold
solventdonor
\series default
 and/or 
\series bold
solventacceptor
\series default
 keywords.
 The number of solute-solvent hydrogen bonds and number of 
\begin_inset Quotes eld
\end_inset

bridging
\begin_inset Quotes erd
\end_inset

 solvent molecules (i.e.
 solvent that is hydrogen bonded to two or more different solute residues
 at the same time) will also be written to the file specified by 
\series bold
out
\series default
.
 These keywords can also be used to track non-specific interactions with
 ions.
 If 
\series bold
avgout
\series default
 or 
\series bold
solvavg
\series default
 is specified the average of each solute solvent hydrogen bond will be printed
 with the format:
\end_layout

\begin_layout LyX-Code
Acceptor   DonorH   Donor   Count   Frac   AvgDist   AvgAng
\end_layout

\begin_layout Standard
where 
\shape italic
Acceptor
\shape default
, 
\shape italic
DonorH
\shape default
, and 
\shape italic
Donor
\shape default
 are either the residue and atom name of the solute atoms or 
\begin_inset Quotes eld
\end_inset

SolventAcc
\begin_inset Quotes erd
\end_inset

/
\begin_inset Quotes erd
\end_inset

SolventH
\begin_inset Quotes erd
\end_inset

/
\begin_inset Quotes erd
\end_inset

SolventDnr
\begin_inset Quotes erd
\end_inset

 representing solvent, 
\shape italic
Count
\shape default
 is the total number of interactions between solute and solvent (note this
 can be greater than the total number of frames since for any given frame
 more than one solvent molecule can hydrogen bond to the same place on solute
 and vice versa), 
\shape italic
AvgDist
\shape default
 is the average distance of the bond when present, and 
\shape italic
AvgAng
\shape default
 is the average angle of the bond when present.
 If 
\series bold
avgout
\series default
 or 
\series bold
bridgeout
\series default
 is specified information on residues that were bridged by a solvent molecule
 over the course of the trajectory will be written to <bfilename> with format:
\end_layout

\begin_layout LyX-Code
Bridge Res <N0:RES0> <N1:RES1> ...
 , <X> frames.
\end_layout

\begin_layout Standard
where '<N0:RES0> ...' is a list of residues that were bridged (residue # followed
 by residue name) and <X> is the number of frames the residues were bridged.
\end_layout

\begin_layout Subsubsection*
hbond Examples
\end_layout

\begin_layout Standard
To search for all hydrogen bonds within residues 1-22, writing the number
 of hydrogen bonds per frame to 
\begin_inset Quotes eld
\end_inset

nhb.dat
\begin_inset Quotes erd
\end_inset

 and information on each hydrogen bond found to 
\begin_inset Quotes eld
\end_inset

avghb.dat
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
hbond :1-22 out nhb.dat avgout avghb.dat
\end_layout

\begin_layout Standard
To search for all hydrogen bonds formed between donors in residue 1 and
 acceptors in residue 2:
\end_layout

\begin_layout LyX-Code
hbond donormask :1 acceptormask :2 out nhb.dat avgout avghb.dat
\end_layout

\begin_layout Standard
To search for all intermolecular hydrogen bonds only and solute-solvent
 hydrogen bonds, saving time series data to HB:
\end_layout

\begin_layout LyX-Code
hbond HB out nhb.dat avgout solute_avg.dat 
\backslash

\end_layout

\begin_layout LyX-Code
  solventacceptor :WAT@O solventdonor :WAT 
\backslash

\end_layout

\begin_layout LyX-Code
  solvout solvent_avg.dat bridgeout bridge.dat 
\backslash

\end_layout

\begin_layout LyX-Code
  series uuseries uuhbonds.agr uvseries uvhbonds.agr
\end_layout

\begin_layout Standard
To search for non-specific hydrogen bonds between solute and ions named
 Na+:
\end_layout

\begin_layout LyX-Code
hbond HB-Ion out nhb.agr avgout ion_avg.dat 
\backslash

\end_layout

\begin_layout LyX-Code
  solventacceptor :Na+ solventdonor :Na+
\end_layout

\begin_layout Subsection
image
\end_layout

\begin_layout LyX-Code
image
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
image
\end_layout

\end_inset

 [origin] [center] [triclinic | familiar [com <commask>]] [<mask>]
\end_layout

\begin_layout LyX-Code
      [ bymol | byres | byatom ] [xoffset <x>] [yoffset <y>] [zoffset <z>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[origin] Image to coordinate origin (0.0, 0.0, 0.0); default is to image to
 box center.
\end_layout

\begin_layout Description
[center] For bymol/byres, image by center of mass; default is to image by
 first atom position.
\end_layout

\begin_layout Description
[triclinic] Force imaging with triclinic code.
 This is the default for non-orthorhombic cells.
\end_layout

\begin_layout Description
[familiar
\begin_inset space ~
\end_inset

[com
\begin_inset space ~
\end_inset

<commask>]] Image to truncated octahedron shape.
 If 'com <commask>' is given, image with respect to the center of mass of
 atoms in <commask>.
\end_layout

\begin_layout Description
[<mask>] Image atoms/residues/molecules in mask.
\end_layout

\begin_layout Description
[bymol] Image by molecule (default).
\end_layout

\begin_layout Description
[byres] Image by residue.
\end_layout

\begin_layout Description
[byatom] Image by atom.
\end_layout

\begin_layout Description
[xoffset
\begin_inset space ~
\end_inset

<x>] Shift atoms by a factor of <x> in the X-direction.
\end_layout

\begin_layout Description
[yoffset
\begin_inset space ~
\end_inset

<y>] Shift atoms by a factor of <y> in the Y-direction.
\end_layout

\begin_layout Description
[zoffset
\begin_inset space ~
\end_inset

<z>] Shift atoms by a factor of <z> in the Z-direction.
\end_layout

\end_deeper
\begin_layout Standard
Note this command is intended for advanced use; for most cases the 
\series bold
\shape italic
autoimage
\series default
\shape default
 command should be sufficient.
\end_layout

\begin_layout Standard
For periodic systems only, image molecules/residues/atoms that are outside
 of the box back into the box.
 Currently both orthorhombic and non-orthorhombic boxes are supported.
 A typical use of 
\series bold
\shape italic
image
\series default
\shape default
 is to move molecules back into the box after performing 
\series bold
\shape italic
center
\series default
\shape default
.
 For example, the following commands move all atoms so that the center of
 residue 1 is at the center of the box, then image so that all molecules
 that are outside the box after centering are wrapped back inside:
\end_layout

\begin_layout LyX-Code
center :1
\end_layout

\begin_layout LyX-Code
image
\end_layout

\begin_layout Standard
The xoffset etc.
 keywords can be used to shift the entire unit cell in a certain direction
 by the given factor, which can be useful for visualizing trajectories with
 periodic boundary conditions.
 For example, to generate a trajectory that is offset by 1.0 box length in
 the X direction, one could use:
\end_layout

\begin_layout LyX-Code
image xoffset 1.0
\end_layout

\begin_layout LyX-Code
trajout traj.offsetx1.nc
\end_layout

\begin_layout Subsection
jcoupling
\end_layout

\begin_layout LyX-Code
jcoupling
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
jcoupling
\end_layout

\end_inset

 <mask> [outfile <filename>] [kfile <param file>] [out <filename>]
\end_layout

\begin_layout LyX-Code
          [name <dsname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<mask> Atom mask in which to search for dihedrals within.
\end_layout

\begin_layout Description
[outfile
\begin_inset space ~
\end_inset

<filename>] File to write j-coupling values to with fixed format.
\end_layout

\begin_layout Description
[kfile
\begin_inset space ~
\end_inset

<param
\begin_inset space ~
\end_inset

file>] File containing Karplus parameters.
 If not specified will check CPPTRAJHOME, AMBERHOME, and KARPLUS environment
 variables (see below).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write data set output to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<dsname>] Data set name.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note data sets are not generated until 
\series bold
run
\series default
 is called.
\end_layout

\begin_layout Standard
Calculate J-coupling values for all dihedrals found within 
\series bold
<mask>
\series default
 (all atoms if no mask given).
 In order to use this function, Karplus parameters for all dihedrals which
 will be calculated must be loaded.
 By default 
\shape italic
cpptraj
\shape default
 will use the data found in either $CPPTRAJHOME/dat/Karplus.txt or $AMBERHOME/dat
/Karplus.txt; if this is not found 
\shape italic
cpptraj
\shape default
 will look for the file specified by the $KARPLUS environment variable.
 
\end_layout

\begin_layout Standard
In the Karplus parameter file each parameter set consists of two lines for
 each dihedral with the format:
\end_layout

\begin_layout LyX-Code
[<Type>]<Name1><Name2><Name3><Name4><A><B><C>[<D>]
\end_layout

\begin_layout LyX-Code
<Resname1>[<Resname2>...]
\end_layout

\begin_layout Standard
The first line defines the parameter set for a dihedral.
 <Type> is optional; if not given the form for calculating the J-coupling
 will be as described by Chou et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Chou03"
literal "true"

\end_inset

; if 'C' the form will be as described by Perez et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Perez01"
literal "true"

\end_inset

.
 The <NameX> parameters define the four atoms involved in the dihedral.
 Each <NameX> parameter is 5 characters wide, starting with a plus '+',
 minus '-' or space ' ' character indicating the atom belongs to the next,
 previous, or current residue.
 The remaining 4 characters are the atom name.
 The parameters <A>, <B>, <C>, and <D> are floating point values 6 characters
 wide describing the Karplus parameters.
 For the 'C' form A, B, and C correspond to C0, C1, and C2; D is unused
 and should not be specified.
 The second line is a list of residue names (4 characters each) to which
 the dihedral applies.
 For example:
\end_layout

\begin_layout LyX-Code
C HA   CA   CB   HB    5.40 -1.37  3.61
\end_layout

\begin_layout LyX-Code
ILE VAL 
\end_layout

\begin_layout Standard
Describes a dihedral between atoms HA-CA-CB-HB using the Perez et al.
 form with constants C0=5.40, C1=-1.37, C2=3.61 applied to ILE and VAL residues.
\end_layout

\begin_layout Standard
Output can be in both a fixed format (
\series bold
outfile <filename>
\series default
) and using cpptraj data set/data file formatting (
\series bold
out <filename>
\series default
).
 The fixed format has each dihedral that is defined from 
\series bold
<mask1>
\series default
 printed along with its calculated J-coupling value for each frame, e.g.:
\end_layout

\begin_layout LyX-Code
#Frame 1 
\end_layout

\begin_layout LyX-Code
1 SER HA CA CB HB2 45.334742 4.024759 
\end_layout

\begin_layout LyX-Code
1 SER HA CA CB HB3 -69.437134 1.829510
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout Standard
First the frame number is printed, then for each dihedral: Residue number,
 residue name, atom names 1-4 in the dihedral, the value of the dihedral,
 the J-coupling value.
\end_layout

\begin_layout Standard
In 
\family typewriter
\shape italic
cpptraj
\family default
\shape default
 format, only the J-coupling value is written.
\end_layout

\begin_layout Subsection
lessplit
\end_layout

\begin_layout LyX-Code
lessplit [out <filename prefix>] [average <avg filename>] <trajout args>
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename
\begin_inset space ~
\end_inset

prefix>] Write split LES trajectories to <filename prefix>.X, where X is
 an integer.
\end_layout

\begin_layout Description
[average
\begin_inset space ~
\end_inset

<avg
\begin_inset space ~
\end_inset

filename>] Write trajectory of averaged LES regions to <avg filename>.
\end_layout

\begin_layout Description
<trajout
\begin_inset space ~
\end_inset

args> Arguments for output trajectories.
\end_layout

\end_deeper
\begin_layout Standard
Split and/or average LES trajectory.
 At least one of 
\series bold
'out'
\series default
 or 
\series bold
'average'
\series default
 must be specified.
 If both are specified they share <trajout args>.
\end_layout

\begin_layout Subsection
lie
\end_layout

\begin_layout LyX-Code
lie
\begin_inset Index idx
status open

\begin_layout Plain Layout
lie
\end_layout

\end_inset

 [<name>] <Ligand mask> [<Surroundings mask>] [out <filename>] [nopbc]
\begin_inset Newline newline
\end_inset

    [noelec] [novdw] [cutvdw <cutoff>] [cutelec <cutoff>] [diel <dielc>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[EELEC] Electrostatic energy (kcal/mol).
\end_layout

\begin_layout Description
[EVDW] van der Waals energy (kcal/mol).
\end_layout

\end_deeper
\begin_layout Standard
For each frame, calculate the non-bonded interactions between all atoms
 in <Ligand mask> with all atoms in <Surroundings mask>.
 Electrostatic and van der Waals interactions will be calculated for all
 atom pairs.
 A separate electrostatic and van der Waals cutoff can be applied, the default
 is 12.0 Angstroms for both.
 <dielc> is an optional dielectric constant.
 Either the electrostatic or van der Waals calculations can be suppressed
 via the keywords noelec and novdw, respectively.
 Periodic boundary conditions (and the minimum image convention) can be
 abandoned with the 
\begin_inset Quotes eld
\end_inset

nopbc
\begin_inset Quotes erd
\end_inset

 keyword.
 Note, however, that no prior imaging is performed if the frames contain
 periodic boundaries.
 This may be useful for instances when you are simulating a microscopic
 droplets.
\end_layout

\begin_layout Standard
The electrostatic interactions are calculated according to a simple shifting
 function shown below.
 The data file will contain two data sets—one for electrostatic interactions
 and one for van der Waals interactions.
 Periodic topologies and trajectories are required (i.e., explicit solvent
 is necessary).
 The minimum image convention is followed.
\end_layout

\begin_layout Standard
\begin_inset Formula 
\[
E_{elec}=k\frac{q_{i}q_{j}}{r_{ij}}\left(1-\frac{r_{ij}^{2}}{r_{cut}^{2}}\right)^{2}
\]

\end_inset


\end_layout

\begin_layout Subsection
lipidorder
\end_layout

\begin_layout LyX-Code
order out <filename> [x|y|z] [scd] [unsat <mask>] 
\end_layout

\begin_layout LyX-Code
      [taildist <filename> [delta <resolution>] tailstart <mask>
\end_layout

\begin_layout LyX-Code
       tailend <mask>] <mask0> ...
 <maskN> 
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
out Output file for order parameters: Sx, Sy, Sz (each succeeded by the
 standard deviation), and two estimates for the deuterium-order parameter
 |SCD| = 0.5Sz and |SCD| = -(2Sx + Sy)/3.
 If scd is set then the order parameter directly computed from the C-H vectors
 is output.
\end_layout

\begin_layout Description
x|y|z Reference axis.
 (z) 
\end_layout

\begin_layout Description
unsat Mask for unsaturated bonds.
 Sz is calculated for vector Cn-Cn+1.
 This is only relevant if scd (below) is not set, i.e.
 order parameters are calculated from carbon position only.
 
\end_layout

\begin_layout Description
scd Calculate the deuterium-order parameter |SCD| directly from the C-H
 vectors (masks must contain C-H-H triplets, see below).
 Otherwise the order parameter is estimated from carbon positions only (masks
 must contain only relevant carbons).
 (false) 
\end_layout

\begin_layout Description
taildist Optional output file for end-to-end distances.
 
\end_layout

\begin_layout Description
delta Optional resolution for taildist.
 (0.1) 
\end_layout

\begin_layout Description
tailstart Mask for the start of the tail.
 Must be given if taildist.
 
\end_layout

\begin_layout Description
tailend Mask for the end of the tail.
 Must be given if taildist.
 
\end_layout

\begin_layout Description
mask0 ...
 maskN Masks for each group in the lipid chain.
\end_layout

\end_deeper
\begin_layout Standard
The order parameters 
\begin_inset Formula $S_{x}$
\end_inset

, 
\begin_inset Formula $S_{y}$
\end_inset

, 
\begin_inset Formula $S_{z}$
\end_inset

 and |SCD| are calculated.
 Carbons must be given in bonding order.
 If 
\series bold
scd
\series default
 the masks must be made up of C-H-H triples, hence hydrogens to double bonds
 must be enumerated twice while methyl groups require an additional mask
 which will also create two entries in the output.
\end_layout

\begin_layout Standard
\begin_inset Formula $S_{z}$
\end_inset

is the vector joining carbons 
\begin_inset Formula $C_{n-1}$
\end_inset

 and 
\begin_inset Formula $C_{n+1}$
\end_inset

, 
\begin_inset Formula $S_{x}$
\end_inset

 the vector normal to the 
\begin_inset Formula $C_{n-1}-C_{n}$
\end_inset

 and 
\begin_inset Formula $C_{n}-C_{n+1}$
\end_inset

 plane and 
\begin_inset Formula $S_{y}$
\end_inset

 is the third axis in the molecular coordinate system.
 The order parameter is then calculated from 
\begin_inset Formula $Sc=0.5<3\cos(2\theta)>-1$
\end_inset

, where 
\begin_inset Formula $\theta$
\end_inset

 is the angle to the chosen reference axis.
 See example input file.
\end_layout

\begin_layout Standard
Example input (all atom names according to CHARMM27 force field for POPC).
 
\end_layout

\begin_layout Standard
sn1 chain: order parameters 
\begin_inset Formula $S_{x}$
\end_inset

, 
\begin_inset Formula $S_{y}$
\end_inset

, 
\begin_inset Formula $S_{z}$
\end_inset

 and 
\begin_inset Formula $|SCD|=0.5\times S_{z}$
\end_inset

 and 
\begin_inset Formula $|SCD|=-(2S_{x}+S_{y})/3$
\end_inset


\end_layout

\begin_layout LyX-Code
lipidorder out sn1.dat z taildist e2e_sn1.dat delta 0.1 
\backslash

\end_layout

\begin_layout LyX-Code
           tailstart ":POPC@C32" tailend ":POPC@C316" 
\backslash

\end_layout

\begin_layout LyX-Code
           ":POPC@C32" ":POPC@C33" ":POPC@C34" ":POPC@C35" 
\backslash

\end_layout

\begin_layout LyX-Code
           ":POPC@C36" ":POPC@C37" ":POPC@C38" ":POPC@C39" 
\backslash

\end_layout

\begin_layout LyX-Code
           ":POPC@C310" ":POPC@C311" ":POPC@C312" ":POPC@C313" 
\backslash

\end_layout

\begin_layout LyX-Code
           ":POPC@C314" ":POPC@C315" ":POPC@C316"
\end_layout

\begin_layout Standard
See also 
\family typewriter
$AMBERHOME/AmberTools/test/cpptraj/Test_LipidOrder
\family default
.
\end_layout

\begin_layout Subsection
lipidscd
\end_layout

\begin_layout LyX-Code
lipidscd [<name>] [<mask>] [{x|y|z}] [out <file>] [p2]
\end_layout

\begin_deeper
\begin_layout Description
<name> Output data set name.
\end_layout

\begin_layout Description
<mask> Atom mask specifying where to search for lipids.
\end_layout

\begin_layout Description
x|y|z Axis to calculate order parameters with respect to (default z).
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<file> File to write order parameters to.
\end_layout

\begin_layout Description
p2 If specified, report raw <P2> values.
\end_layout

\begin_layout Standard
DataSets Generated:
\end_layout

\begin_layout Description
<name>[H1]:<idx> Hold lipid order parameters for each C-H1.
 Each lipid type will have a different <idx> starting from 0.
\end_layout

\begin_layout Description
<name>[H2]:<idx> Hold lipid order parameters for each C-H2.
 If no H2, the C-H1 value will be used.
\end_layout

\begin_layout Description
<name>[H3]:<idx> Hold lipid order parameters for each C-H3.
 If no H3, the C-H2/C-H1 value will be used.
\end_layout

\begin_layout Description
<name>[SDHX]:<idx> Hold standard deviation of lipid order parameters for
 each C-HX.
\end_layout

\end_deeper
\begin_layout Standard
Calculate lipid order parameters SCD (|<P2>|) for lipid chains in mask 
  <mask>.
 Lipid chains are identified by carboxyl groups, i.e.
   O-(C=O)-C1-...-CN, where C1 is the first carbon in the acyl chain   and
 CN is the last.
 Order parameters will be determined for each   hydrogen bonded to each
 carbon.
 If 'p2' is specified the raw <P2>   values will be reported.
\end_layout

\begin_layout Subsection
makestructure
\end_layout

\begin_layout LyX-Code
makestructure <List of Args>
\end_layout

\begin_layout Standard
Apply dihedrals to specified residues using arguments found in <List of
 Args>, where an argument is 1 or more of the following arg types: 
\end_layout

\begin_layout Subsubsection*
<sstype keyword>:<res
\begin_inset space ~
\end_inset

range>
\end_layout

\begin_layout Standard
Apply secondary structure type (via phi/psi backbone angles) to residues
 in given range.
 If the secondary structure type is a turn, the residue range must correspond
 to a multiple of 2 residues.
\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="14" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Keyword
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
phi, psi (deg.)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
# residues
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
alpha
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-57.8, -47.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
left
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-57.8, 47.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pp2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-75.0, 145.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hairpin
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-100.0, 130.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
extended
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-150.0, 155.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeI
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-60.0, -30.0 | -90.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeII
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-60.0, 120.0 | 80.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeVIII
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-60.0, -30.0 | -120.0, 120.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeI'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
60.0, 30.0 | 90.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeII
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
60.0, -120.0 | -80.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeVIa1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-60.0, 120.0 | -90.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeVIa2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-120.0, 120.0 | -60.0, 0.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
typeVIb
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-135.0, 135.0 | -75.0, 160.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection*
<custom
\begin_inset space ~
\end_inset

ss
\begin_inset space ~
\end_inset

name>:<res
\begin_inset space ~
\end_inset

range>[:<phi>:<psi>]
\end_layout

\begin_layout Standard
If <phi> and <psi> are given, define a custom secondary structure conformation
 named <custom_ss> and apply to residues in range.
 If <custom_ss> has been previously defined then apply it to residues in
 range.
\end_layout

\begin_layout Subsubsection*
<custom
\begin_inset space ~
\end_inset

turn
\begin_inset space ~
\end_inset

name>:<res
\begin_inset space ~
\end_inset

range>[:<phi1>:<psi1>:<phi2>:<psi2>]
\end_layout

\begin_layout Standard
If <phi1>, <psi1>, <phi2>, and <psi2> are given, defined a custom turn conformat
ion named <custom_turn> and apply to residues in range (range must correspond
 to a multiple of 2 residues).
 If <custom_turn> has been previously defined then apply it to residues
 in range.
\end_layout

\begin_layout Subsubsection*
<custom
\begin_inset space ~
\end_inset

dih
\begin_inset space ~
\end_inset

name>:<res
\begin_inset space ~
\end_inset

range>[:<dih
\begin_inset space ~
\end_inset

type>:<angle>]
\end_layout

\begin_layout LyX-Code
<dih type> = alpha beta gamma delta epsilon zeta nu0 nu1 nu2 nu3 nu4 
\end_layout

\begin_layout LyX-Code
             h1p c2p chin phi psi chip omega chi2 chi3 chi4 chi5
\end_layout

\begin_layout Standard
If <dih type> and <angle> are given, apply <angle> to selected dihedrals
 of type in range.
 If <custom dih> has been previously defined then apply it to residues in
 range.
\end_layout

\begin_layout Subsubsection*
<custom
\begin_inset space ~
\end_inset

dih
\begin_inset space ~
\end_inset

name>:<res
\begin_inset space ~
\end_inset

range>[:<at0>:<at1>:<at2>:<at3>:<angle>[:<offset>]]
\end_layout

\begin_layout Standard
Apply <angle> to dihedral defined by atoms <at1>, <at2>, <at3>, and <at4>,
 or use previously defined <custom_dih>.
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<offset>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<at0> and <at1> in previous residue.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<at0> in previous residue.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
All atoms in single residue.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<at3> in next residue.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<at2> and <at3> in next residue.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection*
ref:<range>:<refname>[:<ref
\begin_inset space ~
\end_inset

range>[:<dih types>]] [refvalsout <file>] [founddihout <file>]
\end_layout

\begin_layout Standard
Apply dihedrals from residues <ref_range> in previously loaded reference
 structure <refname> to dihedrals in <range>.
 If <ref range> is specified, use those residues from reference.
 The dihedral types to be used (see 
\series bold
<dih_type>
\series default
 above) can be specified in a comma-separated list; default is phi/psi.
 Note that in order to specify <dih types>, <ref range> must be specified.
 The 'refvalsout' and 'founddihout' keywords can be used to print dihedrals
 found in the reference and target structures respectively to files.
\end_layout

\begin_layout Subsubsection*
Examples
\end_layout

\begin_layout Standard
Assign polyproline II structure to residues 1 through 13:
\end_layout

\begin_layout LyX-Code
makestructure pp2:1-13
\end_layout

\begin_layout Standard
Make residues 1 and 12 'extended', residues 6 and 7 a type I' turn, and
 two custom assignments, one (custom1) for residues 2-5, the other (custom2)
 for residues 8-11:
\end_layout

\begin_layout LyX-Code
makestructure extended:1,12 
\backslash

\end_layout

\begin_layout LyX-Code
              custom1:2-5:-80.0:130.0:-130.0:140.0 
\backslash

\end_layout

\begin_layout LyX-Code
              typeI':6-7 
\backslash

\end_layout

\begin_layout LyX-Code
              custom2:8-11:-140.0:170.0:-100.0:140.0
\end_layout

\begin_layout Standard
Assign residue 5 phi 90 degrees, residues 6 and 7 phi=-70 and psi=60 degrees:
\end_layout

\begin_layout LyX-Code
makestructure customdih:5:phi:90 custom:6,7:-70:60
\end_layout

\begin_layout Standard
Create a new dihedral named chi1 and assign it a value of 35 degrees in
 residue 8:
\end_layout

\begin_layout LyX-Code
makestructure chi1:8:N:CA:CB:CG:35
\end_layout

\begin_layout Standard
Assign 'extended' structure to residues 1 and 12, a custom turn to residues
 2-5 and 8-11, and a typeI' turn to residues 6-7:
\end_layout

\begin_layout LyX-Code
makestructure extended:1,12 
\backslash

\end_layout

\begin_layout LyX-Code
              custom1:2-5:-80.0:130.0:-130.0:140.0 
\backslash

\end_layout

\begin_layout LyX-Code
              typeI’:6-7 
\backslash

\end_layout

\begin_layout LyX-Code
              custom1:8-11
\end_layout

\begin_layout Standard
Assign secondary structure from reference structure:
\end_layout

\begin_layout LyX-Code
parm ../tz2.parm7
\end_layout

\begin_layout LyX-Code
reference ../tz2.rst7
\end_layout

\begin_layout LyX-Code
trajin pp2.rst7.save
\end_layout

\begin_layout LyX-Code
makestructure "ref:1-13:tz2.rst7" rmsd reference
\end_layout

\begin_layout LyX-Code
trajout fromref.pdb multi 
\end_layout

\begin_layout Subsection
mask
\end_layout

\begin_layout LyX-Code
mask
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
mask
\end_layout

\end_inset

 <mask> [maskout <filename>] [out <filename>] [nselectedout <filename>]
\end_layout

\begin_layout LyX-Code
     [name <setname>] [ {maskpdb <filename> | maskmol2 <filename>}
\end_layout

\begin_layout LyX-Code
                        [trajargs <comma-separated args>] ]
\end_layout

\begin_deeper
\begin_layout Description
<mask> Atom mask to process.
\end_layout

\begin_layout Description
maskout
\begin_inset space ~
\end_inset

<filename> Write information on atoms in <mask> to <filename>.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> Write the frame, atom number, atom name, residue number, residue
 name, and molecule number for each selected atom to file.
\end_layout

\begin_layout Description
nselectedout
\begin_inset space ~
\end_inset

<filename> Write the total number of selected atoms to file.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<setname> Name for output data sets.
\end_layout

\begin_layout Description
maskpdb
\begin_inset space ~
\end_inset

<filename> Write PDB of atoms in <mask> to <name>.X.
\end_layout

\begin_layout Description
maskmol2
\begin_inset space ~
\end_inset

<filename> Write Mol2 of atoms in <mask> to <name>.X.
\end_layout

\begin_layout Description
trajargs
\begin_inset space ~
\end_inset

<comma-separated
\begin_inset space ~
\end_inset

args> When writing output PDB/Mol2, additional trajectory arguments to pass
 to the output trajectory.
\end_layout

\begin_layout Standard
DataSets Created
\end_layout

\begin_layout Description
<name> Number of atoms selected each frame.
\end_layout

\begin_layout Description
<name>[Frm] Frame number for each selected atom.
\end_layout

\begin_layout Description
<name>[AtNum] Atom number for each selected atom.
\end_layout

\begin_layout Description
<name>[Aname] Atom name for each selected atom.
\end_layout

\begin_layout Description
<name>[Rnum] Residue number for each selected atom.
\end_layout

\begin_layout Description
<name>[Rname] Residue name for each selected atom.
\end_layout

\begin_layout Description
<name>[Mnum] Molecule number for each selected atom.
\end_layout

\end_deeper
\begin_layout Standard
For each frame determine all atoms that correspond to 
\series bold
<mask>
\series default
.
 This is most useful when using distance-based masks, since the atoms in
 the mask are updated for every frame read in.
 If 
\series bold
maskout
\series default
 is specified information on all atoms in <mask> will be written to <filename>
 with format:
\end_layout

\begin_layout LyX-Code
#Frame AtomNum Atom ResNum Res MolNum
\end_layout

\begin_layout Standard
where 
\family typewriter
#Frame
\family default
 is the frame number, 
\family typewriter
AtomNum
\family default
 is the number of the selected atom, 
\family typewriter
Atom
\family default
 is the name of the selected atom, 
\family typewriter
ResNum
\family default
 is the residue number of the selected atom, 
\family typewriter
Res
\family default
 is the residue name, and 
\family typewriter
MolNum
\family default
 is the molecule number of the selected atom.
\end_layout

\begin_layout Standard
If 
\series bold
maskpdb
\series default
 or 
\series bold
maskmol2
\series default
 are specified a PDB/Mol2 file corresponding to <mask> will be written out
 every frame with name 
\begin_inset Quotes eld
\end_inset


\shape italic
<name>.frame#
\shape default

\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
For example, to write out all residues within 3.0 Angstroms of residue 195
 that are named WAT to 
\begin_inset Quotes eld
\end_inset

Res195WAT.dat
\begin_inset Quotes erd
\end_inset

, as well as write out corresponding PDB files:
\end_layout

\begin_layout LyX-Code
mask 
\begin_inset Quotes eld
\end_inset

(:195<:3.0)&:WAT
\begin_inset Quotes erd
\end_inset

 maskout Res195WAT.dat maskpdb Res195WAT.pdb
\end_layout

\begin_layout Standard
To write all out atoms outside of 5.0 Angstroms of residues named ARG to
 PDB files with a chain ID of 'B':
\end_layout

\begin_layout LyX-Code
mask :ARG>@5.0 maskpdb Outside5Arg.pdb trajargs 
\begin_inset Quotes eld
\end_inset

chainid 'B'
\begin_inset Quotes erd
\end_inset


\end_layout

\begin_layout Subsection
matrix
\end_layout

\begin_layout LyX-Code
matrix [out <filename>] [start <#>] [stop|end <#>] [offset <#>]
\end_layout

\begin_layout LyX-Code
       [name <name>] [ byatom | byres [mass] | bymask [mass] ]
\end_layout

\begin_layout LyX-Code
       [ ired [order <#>] ]
\end_layout

\begin_layout LyX-Code
       [ {distcovar | idea} <mask1> ]
\end_layout

\begin_layout LyX-Code
       [ {dist | correl | covar | mwcovar} <mask1> [<mask2>] ]
\end_layout

\begin_layout LyX-Code
       [ dihcovar dihedrals <dataset arg> ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>]
\series default
 If specified, write matrix to <filename>.
\end_layout

\begin_layout Description

\series bold
[start
\begin_inset space ~
\end_inset

<#>]
\begin_inset space ~
\end_inset

[stop|end
\begin_inset space ~
\end_inset

<#>]
\begin_inset space ~
\end_inset

[offset
\begin_inset space ~
\end_inset

<#>]
\series default
 Start, stop, and offset frames to use (as a subset of all frames read in).
\end_layout

\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<name>]
\series default
 Name of the matrix dataset (for referral in subsequent analysis).
\end_layout

\begin_layout Description

\series bold
byatom
\series default
 Write results by atom (default).
 This is the sole option for 
\family typewriter
covar
\family default
, 
\family typewriter
mwcovar
\family default
, and 
\family typewriter
ired
\family default
.
\end_layout

\begin_layout Description

\series bold
byres
\series default
 Write results by calculating an average for each residue (mass weighted
 if 
\series bold
mass
\series default
 is specified).
\end_layout

\begin_layout Description

\series bold
bymask
\series default
 Write average over <mask1>, and if <mask2> is specified <mask1> x <mask2>
 and <mask2> as well (mass weighted if 
\series bold
mass
\series default
 is specified).
\end_layout

\end_deeper
\begin_layout Standard
Calculate matrix of the specified type from input coordinate frames:
\end_layout

\begin_layout Description
dist
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

[<mask2>] Distance matrix (default).
\end_layout

\begin_layout Description
correl
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

[<mask2>] Correlation matrix (aka dynamic cross correlation
\begin_inset CommandInset citation
LatexCommand citep
key "Hunenberger1995"
literal "true"

\end_inset

).
\end_layout

\begin_layout Description
covar
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

[<mask2>] Coordinate covariance matrix.
 
\end_layout

\begin_layout Description
mwcovar
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

[<mask2>] Mass-weighted coordinate covariance matrix.
\end_layout

\begin_layout Description
distcovar
\begin_inset space ~
\end_inset

<mask1> Distance covariance matrix.
\end_layout

\begin_layout Description
idea
\begin_inset space ~
\end_inset

<mask1> Isotropically Distributed Ensemble Analysis matrix.
\begin_inset CommandInset citation
LatexCommand citep
key "Prompers02"
literal "true"

\end_inset


\end_layout

\begin_layout Description
ired
\begin_inset space ~
\end_inset

[order
\begin_inset space ~
\end_inset

<#>] Isotropic Reorientational Eigenmode Dynamics matrix
\begin_inset CommandInset citation
LatexCommand citep
key "Prompers02a"
literal "true"

\end_inset

 with Legendre polynomials of specified order (default 1).
 IRED vectors must have been specified previously with '
\series bold
\emph on
vector
\series default
\emph default
 
\series bold
ired
\series default
' (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-vector"

\end_inset

).
\end_layout

\begin_layout Description
dihcovar
\begin_inset space ~
\end_inset

dihedrals
\begin_inset space ~
\end_inset

<dataset
\begin_inset space ~
\end_inset

arg> Dihedral covariance matrix.
 Dihedral data sets must have been previously defined with e.g.
 
\series bold
\emph on
dihedral
\series default
\emph default
 or 
\series bold
\emph on
multidihedral
\series default
\emph default
 commands or read in externally with 
\series bold
\emph on
readdata
\series default
\emph default
 and marked as dihedrals.
\end_layout

\begin_layout Standard
Matrix dimensions will be of the order of N x M for 
\series bold
dist
\series default
, 
\series bold
correl
\series default
, 
\series bold
idea
\series default
, and 
\series bold
ired
\series default
, 2N x 2N for 
\series bold
dihcovar
\series default
, 3N x 3M for 
\series bold
covar
\series default
 and 
\series bold
mwcovar
\series default
, and N(N-1) x N(N-1) / 4 for 
\series bold
distcovar
\series default
 (with N being the number of data sets in the case of 
\series bold
ired
\series default
 and 
\series bold
dihcovar
\series default
 and the number of atoms in 
\series bold
\shape italic
\emph on
<mask1>
\series default
\shape default
\emph default
 otherwise, and M being the number of atoms in 
\series bold
<mask2>
\series default
 if specified or 
\series bold
\shape italic
\emph on
<mask1>
\series default
\shape default
\emph default
 otherwise).
 No mask is required for 
\series bold
ired
\series default
; the matrix will be made up of previously defined IRED vectors (see the
 
\series bold
\shape italic
vector
\series default
\shape default
 command 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj-vector"

\end_inset

).
 Similarly no mask is required for dihcovar; dihedral data sets must have
 been previously defined.
 Only one mask can be used with 
\series bold
distcovar
\series default
 and 
\series bold
idea
\series default
 matrices (i.e.
 they can be symmetric only), otherwise one or two masks can be used (for
 symmetric and full matrices respectively).
 If two masks are specified the number of atoms covered by 
\shape italic
mask1
\shape default
 must be greater than or equal to the number of atoms covered by 
\shape italic
mask2,
\shape default
 and on output 
\series bold
<mask1>
\series default
\shape italic
 
\shape default
corresponds to columns while 
\series bold
<mask2>
\series default
 corresponds to rows.
\end_layout

\begin_layout Standard
Note that for backwards compatibility, output files written with '
\series bold
out <filename>
\series default
' will have the options '
\series bold
noheader noxcol square2d
\series default
' applied to them (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"
plural "false"
caps "false"
noprefix "false"

\end_inset

 for more details).
 To prevent any of these from taking effect, simply specify '
\series bold
header
\series default
', '
\series bold
xcol
\series default
', and/or '
\series bold
nosquare2d
\series default
' after '
\series bold
out <filename>
\series default
'.
\end_layout

\begin_layout Standard
As a simple example, a distance matrix of all CA atoms is generated and
 output to 'distmat.dat'.
\end_layout

\begin_layout LyX-Code
matrix dist @CA out distmat.dat
\end_layout

\begin_layout Subsection
mindist
\end_layout

\begin_layout Standard
This functionality is now part of the 
\series bold
\emph on
nativecontacts
\series default
\emph default
 command; see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-nativecontacts"

\end_inset

.
\end_layout

\begin_layout Subsection
minimage
\end_layout

\begin_layout LyX-Code
minimage [<name>] <mask1> <mask2> [out <filename>] [geom] [maskcenter]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> Data set name.
\end_layout

\begin_layout Description
<mask1> First atom mask.
\end_layout

\begin_layout Description
<mask2> Second atom mask.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> File to write to.
\end_layout

\begin_layout Description
geom (
\series bold
maskcenter
\series default
 only) If specified, use geometric center instead of center of mass.
\end_layout

\begin_layout Description
maskcenter Calculate distance from center of masks instead of between each
 atom.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name> Minimum distance to an image in Ang.
\end_layout

\begin_layout Description
<name>[A1] Atom number in mask 1 involved in minimum distance.
\end_layout

\begin_layout Description
<name>[A2] Atom number in mask 2 involved in minimum distance.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the shortest distance to an image, i.e.
 the distance to a neighboring unit cell, as well as the numbers of the
 atoms involved in the distance.
 By default the distance between each atom in <mask1> and <mask2> is considered;
 if 
\series bold
maskcenter
\series default
 is specified the center of the masks is used.
 By convention, the lower atom number is saved as A1 and the higher is saved
 as A2.
\end_layout

\begin_layout Subsection
molsurf
\end_layout

\begin_layout LyX-Code
molsurf
\begin_inset Index idx
status open

\begin_layout Plain Layout
molsurf
\end_layout

\end_inset

 [<name>] [<mask>] [out filename] [probe <probe_rad>]
\end_layout

\begin_layout LyX-Code
    	[radii {gb | parse | vdw}] [offset <rad_offset>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Name of surface area data set.
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate surface area of.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write values to.
\end_layout

\begin_layout Description
[probe
\begin_inset space ~
\end_inset

<probe_rad>] Probe radius (default 1.4 Angstrom).
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<rad_offset>] Add <rad_offset> to each atom radius (default 0.0).
\end_layout

\begin_layout Description
[radii
\begin_inset space ~
\end_inset

{gb|parse|vdw}] Specify radii to use:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
gb GB radii (default).
\end_layout

\begin_layout Description
parse PARSE radii.
\end_layout

\begin_layout Description
vdw van der Waals radii.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Calculate the Connolly surface area
\begin_inset CommandInset citation
LatexCommand citep
key "Connolly83"
literal "true"

\end_inset

 of atoms in <mask> (default all atoms if no mask specified) using routines
 from molsurf (originally developed by Paul Beroza) using the probe radius
 specified by 
\series bold
probe
\series default
 (1.4 Å if not specified).
 Note that if GB/VDW radii are not present in the topology file (e.g.
 for PDB files), then PARSE
\begin_inset CommandInset citation
LatexCommand citep
key "Sitkoff94"
literal "true"

\end_inset

 radii can be used.
 Also note that this routine only calculate absolute surface areas, i.e.
 it cannot be used to get the contribution of a subset of atoms to overall
 surface area; if such functionality is needed try the 
\series bold
\emph on
surf
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_surf"

\end_inset

).
\end_layout

\begin_layout Subsection
multidihedral
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_multidihedral"

\end_inset


\end_layout

\begin_layout LyX-Code
multidihedral [<name>] <dihedral types> [resrange <range>] [out <filename>]
 [range360]
\end_layout

\begin_layout LyX-Code
              [dihtype <name>:<a0>:<a1>:<a2>:<a3>[:<offset>] ...]
\end_layout

\begin_layout LyX-Code
                  Offset -2=<at0><at1> in previous res, -1=<at0> in previous
 res,
\end_layout

\begin_layout LyX-Code
                          0=All <atX> in single res,
\end_layout

\begin_layout LyX-Code
                          1=<at3> in next res, 2=<at2><at3> in next res.
\end_layout

\begin_layout LyX-Code
              <dihedral types> =  alpha beta gamma delta epsilon zeta 
\end_layout

\begin_layout LyX-Code
                                  nu0 nu1 nu2 nu3 nu4 h1p c2p chin 
\end_layout

\begin_layout LyX-Code
                                  phi psi chip omega chi2 chi3 chi4 chi5
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
<dihedral
\begin_inset space ~
\end_inset

types> Dihedral types to look for.
 Note that chip is 'protein chi', chin is 'nucleic chi'.
\end_layout

\begin_layout Description
[resrange
\begin_inset space ~
\end_inset

<range>] Residue range to look for dihedrals in.
 Default is all solute residues.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[range360] Wrap torsion values from 0.0 to 360.0 (default is -180.0 to 180.0).
\end_layout

\begin_layout Description
[dihtype
\begin_inset space ~
\end_inset

<name>:<a0>:<a1>:<a2>:<a3>[:<offset>] Search for a custom dihedral type
 called <name> using atom names <a0>, <a1>, <a2>, and <a3>.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
Offset: -2=<a0><a1> in previous res, -1=<a0> in previous res, 0=All <aX>
 in single res, 1=<a3> in next res, 2=<a2><a3> in next res.
\end_layout

\end_deeper
\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[<dihedral
\begin_inset space ~
\end_inset

type>]:<#> Aspect corresponds to the dihedral type name (e.g.
 [phi], [psi], etc).
 The index is the residue number.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note data sets are not generated until 
\series bold
run
\series default
 is called.
\end_layout

\begin_layout Standard
Calculate specified dihedral angle types for residues in given range.
 By default, dihedral angles are identified based on standard Amber atom
 names.
 The resulting data sets will have aspect equal to [<dihedral type>] and
 index equal to residue #.
 To differentiate the chi angle, chip is used for proteins and chin for
 nucleic acids.
 For example, to calculate all phi/psi dihedrals for residues 6 to 9:
\end_layout

\begin_layout LyX-Code
multidihedral MyTorsions phi psi resrange 6-9 out PhiPsi_6-9.dat
\end_layout

\begin_layout Standard
This will generate data sets named MyTorsions[phi]:6, MyTorsions[psi]:6,
 MyTorsions[phi]:7, etc.
 Dihedrals other than those defined in 
\series bold
<dihedral types>
\series default
 can be searched for using 
\series bold
dihtype
\series default
.
 For example to create a custom dihedral type called chi1 using atoms N,
 CA, CB, and CG (all in the same residue), then search for and calculate
 the dihedral in all residues:
\end_layout

\begin_layout LyX-Code
multidihedral dihtype chi1:N:CA:CB:CG out custom.dat
\end_layout

\begin_layout Subsection
multivector
\end_layout

\begin_layout LyX-Code
multivector [<name>] [resrange <range>] name1 <name1> name2 <name2> [out
 <filename>]
\end_layout

\begin_layout LyX-Code
            [ired]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[resrange
\begin_inset space ~
\end_inset

<range>] Range of residues to look for vectors in.
\end_layout

\begin_layout Description
name1
\begin_inset space ~
\end_inset

<name1> Name of first atom in each residue.
\end_layout

\begin_layout Description
name2
\begin_inset space ~
\end_inset

<name2> Name of second atom in each residue.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write results to.
\end_layout

\end_deeper
\begin_layout Standard
Search for and calculate atomic vectors between atoms named <name1> and
 <name2> in residues specified by the given <range>; each one is equivalent
 to the command '
\family typewriter
\series bold
vector
\series default
 <name1> <name2>
\family default
'.
 For example, to calculate all vectors between atoms named 'N' and atoms
 named 'H' in residues 5-20, storing the results in data sets named NH and
 writing to NH.dat:
\end_layout

\begin_layout LyX-Code
multivector NH name1 N name2 H ired out NH.dat resrange 5-20
\end_layout

\begin_layout Subsection
nastruct
\end_layout

\begin_layout LyX-Code
nastruct
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
nastruct
\end_layout

\end_inset

 [<dataset name>] [resrange <range>] [sscalc] [naout <suffix>]
\end_layout

\begin_layout LyX-Code
     	[noheader] [resmap <ResName>:{A,C,G,T,U} ...] [calcnohb]
\end_layout

\begin_layout LyX-Code
         [noframespaces] [baseref <file>] ...
\end_layout

\begin_layout LyX-Code
     	[hbcut <hbcut>] [origincut <origincut>] [altona | cremer]
\end_layout

\begin_layout LyX-Code
     	[zcut <zcut>] [zanglecut <zanglecut>] [groovecalc {simple | 3dna}]
\end_layout

\begin_layout LyX-Code
     	[{ first | reference | ref <name> | refindex <#> | allframes | guessbp}]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
         [bptype {anti | para} ...]
\end_layout

\begin_deeper
\begin_layout Description
[<dataset
\begin_inset space ~
\end_inset

name>] Output data set name.
\end_layout

\begin_layout Description
[resrange
\begin_inset space ~
\end_inset

<range>] Residue range to search for nucleic acids in (default all).
\end_layout

\begin_layout Description
[sscalc] Calculate parameters between consectuive bases in strands.
\end_layout

\begin_layout Description
[naout
\begin_inset space ~
\end_inset

<suffix>] File name suffix for output files; BP.<suffix> for base pair parameters
, BPstep.<suffix> for base pair step parameters, and Helix.<suffix> for base
 pair step helical parameters.
 If 
\series bold
sscalc
\series default
 is specified, also SS.<suffix> for parameters of consecutive bases in strands.
\end_layout

\begin_layout Description
[noheader] Do not print header to 
\series bold
naout
\series default
 file.
\end_layout

\begin_layout Description
[resmap
\begin_inset space ~
\end_inset

<ResName>:{A,C,G,T,U}] Attempt to treat residues named <ResName> as if it
 were A, C, G, T, or U; useful for residues with modifications or non-standard
 residue names.
 This will only work if enough reference atoms are present in <ResName>.
\end_layout

\begin_layout Description
[calcnohb] Calculate parameters between bases in base pairs even if no hydrogen
 bonds present between them.
\end_layout

\begin_layout Description
[noframespaces] If specified there will be no spaces between frames in the
 
\series bold
naout
\series default
 files.
\end_layout

\begin_layout Description
[baseref
\begin_inset space ~
\end_inset

<file>] Specify a custom nucleic acid base reference.
 One file per custom residue; multiple 'baseref' keywords may be present.
 See below for details.
\end_layout

\begin_layout Description
[hbcut
\begin_inset space ~
\end_inset

<hbcut>] Distance cutoff (in Angstroms) for determining hydrogen bonds between
 bases (default 3.5).
\end_layout

\begin_layout Description
[origincut
\begin_inset space ~
\end_inset

<origincut>] Distance cutoff (in Angstroms) between base pair axis origins
 for determining which bases are eligible for base-pairing (default 2.5).
\end_layout

\begin_layout Description
[altona] Use method of Altona & Sundaralingam to calculate sugar pucker
 (default, see 
\series bold
\shape italic
pucker
\series default
\shape default
 command).
\end_layout

\begin_layout Description
[cremer] Use method of Cremer and Pople to calculate sugar pucker (see 
\series bold
\shape italic
pucker
\series default
\shape default
 command).
\end_layout

\begin_layout Description
[zcut] Distance cutoff (in Angstroms) between base reference axes along
 the Z axis (i.e.
 stagger) for determining base pairing (default 2).
\end_layout

\begin_layout Description
[zanglecut] Angle cutoff (in degrees) between base reference Z axes for
 determining base pairing (default 65).
\end_layout

\begin_layout Description
[groovecalc] Groove width calculation method:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
simple Use P-P distance for major groove, O4-O4 distance for minor groove.
 Output to 'BP.<suffix>'.
\end_layout

\begin_layout Description
3dna Use groove width calculation of El Hassan and Calladine
\begin_inset CommandInset citation
LatexCommand citep
key "Hassan1998"
literal "true"

\end_inset

.
 Output to 'BPstep.<suffix>'.
\end_layout

\end_deeper
\begin_layout Description
[first] Use first frame to determine base pairing (default).
\end_layout

\begin_layout Description
[reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>] Reference structure to use to determine base pairing.
\end_layout

\begin_layout Description
[allframes] If specified determine base pairing each frame.
\end_layout

\begin_layout Description
[guessbp
\begin_inset space ~
\end_inset

[bptype{anti|para}]] If specified base pairing will be determined based
 on selected NA strands.
 It is assumed that consecutive strands will be base-paired and that they
 are arranged 5' to 3'.
 The specific type of base pairing between strands can be specified with
 one or more 'bptype' arguments.
\end_layout

\begin_layout Standard
DataSets Created:
\end_layout

\begin_layout Description
<name>[pucker]:X Base X (residue number) sugar pucker.
\end_layout

\begin_layout Standard
Base pairs:
\end_layout

\begin_layout Description
<name>[shear]:X Base pair X (starting from 1) shear.
\end_layout

\begin_layout Description
<name>[stretch]:X Base pair stretch.
\end_layout

\begin_layout Description
<name>[stagger]:X Base pair stagger.
\end_layout

\begin_layout Description
<name>[buckle]:X Base pair buckle.
\end_layout

\begin_layout Description
<name>[prop]:X Base pair propeller.
\end_layout

\begin_layout Description
<name>[open]:X Base pair opening.
\end_layout

\begin_layout Description
<name>[hb]:X Number of WC hydrogen bonds between bases in base pair.
\end_layout

\begin_layout Description
<name>[bp]:X Contain 1 if bases are base paired, 0 otherwise.
\end_layout

\begin_layout Description
<name>[major]:X (If groovecalc simple) Major groove width calculated between
 P atoms of each base.
\end_layout

\begin_layout Description
<name>[minor]:X (If groovecalc simple) Minor groove width calculated between
 O4 atoms of each base.
\end_layout

\begin_layout Standard
Base pair steps:
\end_layout

\begin_layout Description
<name>[shift]:X Base pair step X (starting from 1) shift.
\end_layout

\begin_layout Description
<name>[slide]:X Base pair step slide.
\end_layout

\begin_layout Description
<name>[rise]:X Base pair step rise.
\end_layout

\begin_layout Description
<name>[title]:X Base pair step tilt.
\end_layout

\begin_layout Description
<name>[roll]:X Base pair step roll.
\end_layout

\begin_layout Description
<name>[twist]:X Base pair step twist.
\end_layout

\begin_layout Description
<name>[zp]:X Base pair step Zp value.
\end_layout

\begin_layout Description
<name>[major]:X (If groovecalc 3dna) Major groove width, El Hassan and Calladine.
\end_layout

\begin_layout Description
<name>[minor]:X (If groovecalc 3dna) Minor groove width, El Hassan and Calladine.
\end_layout

\begin_layout Standard
Helical steps:
\end_layout

\begin_layout Description
<name>[xdisp]:X Helical step X (starting from 1) X displacement.
\end_layout

\begin_layout Description
<name>[ydisp]:X Helical Y displacement.
\end_layout

\begin_layout Description
<name>[hrise]:X Helical rise.
\end_layout

\begin_layout Description
<name>[incl]:X Helical inclination.
\end_layout

\begin_layout Description
<name>[tip]:X Helical tip.
\end_layout

\begin_layout Description
<name>[htwist]:X Helical twist.
\end_layout

\begin_layout Standard
Strands (sscalc only):
\end_layout

\begin_layout Description
<name>[dx]:X Strand pair X (starting from 1) X displacement.
\end_layout

\begin_layout Description
<name>[dy]:X Y displacement.
\end_layout

\begin_layout Description
<name>[dz]:X Z displacement.
\end_layout

\begin_layout Description
<name>[rx]:X Relative rotation around X axis.
\end_layout

\begin_layout Description
<name>[ry]:X Relative rotation around Y axis.
\end_layout

\begin_layout Description
<name>[rz]:X Relateive rotation around Z axis.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note that base pair data sets are not created until base pairing is determined.
\end_layout

\begin_layout Standard
Calculate basic nucleic acid (NA) structure parameters for all residues
 in the range specified by 
\series bold
resrange
\series default
 (or all NA residues if no range specified).
 Residue names are recognized with the following priority: standard Amber
 residue names DA, DG, DC, DT, RA, RG, RC, and RU; 3 letter residue names
 ADE, GUA, CYT, THY, and URA; and finally 1 letter residue names A, G, C,
 T, and U.
 Non-standard/modified NA bases can be recognized by using the 
\series bold
resmap
\series default
 keyword.
 For example, to make 
\shape italic
cpptraj
\shape default
 recognize all 8-oxoguanine residues named '8OG' as a guanine-based residue:
\end_layout

\begin_layout LyX-Code
nastruct naout nastruct.dat resrange 274-305 resmap 8OG:G
\end_layout

\begin_layout Standard
The 
\series bold
resmap
\series default
 keyword can be specified multiple times, but only one mapping per unique
 residue name is allowed.
 Note that 
\series bold
resmap
\series default
 may fail if the residue is missing heavy atoms normally present in the
 specified base type.
\end_layout

\begin_layout Standard
Base pairs are determined either once from the first frame or from a reference
 structure, or can be determined each frame if 
\series bold
allframes
\series default
 is specified.
 Base pairing is determined first by base reference axis origin distance,
 then by stagger, then by angle between base Z axes, then finally by hydrogen
 bonding (at least one hydrogen bond must be present).
 Base pair parameters will only be written for determined base pairs.
 Both Watson-Crick and other types of base pairing can be detected.
 Note that although all possible hydrogen bonds are searched for, only WC
 hydrogen bonds are reported in the BP.<suffix> file.
\end_layout

\begin_layout Standard
The procedure used to calculate NA structural parameters is the same as
 3DNA
\begin_inset CommandInset citation
LatexCommand citep
key "Lu2003"
literal "true"

\end_inset

, with algorithms adapted from Babcok et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Babcock94"
literal "true"

\end_inset

 and reference frame coordinates from Olson et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Olson2001"
literal "true"

\end_inset

.
 Given the same base pairs are determined, 
\shape italic
cpptraj
\shape default
 nastruct gives the exact same numbers as 3DNA.
 
\end_layout

\begin_layout Standard
Calculated NA structure parameters are written to three separate files,
 the suffix of which is specified by 
\series bold
naout
\series default
.
 Base pair parameters (shear, stretch, stagger, buckle, propeller twist,
 opening, # WC hydrogen bonds, base pairing, and simple groove widths) are
 written to BP.<suffix>, along with the number of WC hydrogen bonds detected.
 Base pair step parameters (shift, slide, rise, tilt, roll, twist, Zp, and
 El Hassan and Calladine groove widths) are written to BPstep.<suffix>, and
 helical parameters (X-displacement, Y-displacement, rise, inclination,
 tip, and twist) are written to Helix.<suffix>.
 If 
\series bold
noheader
\series default
 is specified a header will not be written to the output files.
 Note that although base puckering is calculated, it is not written to an
 output file by default.
 You can output pucker to a file via the create or write/writedata commands
 after the data has been generated, e.g.:
\end_layout

\begin_layout LyX-Code
nastruct NA naout nastruct.dat resrange 1-3,28-30
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
writedata NApucker.dat NA[pucker]
\end_layout

\begin_layout Standard
Note that while the underlying procedure is geared towards calculating parameter
s for base pairs, the code can be made to calculate parameters between consecuti
ve bases in single strands by specifying 
\series bold
sscalc
\series default
.
\end_layout

\begin_layout Subsubsection*
Custom Nucleic Acid Base References
\end_layout

\begin_layout Standard
Users can now specify 
\series bold
baseref <file>
\series default
 to load a custom nucleic acid base reference.
 The base reference files are white-space delimited, begin with the line
 NASTRUCT REFERENCE, and have the following format:
\end_layout

\begin_layout LyX-Code
NASTRUCT REFERENCE
\end_layout

\begin_layout LyX-Code
<base character> <res name 0> [<res name 1> ...]
\end_layout

\begin_layout LyX-Code
<atom name> <X> <Y> <Z> <HB type> <RMS fit>
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout Standard
There is a line for each reference atom.
 Lines beginning with '#' are ignored as comments.
\end_layout

\begin_layout Description
<base
\begin_inset space ~
\end_inset

character> Used to identify the underlying base type: A G C T or U.
 If none of these, it will be considered an unknown residue (which just
 means WC hydrogen bonding will not be identified).
\end_layout

\begin_layout Description
<res
\begin_inset space ~
\end_inset

name
\begin_inset space ~
\end_inset

X> Specifies what residue names this reference corresponds to.
 There must be at least one residue name.
 There can be any number of these specified.
\end_layout

\begin_layout Description
<atom
\begin_inset space ~
\end_inset

name> A reference atom name.
\end_layout

\begin_layout Description
<X>
\begin_inset space ~
\end_inset

<Y>
\begin_inset space ~
\end_inset

<Z> The X Y and Z coordinates of the reference atom.
\end_layout

\begin_layout Description
<HB
\begin_inset space ~
\end_inset

type> Denotes if and how the atom participates in hydrogen bonding.
 Can be 'd'onor, 'a'cceptor, or 'n'one (or the numbers 1, 2, 0 respectively).
 Only the first character of the word actually matters.
\end_layout

\begin_layout Description
<RMS
\begin_inset space ~
\end_inset

fit> Denotes whether the atom is involved in RMS-fitting.
\end_layout

\begin_layout Standard
Here is an example for GUA:
\end_layout

\begin_layout LyX-Code
NASTRUCT REFERENCE
\end_layout

\begin_layout LyX-Code
G G G5 G3
\end_layout

\begin_layout LyX-Code
# Modified into format readable by cpptraj nastruct
\end_layout

\begin_layout LyX-Code
C1' -2.477   5.399   0.000 0      0
\end_layout

\begin_layout LyX-Code
N9  -1.289   4.551   0.000 0      1
\end_layout

\begin_layout LyX-Code
C8   0.023   4.962   0.000 0      1
\end_layout

\begin_layout LyX-Code
N7   0.870   3.969   0.000 accept 1
\end_layout

\begin_layout LyX-Code
C5   0.071   2.833   0.000 0      1
\end_layout

\begin_layout LyX-Code
C6   0.424   1.460   0.000 0      1
\end_layout

\begin_layout LyX-Code
O6   1.554   0.955   0.000 accept 0
\end_layout

\begin_layout LyX-Code
N1  -0.700   0.641   0.000 donor  1
\end_layout

\begin_layout LyX-Code
C2  -1.999   1.087   0.000 0      1
\end_layout

\begin_layout LyX-Code
N2  -2.949   0.139  -0.001 donor  0
\end_layout

\begin_layout LyX-Code
N3  -2.342   2.364   0.001 accept 1
\end_layout

\begin_layout LyX-Code
C4  -1.265   3.177   0.000 0      1
\end_layout

\begin_layout Subsection
nativecontacts
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-nativecontacts"

\end_inset


\end_layout

\begin_layout LyX-Code
nativecontacts [<mask1> [<mask2>]] [writecontacts <outfile>] [resout <resfile>]
\end_layout

\begin_layout LyX-Code
               [noimage] [distance <cut>] [out <filename>] [includesolvent]
\end_layout

\begin_layout LyX-Code
               [ first | reference | ref <name> | refindex <#> ]
\end_layout

\begin_layout LyX-Code
               [resoffset <n>] [contactpdb <file>] [pdbcut <cut>] [mindist]
 [maxdist]
\end_layout

\begin_layout LyX-Code
               [name <dsname>] [byresidue] [map [mapout <mapfile>]]
\end_layout

\begin_layout LyX-Code
               [series [seriesout <file>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
               [savenonnative [seriesnnout <file>] [nncontactpdb <file>]]
\end_layout

\begin_layout LyX-Code
               [resseries { present | sum } [resseriesout <file>]] [skipnative]
\end_layout

\begin_deeper
\begin_layout Description
<mask1> First mask to calculate contacts for.
\end_layout

\begin_layout Description
[<mask2>] (Optional) Second mask to calculate contacts for.
\end_layout

\begin_layout Description
[writecontacts
\begin_inset space ~
\end_inset

<outfile>] Write information on native contacts to 
\series bold
<outfile>
\series default
 (STDOUT if not specified).
\end_layout

\begin_layout Description
[resout
\begin_inset space ~
\end_inset

<resfile>] File to write contact residue pairs to.
\end_layout

\begin_layout Description
[noimage] Do not image distances.
\end_layout

\begin_layout Description
[distance
\begin_inset space ~
\end_inset

<cut>] Distance cutoff for determining native contacts in Angstroms (default
 7.0 Ang).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write number of native contacts and non-native contacts.
\end_layout

\begin_layout Description
[includesolvent] By default solvent molecules are ignored; this will explicitly
 include solvent molecules.
\end_layout

\begin_layout Description
[first
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>] Reference structure to use for determining native contacts.
\end_layout

\begin_layout Description
[resoffset
\begin_inset space ~
\end_inset

<n>] (
\series bold
byresidue
\series default
 only) Ignore contacts between residues spaced less than <n> residues apart
 in sequence.
\end_layout

\begin_layout Description
[contactpdb
\begin_inset space ~
\end_inset

<file>] Write PDB with B-factor column containing relative contact strength
 for native contacts (strongest is 100.0).
\end_layout

\begin_layout Description
[pdbcut
\begin_inset space ~
\end_inset

<cut>] If writing 
\series bold
contactpdb
\series default
, only write contacts with relative contact strength greater than 
\series bold
<cut>
\series default
.
\end_layout

\begin_layout Description
[mindist] If specified, determine the minimum distance between any atoms
 in the mask(s).
\end_layout

\begin_layout Description
[maxdist] If specified, determine the maximum distance between any atoms
 in the mask(s).
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<dsname>] Data set name.
\end_layout

\begin_layout Description
[byresidue] Write out the contact map by residue instead of by atom.
\end_layout

\begin_layout Description
[map] Calculate matrices of native contacts ([nativemap]) and non-native
 contacts ([nonnatmap]).
 These matrices are normalized by the total number of frames, so that a
 value of 1.0 means 
\begin_inset Quotes eld
\end_inset

contact always present
\begin_inset Quotes erd
\end_inset

.
 If 
\series bold
byresidue
\series default
 specified, the values for each individual atom pair are summed over the
 residues they belong to (this means for 
\series bold
byresidue
\series default
 values greater than 1.0 are possible).
\end_layout

\begin_layout Description
[mapout
\begin_inset space ~
\end_inset

<mapfile>] Write native/non-native matrices to 'native.<mapfile>' and 'nonnative.<
mapfile>' respectively.
\end_layout

\begin_layout Description
[series] Calculate native contact time series data, 1 for contact present
 and 0 otherwise.
\end_layout

\begin_layout Description
[seriesout
\begin_inset space ~
\end_inset

<file>] Write native contact time series data to file.
\end_layout

\begin_layout Description
[savenonnative] Save non-native contacts; 
\series bold
series
\series default
 must also be specified.
 This is enabled by default if 
\series bold
skipnative
\series default
 specified.
\end_layout

\begin_deeper
\begin_layout Description
[seriesnnout
\begin_inset space ~
\end_inset

<file>] Write non-native contact time series data to file.
\end_layout

\begin_layout Description
[nncontactpdb
\begin_inset space ~
\end_inset

<file>] Write PDB with B-factor column containing relative contact strength
 for non-native contacts (strongest is 100.0).
\end_layout

\end_deeper
\begin_layout Description
[resseries
\begin_inset space ~
\end_inset

{present
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

sum} Create contacts time series by residue; 
\series bold
series
\series default
 must also be specified.
\end_layout

\begin_deeper
\begin_layout Description
present Record a 1 if 
\emph on
any
\emph default
 contact is present and 0 if no contact is present for the residue pair.
\end_layout

\begin_layout Description
sum The sum of all individual contacts is recorded for the residue pair.
\end_layout

\begin_layout Description
[resseriesout
\begin_inset space ~
\end_inset

<file>] Write residue time series data to <file>.
\end_layout

\end_deeper
\begin_layout Description
[skipnative] If specified, skip native contacts determination, i.e.
 treat all sonctacts as non-native contacts.
 Implies 
\series bold
savenonnative.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<dsname>[native] Number of native contacts.
\end_layout

\begin_layout Description
<dsname>[nonnative] Number of non-native contacts.
\end_layout

\begin_layout Description
<dsname>[mindist] (mindist only) Minimum observed distance each frame.
\end_layout

\begin_layout Description
<dsname>[maxdist] (maxdist only) Maximum observed distance each frame.
\end_layout

\begin_layout Description
<dsname>[nativemap] (map only) Native contacts matrix (2D).
\end_layout

\begin_layout Description
<dsname>[nonnatmap] Non-native contacts matrix (2D).
\end_layout

\begin_layout Description
<dsname>[NC] Native contacts time series.
\end_layout

\begin_layout Description
<dsname>[NN] Non-native contacts time series.
\end_layout

\begin_layout Description
<dsname>[NCRES] Residue native contacts time series.
\end_layout

\begin_layout Description
<dsname>[NNRES] Residue non-native contacts time series.
\end_layout

\end_deeper
\begin_layout Standard
Define and track 
\begin_inset Quotes eld
\end_inset

native
\begin_inset Quotes erd
\end_inset

 contacts as determined by a simple distance cut-off, i.e.
 any atoms which are closer than 
\series bold
<cut>
\series default
 in the specified reference frame (the first frame if no reference specified)
 are considered a native contact.
 If one mask is provided, contacts are looked for within 
\series bold
<mask1>
\series default
; if two masks are provided, only contacts between atoms in 
\series bold
<mask1>
\series default
 and atoms in 
\series bold
<mask2>
\series default
 are looked for (useful for determining intermolecular contacts).
 By default only native contacts are tracked.
 This can be changed by specifying the 
\series bold
savenonnative
\series default
 keyword or by specifying 
\series bold
skipnative
\series default
.
 The time series for contacts can be saved using the 
\series bold
series
\series default
 keyword; these can be further consolidated by residue using the 
\series bold
resseries
\series default
 keyword.
 When using <resseries> the data set index is calculated as (r2 * nres)
 + r1 so that indices can be matched between native/non-native contact pairs.
 Non-native residue contact legends have an nn_ prefix.
\end_layout

\begin_layout Standard
Native contacts that are found are written to the file specified by writecontact
s (or STDOUT) with format:
\end_layout

\begin_layout LyX-Code
# Contact Nframes Frac.
 Avg Stdev 
\end_layout

\begin_layout Standard
Where 
\family typewriter
Contact
\family default
 takes the form ':<residue1 num>@<atom name>_:<residue2 num>@<atom name>,
 
\family typewriter
Nframes
\family default
 is the number of frames the contact is present, 
\family typewriter
Frac.

\family default
 is the total fraction of frames the contact is present, 
\family typewriter
Avg
\family default
 is the average distance of the contact when present, and 
\family typewriter
Stdev
\family default
 is the standard deviation of the contact distance when present.
 If 
\series bold
resout
\series default
 is specified the total fraction of contacts is printed for all residue
 pairs having native contacts with format:
\end_layout

\begin_layout LyX-Code
#Res1 #Res2 TotalFrac Contacts 
\end_layout

\begin_layout Standard
Where 
\family typewriter
#Res1
\family default
 is the first residue number, 
\family typewriter
#Res2
\family default
 is the second residue number, 
\family typewriter
TotalFrac
\family default
 is the total fraction of contacts for the residue pair, and 
\family typewriter
Contacts
\family default
 is the total number of native contacts involved with the residue pair.
 Since 
\family typewriter
TotalFrac
\family default
 is calculated for each pair as the sum of each contact involving that pair
 divided by the total number of frames, it is possible to have 
\family typewriter
TotalFrac
\family default
 values greater than 1 if the residue pair includes more than 1 native contact.
\end_layout

\begin_layout Standard
During trajectory processing, non-native contacts (i.e.
 any pair satisfying the distance cut-off which is not already a native
 contact) are also searched for.
 The time series for native contacts can be saved as well, with 1 for contact
 present and 0 otherwise (similar to the 
\series bold
\emph on
hbond
\series default
\emph default
 command).
 This data can be subsequently analyzed using e.g.
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-lifetime"

\end_inset

.
\end_layout

\begin_layout Standard
Contact maps (matrices) are generated for native and non-native contacts.
 If 
\series bold
byresidue
\series default
 is specified, contact maps are summed over residues, and contacts between
 residues spaced 
\series bold
<resoffset>
\series default
 residues apart in sequence are ignored.
\end_layout

\begin_layout Standard
If 
\series bold
contactpdb
\series default
 is specified a PDB is generated containing relative contact strengths in
 the B-factor column.
 The relative contact strength is normalized so that a value of 100 means
 that atom participated in the most contacts with other atoms.
\end_layout

\begin_layout Standard
Example command looking for contacts between residues 210 to 260 and residue
 named NDP, using reference structure 'FtuFabI.WT.pdb' to define native contacts:
\end_layout

\begin_layout LyX-Code
parm FtuFabI.parm7
\end_layout

\begin_layout LyX-Code
trajin FtuFabI.nc
\end_layout

\begin_layout LyX-Code
reference FtuFabI.WT.pdb
\end_layout

\begin_layout LyX-Code
nativecontacts name NC1 :210-260&!@H= :NDP&!@H= 
\backslash

\end_layout

\begin_layout LyX-Code
    byresidue out nc.all.res.dat mindist maxdist 
\backslash

\end_layout

\begin_layout LyX-Code
    distance 3.0 reference map mapout resmap.gnu 
\backslash

\end_layout

\begin_layout LyX-Code
    contactpdb Loop-NDP.pdb 
\backslash

\end_layout

\begin_layout LyX-Code
    series seriesout native.dat
\end_layout

\begin_layout Subsection
outtraj
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_outtraj"

\end_inset


\end_layout

\begin_layout LyX-Code
outtraj
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
outtraj
\end_layout

\end_inset

 <filename> [ trajout args ]
\end_layout

\begin_layout LyX-Code
        [maxmin <dataset> min <min> max <max>] ...
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<filename> Output trajectory file name.
\end_layout

\begin_layout Description
[trajout
\begin_inset space ~
\end_inset

args] Output trajectory arguments (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-trajout"

\end_inset

).
\end_layout

\begin_layout Description
[maxmin
\begin_inset space ~
\end_inset

<dataset>
\begin_inset space ~
\end_inset

min
\begin_inset space ~
\end_inset

<min>
\begin_inset space ~
\end_inset

max
\begin_inset space ~
\end_inset

<max>] Only write frames to <filename> if values in <dataset> for those
 frames are between <min> and <max>.
 Can be specified for one or more data sets.
\end_layout

\end_deeper
\begin_layout Standard
The outtraj command is similar in function to 
\series bold
\emph on
trajout
\series default
\emph default
, and takes all of the same arguments.
 However, instead of writing a trajectory frame after all actions are complete
 outtraj writes the trajectory frame at its position in the Action queue.
 For example, given the input:
\end_layout

\begin_layout LyX-Code
trajin mdcrd.crd
\end_layout

\begin_layout LyX-Code
trajout output.crd
\end_layout

\begin_layout LyX-Code
outtraj BeforeRmsd.crd
\end_layout

\begin_layout LyX-Code
rms R1 first :1-20@CA out rmsd.dat
\end_layout

\begin_layout LyX-Code
outtraj AfterRmsd.crd
\end_layout

\begin_layout Standard
three trajectories will be written: output.crd, BeforeRmsd.crd, and AfterRmsd.crd.
 The output.crd and AfterRmsd.crd trajectories will be identical, but the
 BeforeRmsd.crd trajectory will contain the coordinates of mdcrd.crd before
 they are RMS-fit.
\end_layout

\begin_layout Standard
The maxmin keyword can be used to restrict output using one more more data
 sets.
 For example, to only write frames for which the RMSD value is between 0.7
 and 0.8:
\end_layout

\begin_layout LyX-Code
trajin tz2.truncoct.nc
\end_layout

\begin_layout LyX-Code
rms R1 first :2-11
\end_layout

\begin_layout LyX-Code
outtraj maxmin.crd maxmin R1 min 0.7 max 0.8
\end_layout

\begin_layout Subsection
pairdist
\end_layout

\begin_layout LyX-Code
pairdist out <filename> mask <mask> [delta <resolution>]
\end_layout

\begin_layout Standard
Calculate pair distribution function.
 In the following, defaults are given in parentheses.
 The 
\series bold
out
\series default
 keyword specifies output file for histogram: distance, P(r), s(P(r)).
 The 
\series bold
mask
\series default
 option specifies atoms for which distances should be computed.
 The 
\series bold
delta
\series default
 option specifies resolution.
 (0.1 Å)
\end_layout

\begin_layout Subsection
pairwise
\end_layout

\begin_layout LyX-Code
pairwise [<name>] [<mask>] [out <filename>] [cuteelec <ecut>] [cutevdw <vcut>]
 	
\end_layout

\begin_layout LyX-Code
         [ reference | ref <name> | refindex <#> ] [cutout <cut mol2 prefix>]
\end_layout

\begin_layout LyX-Code
     	[vmapout <vdw map>] [emapout <elec map>] [avgout <avg file>]
\end_layout

\begin_layout LyX-Code
     	[eout <eout file>] [pdbout <pdb file>] [scalepdbe] [printmode {only|or|and
|}]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name; van der Waals energy will get aspect [EVDW] and
 electrostatic energy will get aspect [EELEC].
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate energy for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write total EELEC and EVDW to.
\end_layout

\begin_layout Description
[eout
\begin_inset space ~
\end_inset

<eout
\begin_inset space ~
\end_inset

file>] File to write individual EELEC and EVDW interactions to.
\end_layout

\begin_layout Description
[reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

] Specify a reference to compare frames to (i.e.
 calculate Eref - Eframe).
\end_layout

\begin_layout Description
[cuteelec
\begin_inset space ~
\end_inset

<cut>] Only report interaction EELEC (or delta EELEC) if absolute value
 is greater than <ecut> (default 1.0 kcal/mol).
\end_layout

\begin_layout Description
[cutevdw
\begin_inset space ~
\end_inset

<cutv>] Only report interaction EVDW (or delta EVDW) if absolute value is
 greater than <vcut> (default 1.0 kcal/mol).
\end_layout

\begin_layout Description
[cutout
\begin_inset space ~
\end_inset

<cut
\begin_inset space ~
\end_inset

mol2
\begin_inset space ~
\end_inset

prefix>] Write out mol2 containing only atom pairs which satisfy <ecut>
 and <vcut>.
\end_layout

\begin_layout Description
[vmapout
\begin_inset space ~
\end_inset

<vdw
\begin_inset space ~
\end_inset

map>] Write out interaction EVDW (or delta EVDW) matrix to file <vdw map>.
\end_layout

\begin_layout Description
[emapout
\begin_inset space ~
\end_inset

<elec
\begin_inset space ~
\end_inset

map>] Write out interaction EELEC (or delta EELEC) matrix to file <elec
 map>.
\end_layout

\begin_layout Description
[avgout
\begin_inset space ~
\end_inset

<avg
\begin_inset space ~
\end_inset

file>] Print average interaction EVDW|EELEC (or average delta EVDW|EELC)
 to <avg file>.
\end_layout

\begin_layout Description
[pdbout
\begin_inset space ~
\end_inset

<pdb
\begin_inset space ~
\end_inset

file>] Write PDB with EVDW|EELEC in occupancy|B-factor columns to <pdb file>.
\end_layout

\begin_layout Description
[scalepdbe] Scale energies written to PDB from 0 to 100.
\end_layout

\begin_layout Description
[printmode
\begin_inset space ~
\end_inset

{only|or|and}] Control when/how average energies are written
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name>[EELEC] Electrostatic energy in (kcal/mol).
\end_layout

\begin_layout Description
<name>[EVDW] van der Waals energy in (kcal/mol).
\end_layout

\begin_layout Description
<name>[VMAP] van der Waals energy matrix.
\end_layout

\begin_layout Description
<name>[EMAP] Electrostatic energy matrix.
\end_layout

\end_deeper
\begin_layout Standard
This action has two related functions: 1) Calculate pairwise (i.e.
 non-bonded) energy (in kcal/mol) for atoms in 
\series bold
<mask>
\series default
, or 2) Compare pairwise energy of frames to a reference frame.
 This calculation does use an exclusion list but is not periodic.
\end_layout

\begin_layout Standard
When comparing to a reference frame, the 
\series bold
eout
\series default
 file will contain the differences for each individual interaction (i.e.
 Eref - Eframe), otherwise the 
\series bold
eout
\series default
 file will contain the absolute value of each individual interaction.
 The 
\series bold
cuteelc
\series default
 and 
\series bold
cutevdw
\series default
 keywords can be used to restrict printing of individual interactions to
 those for which the absolute value is above a cutoff.
 The VMAP and EMAP matrix elements will contain these values as well (difference
s for reference, absolute value otherwise) averaged over all frames.
 The 
\series bold
avgout
\series default
 file will contain only these values averaged over all frames that satisfy
 the cutoffs.
 The 
\series bold
printmode
\series default
 keyword controls when the average energies are written: 
\series bold
only
\series default
 means only average energy components that satisfy cutoffs will be printed,
 
\series bold
or
\series default
 means that both energy components will be printed if either satistfy a
 cutoff, and 
\series bold
and
\series default
 means that both energy components will be written only if both satisfy
 the cutoffs.
\end_layout

\begin_layout Standard
The 
\series bold
cutout
\series default
 keyword can be used to write out MOL2 files each frame named '<cut mol2
 prefix>.evdw.mol2.X' and '<cut mol2 prefix>.eelec.mol2.X' (where X is the frame
 number) containing only atoms with energies that satisfy the cutoffs.
 Similarly, the 
\series bold
pdbout
\series default
 keyword can be used to write out a PDB file (with 1 MODEL per frame).
 The occupancy and B-factor columns will contain the total van der Waals
 and electrostatic energy for each atom if cutoffs are satisfied, or 0.0
 otherwise.
\end_layout

\begin_layout Subsection
principal
\end_layout

\begin_layout LyX-Code
principal [<mask>] [dorotation] [out <filename>] [name <dsname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>] Mask of atoms used to determine principal axes (default all).
\end_layout

\begin_layout Description
[dorotation] Align coordinates along principal axes.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write resulting eigenvalues/eigenvectors to <filename>.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<dsname>] Data set name (3x3 matrices).
\end_layout

\begin_layout Standard
Data Sets Created (
\series bold
name
\series default
 keyword only):
\end_layout

\begin_layout Description
<dsname>[evec] Eigenvectors (3x3 matrix, row-major).
\end_layout

\begin_layout Description
<dsname>[eval] Eigenvalues (vector).
\end_layout

\end_deeper
\begin_layout Standard
Determine principal axes of each frame determined by diagonalization of
 the inertial matrix from the coordinates of the specified atoms.
 At least one of 
\series bold
dorotation
\series default
, 
\series bold
out
\series default
, or 
\series bold
name
\series default
 must be specified.
 The resulting eigenvectors are sorted from largest eigenvalue to smallest,
 and the corresponding axes labelled using the 
\emph on
cpptraj
\emph default
 convention of X > Y > Z (similar to '
\series bold
\emph on
vector
\series default
\emph default
 
\series bold
principal
\series default
').
 If out is specified the eigenvectors and eigenvalues will be written for
 each frame N with format:
\end_layout

\begin_layout LyX-Code
<N> EIGENVALUES: <EX> <EY> <EZ>
\end_layout

\begin_layout LyX-Code
<N> EIGENVECTOR 0: <Xx> <Xy> <Xz>
\end_layout

\begin_layout LyX-Code
<N> EIGENVECTOR 1: <Yx> <Yy> <Yz>
\end_layout

\begin_layout LyX-Code
<N> EIGENVECTOR 2: <Zx> <Zy> <Zz>
\end_layout

\begin_layout Standard
NOTE: The eigenvector 3x3 matrix data set could subsequently be used e.g.
 with the 
\series bold
\emph on
rotate
\series default
\emph default
 action.
\end_layout

\begin_layout Standard
Example: Align system (residues 1-76) along principle axes:
\end_layout

\begin_layout LyX-Code
parm myparm.parm7
\end_layout

\begin_layout LyX-Code
trajin protein.nc
\end_layout

\begin_layout LyX-Code
principal :1-76 dorotation out principal.dat
\end_layout

\begin_layout Subsection
projection
\end_layout

\begin_layout LyX-Code
projection [<name>] evecs <dataset name> [out <outfile>] [beg <beg>] [end
 <end>]
\end_layout

\begin_layout LyX-Code
           [<mask>] [dihedrals <dataset arg>]
\end_layout

\begin_layout LyX-Code
           [start <start>] [stop <stop>] [offset <offset>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
evecs
\begin_inset space ~
\end_inset

<dataset
\begin_inset space ~
\end_inset

name> Data set containing eigenvectors (modes).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfile>] Write projections to <outfile>.
\end_layout

\begin_layout Description
[beg
\begin_inset space ~
\end_inset

<beg>] First eigenvector/mode to use (default 1).
\end_layout

\begin_layout Description
[end
\begin_inset space ~
\end_inset

<end>] Final eigenvector/mode to use (default 2).
\end_layout

\begin_layout Description
[<mask>] (Not dihedral covariance) Mask of atoms to use in projection; MUST
 CORRESPOND TO HOW EIGENVECTORS WERE GENERATED.
\end_layout

\begin_layout Description
[dihedrals
\begin_inset space ~
\end_inset

<dataset
\begin_inset space ~
\end_inset

arg>] (Dihedral covariance only) Dihedral data sets to use in projection;
 MUST CORRESPOND TO HOW EIGENVECTORS WERE GENERATED.
\end_layout

\begin_layout Description
[start
\begin_inset space ~
\end_inset

<start>] Frame to start calculating projection.
\end_layout

\begin_layout Description
[stop
\begin_inset space ~
\end_inset

<stop>] Frame to stop calculating projection.
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<offset>] Frames to skip between projection calculations.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Standard
DataSet indices correspond to mode #.
\end_layout

\begin_layout Description
<name> (All execpt IDEA) Projection data set.
\end_layout

\begin_layout Description
<name>[X] X component of mode (IDEA modes only).
\end_layout

\begin_layout Description
<name>[Y] Y component of mode (IDEA modes only).
\end_layout

\begin_layout Description
<name>[Z] Z component of mode (IDEA modes only).
\end_layout

\begin_layout Description
<name>[R] Magnitude of mode (IDEA modes only).
\end_layout

\end_deeper
\begin_layout Standard
Projects snapshots onto eigenvectors obtained by diagonalizing covariance
 or mass-weighted covariance matrices.
 Eigenvectors are taken from previously generated (e.g.
 with 
\series bold
\shape italic
diagmatrix
\series default
\shape default
) or previously read-in (e.g.
 with 
\series bold
\shape italic
readdata
\series default
\shape default
) eigenvectors with name <dataset name>.
 The user has to make sure that the atoms selected by 
\series bold
<mask>
\series default
 agree with the ones used to calculate the modes (i.e., if mask = '@CA' was
 used in the 
\begin_inset Quotes eld
\end_inset


\family sans
\series bold
matrix
\family default
\series default

\begin_inset Quotes erd
\end_inset

 command, mask = '@CA' needs to be set here as well).
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:cpptraj-Matrix-Vector-Analysis-Examples"

\end_inset

 for examples using the 
\series bold
\emph on
projection
\series default
\emph default
 command.
\end_layout

\begin_layout Subsection
pucker 
\end_layout

\begin_layout LyX-Code
pucker
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
pucker
\end_layout

\end_inset

 [<name>] <mask1> <mask2> <mask3> <mask4> <mask5> [<mask6>] [geom]
\end_layout

\begin_layout LyX-Code
	   [out <filename>] [altona | cremer] [amplitude] [theta]
\end_layout

\begin_layout LyX-Code
   	[range360] [offset <offset>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> Output data set name.
\end_layout

\begin_layout Description
<maskX> Five (optionally six) atom masks selecting atom(s) to calculate
 pucker for.
\end_layout

\begin_layout Description
[geom] Use geometric center of atoms in <maskX> (default is center of mass).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[altona] Use method of Altona & Sundaralingam (5 masks only).
\end_layout

\begin_layout Description
[cremer] Use method of Cremer and Pople (5 or 6 masks).
 This is the default when 6 masks are specified.
\end_layout

\begin_layout Description
[amplitude] Also calculate amplitude.
\end_layout

\begin_layout Description
[theta] (6 masks only) Also calculate theta.
\end_layout

\begin_layout Description
[range360] Wrap pucker values from 0.0 to 360.0 (default is -180.0 to 180.0).
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<offset>] Add <offset> to pucker values.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name> Pucker in degrees.
\end_layout

\begin_layout Description
<name>[Amp] Amplitude (if 
\series bold
amplitude
\series default
 was specified).
\end_layout

\begin_layout Description
<name>[Theta] Theta (if 
\series bold
theta
\series default
 and 6 masks were specified).
\end_layout

\end_deeper
\begin_layout Standard
Calculate the pucker (in degrees) for atoms in <mask1>, <mask2>, <mask3>,
 <mask4>, <mask5> using the method of Altona & Sundarlingam
\begin_inset CommandInset citation
LatexCommand citep
key "Altona1972,Harvey1986"
literal "true"

\end_inset

 (default for 5 masks, or if 
\series bold
altona
\series default
 specified), or the method of Cremer & Pople
\begin_inset CommandInset citation
LatexCommand citep
key "Cremer1975"
literal "true"

\end_inset

 (default for 6 masks, or if 
\series bold
cremer
\series default
 is specified).
 If the 
\series bold
amplitude
\series default
 or 
\series bold
theta
\series default
 keywords are given, amplitudes/thetas (also in degrees) will be calculated
 in addition to pucker.
 The results from 
\series bold
\shape italic
pucker
\series default
\shape default
 can be further analyzed with the 
\series bold
\shape italic
statistics
\series default
\shape default
 analysis.
\end_layout

\begin_layout Standard
By default, pucker values are wrapped to range from -180 to 180 degrees.
 If the 
\series bold
range360
\series default
 keyword is specified values will be wrapped to range from 0 to 360 degrees.
 Note that the Cremer & Pople convention is offset from Altona & Sundarlingam
 convention (with nucleic acids) by +90.0 degrees; the 
\series bold
offset
\series default
 keyword will add an offset to the final value and so can be used to convert
 between the two.
 For example, to convert from Cremer to Altona specify 
\begin_inset Quotes eld
\end_inset


\series bold
offset
\series default
 90
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
To calculate nucleic acid pucker specify C1' first, followed by C2', C3',
 C4' and O4'.
 For example, to calculate the sugar pucker for nucleic acid residues 1
 and 2 using the method of Altona & Sundarlingam, with final pseudorotation
 values ranging from 0 to 360:
\end_layout

\begin_layout LyX-Code
pucker p1 :1@C1' :1@C2' :1@C3' :1@C4' :1@O4' range360 out pucker.dat 
\end_layout

\begin_layout LyX-Code
pucker p2 :2@C1' :2@C2' :2@C3' :2@C4' :2@O4' range360 out pucker.dat
\end_layout

\begin_layout Subsection
radgyr | rog
\end_layout

\begin_layout LyX-Code
radgyr
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
radgyr
\end_layout

\end_inset

 [name>] [<mask>] [out <filename>] [mass] [nomax] [tensor]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate radius of gyration for; default all atoms.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write data to <filename>.
\end_layout

\begin_layout Description
[mass] Mass-weight radius of gyration.
\end_layout

\begin_layout Description
[nomax] Do not calculate maximum radius of gyration.
\end_layout

\begin_layout Description
[tensor] Calculate radius of gyration tensor, output format 'XX YY ZZ XY
 XZ YZ'.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name> Radius of gyration in Ang.
\end_layout

\begin_layout Description
<name>[Max] Max radius of gyration in Ang.
\end_layout

\begin_layout Description
<name>[Tensor] Radius of gyration tensor; format 'XX YY ZZ XY XZ YZ'.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the radius of gyration of specified atoms.
 For example, to calculate only the mass-weighted radius of gyration (not
 the maximum) of the non-hydrogen atoms of residues 4 to 10 and print the
 results to 
\begin_inset Quotes eld
\end_inset

RoG.dat
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
radgyr :4-10&!(@H=) out RoG.dat mass nomax
\end_layout

\begin_layout Subsection
radial | rdf
\end_layout

\begin_layout LyX-Code
radial
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
radial
\end_layout

\end_inset

 [out <outfilename>] <spacing> <maximum> <solvent mask1>
\end_layout

\begin_layout LyX-Code
       [<solute mask2>] [noimage] [density <density> | volume] [<dataset
 name>]
\end_layout

\begin_layout LyX-Code
       [intrdf <file>] [rawrdf <file>]
\end_layout

\begin_layout LyX-Code
       [{{center1|center2|nointramol} | [byres1] [byres2] [bymol1] [bymol2]}]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfilename>] File to write RDF to.
\end_layout

\begin_layout Description
<spacing> Bin spacing, required.
\end_layout

\begin_layout Description
<maximum> Max bin value, required.
\end_layout

\begin_layout Description
<solvent
\begin_inset space ~
\end_inset

mask1> Atoms to calculate RDF for, required.
\end_layout

\begin_layout Description
[<solute
\begin_inset space ~
\end_inset

mask2>] (Optional) If specified calculate RDF of all atoms in <solvent mask1>
 to each atom in <solute mask2>.
\end_layout

\begin_layout Description
[noimage] Do not image distances.
\end_layout

\begin_layout Description
[density
\begin_inset space ~
\end_inset

<density>] Use density value of <density> for normalization (default 0.033456
 molecules
\begin_inset space ~
\end_inset

Å
\begin_inset Formula $^{-\text{3}}$
\end_inset

).
\end_layout

\begin_layout Description
[volume] Determine density for normalization from average volume of input
 frames.
\end_layout

\begin_layout Description
[<setname>] Name of output data sets.
\end_layout

\begin_layout Description
[center1] Calculate RDF from geometric center of atoms in <solvent mask1>
 to all atoms in <solute mask2>.
\end_layout

\begin_layout Description
[center2] Calculate RDF from geometric center of atoms in <solute mask2>
 to all atoms in <solvent mask1>.
\end_layout

\begin_layout Description
[nointramol] Ignore intra-molecular distances.
\end_layout

\begin_layout Description
[intrdf
\begin_inset space ~
\end_inset

<file>] Calculate integral of RDF bin values (averaged over # of frames
 but otherwise not normalized) and write to <file> (can be same as <output_filen
ame>).
\end_layout

\begin_layout Description
[rawrdf
\begin_inset space ~
\end_inset

<file>] Write raw (non-normalized) RDF values to <file>.
\end_layout

\begin_layout Description
[byres1] Calculate using the centers of mass of each residue in the first
 mask.
\end_layout

\begin_layout Description
[bymol1] Calculate using the centers of mass of each molecule in the first
 mask.
\end_layout

\begin_layout Description
[byres2] Calculate using the centers of mass of each residue in the second
 mask.
\end_layout

\begin_layout Description
[bymol2] Calculate using the centers of mass of each molecule in the second
 mask.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
<setname> The radial distribution function.
\end_layout

\begin_layout Description
<setname>[int] (
\series bold
intrdf
\series default
 only) Integral of RDF bin values.
\end_layout

\begin_layout Description
<setname>[raw] (
\series bold
rawrdf
\series default
 only) Raw (non-normalized) RDF values.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the radial distribution function (RDF, aka pair correlation function)
 of atoms in 
\series bold
<solvent mask1>
\series default
 (note that this mask does not need to be solvent, but this nomenclature
 is used for clarity).
 If an optional second mask (
\series bold
<solute mask2>
\series default
) is given, calculate the RDF of ALL atoms in 
\series bold
<solvent mask1>
\series default
 to EACH atom in 
\series bold
<solute mask2>
\series default
.
 If desired, the geometric center of atoms in 
\series bold
<solvent mask1>
\series default
 or 
\series bold
<solute mask2>
\series default
 can be used by specifying the 
\series bold
center1
\series default
 or 
\series bold
center2
\series default
 keywords respectively, or alternatively intra-molecular distances can be
 ignored by specifying the 
\series bold
nointramol
\series default
 keyword.
\end_layout

\begin_layout Standard
The RDF is calculated from the histogram of the number of particles found
 as a function of distance R, normalized by the expected number of particles
 at that distance.
 The normalization is calculated from:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Formula $Density*\frac{4\pi}{3}\left(\left(R+dR\right)^{3}-R^{3}\right)$
\end_inset


\end_layout

\begin_layout Standard
where dR is equal to the bin spacing.
 Some care is required by the user in order to normalize the RDF correctly.
 The default density value is 0.033456 molecules
\begin_inset space ~
\end_inset

Å
\begin_inset Formula $^{-\text{3}}$
\end_inset

, which corresponds to a density of water approximately equal to 1.0 g
\begin_inset space ~
\end_inset

mL
\begin_inset Formula $^{-\text{1}}$
\end_inset

.
 To convert a standard density in g
\begin_inset space ~
\end_inset

mL
\begin_inset Formula $^{-\text{1}}$
\end_inset

, multiply the density by 
\begin_inset Formula $\frac{0.6022}{M_{r}}$
\end_inset

, where 
\begin_inset Formula $M_{r}$
\end_inset

 is the mass of the molecule in atomic mass units.
 Alternatively, if the 
\series bold
volume
\series default
 keyword is specified the density is determined from the average volume
 of the system over all Frames.
 
\end_layout

\begin_layout Standard
Note that correct normalization of the RDF depends on the number of atoms
 in each mask; if multiple topology files are being processed that result
 in changes in the number of atoms in each mask, the normalization will
 be off.
\end_layout

\begin_layout Subsection
randomizeions
\end_layout

\begin_layout LyX-Code
randomizeions <mask> [around <ardoundmask> by <distance>] [{allowoverlap|overlap
 <value>}]
\end_layout

\begin_layout LyX-Code
              [noimage] [seed <value>] [originalalgorithm]
\end_layout

\begin_deeper
\begin_layout Description
<mask> Mask of ions to randomize.
\end_layout

\begin_layout Description
around
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

by
\begin_inset space ~
\end_inset

<distance> Ensure ions come no closer than <distance> Ang.
 to atoms in <aroundmask>.
\end_layout

\begin_layout Description
allowoverlap No restrictions on how close ions can be to each other.
\end_layout

\begin_layout Description
overlap
\begin_inset space ~
\end_inset

<value> Ions in <mask> can be no closer than <value> Ang.
 to each other.
\end_layout

\begin_layout Description
[noimage] Do not image distances.
\end_layout

\begin_layout Description
[seed
\begin_inset space ~
\end_inset

<value>] Seed for the random number generator.
\end_layout

\begin_layout Description
[originalalgorithm] Use the original, slower algorithm (from versions before
 5.1.0).
\end_layout

\end_deeper
\begin_layout Standard
This can be used to randomly swap the positions of solvent and single atom
 ions.
 The 
\begin_inset Quotes eld
\end_inset


\family typewriter
overlap
\family default

\begin_inset Quotes erd
\end_inset

 specifies the minimum distance between ions, and the 
\begin_inset Quotes eld
\end_inset


\family typewriter
around
\family default

\begin_inset Quotes erd
\end_inset

 keyword can be used to specify a solute (or set of atoms) around which
 the ions can get no closer than the distance specified.
 The optional keywords 
\begin_inset Quotes eld
\end_inset


\family typewriter
noimage
\family default

\begin_inset Quotes erd
\end_inset

 disable imaging and 
\begin_inset Quotes eld
\end_inset


\family typewriter
seed
\family default

\begin_inset Quotes erd
\end_inset

 update the random number seed.
 An example usage is
\end_layout

\begin_layout LyX-Code
randomizeions @NA around :1-20 by 5.0 overlap 3.0
\end_layout

\begin_layout Standard
The above will swap Na
\begin_inset Formula $^{\text{+}}$
\end_inset

 ions with water getting no closer than 5.0
\begin_inset space ~
\end_inset

Å from residues 1 – 20 and no closer than 3.0
\begin_inset space ~
\end_inset

Å from any other Na
\begin_inset Formula $^{\text{+}}$
\end_inset

 ion.

\shape italic
 
\end_layout

\begin_layout Subsection
remap
\end_layout

\begin_layout LyX-Code
remap data <setname>
\end_layout

\begin_layout LyX-Code
      [outprefix <prefix>] [parmout <filename>]
\end_layout

\begin_layout LyX-Code
      [parmopts <comma-separated-list>]
\end_layout

\begin_deeper
\begin_layout Description
data
\begin_inset space ~
\end_inset

<setname> Data set to use for remapping; should be a 1D integer data set
 with X= reference (old) atom index, Y = target (new) atom index.
\end_layout

\begin_layout Description
outprefix
\begin_inset space ~
\end_inset

<prefix> Write remapped topology to <prefix>.<originalname>
\end_layout

\begin_layout Description
parmout
\begin_inset space ~
\end_inset

<filename> Write remapped topology to <filename>
\end_layout

\begin_layout Description
parmopts
\begin_inset space ~
\end_inset

<list> Options for writing topology file
\end_layout

\end_deeper
\begin_layout Standard
Re-map atoms according to the given reference data set which is of the format:
 
\end_layout

\begin_layout LyX-Code
Reference[Target]
\end_layout

\begin_layout Standard
with atom numbering starting from 1.
 E.g.
 Reference[1] = 10 would mean remap atom 10 in target to position 1.
\end_layout

\begin_layout Subsection
replicatecell
\end_layout

\begin_layout LyX-Code
replicatecell [out <traj filename>] [name <dsname>]
\end_layout

\begin_layout LyX-Code
          	{ all | dir <XYZ> [dir <XYZ> ...] } [<mask>]
\end_layout

\begin_layout LyX-Code
          	[outprefix <prefix>] [parmout <filename>]
\end_layout

\begin_layout LyX-Code
          	[parmopts <comma-separated-list>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
out
\begin_inset space ~
\end_inset

<traj
\begin_inset space ~
\end_inset

filename> Write replicated cell to output trajectory file.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<dsname> If specified save replicated cell to COORDS data set.
\end_layout

\begin_layout Description
all Replicate cell once in all possible directions.
\end_layout

\begin_layout Description
dir
\begin_inset space ~
\end_inset

<XYZ> Repicate cell once in specified directions.
 <XYZ> should consist of 3 numbers with no spaces in between them and are
 restricted to values of -1, 1, and 0.
 May be specified more than once.
\end_layout

\begin_layout Description
<mask> Mask of atoms to replicate.
\end_layout

\begin_layout Description
outprefix
\begin_inset space ~
\end_inset

<prefix> Write replicated topology to <prefix>.<originalname>
\end_layout

\begin_layout Description
parmout
\begin_inset space ~
\end_inset

<filename> Write replicated topology to <filename>
\end_layout

\begin_layout Description
parmopts
\begin_inset space ~
\end_inset

<list> Options for writing topology file
\end_layout

\end_deeper
\begin_layout Standard
Create a trajectory where the unit cell is replicated in 1 or more directions
 (up to 27).
 The resulting coordinates and topology can be written to a trajectory/topology
 file.
 They can also be saved as a COORDS data set for subsequent processing.
 Currently replication is only allowed 1 axis length in either direction.
 The 
\series bold
all
\series default
 keyword will replicate the cell once in all directions.
 The 
\series bold
dir
\series default
 keyword can be used to restrict replication to specific directions, e.g.
 '
\family typewriter
dir 10-1
\family default
' would replicate the cell once in the +X, -Z directions.
\end_layout

\begin_layout Standard
For example, to replicate a cell in all directions, writing out to NetCDF
 trajectory cell.nc:
\end_layout

\begin_layout LyX-Code
parm ../tz2.truncoct.parm7
\end_layout

\begin_layout LyX-Code
trajin ../tz2.truncoct.nc
\end_layout

\begin_layout LyX-Code
replicatecell out cell.nc parmout cell.parm7 all
\end_layout

\begin_layout Subsection
rms | rmsd
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-rmsd"

\end_inset


\end_layout

\begin_layout LyX-Code
rmsd
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
rmsd
\end_layout

\end_inset

 [<name>] <mask> [<refmask>] [out <filename>] [mass]
\end_layout

\begin_layout LyX-Code
 	[nofit | norotate | nomod]
\end_layout

\begin_layout LyX-Code
 	[savematrices [matricesout <file>]]
\end_layout

\begin_layout LyX-Code
 	[savevectors {combined|separate} [vecsout <file>]]
\end_layout

\begin_layout LyX-Code
 	[ first | reference | ref <name> | refindex <#> | previous |
\end_layout

\begin_layout LyX-Code
 	  reftraj <name> [parm <name> | parmindex <#>] ]
\end_layout

\begin_layout LyX-Code
 	[perres perresout <filename> [perresavg <avgfile>]
\end_layout

\begin_layout LyX-Code
 	 [range <resRange>] [refrange <refRange>]
\end_layout

\begin_layout LyX-Code
 	 [perresmask <additional mask>] [perrescenter] [perresinvert]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
[<mask>] Mask of atoms to calculate RMSD for; if not specified, calculate
 for all atoms.
\end_layout

\begin_layout Description
[<refmask>] Reference mask; if not specified, use 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output data file name.
\end_layout

\begin_layout Description
[mass] Mass-weight the RMSD calculation.
\end_layout

\begin_layout Description
[nofit] Do not perform best-fit RMSD.
\end_layout

\begin_layout Description
[norotate] If calculating best-fit RMSD, translate but do not rotate coordinates.
\end_layout

\begin_layout Description
[nomod] If calculating best-fit RMSD, do not modify coordinates.
\end_layout

\begin_layout Description
[savematrices] If specified save rotation matrices to data set with aspect
 [RM].
\end_layout

\begin_deeper
\begin_layout Description
matricesout
\begin_inset space ~
\end_inset

<file> Write rotation matrices to specified file.
\end_layout

\end_deeper
\begin_layout Description
[savevectors
\begin_inset space ~
\end_inset

{combined|separate}] If specified save translation vectors: 
\series bold
combined
\series default
 means save target-to-origin plus the origin-to-reference translation vectors,
 
\series bold
separate
\series default
 means save target-to-origin as Vx, Vy, Vz and save origin-to-reference
 as Ox Oy Oz in the output vector data set.
\end_layout

\begin_deeper
\begin_layout Description
vecsout
\begin_inset space ~
\end_inset

<file> Output translation vector data set to <file>.
\end_layout

\end_deeper
\begin_layout Standard
Reference keywords:
\end_layout

\begin_layout Description

\series bold
first
\series default
 Use the first trajectory frame processed as reference.
\end_layout

\begin_layout Description

\series bold
reference
\series default
 Use the first previously read in reference structure (refindex 0).
\end_layout

\begin_layout Description

\series bold
ref
\begin_inset space ~
\end_inset

<name>
\series default
 Use previously read in reference structure specified by filename/tag.
\end_layout

\begin_layout Description

\series bold
refindex
\begin_inset space ~
\end_inset

<#>
\series default
 Use previously read in reference structure specified by <#> (based on order
 read in).
\end_layout

\begin_layout Description
previous Use frame prior to current frame as reference.
\end_layout

\begin_layout Description

\series bold
reftraj
\series default

\begin_inset space ~
\end_inset

<name> Use frames from COORDS set <name> or read in from trajectory file
 <name> as references.
 Each frame from <name> is used in turn, so that frame 1 is compared to
 frame 1 from <name>, frame 2 is compared to frame 2 from <name> and so
 on.
 If <trajname> runs out of frames before processing is complete, the last
 frame of <trajname> continues to be used as the reference.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<parmname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> If 
\series bold
reftraj
\series default
 specifies a trajectory file, associate it with specified topology; if not
 specified the first topology is used.
\end_layout

\end_deeper
\begin_layout Standard
Per-residue RMSD keywords:
\end_layout

\begin_layout Description
perres Activate per-residue no-fit RMSD calculation.
\end_layout

\begin_layout Description
perresout
\begin_inset space ~
\end_inset

<perresfile> Write per-residue RMSD to <perresfile>.
\end_layout

\begin_layout Description
perresavg
\begin_inset space ~
\end_inset

<avgfile> Write average per-residue RMSDs to <avgfile>.
\end_layout

\begin_layout Description
range
\begin_inset space ~
\end_inset

<res
\begin_inset space ~
\end_inset

range> Calculate per-residue RMSDs for residues in <res range> (default
 all solute residues).
\end_layout

\begin_layout Description
refrange
\begin_inset space ~
\end_inset

<ref
\begin_inset space ~
\end_inset

range> Calculate per-residue RMSDs to reference residues in <ref range>
 (use <res range> if not specified).
\end_layout

\begin_layout Description
perresmask
\begin_inset space ~
\end_inset

<additional
\begin_inset space ~
\end_inset

mask> By default residues are selected using the mask ':X' where X is residue
 number; this appends <additional mask> to the mask expression.
\end_layout

\begin_layout Description
perrescenter Translate residues to a common center of mass prior to calculating
 RMSD.
\end_layout

\begin_layout Description
perresinvert Make X-axis residue number instead of frame number.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name> RMSD of atoms in mask to reference.
\end_layout

\begin_layout Description
<name>[RM] (savematrices only) Rotation matrices of target to reference.
\end_layout

\begin_layout Description
<name>[TV] (savevectors only) Translation vector.
\end_layout

\begin_layout Description
<name>[res] (
\series bold
perres
\series default
 only) Per-residue RMSDs; index is residue number.
\end_layout

\begin_layout Description
<name>[Avg] (
\series bold
perres
\series default
 only) Average per-residue RMSD for each residue.
\end_layout

\begin_layout Description
<name>[Stdev] (
\series bold
perres
\series default
 only) Standard deviation of RMSD for each residue.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note that 
\series bold
perres
\series default
 data sets are not generated until 
\series bold
run
\series default
 is called.
\end_layout

\begin_layout Standard
Calculate the coordinate RMSD of input frames to a reference frame (or reference
 trajectory).
 Both <mask> and <refmask> must specify the same number of atoms, otherwise
 an error will occur.
 
\end_layout

\begin_layout Standard
For example, say you have a trajectory and you want to calculate RMSD to
 two separate reference structures.
 To calculate the best-fit RMSD of the C, CA, and N atoms of residues 1
 to 20 in each frame to the C, CA, and N atoms of residues 3 to 23 in StructX.crd
, and then calculate the no-fit RMSD of residue 7 to residue 7 in another
 structure named Struct-begin.rst7, writing both results to Grace-format
 file 
\begin_inset Quotes eld
\end_inset

rmsd1.agr
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
reference StructX.crd [structX]
\end_layout

\begin_layout LyX-Code
reference md_begin.rst7 [struct0]
\end_layout

\begin_layout LyX-Code
rmsd BB :1-20@C,CA,N ref [structX] :3-23@C,CA,N out rmsd1.agr 
\end_layout

\begin_layout LyX-Code
rmsd Res7 :7 ref [struct0] out rmsd1.agr nofit
\end_layout

\begin_layout Subsubsection*
Per-residue RMSD calculation
\end_layout

\begin_layout Standard
If the 
\series bold
\color black
perres
\series default
\color inherit
 keyword is specified, after the initial RMSD calculation the no-fit RMSD
 of specified residues is also calculated.
 So for example:
\end_layout

\begin_layout LyX-Code
rmsd :10-260 reference perres perresout PRMS.dat range 190-211 perresmask
 &!(@H=)
\end_layout

\begin_layout Standard

\family roman
will first perform a best-fit RMSD calculation to the first specified reference
 structure using residues 10 to 260, then calculate the no-fit RMSD of residues
 190 to 211 (excluding any hydrogen atoms), writing the results to PRMS.dat.
 Two additional recommendations for the 'perres' option: 1) try not including
 backbone atoms by using the 'perresmask' keyword, e.g.
 "perresmask &!@H,N,CA,HA,C,O", and 2) try using the 'perrescenter' keyword,
 which centers each residue prior to the 'nofit' calculation; this is useful
 for isolating changes in residue conformation.
\end_layout

\begin_layout Subsection
rms2d | 2drms
\end_layout

\begin_layout Standard
Although the 
\series bold
\emph on
'rms2d'
\series default
\emph default
 command can still be specified as an action, it is now considered an analysis.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-rms2d"

\end_inset

.
\end_layout

\begin_layout Subsection
rmsavgcorr
\end_layout

\begin_layout Standard
Although the 
\series bold
\emph on
'rmsavgcorr'
\series default
\emph default
 command can still be specified as an action, it is now considered an analysis.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-rmsavgcorr"

\end_inset

.
\end_layout

\begin_layout Subsection
rmsf | atomicfluct
\end_layout

\begin_layout Standard
See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_atomicfluct"

\end_inset

.
\end_layout

\begin_layout Subsection
rotate
\end_layout

\begin_layout LyX-Code
rotate [<mask>] { [x <xdeg>] [y <ydeg>] [z <zdeg>]  |
\end_layout

\begin_layout LyX-Code
   	           axis0 <mask0> axis1 <mask1> <deg> |
\end_layout

\begin_layout LyX-Code
   	           usedata <set name> [inverse] }
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<mask>] Rotate atoms in <mask> (default all).
\end_layout

\begin_layout Description
[x
\begin_inset space ~
\end_inset

<xdeg] Degrees to rotate around the X axis.
\end_layout

\begin_layout Description
[y
\begin_inset space ~
\end_inset

<xdeg] Degrees to rotate around the Y axis.
\end_layout

\begin_layout Description
[z
\begin_inset space ~
\end_inset

<xdeg] Degrees to rotate around the Z axis.
\end_layout

\begin_layout Description
axis0
\begin_inset space ~
\end_inset

<mask0> Mask defining the beginning of a user-defined axis.
\end_layout

\begin_layout Description
axis1
\begin_inset space ~
\end_inset

<mask1> Mask defining the end of a user-defined axis.
\end_layout

\begin_layout Description
<deg> Value in degrees to rotate around user defined axis.
\end_layout

\begin_layout Description
usedata
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name> If specified, use 3x3 rotation matrices in specified data set to rotate
 coordinates.
\end_layout

\begin_layout Description
[inverse] Perform inverse rotation from input rotation matrices.
\end_layout

\end_deeper
\begin_layout Standard
Rotate specified atoms around the X, Y, and/or Z axes by the specified amounts,
 around a user-defined axis (specified by <mask0> and <mask1>), or use a
 previously read in or generated data set of 3x3 matrices to perform rotations.
\end_layout

\begin_layout Standard
For example, to rotate the entire system 90 degrees around the X axis:
\end_layout

\begin_layout LyX-Code
rotate x 90
\end_layout

\begin_layout Standard
To rotate residue 270 90 degrees around the axis defined between atoms C1,
 C2, C3, C4, C5, and C6 in residue 270 and atoms C7, C8, C9, C10, C11, and
 C12 in residue 270:
\end_layout

\begin_layout LyX-Code
rotate :270 axis0 :270@C1,C2,C3,C4,C5,C6 axis1 :270@C7,C8,C9,C10,C11,C12
 90.0
\end_layout

\begin_layout Standard
To rotate the system with rotation matrices read in from rmatrices.dat:
\end_layout

\begin_layout LyX-Code
trajin tz2.norotate.crd
\end_layout

\begin_layout LyX-Code
readdata rmatrices.dat name RM mat3x3
\end_layout

\begin_layout LyX-Code
rotate usedata RM 
\end_layout

\begin_layout Subsection
rotdif
\end_layout

\begin_layout Standard
The 
\series bold
\emph on
'rotdif'
\series default
\emph default
 command is now an analysis (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-rotdif"

\end_inset

), and requires that rotation matrices be generated via an 
\series bold
\emph on
rmsd
\series default
\emph default
 action.
 For example:
\end_layout

\begin_layout LyX-Code
reference avgstruct.pdb
\end_layout

\begin_layout LyX-Code
trajin tz2.nc
\end_layout

\begin_layout LyX-Code
rms R0 reference @CA,C,N,O savematrices 
\end_layout

\begin_layout LyX-Code
rotdif rmatrix R0[RM] rseed 1 nvecs 10 dt 0.002 tf 0.190 
\backslash

\end_layout

\begin_layout LyX-Code
       itmax 500 tol 0.000001 d0 0.03 order 2 rvecout rvecs.dat 
\backslash

\end_layout

\begin_layout LyX-Code
       rmout matrices.dat deffout deffs.dat outfile rotdif.out
\end_layout

\begin_layout Subsection
runavg | runningaverage
\end_layout

\begin_layout LyX-Code
runavg
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
runavg
\end_layout

\end_inset

 [window <window_size>]
\end_layout

\begin_layout Standard

\shape italic
Note that for backwards compatibility with ptraj 
\begin_inset Quotes eld
\end_inset

runningaverage
\begin_inset Quotes erd
\end_inset

 is also accepted.
\end_layout

\begin_layout Standard
Replaces the current frame with a running average over a number of frames
 specified by 
\series bold
window
\series default
 <window_size> (5 if not specified).
 This means that in order to build up the correct number of frames to calculate
 the average, the first <window_size> minus one frames will not be processed
 by subsequent actions.
 So for example given the input:
\end_layout

\begin_layout LyX-Code
runavg window 3
\end_layout

\begin_layout LyX-Code
rms first out rmsd.dat
\end_layout

\begin_layout Standard
the rms command will not take effect until frame 3 since that is the first
 time 3 frames are available for averaging (1, 2, and 3).
 The next frame processed would be an average of frames 2, 3, and 4, etc.
\end_layout

\begin_layout Subsection
scale
\end_layout

\begin_layout LyX-Code
scale x <sx> y <sy> z <sz> <mask>
\end_layout

\begin_layout Standard
Scale the X|Y|Z coordinates of atoms in <mask> by <sx>|<sy>|<sz>.
\end_layout

\begin_layout Subsection
secstruct
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-secstruct"

\end_inset


\end_layout

\begin_layout LyX-Code
secstruct
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
secstruct
\end_layout

\end_inset

 [<name>] [out <filename>] [<mask>] [sumout <filename>]
\end_layout

\begin_layout LyX-Code
          [assignout <filename>] [totalout <filename> [ptrajformat]
\end_layout

\begin_layout LyX-Code
          [betadetail]
\end_layout

\begin_layout LyX-Code
          [namen <N name>] [nameh <H name>] [nameca <CA name>]
\end_layout

\begin_layout LyX-Code
          [namec <C name>] [nameo <O name>] [namesg <sulfur name>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name for secondary structure vs time.
\end_layout

\begin_layout Description
[<mask>] Atom mask in which residues should be looked for.
\end_layout

\begin_layout Description
[sumout
\begin_inset space ~
\end_inset

<sumfilename>] Write average secondary structure values for each residue
 to <sumfilename>; if not specified <filename>.sum is used.
\end_layout

\begin_layout Description
[assignout
\begin_inset space ~
\end_inset

<filename>] Write overall secondary structure assignment (based on dominant
 secondary structure type for each residue) to file.
\end_layout

\begin_layout Description
[ptrajformat] Write secondary structure as a string of characters for each
 frame, similar to ptraj output.
\end_layout

\begin_layout Description
[betadetail] Record anti-parallel beta and parallel beta in place of extended
 and bridge secondary structure.
 If a residue could be both only anti-parallel is reported.
\end_layout

\begin_layout Description
[namen
\begin_inset space ~
\end_inset

<N
\begin_inset space ~
\end_inset

name>] Backbone amide nitrogen atom name (default 'N').
\end_layout

\begin_layout Description
[nameh
\begin_inset space ~
\end_inset

<H
\begin_inset space ~
\end_inset

name>] Backbone amide hydrogen atom name (default 'H').
\end_layout

\begin_layout Description
[nameca
\begin_inset space ~
\end_inset

<CA
\begin_inset space ~
\end_inset

name>] Backbone alpha carbon atom name (default 'CA').
\end_layout

\begin_layout Description
[namec
\begin_inset space ~
\end_inset

<C
\begin_inset space ~
\end_inset

name>] Backbone carbonyl carbon atom name (default 'C').
\end_layout

\begin_layout Description
[nameo
\begin_inset space ~
\end_inset

<O
\begin_inset space ~
\end_inset

name>] Backbone carbonyl oxygen atom name (default 'O').
\end_layout

\begin_layout Description
[namesg
\begin_inset space ~
\end_inset

<SG
\begin_inset space ~
\end_inset

name>] Cysteine sulfur atom name, used to ignore disulfide connectivity
 (default 'SG').
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name>[res] Residue secondary structure per frame; index corresponds to
 residue number.
 If 
\series bold
ptrajformat
\series default
 specified these will be characters, otherwise integers (see table below).
\end_layout

\begin_layout Description
<name>[avgss] Average of each type of secondary structure; index corresponds
 to secondary structure type (see table below; no index for 
\begin_inset Quotes eld
\end_inset

None
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Description
<name>[None] Total fraction of residues with no structure vs time.
\end_layout

\begin_layout Description
<name>[Para] Total fraction of residues with parallel beta structure vs
 time.
\end_layout

\begin_layout Description
<name>[Anti] Total fraction of residues with anti-parallel beta structure
 vs time.
\end_layout

\begin_layout Description
<name>[3-10] Total fraction of 3-10 helical structure vs time.
\end_layout

\begin_layout Description
<name>[Alpha] Total fraction of alpha helical structure vs time.
\end_layout

\begin_layout Description
<name>[Pi] Total fraction of Pi helical structure vs time.
\end_layout

\begin_layout Description
<name>[Turn] Total fraction of turn structure vs time.
\end_layout

\begin_layout Description
<name>[Bend] Total fraction of bend structure vs time.
\end_layout

\end_deeper
\begin_layout Standard

\series bold
As of version 4.18.0, this command now produces output that better conforms
 with the original definitions in Kabsch and Sander 1983; namely that Extended
 beta (i.e.
 2 or more consecutive beta bridges of the same type) and beta Bridge (i.e.
 an isolated beta bridge) are now reported instead of anti-parallel and
 parallel beta.
 To restore the original behavior the 'betadetail' keyword must be specified.
\end_layout

\begin_layout Standard

\shape italic
Note that the residue and [avgss] data sets are not generated until 
\series bold
run
\series default
 is called.
\end_layout

\begin_layout Standard
Calculate secondary structural propensities for residues in 
\series bold
<mask>
\series default
 (or all solute residues if no mask given) using the DSSP method of Kabsch
 and Sander
\begin_inset CommandInset citation
LatexCommand citep
key "Kabsch83"
literal "true"

\end_inset

, which assigns secondary structure types for residues based on backbone
 amide (N-H) and carbonyl (C=O) atom positions.
 By default 
\shape italic
cpptraj
\shape default
 assumes these atoms are named 
\begin_inset Quotes eld
\end_inset

N
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

H
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

C
\begin_inset Quotes erd
\end_inset

, and 
\begin_inset Quotes eld
\end_inset

O
\begin_inset Quotes erd
\end_inset

 respectively.
 If a different naming scheme is used (e.g.
 amide hydrogens are named 
\begin_inset Quotes eld
\end_inset

HN
\begin_inset Quotes erd
\end_inset

) the backbone atom names can be customized with the 
\series bold
nameX
\series default
 keywords (e.g.
 'nameH HN').
 Note that it is expected that some residues will not have all of these
 atoms (such as proline); in this case 
\shape italic
cpptraj
\shape default
 will print an informational message but the calculation will proceed normally.
 If a residue has no atoms selected it will be skipped.
 When determining residue connecivity, disulfide bonds will be ignored;
 
\emph on
cpptraj
\emph default
 identifies such bonds based on the 
\series bold
namesg
\series default
 atom name (default 
\begin_inset Quotes eld
\end_inset

SG
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Standard
Results will be written to filename specified by 
\series bold
out
\series default
 with format:
\end_layout

\begin_layout LyX-Code
<#Frame>    <ResX SS> <ResX+1 SS> ...
 <ResN SS>
\end_layout

\begin_layout Standard
where <#Frame> is the frame number and <ResX SS> is an integer representing
 the calculated secondary structure type for residue X.
 If the keyword 
\series bold
ptrajformat
\series default
 is specified, the output format will instead be:
\end_layout

\begin_layout LyX-Code
<#Frame>    STRING
\end_layout

\begin_layout Standard
where STRING is a string of characters (one for each residue) where each
 character represents a different structural type (this format is similar
 to what 
\shape italic
ptraj
\shape default
 had outputed and is retained for backwards compatibility).
 The various secondary structure types and their corresponding integer/character
 are listed below.
 If 'betadetail' is specified what is reported and the characters used change
 slightly.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
STRING (betadetail)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Integer
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
DSSP
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SS type (betadetail)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
' '
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
None
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
E (b)
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'E'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Extended beta (parallel beta)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
B
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'B'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Isolated beta (anti-parallel beta)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
G
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'G'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3-10 helix
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
H
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'H'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Alpha helix
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
I
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
5
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'I'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Pi (3-14) helix
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
T
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
6
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'T'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Turn
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
S
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
7
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
'S'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Bend
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Average structural propensities over all frames for each residue will be
 written to the file specified by 
\series bold
sumout
\series default
 (or 
\begin_inset Quotes eld
\end_inset


\shape italic
<filename>.sum
\shape default

\begin_inset Quotes erd
\end_inset

 if 
\series bold
sumout
\series default
 is not specified).
 The total structural propensity over all residues for each secondary structure
 type will be written to the file specified by 
\series bold
totalout
\series default
.
 If assignout is specified, the overall secondary structure assignment for
 each residue will be printed in two line chunks of 50 residues, with the
 first line containing the residue number the line starts with and one character
 residue names, and the second line containing secondary structure assignment
 using DSSP-style characters, like so:
\end_layout

\begin_layout LyX-Code
1 KCNTATCATQ RLANFLVHSS NNFGAILSST NVGSNTRn
\end_layout

\begin_layout LyX-Code
    SSS   TH HHHTTSEEEE TTTEEEE SS     S 
\end_layout

\begin_layout Standard
The output of secstruct command is amenable to visualization with gnuplot.
 To generate a 2D map-style plot of secondary structure vs time, with each
 residue on the Y axis simply give the output file a 
\begin_inset Quotes eld
\end_inset

.gnu
\begin_inset Quotes erd
\end_inset

 extension.
 For example, to generate a 2D map of secondary structure vs time, with
 different colors representing different secondary structure types for residues
 1-22:
\end_layout

\begin_layout LyX-Code
secstruct :1-22 out dssp.gnu
\end_layout

\begin_layout Standard
The resulting file can be visualized with gnuplot:
\end_layout

\begin_layout LyX-Code
gnuplot dssp.gnu
\end_layout

\begin_layout Standard
Similarly, the 
\series bold
sumout
\series default
 file can be nicely visualized using xmgrace (use 
\begin_inset Quotes eld
\end_inset

.agr
\begin_inset Quotes erd
\end_inset

 extension).
\end_layout

\begin_layout LyX-Code
secstruct :1-22 out dssp.gnu sumout dssp.agr
\end_layout

\begin_layout LyX-Code
xmgrace dssp.agr
\end_layout

\begin_layout LyX-Code
C <X> <Y> <Z> <Density>
\end_layout

\begin_layout Standard
Values of 
\series bold
dgbulk
\series default
 and 
\series bold
dhbulk
\series default
 for different water models can be calculated from pure water simulations
 with the 
\series bold
purewater
\series default
 keyword.
\end_layout

\begin_layout Subsection
setvelocity
\end_layout

\begin_layout LyX-Code
setvelocity [<mask>]
\end_layout

\begin_layout LyX-Code
            [{ tempi <temperature> |
\end_layout

\begin_layout LyX-Code
               scale [factor <fac>] [sx <xfac>] [sy <yfac>] [sz <zfac>]
 |
\end_layout

\begin_layout LyX-Code
               none |
\end_layout

\begin_layout LyX-Code
               modify}]
\end_layout

\begin_layout LyX-Code
            [[ntc <#>]] [[dt <time>] [epsilon <eps>]]
\end_layout

\begin_layout LyX-Code
        	[zeromomentum] [ig <random seed>] 
\end_layout

\begin_deeper
\begin_layout Description
<mask> Mask of atoms to assign velocities to.
\end_layout

\begin_layout Description
tempi
\begin_inset space ~
\end_inset

<temperature> Assign velocities at specified temperature (default 300.0 K).
\end_layout

\begin_layout Description
scale Scale existing velocities
\end_layout

\begin_deeper
\begin_layout Description
[factor
\begin_inset space ~
\end_inset

<fac>] Factor to scale velocities by.
\end_layout

\begin_layout Description
[sx
\begin_inset space ~
\end_inset

<xfac>] Factor to scale X component of velocities by.
\end_layout

\begin_layout Description
[sy
\begin_inset space ~
\end_inset

<yfac>] Factor to scale Y component of velocities by.
\end_layout

\begin_layout Description
[sz
\begin_inset space ~
\end_inset

<zfac>] Factor to scale Z component of velocities by.
\end_layout

\end_deeper
\begin_layout Description
none Remove any velocities.
\end_layout

\begin_layout Description
modify If specified, do not set, just modify any existing velocities (via
 'ntc' or 'zeromomentum').
\end_layout

\begin_layout Description
ig
\begin_inset space ~
\end_inset

<random
\begin_inset space ~
\end_inset

seed> Random seed to use to generate velocity distribution.
\end_layout

\begin_layout Description
ntc
\begin_inset space ~
\end_inset

<#> Correct set velocities for SHAKE constraints.
 Numbers match sander/pmemd: 1 = no SHAKE, 2 = SHAKE on hydrogens, 3 = SHAKE
 on all atoms.
\end_layout

\begin_layout Description
dt
\begin_inset space ~
\end_inset

<time> Time step for SHAKE correction.
\end_layout

\begin_layout Description
epsilon
\begin_inset space ~
\end_inset

<eps> Epsilon for SHAKE correction
\end_layout

\begin_layout Description
zeromomentum If specified adjust velocities so the total momentum of atoms
 in <mask> is zero.
\end_layout

\end_deeper
\begin_layout Standard
Set velocities in frame for atoms in <mask> using Maxwellian distribution
 based on given temperature.
\end_layout

\begin_layout Subsection
spam
\end_layout

\begin_layout LyX-Code
spam [name <name>] [out <datafile>] [cut <cut>] [solv <solvname>]
\end_layout

\begin_layout LyX-Code
 	{ purewater |
\end_layout

\begin_layout LyX-Code
 	  <peaksname> [reorder] [info <infofile>] [summary <summary>]
\end_layout

\begin_layout LyX-Code
 	  [site_size <size>] [sphere] [temperature <T>]
\end_layout

\begin_layout LyX-Code
 	  [dgbulk <dgbulk>] [dhbulk <dhbulk>] } 
\end_layout

\begin_deeper
\begin_layout Description
name
\begin_inset space ~
\end_inset

<name> Output data sets name.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<datafile> Data file with all SPAM energies for each snapshot.
\end_layout

\begin_layout Description
cut
\begin_inset space ~
\end_inset

<cut> Non-bonded cutoff for energy evaluation
\end_layout

\begin_layout Description
solv
\begin_inset space ~
\end_inset

<solvname> Name of the solvent residues.
\end_layout

\begin_layout Description
[purewater] The system is pure water.
 Used to parametrize the bulk values.
 If this is specified, none of the below options are relevant.
\end_layout

\begin_layout Description
<peaksname> Data set or file (XYZ- format: see below) with the peak locations
 present .
 
\end_layout

\begin_layout Description
[reorder] The solvent should be re-ordered so the same solvent molecule
 is always in the same site.
\end_layout

\begin_layout Description
info
\begin_inset space ~
\end_inset

<infofile> File with stats about which sites are occupied when.
\end_layout

\begin_layout Description
summary
\begin_inset space ~
\end_inset

<summary> File with the summary of all SPAM results.
 If not specified, no SPAM energies will be calculated.
\end_layout

\begin_layout Description
site_size <size> Size of the water site around each density peak (sphere
 diameter/box edge length) in Ang.
\end_layout

\begin_layout Description
[sphere] Treat each site like a sphere.
\end_layout

\begin_layout Description
temperature
\begin_inset space ~
\end_inset

<T> Temperature at which SPAM calculation was run.
\end_layout

\begin_layout Description
dgbulk
\begin_inset space ~
\end_inset

<dgbulk> SPAM free energy of the bulk solvent in kcal/mol; default is -30.3
 kcal/mol (SPC/E water).
\end_layout

\begin_layout Description
dhbulk
\begin_inset space ~
\end_inset

<dhbulk> SPAM enthalpy of the bulk solvent in kcal/mol; default is -22.2
 kcal/mol (SPC/E water).
\end_layout

\begin_layout Standard
Data Sets Created for 'purewater':
\end_layout

\begin_layout Description
<name> Energies for each water at each frame.
\end_layout

\begin_layout Standard
Data Sets Created otherwise:
\end_layout

\begin_layout Description
<name>:<#> SPAM energies for peak <#> starting from 1.
\end_layout

\begin_layout Description
<name>[DG] SPAM delta G values for valid peaks.
\end_layout

\begin_layout Description
<name>[DH] SPAM delta H values for valid peaks.
\end_layout

\begin_layout Description
<name>[-TDS] SPAM -T * delta S values for valid peaks.
\end_layout

\end_deeper
\begin_layout Standard
Perform profiling of bound water molecules via SPAM analysis
\begin_inset CommandInset citation
LatexCommand citep
key "Cui2013"
literal "true"

\end_inset

.
 Briefly, this method identifies and estimates the free energy profiles
 of bound waters via calculation of the distribution of interaction energies
 between the water and it's environment from explicit solvent MD trajectories.
 The interaction energies are calculated using a force- and energy-shifted
 electrostatic term with a hard cutoff.
 For a given peak, SPAM energies will only be calculated for peaks where
 the peak is singly-occupied (i.e.
 a multiple-occupied peak is not considered valid).
\end_layout

\begin_layout Standard
Prior to this command, the 
\series bold
\emph on
volmap
\series default
\emph default
 command should be run with the 
\series bold
peakfile
\series default
 keyword (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_volmap"

\end_inset

) to generate the peaks file.
 If not using peaks from the 
\series bold
\emph on
volmap
\series default
\emph default
 command, the peaks file should have one line per peak with format:
\end_layout

\begin_layout LyX-Code
<# of peaks>
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
C     <X>      <Y>      <Z>       <Peak Density>
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout Standard
With a 'C' line for each peak.
\end_layout

\begin_layout Subsection
stfcdiffusion
\end_layout

\begin_layout LyX-Code
stfcdiffusion mask <mask> [out <file>] [time <time per frame>]
\end_layout

\begin_layout LyX-Code
              [mask2 <mask> [lower <distance>] [upper <distance>]]
\end_layout

\begin_layout LyX-Code
              [nwout <file>]) [avout <file>] [distances] [com]
\end_layout

\begin_layout LyX-Code
              [x|y|z|xy|xz|yz|xyz]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
mask Atoms for which MSDs will be computed.
\end_layout

\begin_layout Description
out Output file: time vs.
 MSD.
 
\end_layout

\begin_layout Description
time Time step in the trajectory.
 (1.0 ps) 
\end_layout

\begin_layout Description
mask2 Compute MSDs only within the lower and upper limit of mask2.
 IMPORTANT: may be very slow!!! 
\end_layout

\begin_layout Description
lower Smaller distance from reference point(s).
 (0.01 Å) 
\end_layout

\begin_layout Description
upper Larger distance from reference point(s).
 (3.5 Å) 
\end_layout

\begin_layout Description
nwout Output file containing number of water molecules in the chosen region,
 see mask2.
 (off) 
\end_layout

\begin_layout Description
avout Output file containing average distances.
 (off) 
\end_layout

\begin_layout Description
x|y|z|xy|xz|yz|xyz Computation of the mean square displacement in the chosen
 dimension.
 (xyz) 
\end_layout

\begin_layout Description
distances Dump un-imaged distances.
 By default only averages are output.
 (off) 
\end_layout

\begin_layout Description
com Calculate MSD for centre of mass.
 (off)
\end_layout

\end_deeper
\begin_layout Standard
Calculate diffusion for selected atoms using code based on the 'diffusion'
 routine developed by Hannes Loeffler at STFC (http://www.stfc.ac.uk/CSE).
\end_layout

\begin_layout Subsection
strip
\end_layout

\begin_layout LyX-Code
strip
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
strip
\end_layout

\end_inset

 <mask> [nobox]
\end_layout

\begin_layout LyX-Code
  	[outprefix <prefix>] [parmout <filename>]
\end_layout

\begin_layout LyX-Code
  	[parmopts <comma-separated-list>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<mask> Remove atoms specified by mask from the system.
\end_layout

\begin_layout Description
[nobox] Remove any box information from the stripped topology.
\end_layout

\begin_layout Description
[outprefix
\begin_inset space ~
\end_inset

<prefix>] Write out stripped topology file with name '<prefix>.<Original
 Topology Name>'.
\end_layout

\begin_layout Description
[parmout
\begin_inset space ~
\end_inset

<file>] Write stripped topology to file with name <file>.
\end_layout

\begin_layout Description
[parmopts
\begin_inset space ~
\end_inset

<list>] Options for writing topology file.
\end_layout

\end_deeper
\begin_layout Standard
Strip all atoms specified by 
\series bold
<mask>
\series default
 from the frame and modify the topology to match for any subsequent Actions.
 The 
\series bold
outprefix
\series default
 keyword can be used to write stripped topologies; stripped Amber topologies
 are fully-functional.
\end_layout

\begin_layout Standard
Note that stripping a system renumbers all atoms and residues, so for example
 after this command:
\end_layout

\begin_layout LyX-Code
strip :1
\end_layout

\begin_layout Standard
residue 1 will be gone, and the former second residue will now be the first,
 and so on.
\end_layout

\begin_layout Standard
For example, to strip all residues named WAT from each topology/coordinate
 frame:
\end_layout

\begin_layout LyX-Code
strip :WAT
\end_layout

\begin_layout Standard
The next example uses a distance-based mask to strip atoms in a single frame.
 Note that with the exception of the 
\series bold
\shape italic
mask
\series default
\shape default
 command, distance-based masks do not update on a per-frame basis.
 To strip all residues outside of 6.0 from any atom in residues 1 to 14 and
 write out the stripped topology and coordinates, both with no box information:
\end_layout

\begin_layout LyX-Code
parm parm7 
\end_layout

\begin_layout LyX-Code
trajin frame_1000.rst.1
\end_layout

\begin_layout LyX-Code
reference frame_1000.rst.1
\end_layout

\begin_layout LyX-Code
strip !(:1-14<:6.0) outprefix f1.1 nobox
\end_layout

\begin_layout LyX-Code
trajout f1.1.x restart nobox
\end_layout

\begin_layout Subsection
surf
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_surf"

\end_inset


\end_layout

\begin_layout LyX-Code
surf
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
surf
\end_layout

\end_inset

 [<name>] [<mask1>] [out <filename>] [solutemask <mask>]
\end_layout

\begin_layout LyX-Code
	[offset <offset>] [nbrcut <cut>]
\end_layout

\begin_deeper
\begin_layout Description
<name> Output data set name.
\end_layout

\begin_layout Description
<mask1> Atoms to calculate surface area for.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> File to write surface area to.
\end_layout

\begin_layout Description
solutemask
\begin_inset space ~
\end_inset

<mask> If specified, calculate the contribution of <mask1> to <mask>.
\end_layout

\begin_layout Description
offset
\begin_inset space ~
\end_inset

<offset> Increment van der Waals radii by <offset>; 1.4 Ang.
 is the default (as used by Amber).
\end_layout

\begin_layout Description
nbrcut
\begin_inset space ~
\end_inset

<cut> Only atoms with van der Waals radii greater than <cut> are considered
 to have neighbors (2.5 Ang Amber default).
\end_layout

\end_deeper
\begin_layout Standard
Calculate the surface area in Å
\begin_inset Formula $^{\text{2}}$
\end_inset

 of atoms in <mask> (if no mask specified, all atoms not marked as 'solvent'
 that are part of a molecule > 1 atom in size) using the LCPO algorithm
 of Weiser et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Weiser99"
literal "true"

\end_inset

.
 In order for this to work, the topology needs to have bond information
 and atom type information.
 
\end_layout

\begin_layout Standard
Note that even if <mask> does not include all solute atoms, the neighbor
 list is still calculated for all solute atoms so the surface area calculated
 reflects the contribution of atoms in <mask> to the overall surface area,
 not the surface area of <mask> as an isolated system.
 As a result, it may be possible to obtain a negative surface area if only
 a small fraction of the solute is selected.
\end_layout

\begin_layout Standard
For example, to calculate the overall surface area of all solute atoms,
 as well as the contribution of residue 1 to the overall surface area, writing
 both results to 
\begin_inset Quotes eld
\end_inset

surf.dat
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
surf out surf.dat
\end_layout

\begin_layout LyX-Code
surf :1 out surf.dat
\end_layout

\begin_layout Subsection
symmrmsd
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_symmrmsd"

\end_inset


\end_layout

\begin_layout LyX-Code
symmrmsd  [<name>] [<mask>] [<refmask>] [out <filename>] [nofit] [mass]
 [remap]
\end_layout

\begin_layout LyX-Code
          [ first | reference | ref <name> | refindex <#> | previous |
\end_layout

\begin_layout LyX-Code
            reftraj <name> [parm <parmname> | parmindex <#>] ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
[<mask>] Mask of atoms to calculate RMSD for; if not specified, calculate
 for all atoms.
\end_layout

\begin_layout Description
[<refmask>] Reference mask; if not specified, use 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output data file name.
\end_layout

\begin_layout Description
[nofit] Do not perform best-fit RMSD (not recommended).
\end_layout

\begin_layout Description
[mass] Mass-weight the RMSD calculation.
\end_layout

\begin_layout Description
[remap] Re-arrange atoms according to symmetry.
 See below for more details.
\end_layout

\begin_layout Standard
Reference keywords:
\end_layout

\begin_layout Description

\series bold
first
\series default
 Use the first trajectory frame processed as reference.
\end_layout

\begin_layout Description

\series bold
reference
\series default
 Use the first previously read in reference structure (refindex 0).
\end_layout

\begin_layout Description

\series bold
ref
\begin_inset space ~
\end_inset

<name>
\series default
 Use previously read in reference structure specified by filename/tag.
\end_layout

\begin_layout Description

\series bold
refindex
\begin_inset space ~
\end_inset

<#>
\series default
 Use previously read in reference structure specified by <#> (based on order
 read in).
\end_layout

\begin_layout Description
previous Use frame prior to current frame as reference.
\end_layout

\begin_layout Description

\series bold
reftraj
\series default

\begin_inset space ~
\end_inset

<name> Use frames from COORDS set <name> or read in from trajectory file
 <name> as references.
 Each frame from <name> is used in turn, so that frame 1 is compared to
 frame 1 from <name>, frame 2 is compared to frame 2 from <name> and so
 on.
 If <trajname> runs out of frames before processing is complete, the last
 frame of <trajname> continues to be used as the reference.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
parm
\begin_inset space ~
\end_inset

<parmname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#> If 
\series bold
reftraj
\series default
 specifies a file associate trajectory <name> with specified topology; if
 not specified the first topology is used.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Perform symmetry-corrected RMSD calculation.
 This is done by identifying potential symmetric atoms in each residue,
 performing an initial best-fit, then determining which configuration of
 symmetric atoms will give the lowest RMSD using atomic distance to reference
 atoms.
 
\end_layout

\begin_layout Standard

\series bold
Note that when re-mapping, all atoms in the residues of interest should
 be selected to prevent cases where selected symmetric atoms are swapped
 but the atoms they are bonded to are not
\series default
.
 Also, occasionally larger symmetric structures (e.g.
 6 membered rings) may become distorted due to only part of the residue
 being corrected for symmetry.
 This appears to happen about 4% of the time but does not overly inflate
 the RMSD.
 The 
\series bold
\shape italic
'check'
\series default
\shape default
 command can be used after 
\series bold
\shape italic
symmrmsd
\series default
\shape default
 to look for such distortions.
\end_layout

\begin_layout Standard
Warning: the symmetry correction is generally robust enough to account for
 symmetries in the standard amino and nucleic acid residues, but has not
 been extensively tested on residues with more extended types of symmetry.
\end_layout

\begin_layout Subsection
temperature
\end_layout

\begin_layout LyX-Code
temperature [<name>] [out <filename>]
\end_layout

\begin_layout LyX-Code
            { frame |
\end_layout

\begin_layout LyX-Code
              [<mask>] [ntc <#>] [update] [remove {trans|rot|both}]
\end_layout

\begin_layout LyX-Code
            }
\end_layout

\begin_deeper
\begin_layout Description
[<name>] Data set name.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write values to.
\end_layout

\begin_layout Description
frame Do not calculate temperature; use existing frame temperature.
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate temperature for.
\end_layout

\begin_layout Description
[ntc
\begin_inset space ~
\end_inset

<#>] Value of SHAKE bond constraint: 1 - none, 2 - bonds to H, 3- all bonds
 (equivalent to SANDER/PMEMD).
\end_layout

\begin_layout Description
[update] Update temperature in Frames with calculated temperatures.
\end_layout

\begin_layout Description
[remove
\begin_inset space ~
\end_inset

{trans|rot|both}] Correct for removed translational, rotational, or both
 kinds of degrees of freedom.
\end_layout

\end_deeper
\begin_layout Standard
Calculate temperature in frame based on velocity information.
 If '
\series bold
update
\series default
' is specified, update frame temperature too.
 If '
\series bold
frame
\series default
' is specified just use frame temperature (e.g.
 read in from a REMD trajectory).
\end_layout

\begin_layout Standard
The 'ntc' keyword can be used to correct for lost degrees of freedom due
 to SHAKE constraints (2 = bonds to hydrogen, 3 = all bonds).
 The 'remove' keyword can be used to account for removed translational and/or
 rotational degrees of freedom.
\end_layout

\begin_layout Standard
For example, if using a trajectory that has been generated with SHAKE on
 hydrogens, no periodic boundary conditions (i.e.
 no box), and has had the center of mass periodically removed:
\end_layout

\begin_layout LyX-Code
temperature T1 ntc 2 remove both out T1.dat
\end_layout

\begin_layout Standard
If using a trajectory that has been generated with SHAKE on hydrogens, periodic
 boundary conditions (i.e.
 with a box), and has had the center of mass periodically removed:
\end_layout

\begin_layout LyX-Code
temperature T1 ntc 2 remove trans out T1.dat
\end_layout

\begin_layout Standard
If using a trajectory that has been generated with SHAKE on all bonds, periodic
 boundary conditions, and no center of mass motion removal:
\end_layout

\begin_layout LyX-Code
temperature T1 ntc 3 out T1.dat
\end_layout

\begin_layout Subsection
time
\end_layout

\begin_layout LyX-Code
time {time0 <initial time> dt <step> [update] | remove}
\end_layout

\begin_deeper
\begin_layout Description
time0
\begin_inset space ~
\end_inset

<initial
\begin_inset space ~
\end_inset

time> Time of the first frame (ps).
\end_layout

\begin_layout Description
dt
\begin_inset space ~
\end_inset

<step> Time step between frames (ps).
\end_layout

\begin_layout Description
[update] If specified, modify any existing time info.
\end_layout

\begin_layout Description
remove Remove any time info from frame.
\end_layout

\end_deeper
\begin_layout Standard
Either add time information to frames, modify existing time information
 in frames, or remove existing time information from frames.
 Note that currently COORDS data sets do not store time information, so
 using this command with the 
\series bold
\emph on
crdaction
\series default
\emph default
 command will have no effect.
\end_layout

\begin_layout Subsection
trans | translate
\end_layout

\begin_layout LyX-Code
translate [<mask>] [x <dx>] [y <dy>] [z <dz>]
\end_layout

\begin_layout Standard
Translate atoms in 
\series bold
<mask>
\series default
 (all atoms if no mask specified) 
\series bold
<dx>
\series default
 Å in the X direction, 
\series bold
<dy>
\series default
 Å in the Y direction, and 
\series bold
<dz>
\series default
 Å in the Z direction.
\end_layout

\begin_layout Subsection
unstrip
\end_layout

\begin_layout LyX-Code
unstrip
\begin_inset Index idx
status open

\begin_layout Plain Layout
unstrip
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Requests that the original topology and frame be used for all following
 actions.
 This has the effect of undoing any command that modifies the state (such
 as strip).
 For example, the following code takes a solvated complex and uses a combination
 of strip, unstrip, and outtraj commands to write out separate dry complex,
 receptor, and ligand files:
\end_layout

\begin_layout LyX-Code
parm Complex.WAT.pdb
\end_layout

\begin_layout LyX-Code
trajin Complex.WAT.pdb
\end_layout

\begin_layout LyX-Code
# Remove water, write complex
\end_layout

\begin_layout LyX-Code
strip :WAT
\end_layout

\begin_layout LyX-Code
outtraj Complex.pdb pdb
\end_layout

\begin_layout LyX-Code
# Reset to solvated Complex
\end_layout

\begin_layout LyX-Code
unstrip
\end_layout

\begin_layout LyX-Code
# Remove water and ligand, write receptor
\end_layout

\begin_layout LyX-Code
strip :WAT,LIG
\end_layout

\begin_layout LyX-Code
outtraj Receptor.pdb pdb
\end_layout

\begin_layout LyX-Code
# Reset to solvated Complex
\end_layout

\begin_layout LyX-Code
unstrip
\end_layout

\begin_layout LyX-Code
# Remove water and receptor, write ligand
\end_layout

\begin_layout LyX-Code
strip :WAT
\end_layout

\begin_layout LyX-Code
strip !(:LIG)
\end_layout

\begin_layout LyX-Code
outtraj Ligand.pdb pdb
\end_layout

\begin_layout Subsection
unwrap
\end_layout

\begin_layout LyX-Code
unwrap [center] [{bymol | byres | byatom}]
\end_layout

\begin_layout LyX-Code
       [ reference | ref <name> | refindex <#> ] [<mask>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[center] Unwrap by center of mass; otherwise unwrap by first atom position.
\end_layout

\begin_layout Description
bymol Unwrap by molecule (default).
\end_layout

\begin_layout Description
byres Unwrap by residue.
\end_layout

\begin_layout Description
byatom Unwrap by atom.
\end_layout

\begin_layout Description
[
\begin_inset space ~
\end_inset

reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

] Reference structure to use in unwrapping.
\end_layout

\begin_layout Description
[<mask>] Selection to unwrap.
\end_layout

\end_deeper
\begin_layout Standard
Under periodic boundary conditions, MD trajectories are not continuous if
 molecules are wrapped(imaged) into the central unit cell.
 Especially, in sander, with 
\emph on
iwrap
\emph default
=1, molecular trajectories become discontinuous when a molecule crosses
 the boundary of the unit cell.
 This command, 
\family sans
\series bold
unwrap
\family default
\series default
 processes the trajectories to force the 
\shape italic
mask
\shape default
ed molecules continuous by translating the molecules into the neighboring
 unit cells.
 It is the opposite function of 
\family sans
\series bold
image
\family default
\series default
, but this command can also be used to place molecules side by side, for
 example, two strands of a DNA duplex.
 However, this command fails when the 
\shape italic
mask
\shape default
ed molecules travel more than half of the box size within a single frame.
\end_layout

\begin_layout Standard
If the optional argument 
\begin_inset Quotes eld
\end_inset


\family typewriter
reference
\family default

\begin_inset Quotes erd
\end_inset

 is specified, then the first frame is unwrapped according to the reference
 structure.
 Otherwise, the first frame is not modified.
\end_layout

\begin_layout Standard
As an example, assume that :1-10 is the first strand of a DNA duplex and
 :11-20 is the other strand of the duplex.
 Then the following commands could be used to create system where the two
 strands are not separated artificially:
\end_layout

\begin_layout LyX-Code
unwrap :1-20
\end_layout

\begin_layout LyX-Code
center :1-20 mass origin
\end_layout

\begin_layout LyX-Code
image origin center familiar
\end_layout

\begin_layout Subsection
vector
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-vector"

\end_inset


\end_layout

\begin_layout LyX-Code
vector [<name>] <Type> [out <filename> [ptrajoutput]] [<mask1>] [<mask2>]
\end_layout

\begin_layout LyX-Code
   	[magnitude] [ired]
\end_layout

\begin_layout LyX-Code
       <Type> = { mask     | minimage  | dipole | center   | corrplane |
\end_layout

\begin_layout LyX-Code
                  box      | boxcenter | ucellx | ucelly   | ucellz
\end_layout

\begin_layout LyX-Code
   	           momentum | principal [x|y|z]  | velocity | force }
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<name>] Vector data set name.
\end_layout

\begin_layout Description
<Type> Vector type; see below.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write vector data to 
\series bold
<filename>
\series default
 with format 'Vx Vy Vz Ox Oy Oz' where V denotes vector coordinates and
 'O' denotes origin coordinates.
\end_layout

\begin_layout Description
[ptrajoutput] Write vector data in 
\shape italic
ptraj
\shape default
 style (Vx Vy Vz Ox Oy Oz Vx+Ox Vy+Oy Vz+Oz).
 This prevents additional formatting of 
\series bold
<filename>
\series default
 and is not compatible with 
\series bold
'magnitude'
\series default
.
\end_layout

\begin_layout Description
[<mask1>] Atom mask, required for all types except 
\series bold
'box'
\series default
.
\end_layout

\begin_layout Description
[<mask2>] Second atom mask, only required for type 
\series bold
'mask'
\series default
.
\end_layout

\begin_layout Description
[magnitude] Store the magnitude of the vector with aspect [Mag].
\end_layout

\begin_layout Description
[ired] Mark this vector for subsequent IRED analysis with commands 'matrix
 ired' and 'ired'.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<name> Vector data set.
\end_layout

\begin_layout Description
<name>[Mag] (
\series bold
magnitude
\series default
 only) Vector magnitude.
\end_layout

\end_deeper
\begin_layout Standard
This command will keep track of a vector value (and its origin) over the
 trajectory; the data can be referenced for later use based on the 
\shape italic
name
\shape default
 (which must be unique).
 The types of vectors that can be calculated are:
\end_layout

\begin_layout Description
mask (Default) Store vector from center of mass of atoms in 
\series bold
<mask1>
\series default
 to atoms in 
\series bold
<mask2>
\series default
.
\end_layout

\begin_layout Description
minimage Store minimum-imaged vector from center of mass of atoms in 
\series bold
<mask1>
\series default
 to atoms in 
\series bold
<mask2>
\series default
.
\end_layout

\begin_layout Description
dipole Store the dipole and center of mass of the atoms specified in 
\series bold
<mask1>
\series default
.
 The vector is not converted to appropriate units, nor is the value well-defined
 if the atoms in the mask are not overall charge neutral.
\end_layout

\begin_layout Description
center Store the center of mass of atoms in 
\series bold
<mask1>
\series default
.
 The reference point is the origin (0.0, 0.0, 0.0).
\end_layout

\begin_layout Description
corrplane This defines a vector perpendicular to the (least-squares best)
 plane through the atoms in 
\series bold
<mask1>
\series default
.
 The reference point is the center of mass of atoms in 
\series bold
<mask1>
\series default
.
\end_layout

\begin_layout Description
box (No mask needed) Store the box lengths of the trajectory.
 The reference point is the origin (0.0, 0.0, 0.0).
 
\end_layout

\begin_layout Description
boxcenter (No mask needed) Store the center of the box as a vector.
\end_layout

\begin_layout Description
ucell{x|y|z}: (No mask needed) Store specified unit cell (i.e.
 box) vector.
\end_layout

\begin_layout Description
momentum Store momentum of atoms selected by <mask1> (requires velocities).
\end_layout

\begin_layout Description
principal
\begin_inset space ~
\end_inset

[x|y|z] Store one of the principal axis vectors determined by diagonalization
 of the inertial matrix from the coordinates of the atoms specified by 
\series bold
<mask1>
\series default
.
 The eigenvector with the largest eigenvalue is considered 
\begin_inset Quotes eld
\end_inset


\family typewriter
x
\family default

\begin_inset Quotes erd
\end_inset

 (i.e., the hardest axis to rotate around) and the eigenvector with the smallest
 eigenvalue is considered 
\begin_inset Quotes eld
\end_inset


\family typewriter
z
\family default

\begin_inset Quotes erd
\end_inset

.
 If none of 
\family typewriter
x
\family default
 or 
\family typewriter
y
\family default
 or 
\family typewriter
z
\family default
 are specified, then the 
\begin_inset Quotes eld
\end_inset

x
\begin_inset Quotes erd
\end_inset

 principal axis is stored.
 The reference point is the center of mass of atoms in 
\series bold
<mask1>
\series default
.
\end_layout

\begin_layout Description
velocity Store velocity of atoms in <mask1> (requires velocities).
\end_layout

\begin_layout Description
force Store force of atoms in <mask1> (requires forces).
\end_layout

\begin_layout Standard
Cpptraj supports writing out vector data in a pseudo-trajectory format for
 easy visualization.
 Once a vector data set has been generated the writedata command can be
 used with the vectraj keyword (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:Datafile-Commands"

\end_inset

 for more details) to write a pseudo trajectory consisting of two atoms,
 one for the vector origin and one for the vector from the origin (i.e.
 V+O).
 For example, to create a MOL2 containing a pseudo-trajectory of the minimum-ima
ged vector from residue 4 to residue 11:
\end_layout

\begin_layout LyX-Code
trajin tz2.nc
\end_layout

\begin_layout LyX-Code
vector v8 minimage out v8.dat :4 :11 
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
writedata v8.mol2 vectraj v8 trajfmt mol2 
\end_layout

\begin_layout Standard
Auto-correlation or cross-correlation functions can be calculated subsequently
 for vectors using either the 
\series bold
\emph on
corr
\series default
\emph default
 analysis command or the 
\series bold
\shape italic
timecorr
\series default
\shape default
 analysis command (to calculate via spherical harmonic theory).
\end_layout

\begin_layout Subsection
velocityautocorr
\end_layout

\begin_layout LyX-Code
velocityautocorr [<set name>] [<mask>] [usevelocity] [out <filename>] [diffout
 <file>]
\end_layout

\begin_layout LyX-Code
                 [maxlag <frames>] [tstep <timestep>] [direct] [norm]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[<set
\begin_inset space ~
\end_inset

name>] Data set name.
\end_layout

\begin_layout Description
[<mask>] Atoms(s) to calculate velocity autocorrelation (VAC) function for.
\end_layout

\begin_layout Description
[usevelocity] Use velocity information in frame if present.
 This will only give sensible results if the velocities are recorded close
 to the order of the simulation time step.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write VAC function to <filename>.
\end_layout

\begin_layout Description
[diffout
\begin_inset space ~
\end_inset

<file>] File to write diffusion constants to.
\end_layout

\begin_layout Description
[maxlag
\begin_inset space ~
\end_inset

<frames>] Maximum lag in frames to calculate VAC function for.
 Default is half the total number of frames.
\end_layout

\begin_layout Description
[tstep
\begin_inset space ~
\end_inset

<timestep>] Time between frames in ps (default 1.0).
\end_layout

\begin_layout Description
[direct] Calculate VAC function directly instead of via FFT (will be much
 slower).
\end_layout

\begin_layout Description
[norm] Normalize resulting VAC function to 1.0.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[D] Diffusion constant calculated from integral over VAC function in 1x10
\begin_inset script superscript

\begin_layout Plain Layout
-5
\end_layout

\end_inset

 cm
\begin_inset script superscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

/s.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the velocity autocorrelation (VAC) function averaged over the
 atoms in <mask>.
 Pseudo-velocities are calculated using coordinates and the specified time
 step.
 As with all time correlation functions the statistical noise will increase
 if the maximum lag is greater than half the total number of frames.
 In addition to calculating the velocity autocorrelation function, the self-diff
usion coefficient will be reported in the output, calculated from the integral
 over the VAC function.
\end_layout

\begin_layout Subsection
volmap
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_volmap"

\end_inset


\end_layout

\begin_layout LyX-Code
volmap [out <filename>] <mask> [radscale <factor>] [stepfac <fac>]
\end_layout

\begin_layout LyX-Code
   	[sphere] [radii {vdw | element}] [splinedx <spacing>]
\end_layout

\begin_layout LyX-Code
   	[calcpeaks] [peakcut <cutoff>] [peakfile <xyzfile>]
\end_layout

\begin_layout LyX-Code
   	{ data <existing set> |
\end_layout

\begin_layout LyX-Code
   	  name <setname> <dx> [<dy> <dz>]
\end_layout

\begin_layout LyX-Code
 	      { size <x,y,z> [center <x,y,z>] |
\end_layout

\begin_layout LyX-Code
   	      centermask <mask> [buffer <buffer>] |
\end_layout

\begin_layout LyX-Code
   	      boxref <reference> } 	}
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\family roman
out
\begin_inset space ~
\end_inset

<filename> 
\family default
The name of the output file with the grid density.
\end_layout

\begin_layout Description

\family roman
<mask> 
\family default
The atom selection from which to calculate the number density.
\end_layout

\begin_layout Description

\family roman
radscale
\begin_inset space ~
\end_inset

<factor> 
\family default
Factor by which to scale radii (by division).
 To match the atomic radius of Oxygen used by the VMD volmap tool, a scaling
 factor of 1.36 should be used.
 Default 1.0.
\end_layout

\begin_layout Description
stepfac
\begin_inset space ~
\end_inset

<factor> Factor for determining how many voxels to smear Gaussian (default
 4.1, 1.0 for 
\series bold
sphere
\series default
).
\end_layout

\begin_layout Description
sphere When smearing Gaussian, skip voxels farther than radii/2.
\end_layout

\begin_layout Description
radii
\begin_inset space ~
\end_inset

{vdw|element} Specify either van der Waals radii (default) or elemental
 radii.
\end_layout

\begin_layout Description
splinedx
\begin_inset space ~
\end_inset

<spacing> Spacing to use for cubic spline interpolation (default 0.01 Ang.).
\end_layout

\begin_layout Description
calcpeaks If specified, peaks in the grid density will be calculated and
 saved to set <setname> with aspect 
\begin_inset Quotes eld
\end_inset

peaks
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description

\family roman
peakcut
\begin_inset space ~
\end_inset

<cutoff> 
\family default
The minimum density required to consider a local maximum a 'density peak'
 in the outputted peak file (default 0.05).
\end_layout

\begin_layout Description

\family roman
peakfile
\begin_inset space ~
\end_inset

<xyzfile> 
\family default
A file in XYZ-format that contains a carbon atom centered at the grid point
 of every local density maximum.
 This file is necessary input to the spam action command.
\end_layout

\begin_layout Description
data
\begin_inset space ~
\end_inset

<setname> Name of existing grid data set to use.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<setname> Name of grid set that will be created (
\series bold
size/center
\series default
 or 
\series bold
centermask/buffer
\series default
 keywords).
\end_layout

\begin_layout Description

\family roman
dx,
\begin_inset space ~
\end_inset

dy,
\begin_inset space ~
\end_inset

dz 
\family default
The grid spacing (Angstroms) in the X-, Y-, and Z-dimensions, respectively.
\end_layout

\begin_layout Description

\family roman
size
\begin_inset space ~
\end_inset

<x,y,z> 
\family default
Specify the size of the grid in the X-, Y-, and Z-dimensions.
 Must be used alongside the center argument.
\end_layout

\begin_deeper
\begin_layout Description

\family roman
center
\begin_inset space ~
\end_inset

<x,y,z> 
\family default
Specify the grid center explicitly.
 Note, the size argument must be present in this case.
 Default is the origin.
\end_layout

\end_deeper
\begin_layout Description

\family roman
centermask
\begin_inset space ~
\end_inset

<mask> 
\family default
The mask around which the grid should be centered (via geometric center).
 If this is omitted and the center and size are not specified, the default
 <mask> entered (see above) is used in its place.
\end_layout

\begin_deeper
\begin_layout Description

\family roman
buffer
\begin_inset space ~
\end_inset

<buffer> 
\family default
A buffer distance, in Angstroms, by which the edges of the grid should clear
 every atom of the centermask (or default mask if centermask is omitted)
 in every direction.
 The default value is 3.
 The buffer is ignored if the center and size are specified (see below).
\end_layout

\end_deeper
\begin_layout Description
boxref
\begin_inset space ~
\end_inset

<reference> Set up the grid using the unit cell info in the specified reference.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<setname> The 3D grid.
\end_layout

\begin_layout Description
<setname>[peaks] The density peaks if 
\series bold
calcpeaks
\series default
 specified.
\end_layout

\end_deeper
\begin_layout Standard
Grid data as a volumetric map, similar to the 'volmap' command in VMD.
 The density is calculated by treating each atom as a 3-dimensional Gaussian
 function whose standard deviation is equal to the van der Waals radius.
 The density calculated is the number density averaged over the entire simulatio
n.
 The grid can be specified in one of three ways:
\end_layout

\begin_layout Enumerate
An existing grid data set (from e.g.
 bounds), specified with the 
\series bold
data
\series default
 keyword.
\end_layout

\begin_layout Enumerate
Via the sizes and center specified by the 
\series bold
size
\series default
 and 
\series bold
center
\series default
 keywords (comma-separated strings, e.g.
 '20,20,20').
\end_layout

\begin_layout Enumerate
Centered on the atoms in the mask given by 
\series bold
centermask
\series default
 with an additional buffer in each direction specified by 
\series bold
buffer
\series default
.
\end_layout

\begin_layout Standard
The calculation is sped up by using cubic splines to interpolate the exponential
 function when calculating the Gaussians.
\begin_inset CommandInset citation
LatexCommand citep
key "Roe2021"
literal "true"

\end_inset


\end_layout

\begin_layout Subsection
volume
\end_layout

\begin_layout LyX-Code
volume [<name>] [out <filename>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> Data set name.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> Output file name.
\end_layout

\end_deeper
\begin_layout Standard
Calculate unit cell volume.
\end_layout

\begin_layout Subsection
watershell
\end_layout

\begin_layout LyX-Code
watershell <solutemask> [out <filename>] [lower <lower cut>] [upper <upper
 cut>]
\end_layout

\begin_layout LyX-Code
           [noimage] [<solventmask>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<solutemask> Atom mask corresponding to solute of interest (required).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output file name.
\end_layout

\begin_layout Description
[lower
\begin_inset space ~
\end_inset

<lower
\begin_inset space ~
\end_inset

cut>] Cutoff for the first water shell (default 3.4 Angstroms).
\end_layout

\begin_layout Description
[upper
\begin_inset space ~
\end_inset

<upper
\begin_inset space ~
\end_inset

cut>] Cutoff for the second water shell (default 5.0 Angstroms).
\end_layout

\begin_layout Description
[noimage] Do not image distances.
\end_layout

\begin_layout Description
[<solventmask>] Optional atom mask corresponding to solvent.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[lower] Number of solvent molecules in first solvent shell.
\end_layout

\begin_layout Description
[upper] Number of solvent molecules in second solvent shell.
\end_layout

\end_deeper
\begin_layout Standard
This option will count the number of waters within a certain distance of
 the atoms in the <solutemask> in order to represent the first and second
 solvation shells.
 The optional <solventmask> can be used to consider other atoms as the solvent;
 the default is 
\begin_inset Quotes eld
\end_inset

:WAT
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
This action is often used prior to the 
\series bold
\shape italic
closest
\series default
\shape default
 command in order to determine how many waters around a solute should be
 retained to maintain the first and/or second water shells.
\end_layout

\begin_layout Standard
As of version 17 this command is CUDA-enabled in CUDA versions of CPPTRAJ.
\end_layout

\begin_layout Subsection
xtalsymm
\end_layout

\begin_layout LyX-Code
xtalsymm <mask> group <space group> [collect [centroid]]
\end_layout

\begin_layout LyX-Code
     	[ first | reference | ref <name> | refindex <#> ]
\end_layout

\begin_layout LyX-Code
     	[na <na>] [nb <nb>] [nc <nc>]
\end_layout

\begin_deeper
\begin_layout Description
<mask> Atom mask defining the asymmetric unit within the larger system (required
).
\end_layout

\begin_layout Description
group
\begin_inset space ~
\end_inset

<space
\begin_inset space ~
\end_inset

group> The space group to which the system belongs.
 Omit spaces in the name.
 Example: 
\begin_inset Quotes eld
\end_inset

P22(1)2(1)
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description
[collect] Optional flag to have all solvent particles, not just the asymmetric
 units, re-imaged.
 This will trigger cpptraj to compute the unit cell volume that constitutes
 the aymmetric unit and thereby classify all particles for re-imaging.
\end_layout

\begin_deeper
\begin_layout Description
[centroid] If specified along with 
\series bold
collect
\series default
, re-image solvent molecules by centroids, not individual atom coordinates.
 This is useful for keeping water molecules intact.
\end_layout

\end_deeper
\begin_layout Description
[first
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

reference
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

ref
\begin_inset space ~
\end_inset

<name>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

refindex
\begin_inset space ~
\end_inset

<#>] Reference structure to use for determining crystal symmetry.
\end_layout

\begin_layout Description
[na
\begin_inset space ~
\end_inset

<na>]
\begin_inset space ~
\end_inset

[nb
\begin_inset space ~
\end_inset

<nb>]
\begin_inset space ~
\end_inset

[nc
\begin_inset space ~
\end_inset

<nc>] The number of times the crystal unit cell is replicated along the
 “a,” “b,” or “c” axes (for orthorhombic unti cells, these are the x, y,
 and z axes) of the simulation; default is 1.
 Many crystal unit cells are too small in one or more dimensions for our
 simulation cutoffs, and replicating the unit cell is an effective way to
 counter imaging artifacts even for larger unit cells.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the optimal approach for superimposing symmetry-related subunits
 of the simulation back onto one another.
 The calculation assumes that the system is a simulation of an X-ray structure
 in its native crystal lattice, finds all copies of the asymmetric unit
 among the entire system, and devises plans for re-imagining their coordinates
 to superimpose them back on the original asymmetric unit.
 The space group information can be found in a PDB X-ray structure used
 as the initial coordinates for a simulation.
 All 230 space groups are supported, and a scan of the PDB was made to ensure
 that common variants of the names are included (P2(1)22(1) is the same
 as P22(1)2(1), but with different axis conventions).
 If your space group is not understood, contact the Amber mailing list.
 This command is compute intensive, especially for simulations that are
 “supercells” containing many crystallographic unit cells.
\end_layout

\begin_layout Standard
This command will cause cpptraj to locate all asymmetric units from within
 the topology, then determine what wrapping, if any, has occurred in order
 to bring about an optimal re-alignment based on the space group symmetry
 operations.
 The user need not worry about wrapping or drift of the simulation over
 time–the asymmetric units will be re-imaged frame by frame.
 Coordinate modifications due to this action are permanent and will affect
 the results of subsequent actions and analyses.
\end_layout

\begin_layout Section
Analysis Commands
\end_layout

\begin_layout Standard
Analyses in 
\emph on
cpptraj
\emph default
 operate on data sets which have been generated by Actions in a prior Run
 or read in with a 
\series bold
\emph on
readdata
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_readdata"

\end_inset

).
 Unlike 
\emph on
ptraj
\emph default
, Analysis commands in 
\emph on
cpptraj
\emph default
 do not need to be prefaced with 
\family typewriter
'analysis'
\family default
.
 The exception to this is '
\series bold
\emph on
analyze matrix
\series default
\emph default
' in order to differentiate it from the 
\series bold
\emph on
matrix
\series default
\emph default
 Action command; users are encouraged to use the new command 
\series bold
\emph on
diagmatrix
\series default
\emph default
 instead.
\end_layout

\begin_layout Standard
Like Actions, when an Analysis command is issued it is by default added
 to the Analysis queue and is not executed until after trajectory processing
 is completed; a complete list of data sets available for analysis is shown
 after trajectory processing (prefaced by 'DATASETS') or can be shown with
 the '
\series bold
\emph on
list dataset
\series default
\emph default
' command.
 Analyses can also be executed immediately via the 
\series bold
\emph on
runanalysis
\series default
\emph default
 command (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_runanalysis"

\end_inset

).
\end_layout

\begin_layout Standard
Note that for Analysis commands that use COORDS data sets, if no COORDS
 data set is specified then a default one will be automatically created
 from frames read in by 
\series bold
\emph on
trajin
\series default
\emph default
 commands.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="47" columns="3">
<features islongtable="true" longtabularalignment="center">
<column alignment="center" valignment="top" width="25text%">
<column alignment="center" valignment="top" width="50text%">
<column alignment="center" valignment="top" width="25text%">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Set Type(s)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
autocorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate autocorrelation function for multiple data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D sclar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
avg
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate average, standard deviation, min, and max for (or over) data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
calcstate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate states based on given data sets and criteria.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cluster
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform cluster analysis.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COORDS, N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
corr,
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate auto or cross correlation for 1 or 2 data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D scalar, vector
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 correlationcoe
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cphstats
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate statistics for constant pH data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pH data sets
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crank, 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate crankshaft motion between two data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crankshaft
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crdfluct
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate atomic fluctuations (RMSF) for atoms over time blocks.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COORDS
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
crosscorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate a matrix of Pearson product-moment 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
coefficients between given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
curvefit
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform non-linear curve fitting on given data set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
diagmatrix
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate eigenvectors and eigenvalues from given symmetric matrix.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
symmetric matrix
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
divergence
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate Kullback-Leibler divergence between two data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
evalplateau
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Evaluate whether the data in a 1D set has reached a single exponential plateau.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
FFT
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform a fast Fourier transform on data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hausdorff
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate the Hausdorff distance for given matrix data set(s).
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 2D matrices
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hist, histogram
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate N-dimensional histogram for N given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
integrate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform integration on each of the given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ired
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform isotropic reorientational eigenmode dynamics
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N IRED vectors
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 analysis using given IRED vectors.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
kde
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate 1D histogram from given data set using a kernel density estimator.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1 or 2 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Also time-dependent Kullback-Leibler divergence analysis with another set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lifetime
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform lifetime analysis on given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lowestcurve
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
For each given data set, calculate a curve that traces 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
the lowest N points over specified bins.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
meltcurve
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate a melting curve from given data sets assuming simple 2 state kinetics.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
modes
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform various analyses on eigenmodes (from e.g.
 
\series bold
\emph on
diagmatrix
\series default
\emph default
).
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
eigenmodes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multicurve
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform non-linear curve fitting for multiple input data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multihist
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate 1D histograms (optionally with a kernel
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 density estimator) from multiple input data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
phipsi
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate and plot the average phi and psi values from input dihedral data
 sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N phi/psi dihedrals
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
regress
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform linear regression on multiple input data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
remlog
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate various statistics from a replica log data set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
replica log
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rms2d, 2drms
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate 2D RMSD between frames in 1 or 2 COORDS data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1 or 2 COORDS
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rmsavgcorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate RMS average correlation curve for a COORDS data set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COORDS
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rotdif
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate rotational diffusion using given rotation matrices (from e.g.
 
\series bold
\emph on
rms
\series default
\emph default
).
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
rotation matrices
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
runningavg
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate running average for given data sets using given window size.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
spline
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate cubic splines for given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
stat, statistics
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate various statistics for given data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ti
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Peform Gaussian quadrature integration for given DV/DL data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
N 1D scalar
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
timecorr
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Calculate auto/cross-correlation functions for given
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1 or 2 vector
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
 vector(s) using spherical harmonics.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
vectormath
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform math on given vector data sets.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2 vector
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
wavelet
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perform wavelet analysis on coordinates from given COORDS set.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COORDS
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
autocorr
\end_layout

\begin_layout LyX-Code
autocorr [name <dsetname>] <dsetarg0> [<dsetarg1> ...] [out <filename>]
\end_layout

\begin_layout LyX-Code
         [lagmax <lag>] [nocovar] [direct]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
<dsetarg0>
\begin_inset space ~
\end_inset

[dsetarg1>
\begin_inset space ~
\end_inset

...]
\series default
 Argument(s) specifying datasets to be used.
\end_layout

\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<dsetname>]
\series default
 Store results in dataset(s) named <dsetname>:X.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename
\series default
>
\series bold
]
\series default
 Write results to file named <filename>.
\end_layout

\begin_layout Description

\series bold
[lagmax]
\series default
 Maximum lag to calculate for.
 If not specified all frames are used.
\end_layout

\begin_layout Description

\series bold
[nocovar]
\series default
 Do not calculate covariance.
\end_layout

\begin_layout Description

\series bold
[direct]
\series default
 Do not use FFTs to calculate correlation; this will be much slower.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
This is for integer/double/float datasets only; for vectors see the 
\series bold
'timecorr'
\series default
 command.
\end_layout

\begin_layout Standard
Calculate auto-correlation (actually auto-covariance by default) function
 for datasets specified by one or more dataset arguments.
 The datasets must have the same # of data points.
\end_layout

\begin_layout Subsection
avg
\end_layout

\begin_layout LyX-Code
avg <dset0> [<dset1> ...] [torsion] [out <file>] [oversets]
\end_layout

\begin_layout LyX-Code
    [name <name>] [nostdout]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dsetX> Data set(s) to calculate the average for.
\end_layout

\begin_layout Description
[torsion] If the data sets are not already marked periodic (e.g.
 if read in via 'readdata'), treat them as periodic torsion.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write results to.
\end_layout

\begin_layout Description
[oversets] If specified, calculate the average over all inpout sets instead
 of each input set.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<name>] Output data set name.
\end_layout

\begin_layout Description
[nostdout] If 'nostdout' specified do not write averages to STDOUT when
 'out' not specified.
\end_layout

\begin_layout Standard
DataSets Created (not 
\series bold
oversets
\series default
):
\end_layout

\begin_layout Description
<name>[avg] Average of each set.
\end_layout

\begin_layout Description
<name>[sd] Standard deviation of each set.
\end_layout

\begin_layout Description
<name>[ymin] Y minimum of each set.
\end_layout

\begin_layout Description
<name>[ymax] Y maximum of each set.
\end_layout

\begin_layout Description
<name>[yminidx] Index of minimum Y value.
\end_layout

\begin_layout Description
<name>[ymaxidx] Index of maximum Y value.
\end_layout

\begin_layout Description
<name>[names] Name of each set.
\end_layout

\begin_layout Standard
DataSets Created (oversets)
\end_layout

\begin_layout Description
<name> Average over all input sets for each frame.
\end_layout

\begin_layout Description
<name>[SD] Standard deviation over all input sets for each frame.
\end_layout

\end_deeper
\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Calculate the average, standard deviation, min, and max of given 1D data
 sets.
 Alternatively, if 
\series bold
oversets
\series default
 is specified the average over each set for each point is calculated; this
 requires all input sets be the same size.
\end_layout

\begin_layout Standard
For example, to read in data from a file named perres.peptide.dat and calculate
 the averages etc for all the input sets:
\end_layout

\begin_layout LyX-Code
readdata perres.peptide.dat 
\end_layout

\begin_layout LyX-Code
avg perres.peptide.dat out output.dat name V 
\end_layout

\begin_layout Subsection
calcstate
\end_layout

\begin_layout LyX-Code
calcstate {state <ID>,<dataset>,<min>,<max>[,<dataset1>,<min1>,<max1>]}
 ...
\end_layout

\begin_layout LyX-Code
      	[out <state v time file>] [name <setname>]
\end_layout

\begin_layout LyX-Code
      	[curveout <curve file>] [stateout <states file>]
\end_layout

\begin_layout LyX-Code
      	[transout <transitions file>] [countout <count file>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
state
\begin_inset space ~
\end_inset

<ID>,<dataset>,<min>,<max> Define a state according to given data set and
 criteria.
 Multiple states can be given, and each state can have multiple criteria.
 If multiple criteria are specified, each one must be satisfied in order
 to assign the state.
 If the same state is defined multiple times, the state will be assigned
 if either criteria match.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<ID> Name to give each state index.
 State indices start at 0.
 -1 means 
\begin_inset Quotes eld
\end_inset

undefined state
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description
<dataset> Data set to use.
\end_layout

\begin_layout Description
<min>,<max> Frames with data set value above <min> and below <max> will
 be assigned <ID>.
\end_layout

\end_deeper
\begin_layout Description
[out
\begin_inset space ~
\end_inset

<state
\begin_inset space ~
\end_inset

v
\begin_inset space ~
\end_inset

time
\begin_inset space ~
\end_inset

file>] File to write state index vs frame to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Data set name.
\end_layout

\begin_layout Description
[curveout
\begin_inset space ~
\end_inset

<curve
\begin_inset space ~
\end_inset

file>] File to write state lifetime and transition curves to.
\end_layout

\begin_layout Description
[stateout
\begin_inset space ~
\end_inset

<states
\begin_inset space ~
\end_inset

file>] File to write state lifetime data to.
\end_layout

\begin_layout Description
[transout
\begin_inset space ~
\end_inset

<transitions
\begin_inset space ~
\end_inset

file>] File to write state transition data to.
\end_layout

\begin_layout Description
[countout
\begin_inset space ~
\end_inset

<state
\begin_inset space ~
\end_inset

count
\begin_inset space ~
\end_inset

file>] File to write state counts (i.e.
 how many frames each state was observed) to.
\end_layout

\begin_layout Standard
DataSets Created:
\end_layout

\begin_layout Description
<setname> State index vs frame.
\end_layout

\begin_layout Description
<setname>[Count] Number of frames each state was observed.
\end_layout

\begin_layout Description
<setname>[Frac] Fraction of time each state was observed
\end_layout

\begin_layout Description
<setname>[Nlifetimes] Number of times each state was reached.
\end_layout

\begin_layout Description
<setname>[Avglife] Average lifetime length for each state.
\end_layout

\begin_layout Description
<setname>[Maxlife] Maximum lifetime of each state.
\end_layout

\begin_layout Description
<setname>[Name] Name (<ID>) of each state.
\end_layout

\begin_layout Description
<setname>[Xlifetimes] Number of times each state transitioned to each other
 state.
\end_layout

\begin_layout Description
<setname>[Xavglife] Average lifetime of each state before transitioning
 to each other state.
\end_layout

\begin_layout Description
<setname>[Xmaxlife] Maximum lifetime of each state before transitioning
 to each other state.
\end_layout

\begin_layout Description
<setname>[Xname] Name of each transition, format 
\begin_inset Quotes eld
\end_inset

StateA->StateB
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Description
<setname>[sCurve]:X State curves; lifetime curve for transitions from given
 state to any other state.
\end_layout

\begin_layout Description
<setname>[tCurve]:X Transition curves; lifetime curve for transitions from
 given state to other specific state.
\end_layout

\end_deeper
\begin_layout Standard
Data for the specified data set(s) that matches the given criteria will
 be assigned a state index.
 State indices start from 0 and match the order in which 
\series bold
state
\series default
 keywords were given.
 The -1 state index is reserved for 
\begin_inset Quotes eld
\end_inset

undefined state
\begin_inset Quotes erd
\end_inset

.
 For example, the following input:
\end_layout

\begin_layout LyX-Code
parm DPDP.parm7
\end_layout

\begin_layout LyX-Code
trajin DPDP.nc
\end_layout

\begin_layout LyX-Code
distance d1 :19@O :12@N
\end_layout

\begin_layout LyX-Code
angle a1 :19@O :12@H :12@N
\end_layout

\begin_layout LyX-Code
calcstate state D,d1,3.0,4.0 state A,a1,100,120 out state.dat curveout curve.agr
 
\backslash

\end_layout

\begin_layout LyX-Code
                stateout States.dat transout States.dat name d1_a1
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout Standard
Defines two states.
 State index 0 is defined as a state named 
\begin_inset Quotes eld
\end_inset

D
\begin_inset Quotes erd
\end_inset

 based on the distance from ':19@O' to ':12@N' (data set d1) being between
 3 and 4 Angstroms.
 State index 1 is defined as a state named 
\begin_inset Quotes eld
\end_inset

A
\begin_inset Quotes erd
\end_inset

 based on the angle between ':19@O', ':12@H', and ':12@N' (data set a1)
 being between 100 and 120 degrees.
 The output in state.dat might look like:
\end_layout

\begin_layout LyX-Code
#Frame          d1_a1
\end_layout

\begin_layout LyX-Code
       1           -1
\end_layout

\begin_layout LyX-Code
       2            0
\end_layout

\begin_layout LyX-Code
       3            0
\end_layout

\begin_layout LyX-Code
       4            0
\end_layout

\begin_layout LyX-Code
       5           -1
\end_layout

\begin_layout LyX-Code
       6            1
\end_layout

\begin_layout LyX-Code
       7           -1
\end_layout

\begin_layout LyX-Code
       8           -1
\end_layout

\begin_layout LyX-Code
       9            0
\end_layout

\begin_layout LyX-Code
      10           -1
\end_layout

\begin_layout Standard
where the values in column d1_a1 refer to state index: -1 is undefined,
 0 is state 
\begin_inset Quotes eld
\end_inset

D
\begin_inset Quotes erd
\end_inset

, and 1 is state 
\begin_inset Quotes eld
\end_inset

A
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
To define a state State1 as having a distance named 
\begin_inset Quotes eld
\end_inset

dist
\begin_inset Quotes erd
\end_inset

 between 2.5 and 5.0 Ang.
 and an angle named 
\begin_inset Quotes eld
\end_inset

ang
\begin_inset Quotes erd
\end_inset

 between 30 and 60 degrees OR having a distance named 
\begin_inset Quotes eld
\end_inset

distA
\begin_inset Quotes erd
\end_inset

 between 0.0 and 3.0 Ang.:
\end_layout

\begin_layout LyX-Code
calcstate state State1,dist,2.5,5.0,ang,30,60 
\backslash

\end_layout

\begin_layout LyX-Code
          state State1,distA,0.0,3.0
\end_layout

\begin_layout Standard
Lifetime curves (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-lifetime"

\end_inset

 for further explanation) are calculated for transitions from each state
 to any other state (aspect [sCurve]) and each state to each other state
 (aspect [tCurve]).
 In this case there will be 3 sCurves and 4 tCurves:
\end_layout

\begin_layout LyX-Code
d1_a1[sCurve]:0 "Undefined" (double), size is 10 
\end_layout

\begin_layout LyX-Code
d1_a1[sCurve]:1 "D" (double), size is 3 
\end_layout

\begin_layout LyX-Code
d1_a1[sCurve]:2 "A" (double), size is 1 
\end_layout

\begin_layout LyX-Code
d1_a1[tCurve]:0 "Undefined->D" (double), size is 10
\end_layout

\begin_layout LyX-Code
d1_a1[tCurve]:1 "D->Undefined" (double), size is 3
\end_layout

\begin_layout LyX-Code
d1_a1[tCurve]:2 "Undefined->A" (double), size is 1
\end_layout

\begin_layout LyX-Code
d1_a1[tCurve]:3 "A->Undefined" (double), size is 1
\end_layout

\begin_layout Standard
Lifetime analysis from each state to any other state is directed to the
 file specified by 
\series bold
stateout
\series default
 and has format:
\end_layout

\begin_layout LyX-Code
#Index N Average Max State
\end_layout

\begin_layout Standard
Where 
\family typewriter
#Index
\family default
 is the state index, 
\family typewriter
N
\family default
 is the number of lifetimes in that state, 
\family typewriter
Average
\family default
 is the average lifetime while in that state (in frames), 
\family typewriter
Max
\family default
 is the maximum lifetime while in that state (in frames) and 
\family typewriter
State
\family default
 is the name of the state.
\end_layout

\begin_layout Standard
Finally, lifetime analysis of transitions from each state to each other
 state is directory to the file specified by transout and has format:
\end_layout

\begin_layout LyX-Code
#N Average Max Transition
\end_layout

\begin_layout Standard
Where 
\family typewriter
#N
\family default
 is the number of transitions, 
\family typewriter
Average
\family default
 is the average lifetime (in frames) in the first state before transitioning
 to the second state, 
\family typewriter
Max
\family default
 is the max lifetime (in frames) before transitioning to the second state,
 and 
\family typewriter
Transition
\family default
 is the name of the transition.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-cluster-analysis"

\end_inset

cluster
\end_layout

\begin_layout LyX-Code
cluster
\begin_inset Index idx
status open

\begin_layout Plain Layout
cluster
\end_layout

\end_inset

 [crdset <crd set> | nocoords]
\end_layout

\begin_layout LyX-Code
  Algorithms:
\end_layout

\begin_layout LyX-Code
	[hieragglo [epsilon <e>] [clusters <n>] [linkage|averagelinkage|complete]
\end_layout

\begin_layout LyX-Code
      [epsilonplot <file>] [includesieved_cdist]]
\end_layout

\begin_layout LyX-Code
	[dbscan minpoints <n> epsilon <e> [sievetoframe] [kdist <k> [kfile <prefix>]]]
\end_layout

\begin_layout LyX-Code
    [dpeaks epsilon <e> [noise] [dvdfile <density_vs_dist_file>]
\end_layout

\begin_layout LyX-Code
	  [choosepoints {manual | auto}]
\end_layout

\begin_layout LyX-Code
	  [distancecut <distcut>] [densitycut <densitycut>]
\end_layout

\begin_layout LyX-Code
	  [runavg <runavg_file>] [deltafile <file>] [gauss]]
\end_layout

\begin_layout LyX-Code
    [kmeans clusters <n> [randompoint [kseed <seed>]] [maxit <iterations>]
\end_layout

\begin_layout LyX-Code
    [{readtxt|readinfo} infofile <file>]
\end_layout

\begin_layout LyX-Code
  Distance options:
\end_layout

\begin_layout LyX-Code
	{[[rms | srmsd] [<mask>] [mass] [nofit]] | [dme [<mask>]] |
\end_layout

\begin_layout LyX-Code
      [data <dset0>[,<dset1>,...]]}
\end_layout

\begin_layout LyX-Code
	[sieve <#> [random [sieveseed <#>]]] [loadpairdist] [savepairdist] [pairdist
 <file>]
\end_layout

\begin_layout LyX-Code
    [pairwisecache {mem | none}] [includesieveincalc] [pwrecalc]
\end_layout

\begin_layout LyX-Code
  Output options:
\end_layout

\begin_layout LyX-Code
	[out <cnumvtime>] [gracecolor] [summary <summaryfile>] [info <infofile>]
\end_layout

\begin_layout LyX-Code
	[summarysplit <splitfile>] [splitframe <comma-separated frame list>]
\end_layout

\begin_layout LyX-Code
    [bestrep {cumulative|centroid|cumulative_nosieve}] [savenreps <#>]
\end_layout

\begin_layout LyX-Code
    [clustersvtime <filename> cvtwindow <window size>]
\end_layout

\begin_layout LyX-Code
	[cpopvtime <file> [normpop | normframe] [lifetime]]
\end_layout

\begin_layout LyX-Code
    [sil <silhouette file prefix>] [assignrefs [refcut <rms>] [refmask <mask>]]
\end_layout

\begin_layout LyX-Code
  Coordinate output options:
\end_layout

\begin_layout LyX-Code
	[ clusterout <trajfileprefix> [clusterfmt <trajformat>] ]
\end_layout

\begin_layout LyX-Code
	[ singlerepout <trajfilename> [singlerepfmt <trajformat>] ]
\end_layout

\begin_layout LyX-Code
	[ repout <repprefix> [repfmt <repfmt>] [repframe] ]
\end_layout

\begin_layout LyX-Code
    [ avgout <avgprefix> [avgfmt <avgfmt>] ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[crdset
\begin_inset space ~
\end_inset

<crd
\begin_inset space ~
\end_inset

set>] Name of previously generated COORDS data set.
 If not specified the default COORDS set will be used unless 
\series bold
nocoords
\series default
 has been specified.
\end_layout

\begin_layout Description
[nocoords] Do not use a COORDS data set; distance metrics that require coordinat
es and coordiante output will be disabled.
\end_layout

\begin_layout Standard
Algorithms:
\end_layout

\begin_layout Description
hieragglo (Default) Use hierarchical agglomerative (bottom-up) approach.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[epsilon
\begin_inset space ~
\end_inset

<e>] Finish clustering when minimum distance between clusters is greater
 than 
\series bold
<e>
\series default
.
\end_layout

\begin_layout Description
[clusters
\begin_inset space ~
\end_inset

<n>] Finish clustering when 
\series bold
<n>
\series default
 clusters remain.
\end_layout

\begin_layout Description
[
\series bold
linkage]
\series default
 Single-linkage; use the shortest distance between members of two clusters.
\end_layout

\begin_layout Description
[
\series bold
averagelinkage]
\series default
 Average-linkage (default); use the average distance between members of
 two clusters.
\end_layout

\begin_layout Description

\series bold
[complete]
\series default
 Complete-linkage; use the maximum distance between members of two clusters.
\end_layout

\begin_layout Description
[epsilonplot
\begin_inset space ~
\end_inset

<file>] Write number of clusters vs epsilon to 
\series bold
<file>
\series default
.
\end_layout

\begin_layout Description
[includesieved_cdist] Include sieved frames in final cluster distance calculatio
n (
\bar under
may be very slow
\bar default
).
\end_layout

\end_deeper
\begin_layout Description
dbscan Use DBSCAN clustering algorithm of Ester et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Ester96"
literal "true"

\end_inset


\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
minpoints
\begin_inset space ~
\end_inset

<n> Minimum number of points required to form a cluster.
\end_layout

\begin_layout Description
epsilon
\begin_inset space ~
\end_inset

<e> Distance cutoff between points for forming a cluster.
\end_layout

\begin_layout Description
[sievetoframe] When restoring sieved frames, compare frame to every frame
 in a cluster instead of the centroid; slower but more accurate.
\end_layout

\begin_layout Description
[kdist
\begin_inset space ~
\end_inset

<k>] Generate K-dist plot for help in determining DBSCAN parameters (see
 below).
\end_layout

\begin_layout Description
[kfile
\begin_inset space ~
\end_inset

<prefix>] Prefix for K-dist plot file.
\end_layout

\end_deeper
\begin_layout Description
dpeaks Use the density peaks algorithm of Rodriguez and Laio
\begin_inset CommandInset citation
LatexCommand citep
key "Rodriguez2014"
literal "true"

\end_inset


\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
epsilon
\begin_inset space ~
\end_inset

<e> Cutoff for determining local density in Angstroms.
\end_layout

\begin_layout Description
[noise] If specified, treat all points within epsilon of another cluster
 as noise.
\end_layout

\begin_layout Description
[dvdfile
\begin_inset space ~
\end_inset

<density_vs_dist_file>] File to write density versus minimum distance to
 point with next highest density.
 This can be used to determine appropriate cutoffs for distance and density
 in a subsequent step with 
\series bold
choosepoints
\series default
 
\series bold
manual
\series default
.
\end_layout

\begin_layout Description
[choosepoints
\begin_inset space ~
\end_inset

{manual
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

auto}] Specify whether clusters will be chosen based on specified distance/densi
ty cutoffs, or automatically.
 If not specified only the density vs distance file will be written and
 no clustering will be performed.
 Currently 
\series bold
manual
\series default
 is recommended.
\end_layout

\begin_layout Description
[distancecut
\begin_inset space ~
\end_inset

<distcut>]
\begin_inset space ~
\end_inset

[densitycut
\begin_inset space ~
\end_inset

<densitycut>] If 
\series bold
choosepoints
\series default
 
\series bold
manual
\series default
, points with minimum distance greather than or equal to <distcut> and density
 greater than or equal to <densitycut> will be chosen.
\end_layout

\begin_layout Description
[runavg
\begin_inset space ~
\end_inset

<runavg
\begin_inset space ~
\end_inset

file>] If 
\series bold
choosepoints
\series default
 
\series bold
automatic
\series default
, the calculated running average of density versus distance will be written
 to <runavg file>.
\end_layout

\begin_layout Description
[deltafile
\begin_inset space ~
\end_inset

<file>] If 
\series bold
choosepoints
\series default
 
\series bold
automatic
\series default
, distance minus the running average for each point will be written to this
 file.
\end_layout

\begin_layout Description
[gauss] Calculate density with Gaussian kernels instead of using discrete
 density.
\end_layout

\end_deeper
\begin_layout Description
kmeans Use K-means clustering algorithm.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
clusters
\begin_inset space ~
\end_inset

<n> Finish clustering when number of clusters is 
\series bold
<n>
\series default
.
\end_layout

\begin_layout Description
[randompoint] Randomize initial set of points used (recommended).
\end_layout

\begin_layout Description
[kseed
\begin_inset space ~
\end_inset

<seed>] Random number generator seed for 
\series bold
randompoint
\series default
.
\end_layout

\begin_layout Description
[maxit
\begin_inset space ~
\end_inset

<iteration>] Algorithm will run until frames no longer change clusters of
 <iteration> iterations are reached (default 100).
\end_layout

\end_deeper
\begin_layout Description
readtxt|readinfo No clustering - read in previous cluster results.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
infofile
\begin_inset space ~
\end_inset

<file> Cluster info file to read.
\end_layout

\end_deeper
\begin_layout Standard
Distance Metric Options:
\end_layout

\begin_layout Description
[rms
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

srmsd[<mask>]] (Default 
\series bold
rms
\series default
) Distance between frames calculated via best-fit coordinate RMSD using
 atoms in 
\series bold
<mask>
\series default
.
 If 
\series bold
srmsd
\series default
 specified use symmetry-corrected RMSD (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_symmrmsd"

\end_inset

).
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[mass] Mass-weight the RMSD.
\end_layout

\begin_layout Description
[nofit] Do not fit structures onto each other prior to calculating RMSD.
\end_layout

\end_deeper
\begin_layout Description
dme
\begin_inset space ~
\end_inset

[<mask>] Distance between frames calculated using distance-RMSD (aka DME,
 
\series bold
\emph on
distrmsd
\series default
\emph default
) using atoms in 
\series bold
<mask>
\series default
.
\end_layout

\begin_layout Description
[data
\begin_inset space ~
\end_inset

<dset0>[,<dset1>,...] Distance between frames calculated using specified data
 set(s) (Euclidean distance).
\end_layout

\begin_layout Description
[sieve
\begin_inset space ~
\end_inset

<#>] Perform clustering only for every 
\series bold
<#>
\series default
 frame.
 After clustering, all other frames will be added to clusters.
\end_layout

\begin_layout Description
[random] When 
\series bold
sieve
\series default
 is specified, select initial frames to cluster randomly.
\end_layout

\begin_layout Description
[sieveseed
\begin_inset space ~
\end_inset

<#>] Seed for random sieving; if not set the wallclock time will be used.
\end_layout

\begin_layout Description
[pairdist
\begin_inset space ~
\end_inset

<file>] File to use for loading/saving pairwise distances.
\end_layout

\begin_layout Description
[loadpairdist] Load pairwise distances from 
\series bold
<file>
\series default
 (CpptrajPairDist if pairdist not specified).
\end_layout

\begin_layout Description
[savepairdist] Save pairwise distances from 
\series bold
<file>
\series default
 (CpptrajPairDist if pairdist not specified).
 NOTE: If sieving was performed only the calculated distances are saved.
\end_layout

\begin_layout Description
[pairwisecache
\begin_inset space ~
\end_inset

{mem
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

disk
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

none}] Cache pairwise distance data in memory (default), to disk, or disable
 pairwise caching.
 No caching will save memory but be extremely slow.
 Caching to disk will likely be slow unless writing to a fast storage device
 (e.g.
 SSD) - data is saved to a file named 'CpptrajPairwiseCache'.
\end_layout

\begin_layout Description
[includesieveincalc] Include sieved frames when calculating within-cluster
 average (
\bar under
may be very slow
\bar default
).
\end_layout

\begin_layout Description
[pwrecalc] If a loaded pairwise distance file does not match the current
 setup, force recalculation.
\end_layout

\begin_layout Standard
Output Options:
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<cnumvtime>] Write cluster # vs frame to 
\series bold
<cnumvtime>
\series default
.
 Algorithms that calculate noise (e.g.
 DBSCAN) will assign noise points a value of -1.
\end_layout

\begin_layout Description
[gracecolor] Instead of cluster # vs frame, write cluster# + 1 (corresponding
 to colors used by XMGRACE) vs frame.
 Cluster #s larger than 15 are given the same color.
 Algorithms that calculate noise (e.g.
 DBSCAN) will assign noise points a color of 0 (blank).
\end_layout

\begin_layout Description
[summary
\begin_inset space ~
\end_inset

<summaryfile>] Summarize each cluster with format '#Cluster Frames Frac
 AvgDist Stdev Centroid AvgCDist':
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
#Cluster Cluster number starting from 0 (0 is most populated).
\end_layout

\begin_layout Description
Frames # of frames in cluster.
\end_layout

\begin_layout Description
Frac Size of cluster as fraction of total trajectory.
\end_layout

\begin_layout Description
AvgDist Average distance between points in the cluster.
\end_layout

\begin_layout Description
Stdev Standard deviation of points in the cluster.
\end_layout

\begin_layout Description
Centroid Frame # of structure in cluster that has the lowest cumulative
 distance to every other point.
\end_layout

\begin_layout Description
AvgCDist Average distance of this cluster to every other cluster.
\end_layout

\end_deeper
\begin_layout Description
[info
\begin_inset space ~
\end_inset

<infofile>] Write ptraj-like cluster information to 
\series bold
<infofile>
\series default
.
 This file has format:
\begin_inset Newline newline
\end_inset

#Clustering: <X> clusters <N> frames
\begin_inset Newline newline
\end_inset

#Cluster <I> has average-distance-to-centroid <AVG>
\begin_inset Newline newline
\end_inset

...
\begin_inset Newline newline
\end_inset

#DBI: <DBI>
\begin_inset Newline newline
\end_inset

#pSF: <PSF>
\begin_inset Newline newline
\end_inset

#Algorithm: <algorithm-specific info>
\begin_inset Newline newline
\end_inset

<Line for cluster 0>
\begin_inset Newline newline
\end_inset

...
\begin_inset Newline newline
\end_inset

#Representative frames: <representative frame list>
\begin_inset Newline newline
\end_inset

Where <X> is the number of clusters, <N> is the number of frames clustered,
 <I> ranges from 0 to <X>-1, <AVG> is the average distance of all frames
 in that cluster to the centroid, <DBI> is the Davies-Bouldin Index, <pSF>
 is the pseudo-F statistic, and <representative frame list> contains the
 frame # of the representative frame (i.e.
 closest to the centroid) for each cluster.
 Each cluster has a line made up of characters (one for each frame) where
 '.' means 'not in cluster' and 'X' means 'in cluster'.
\end_layout

\begin_layout Description
[summarysplit
\begin_inset space ~
\end_inset

<splitfile>] Summarize each cluster based on which of its frames fall in
 portions of the trajectory specified by splitframe with format '#Cluster
 Total Frac C# Color NumInX ...
 FracX ...
 FirstX':
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
#Cluster Cluster number starting from 0 (0 is most populated).
\end_layout

\begin_layout Description
Total # of frames in cluster.
\end_layout

\begin_layout Description
Frac Size of cluster as a fraction of the total trajectory.
\end_layout

\begin_layout Description
C# Grace color number.
\end_layout

\begin_layout Description
Color Text description of the color (based on standard XMGRACE coloring).
\end_layout

\begin_layout Description
NumInX Number of frames in Xth portion of the trajectory.
\end_layout

\begin_layout Description
FracX Fraction of frames in Xth portion of the trajectory.
\end_layout

\begin_layout Description
FirstX Frame in the Xth portion of the trajectory where the cluster is first
 observed.
\end_layout

\end_deeper
\begin_layout Description
[splitframe
\begin_inset space ~
\end_inset

<frame>] For 
\series bold
summarysplit
\series default
, frame or comma-separated list of frames to split the trajectory at, e.g.
 '100,200,300'.
\end_layout

\begin_layout Description
[bestrep
\begin_inset space ~
\end_inset

{cumulative|centroid|cumulative_nosieve}] Method for choosing cluster representa
tive frames.
\end_layout

\begin_deeper
\begin_layout Description
cumulative Choose by lowest cumulative distance to all other frames in cluster.
 Default when not sieving.
\end_layout

\begin_layout Description
centroid Choose by lowest distance to cluster centroid.
 Default when sieving.
\end_layout

\begin_layout Description
cumulative_nosieve Choose by lowest cumulative distance to all other frames,
 ignoring sieved frames.
\end_layout

\end_deeper
\begin_layout Description
[savenreps
\begin_inset space ~
\end_inset

<#>] Number of best representative frames to choose (default 1).
\end_layout

\begin_layout Description
[clustersvtime
\begin_inset space ~
\end_inset

<filename>] Write number of unique clusters observed in a given time window
 to <filename>.
\end_layout

\begin_layout Description
[cvtwindow
\begin_inset space ~
\end_inset

<windowsize>] Window size for 
\series bold
clustersvtime
\series default
 output.
\end_layout

\begin_layout Description
[cpopvtime
\begin_inset space ~
\end_inset

<file>
\begin_inset space ~
\end_inset

[normpop
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

normframe]] Write cluster population vs time to 
\series bold
<file>
\series default
; if 
\series bold
normpop
\series default
 specified normalize each cluster to 1.0; if 
\series bold
normframe
\series default
 specified normalize cluster populations by number of frames.
\end_layout

\begin_layout Description
[sil
\begin_inset space ~
\end_inset

<prefix>] Write average cluster silhouette value for each cluster to '<prefix>.cl
uster.dat' and cluster silhouette value for each individual frame to '<prefix>.fra
me.dat'.
\end_layout

\begin_layout Description
assignrefs In 
\series bold
summary
\series default
/
\series bold
summarysplit
\series default
, assign clusters to loaded representative structures if RMSD to that reference
 is less than specified cutoff.
\end_layout

\begin_deeper
\begin_layout Description
[refcut
\begin_inset space ~
\end_inset

<rms>] RMSD cutoff in Angstroms.
\end_layout

\begin_layout Description
[refmask
\begin_inset space ~
\end_inset

<mask>] Mask to use for RMSD calculation.
 If not specified the default mask is all heavy atoms.
\end_layout

\end_deeper
\begin_layout Standard
Coordinate Output Options:
\end_layout

\begin_layout Description
clusterout
\begin_inset space ~
\end_inset

<trajfileprefix> Write frames in each cluster to files named <trajfileprefix>.cX,
 where X is the cluster number.
\end_layout

\begin_layout Description
clusterfmt
\begin_inset space ~
\end_inset

<trajformat> Format keyword for clusterout (default Amber Trajectory).
\end_layout

\begin_layout Description
singlerepout
\begin_inset space ~
\end_inset

<trajfilename> Write all representative frames to single trajectory named
 <trajfilename>.
\end_layout

\begin_layout Description
singlerepfmt
\begin_inset space ~
\end_inset

<trajformat> Format keyword for singlerepout (default Amber Trajectory).
\end_layout

\begin_layout Description
repout
\begin_inset space ~
\end_inset

<repprefix> Write representative frames to separate files named <repprefix>.X.<ext
>, where X is the cluster number and <ext> is a format-specific filename
 extension.
\end_layout

\begin_layout Description
repfmt
\begin_inset space ~
\end_inset

<trajformat> Format keyword for repout (default Amber Trajectory).
\end_layout

\begin_layout Description
repframe Include representative frame number in 
\series bold
repout
\series default
 filename.
\end_layout

\begin_layout Description
avgout
\begin_inset space ~
\end_inset

<avgprefix> Write average structure for each cluster to separate files named
 <avgprefix>.X.<ext>, where X is the cluster number and <ext> is a format-specific
 filename extension.
\end_layout

\begin_layout Description
avgfmt
\begin_inset space ~
\end_inset

<trajformat> Format keyword for avgout.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[Pop] Cluster population vs time; index corresponds to cluster number.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note cluster population vs time data sets are not generated until the analysis
 has been run.
\end_layout

\begin_layout Standard
Cluster input frames using the specified clustering algorithm and distance
 metric.
 In order to speed up clustering of large trajectories, the 
\series bold
sieve
\series default
 keyword can be used.
 In addition, subsequent clustering calculations can be sped up by writing/readi
ng calculated pair distances between each frame to/from a file specified
 by 
\series bold
pairdist
\series default
 (or 
\begin_inset Quotes eld
\end_inset

CpptrajPairDist
\begin_inset Quotes erd
\end_inset

 if 
\series bold
pairdist
\series default
 not specified).
\end_layout

\begin_layout Standard
Example: cluster on a specific distance:
\end_layout

\begin_layout LyX-Code
distance endToEnd :1 :255
\end_layout

\begin_layout LyX-Code
cluster data endToEnd clusters 10 epsilon 3.0 summary summary.dat info info.dat
\end_layout

\begin_layout Standard
Example: cluster on the CA atoms of residues 2-10 using average-linkage,
 stopping when either 3 clusters are reached or the minimum distance between
 clusters is 4.0, writing the cluster number vs time to 
\begin_inset Quotes eld
\end_inset

cnumvtime.dat
\begin_inset Quotes erd
\end_inset

 and a summary of each cluster to 
\begin_inset Quotes eld
\end_inset

avg.summary.dat
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
cluster C1 :2-10 clusters 3 epsilon 4.0 out cnumvtime.dat summary avg.summary.dat
\end_layout

\begin_layout Subsubsection*
Clustering Metrics
\end_layout

\begin_layout Standard
The Davies-Bouldin Index (DBI) measures sum over all clusters of the within
 cluster scatter to the between cluster separation; 
\series bold
the smaller the DBI, the better
\series default
.
 The DBI is defined as the average, for all clusters X, of fred, where fred(X)
 = max, across other clusters Y, of (Cx + Cy)/dXY.
 Here Cx is the average distance from points in X to the centroid, similarly
 Cy, and dXY is the distance between cluster centroids.
 
\end_layout

\begin_layout Standard
The pseudo-F statistic (pSF) is another measure of clustering goodness.
 It is intended to capture the 'tightness' of clusters, and is in essence
 a ratio of the mean sum of squares between groups to the mean sum of squares
 within group.
 
\series bold
High values are good
\series default
.
 Generally, one selects a cluster-count that gives a peak in the pseudo-f
 statistic.
 Formula: A/B, where A = (T - P)/(G-1), and B = P / (n-G).
 Here n is the number of points, G is the number of clusters, T is the total
 distance from the all-data centroid, and P is the sum (for all clusters)
 of the distances from the cluster centroid.
 
\end_layout

\begin_layout Standard
The cluster silhouette is a measure of how well each point fits within a
 cluster.
 Values of 1 indicate the point is very similar to other points in the cluster,
 i.e.
 it is well-clustered.
 Values of -1 indicate the point is dissimilar and may fit better in a neighbori
ng cluster.
 Values of 0 indicate the point is on a border between two clusters.
 
\end_layout

\begin_layout Subsubsection*
Hints for setting DBSCAN parameters with 'kdist'
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_dbscan_Hints"

\end_inset


\end_layout

\begin_layout Standard
It is not always obvious what parameters to set for DBSCAN.
 You can get a rough idea of what to set 'mindist' and 'epsilon' to by generatin
g a so-called "K-dist" plot with the 'kidst <k>' option.
 The K-dist plot shows for each point (X axis) the Kth farthest distance
 (Y axis), sorted by decreasing distance.
 You supply the same distance metric and sieve parameters you want to use
 for the actual clustering, but nothing else.
 For example:
\end_layout

\begin_layout LyX-Code
cluster C0 dbscan kdist 4 rms :1-4@CA sieve 10 loadpairdist pairdist CpptrajPair
Dist
\end_layout

\begin_layout Standard
The K-dist plot will be named <prefix>.<k>.dat, with the default prefix being
 'Kdist' (in this case the file name would be Kdist.4.dat).
 The K-dist plot usually looks like a curve with an initially steep slope
 that gradually decreases.
 Around where the initial part of the curve starts to flatten out (indicating
 an increas in density) is around where epsilon should be set; minpoints
 is set to whatever <k> was.
 It has been suggested that the shape of the K-dist curve doesn't change
 too much after Kdist=4, but users are encouraged to experiment.
\end_layout

\begin_layout Subsubsection*
Using 'dpeaks' clustering
\end_layout

\begin_layout Standard
The 'dpeaks' (density peaks) algorithm attempts to find clusters by identifying
 points in high density regions which are far from other points of high
 density
\begin_inset CommandInset citation
LatexCommand citep
key "Rodriguez2014"
literal "true"

\end_inset

.
 There are two ways these points can be chosen.
 The first and recommended way is manually.
 In this method, clustering if first run with 
\series bold
choosepoints
\series default
 not specified to generate a plot containing density versus minimum distance
 to point with next highest density (the decision graph).
 Appropriate cut offs for distance and density can then be chosen based
 on visual inspection; cutoffs should be chosen so that they select points
 that have both a high density and a high distance to point with next highest
 density.
 Clustering can then be run again with 
\series bold
distancecut
\series default
 and 
\series bold
densitycut
\series default
 set.
\end_layout

\begin_layout Standard
The second way is automatically; cpptraj will attempt to identify outliers
 in the density vs distance plot based on distance from the running average.
 Although this only requires a single pass, this method of choosing points
 is not well-tested and currently not recommended.
\end_layout

\begin_layout Subsubsection*
The CpptrajPairDist file format
\end_layout

\begin_layout Standard
The CpptrajPairDist file is binary; the exact format depends on what version
 of cpptraj generated the file (since earlier versions had no concept of
 'sieve').
 The CpptrajPairDist file starts with a 4 byte header containing the characters
 'C' 'T' 'M' followed by the version number.
 A quick way to figure out the version is to use the linux 'od' command
 to output the first 4 bytes as hexadecimal, e.g.:
\end_layout

\begin_layout LyX-Code
$ od -t x1 -N 4 CpptrajPairDist 0000000 43 54 4d 02
\end_layout

\begin_layout Standard
So the CpptrajPairDist file version in the above example is 2.
\end_layout

\begin_layout Standard
The next few numbers describe the matrix size and depend on the version.
\end_layout

\begin_layout Description
Version
\begin_inset space ~
\end_inset

0: Two 4-byte integers: # of rows and # of elements.
 
\end_layout

\begin_layout Description
Version
\begin_inset space ~
\end_inset

1: Two 8-byte unsigned integers (equivalent to size_t on most systems):
 # of rows and # of elements.
 
\end_layout

\begin_layout Description
Version
\begin_inset space ~
\end_inset

2: Three 8 byte unsigned integers: original # of rows, actual # of rows,
 and sieve value.
\end_layout

\begin_layout Standard
This is followed by the actual matrix data, stored as a single array of
 floats (4 bytes).
 For versions 1 and 2 the number of elements is explicitly stored.
 For version 2, to calculate the number of matrix elements you need to read:
\end_layout

\begin_layout LyX-Code
Elements = (actual_rows * (actual_rows - 1)) / 2
\end_layout

\begin_layout Standard
The cluster pair-distance matrix is an upper-right triangle matrix without
 the diagonal (in row-major order), so the first element is the distance
 between elements 0 and 1, the second is between elements 0 and 2, etc.
\end_layout

\begin_layout Standard
In version 2 files, if the sieve value is greater than 1 that means original_row
s > actual_rows and there is an additional array of characters original_nrows
 long, with 'T' if the row is being ignored (i.e.
 it was sieved out) and 'F' if the row is active (i.e.
 is active in the actual pairwise-distance matrix).
\end_layout

\begin_layout Standard
The code that cpptraj uses to read in CpptrajPairDist files is in ClusterMatrix:
:LoadFile() (ClusterMatrix.cpp).
\end_layout

\begin_layout Subsection
cphstats
\end_layout

\begin_layout LyX-Code
cphstats <pH sets> [name <name>] [statsout <statsfile>] [deprot]
\end_layout

\begin_layout LyX-Code
     	[fracplot [fracplotout <file>]]
\end_layout

\begin_deeper
\begin_layout Description
<pH
\begin_inset space ~
\end_inset

sets> Previously read in pH data sets.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<name> Output set name.
\end_layout

\begin_layout Description
statsout
\begin_inset space ~
\end_inset

<statsfile> Write pH statistics to <statsfile>
\end_layout

\begin_layout Description
deprot If specified, calculate fraction deprotonated instead of protonated.
\end_layout

\begin_layout Description
fracplot If specified, calculate fraction protonated/deprotonated vs pH.
\end_layout

\begin_deeper
\begin_layout Description
fracplotout
\begin_inset space ~
\end_inset

<file> File to write fraction plots to.
\end_layout

\end_deeper
\begin_layout Standard
Data Sets Generated
\end_layout

\begin_layout Description
<name>[Frac]:<idx> Fraction protonated/deprotonated for residue <idx>.
\end_layout

\end_deeper
\begin_layout Standard
Calculate statistics for constant pH simulation data previously read in
 with 
\series bold
\emph on
readdata
\series default
\emph default
 (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_cphdatafile"

\end_inset

).
 Statistics are calculated for each residue at each input pH.
 Output format is as follows:
\end_layout

\begin_layout LyX-Code
Solvent pH is <pH>
\end_layout

\begin_layout LyX-Code
<res name> <res num> : Offset <off> Pred <pred> Frac Prot <frac> Transitions
 <#trans>
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
Average total molecular protonation: <avg>
\end_layout

\begin_layout Standard
Where 
\series bold
<off>
\series default
 is offset from predicted, 
\series bold
<pred>
\series default
 is predicted pH, and <#trans> is the number of transitions.
 A line is printed for each residue.
 This functionality is similar to the 
\series bold
cphstats
\series default
 utility that comes with Amber (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "sec:cphstats"

\end_inset

).
\end_layout

\begin_layout Standard
Note that data from constant pH REMD must be sorted prior to use with 
\series bold
\emph on
cphstats
\series default
\emph default
.
 See the 
\series bold
\emph on
readensembledata
\series default
\emph default
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_readensembledata"

\end_inset

) and 
\series bold
\emph on
sortensembledata
\series default
\emph default
 (
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_sortensembledata"

\end_inset

) commands for more details.
\end_layout

\begin_layout Standard
For example, to read in constant pH data from constant pH REMD, sort and
 analyze:
\end_layout

\begin_layout LyX-Code
readensembledata ExplicitRemd/cpout.001 cpin ExplicitRemd/cpin name PH
\end_layout

\begin_layout LyX-Code
sortensembledata PH
\end_layout

\begin_layout LyX-Code
runanalysis cphstats PH[*] statsout stats.dat fracplot fracplotout frac.agr
 deprot
\end_layout

\begin_layout Subsection
corr | correlationcoe
\end_layout

\begin_layout LyX-Code
corr
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
corr
\end_layout

\end_inset

 out <outfilename> <dataset1> [<dataset2>]
\end_layout

\begin_layout LyX-Code
     [lagmax <lag>] [nocovar] [direct]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
out
\begin_inset space ~
\end_inset

<outfilename>
\series default
 Write results to file named <outfilename>.
 The datasets must have the same # of data points.
\end_layout

\begin_layout Description

\series bold
<dataset1>
\begin_inset space ~
\end_inset

[<dataset2>]
\series default
 Data set(s) to calculate correlation for.
 If one dataset or the same dataset is given twice, the auto-correlation
 will be calculated, otherwise cross-correlation.
\end_layout

\begin_layout Description

\series bold
[lagmax]
\series default
 Maximum lag to calculate for.
 If not specified all frames are used.
\end_layout

\begin_layout Description

\series bold
[nocovar]
\series default
 Do not calculate covariance.
\end_layout

\begin_layout Description

\series bold
[direct]
\series default
 Do not use FFTs to calculate correlation; this will be much slower.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[<dataset1>] (Auto-correlation) The aspect will be the name of each of the
 input data set.
\end_layout

\begin_layout Description
[<dataset1>-<dataset2>] (Cross-correlation) The aspect will be the names
 of each of the input data sets joined by a dash ('-').
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[coeff] Correlation coefficient.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the auto-correlation function for data set named <dataset1> or
 the cross-correlation function for data sets named <dataset1> and <dataset2>
 up to <lagmax> frames (all if 
\series bold
lagmax
\series default
 not specified), writing the result to file specified by 
\series bold
out
\series default
.
 The two datasets must have the same # of datapoints.
 
\end_layout

\begin_layout Subsection
crank | crankshaft
\end_layout

\begin_layout LyX-Code
crank {angle | distance} <dsetname1> <dsetname2> info <string>
\end_layout

\begin_layout LyX-Code
      [out <filename>] [results <resultsfile>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
angle Analyze angle data sets.
\end_layout

\begin_layout Description
distance Analyze distance data sets.
\end_layout

\begin_layout Description
<dsetname1> Data set to analyze.
\end_layout

\begin_layout Description
<dsetname2> Data set to analyze.
\end_layout

\begin_layout Description
info
\begin_inset space ~
\end_inset

<string> Title the analysis <string>.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write frame-vs-bin to <filename>.
\end_layout

\begin_layout Description
[results
\begin_inset space ~
\end_inset

<resultsfile>] Write results to <resultsfile>.
\end_layout

\end_deeper
\begin_layout Standard
Calculate crankshaft motion between two data sets.
\end_layout

\begin_layout Subsection
crdfluct
\end_layout

\begin_layout LyX-Code
[crdset <crd set>] [<mask>] [out <filename>] [window <size>] [bfactor]
\end_layout

\begin_layout Standard
Calculate atomic positional fluctuations for atoms in 
\series bold
<mask>
\series default
 over windows of size 
\series bold
<size>
\series default
.
 If 
\series bold
bfactor
\series default
 is specified, the fluctuations are weighted by 
\begin_inset Formula $\frac{8}{3}\pi^{2}$
\end_inset

(similar but not necessarily equivalent to crystallographic B-factor calculation
).
 Units are Å, or Å
\begin_inset script superscript

\begin_layout Plain Layout
2
\end_layout

\end_inset

x
\begin_inset Formula $\frac{8}{3}\pi^{2}$
\end_inset

 if 
\series bold
bfactor
\series default
 specified.
\end_layout

\begin_layout Subsection
crosscorr
\end_layout

\begin_layout LyX-Code
crosscorr [name <dsetname>] <dsetarg0> [<dsetarg1> ...] [out <filename>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<dsetname>]
\series default
 The resulting upper-triangle matrix is stored with name <dsetname>.
\end_layout

\begin_layout Description

\series bold
<dsetarg0>
\begin_inset space ~
\end_inset

[<dsetarg1>
\begin_inset space ~
\end_inset

...]
\series default
 Argument(s) specifying datasets to be used.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>]
\series default
 Write results to file named <filename>.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the Pearson product-moment correlation coefficients between all
 specified datasets.
\end_layout

\begin_layout Subsection
curvefit
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_curvefit"

\end_inset


\end_layout

\begin_layout LyX-Code
curvefit <dset> { <equation>  |
\end_layout

\begin_layout LyX-Code
                  name <dsname> {gauss | nexp <m> [form {mexp|mexpk|mexpk_penalt
y}} }
\end_layout

\begin_layout LyX-Code
         [AX=<value> ...] [out <outfile>] [resultsout <results>]
\end_layout

\begin_layout LyX-Code
         [maxit <max iterations>] [tol <tolerance>]
\end_layout

\begin_layout LyX-Code
         [outxbins <NX> outxmin <xmin> outxmax <xmax>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dset> Data set to fit.
\end_layout

\begin_layout Description
<equation> Equation to fit of form <Variable> = <Equation>.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

 for more details on equations 
\emph on
cpptraj
\emph default
 understands.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<dsname> Final data set name (required if using 
\series bold
nexp
\series default
 or 
\series bold
gauss
\series default
).
\end_layout

\begin_layout Description
gauss Fit to Gaussian of form A0 * exp( -((X - A1)^2) / (2 * A2^2) )
\end_layout

\begin_layout Description
nexp
\begin_inset space ~
\end_inset

<m> Fit to specified number of exponentials.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
form
\begin_inset space ~
\end_inset

<type> Fit to specified exponential form:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
mexp Multi-exponential, SUM(m)[ An * exp(An+1 * X)]
\end_layout

\begin_layout Description
mexpk Multi-exponential plus constant, A0 + SUM(m)[An * exp(An+1 * X)]
\end_layout

\begin_layout Description
mexpk_penalty Same as mexpk except sum of prefactors constrained to 1.0 and
 exponential constants constrained to < 0.0.
\end_layout

\end_deeper
\end_deeper
\begin_layout Description
AX=<value> Value of any constants in specified equation with X starting
 from 0 (can specify more than one).
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<outfile> Write resulting fit curve to <outfile>.
\end_layout

\begin_layout Description
resultsout
\begin_inset space ~
\end_inset

<results> Write details of the fit to <results> (default STDOUT).
\end_layout

\begin_layout Description
maxit
\begin_inset space ~
\end_inset

<max
\begin_inset space ~
\end_inset

iterations> Number of iterations to run curve fitting algorithm (default
 50).
\end_layout

\begin_layout Description
tol
\begin_inset space ~
\end_inset

<tolerance> Curve-fitting tolerance (default 1E-4).
\end_layout

\begin_layout Description
outxbins
\begin_inset space ~
\end_inset

<NX> Number of points to use when generating final curve (default same number
 of points as input data set).
\end_layout

\begin_layout Description
outxmin
\begin_inset space ~
\end_inset

<xmin> Minimum X value to use for final curve (default same number of points
 as input data set).
\end_layout

\begin_layout Description
outxmax
\begin_inset space ~
\end_inset

<xmax> Maximum X value to use for final curve (default same number of points
 as input data set).
\end_layout

\end_deeper
\begin_layout Standard
Perform non-linear curve fitting for the specified data set using the Levenberg-
Marquardt algorithm.
 Any equation form that cpptraj understands (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

) can be used, or several preset forms can be used.
 Similar to Grace (http://plasma-gate.weizmann.ac.il/Grace/), an equation can
 contain constants for curve fitting termed AX (with X being a numerical
 digit, one for each constant), and is assigned to a variable which then
 becomes a data set.
 For example, to fit a curve to data from a file named Data.dat to a data
 set named 'FitY':
\end_layout

\begin_layout LyX-Code
readdata Data.dat
\end_layout

\begin_layout LyX-Code
runanalysis curvefit Data.dat 
\backslash

\end_layout

\begin_layout LyX-Code
  "FitY = (A0 * exp(X * A1)) + (A2 * exp(X * A3))" 
\backslash

\end_layout

\begin_layout LyX-Code
  A0=1 A1=-1 A2=1 A3=-1 
\backslash

\end_layout

\begin_layout LyX-Code
  out curve.dat tol 0.0001 maxit 50
\end_layout

\begin_layout Standard
To perform the same fit but to a multi-exponential curve with two exponentials:
\end_layout

\begin_layout LyX-Code
readdata Data.dat
\end_layout

\begin_layout LyX-Code
runanalysis curvefit Data.dat nexp 2 name FitY 
\backslash

\end_layout

\begin_layout LyX-Code
  A0=1 A1=-1 A2=1 A3=-1 
\backslash

\end_layout

\begin_layout LyX-Code
  out curve1.dat tol 0.0001 maxit 50
\end_layout

\begin_layout Subsection
diagmatrix
\begin_inset CommandInset label
LatexCommand label
name "subsec:diagmatrix-|-analyze"

\end_inset


\end_layout

\begin_layout LyX-Code
diagmatrix <name> [out <filename>] [thermo [outthermo <filename>]]
\end_layout

\begin_layout LyX-Code
           [vecs <#>] [name <modesname>] [reduce] 
\end_layout

\begin_layout LyX-Code
           [nmwiz [nmwizvecs <#>] [nmwizfile <filename>]]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
<name>
\series default
 Name of symmetric matrix to diagonalize.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>]
\series default
 Write results to <filename>.
\end_layout

\begin_layout Description

\series bold
[thermo
\begin_inset space ~
\end_inset

[outthermo
\begin_inset space ~
\end_inset

<filename>]]
\series default
 Mass-weighted covariance (mwcovar) matrix only.
 Calculate entropy, heat capacity, and internal energy from the structure
 of a molecule (average coordinates, see above) and its vibrational frequencies
 using standard statistical mechanical formulas for an ideal gas.
 Results are written to <filename> if specified, otherwise results are written
 to STDOUT.
 
\series bold
Note that this converts the units of the calculated eigenvalues to frequencies
 (cm
\begin_inset script superscript

\begin_layout Plain Layout
-1
\end_layout

\end_inset

)
\series default
.
\end_layout

\begin_layout Description

\series bold
[vecs
\begin_inset space ~
\end_inset

<#>]
\series default
 Number of eigenvectors to calculate.
 Default is 0, which is only allowed when 'thermo' is specified.
\end_layout

\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<modesname>]
\series default
 Store resulting modes data set with name <modesname>.
\end_layout

\begin_layout Description

\series bold
[reduce]
\series default
 Covariance (covar/mwcovar/distcovar) matrices only.
 For coordinate covariance (covar/mwcovar) matrices, each eigenvector element
 is reduced via Ei = Eix^2 + Eiy^2 + Eiz^2.
 For distance covariance (distcovar) the eigenvectors are reduced by taking
 the sum of the squares of each row.
 See Abseher & Nilges, JMB 1998, 279, 911-920 for further details.
 They may be used to compare results from PCA in distance space with those
 from PCA in cartesian-coordinate space.
\end_layout

\begin_layout Description
[nmwiz] Generate output in 
\emph on
.nmd
\emph default
 format file for viewing with NMWiz
\begin_inset CommandInset citation
LatexCommand citep
key "Bakan11"
literal "true"

\end_inset

.
 See http://prody.csb.pitt.edu/tutorials/nmwiz_tutorial/ for further details.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[nmwizvecs
\begin_inset space ~
\end_inset

<#>] Number of vectors to write out for nmwiz output, starting with the
 lowest frequency mode (default 20).
\end_layout

\begin_layout Description
[nmwizfile
\begin_inset space ~
\end_inset

<filename>] Name of nmwiz file to write to (default 'out.nmd').
\end_layout

\begin_layout Description
[nmwizmask
\begin_inset space ~
\end_inset

<mask>] Mask of atoms corresponding to eigenvectors - should be the same
 one used to generate the matrix.
\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
Calculate eigenvectors and eigenvalues for the specified symmetric matrix.
 This is followed by Principal Component Analysis (in cartesian coordinate
 space in the case of a covariance matrix or in distance space in the case
 of a distance-covariance matrix), or Quasiharmonic Analysis (in the case
 of a mass-weighted covariance matrix).
 Diagonalization of distance, correlation, idea, and ired matrices are also
 possible.
 Eigenvalues are given in cm
\begin_inset Formula $^{-1}$
\end_inset

 in the case of a mass-weighted covariance matrix and in the units of the
 matrix elements in all other cases.
 In the case of a mass-weighted covariance matrix, the eigenvectors are
 mass-weighted.
\end_layout

\begin_layout Standard
For quasi-harmonic analysis the input must be a mass-weighted covariance
 matrix.
 Thermodynamic quantities are calculated based on statistical mechanical
 formulae that assume the input system is oscillating in a single energy
 well: see Statistical Thermodynamics by D.
 A.
 McQuarrie, particularly chapters 4, 5, and 6 for more details.
\begin_inset CommandInset citation
LatexCommand citep
key "McQuarrie1973"
literal "true"

\end_inset

 For an in-depth discussion of the accuracy of thermodynamic parameters
 obtained via quasi-harmonic analysis see Chang et al..
\begin_inset CommandInset citation
LatexCommand citep
key "Chang2005"
literal "true"

\end_inset


\end_layout

\begin_layout Standard
Note that the maximum number of non-zero eigenvalues obtainable depends
 on the number of frames used to generate the input matrix; the number of
 frames should be equal to or greater than the number of columns in the
 matrix in order to obtain all eigenmodes.
\end_layout

\begin_layout Standard
Results may include average coordinates (in the case of covar, mwcovar,
 correl), average distances (in the case of distcovar), main diagonal elements
 (in the case of idea and ired), eigenvalues, and eigenvectors.
\end_layout

\begin_layout Standard
For example, in the following a mass-weighted covariance matrix of all atoms
 is generated and stored internally with the name mwcvmat; the matrix itself
 is written to mwcvmat.dat.
 Subsequently, the first 20 eigenmodes of the matrix are calculated and
 written to evecs.dat, and quasiharmonic analysis is performed at 300.0 K,
 with the results written to thermo.dat.
\end_layout

\begin_layout LyX-Code
matrix mwcovar name mwcvmat out mwcvmat.dat
\end_layout

\begin_layout LyX-Code
diagmatrix mwcvmat out evecs.dat vecs 20 
\backslash

\end_layout

\begin_layout LyX-Code
           thermo outthermo thermo.dat temp 300.0
\end_layout

\begin_layout Subsubsection*
Output Format
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

modes
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

evecs
\begin_inset Quotes erd
\end_inset

 output file is a text file with the following format:
\end_layout

\begin_layout LyX-Code
 [Reduced] Eigenvector file: <Type> nmodes <#> width <width>
\end_layout

\begin_layout LyX-Code
  <# Avg Coords> <Eigenvector Size>
\end_layout

\begin_layout LyX-Code
<Average Coordinates>
\end_layout

\begin_layout Standard
Where <Type> is a string identifying what kind of matrix the eigenvectors/eigenv
alues were determined from, nmodes is how many eigenvectors are in the file,
 and <Average Coordinates> are in lines 7 columns wide, with each element
 having width specified by <width>.
 Then for each eigenvector:
\end_layout

\begin_layout LyX-Code
 ****
\end_layout

\begin_layout LyX-Code
<Eigenvector#> <Eigenvalue>
\end_layout

\begin_layout LyX-Code
<Eigenvector Coordinates>
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout Standard
Where <Eigenvector Coordinates> are in lines 7 columns wide, with each element
 having width specified by <width>.
\end_layout

\begin_layout Subsection
divergence
\end_layout

\begin_layout LyX-Code
divergence ds1 <ds1> ds2 <ds2>
\end_layout

\begin_layout Standard
Calculate Kullback-Leibler divergence between specified data sets.
\end_layout

\begin_layout Subsection
evalplateau
\end_layout

\begin_layout LyX-Code
evalplateau [name <set out name>] [tol <tol>] [valacut <valacut>]
\end_layout

\begin_layout LyX-Code
        	[initpct <initial pct>] [finalpct <final pct>]
\end_layout

\begin_layout LyX-Code
        	[chisqcut <chisqcut>] [slopecut <slopecut>] [maxit <maxit>]
\end_layout

\begin_layout LyX-Code
        	[out <outfile>] [resultsout <resultsfile>] [statsout <statsfile>]
\end_layout

\begin_layout LyX-Code
        	<input set args> ...
\end_layout

\begin_deeper
\begin_layout Description
name
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

out
\begin_inset space ~
\end_inset

name>] Name for output data sets.
\end_layout

\begin_layout Description
tol
\begin_inset space ~
\end_inset

<tol> Curve fitting tolerance.
 Default 0.00001.
\end_layout

\begin_layout Description
valacut
\begin_inset space ~
\end_inset

<valacut> (
\begin_inset Quotes eld
\end_inset

Value A cutoff
\begin_inset Quotes erd
\end_inset

) Cutoff for last half average vs estimated long term value.
 Default 0.01.
\end_layout

\begin_layout Description
initpct
\begin_inset space ~
\end_inset

<initial
\begin_inset space ~
\end_inset

pct> The initial percentage of data to use for the initial density guess.
 Default 1%.
\end_layout

\begin_layout Description
finalpct
\begin_inset space ~
\end_inset

<final
\begin_inset space ~
\end_inset

pct> The final percentatge of data to use for the final density guess.
 Default 50%.
\end_layout

\begin_layout Description
chisqcut
\begin_inset space ~
\end_inset

<chisqcut> Curve fit chi-squared cutoff.
 Defualt 0.5.
\end_layout

\begin_layout Description
slopecut
\begin_inset space ~
\end_inset

<slopecut> Final slope of fitted curve cutoff.
 Default 0.000001.
\end_layout

\begin_layout Description
maxit
\begin_inset space ~
\end_inset

<maxit> Maximum number of iterations to perform during curve fit.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<outfile> File to write data and fitted curve to.
\end_layout

\begin_layout Description
resultsout
\begin_inset space ~
\end_inset

<resultsfile> File to write plateau results to.
\end_layout

\begin_layout Description
statsout
\begin_inset space ~
\end_inset

<statsfile> File to write curve fitting stats to.
\end_layout

\begin_layout Description
<input
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

args> Data sets to evaluate plateau for.
\end_layout

\begin_layout Standard
Data Sets Created
\end_layout

\begin_layout Description
<name>[A0] The A0 (initial density) values.
\end_layout

\begin_layout Description
<name>[A1] The A1 (rate constant) values.
\end_layout

\begin_layout Description
<name>[A2] The A2 (final density) values.
\end_layout

\begin_layout Description
<name>[OneA1] One over the A1 (rate constant) values.
\end_layout

\begin_layout Description
<name>[corr] Curve fit correlation.
\end_layout

\begin_layout Description
<name>[vala] Difference between last half average of data vs final density
 (A2).
\end_layout

\begin_layout Description
<name>[chisq] Chi-squared of the curve fit.
\end_layout

\begin_layout Description
<name>[pltime] Plateau time (time at which all cutoffs satisfied).
\end_layout

\begin_layout Description
<name>[fslope] Final slope of fitted curve.
\end_layout

\begin_layout Description
<name>[name] Input set legend.
\end_layout

\begin_layout Description
<name>[result] Final result: yes, no, err (error).
\end_layout

\end_deeper
\begin_layout Standard
Attempt to determine if data has 
\begin_inset Quotes eld
\end_inset

plateaued
\begin_inset Quotes erd
\end_inset

, i.e.
 stopped changing significantly by the end of the set.
 Currently the defaults are set up to evaluate density data as part of the
 system preparation protocol described by Roe & Brooks.
\begin_inset CommandInset citation
LatexCommand citep
key "Roe2020"
literal "true"

\end_inset


\end_layout

\begin_layout Subsection
fft
\end_layout

\begin_layout LyX-Code
fft <dset0> [<dset1> ...] [out <outfile>] [name <outsetname>] [dt <samp_int>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
<dset0>
\begin_inset space ~
\end_inset

[<dset1
\begin_inset space ~
\end_inset

...]
\series default
 Argument(s) specifying datasets to be used.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<outfile>]
\series default
 Write results to file named <outfile>.
\end_layout

\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<outsetname>]
\series default
 The resulting transform will be stored with name <outsetname>.
\end_layout

\begin_layout Description

\series bold
[dt
\begin_inset space ~
\end_inset

<samp_int>]
\series default
 Set the sampling interval (default is 1.0).
\end_layout

\end_deeper
\begin_layout Standard
Perform fast Fourier transform (FFT) on specified data set(s).
 If more than 1 data set, they must all have the same size.
\end_layout

\begin_layout Subsection
hausdorff
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_hausdorff"

\end_inset


\end_layout

\begin_layout LyX-Code
hausdorff <set arg0> [<set arg1> ...]
\end_layout

\begin_layout LyX-Code
          [outtype {basic|trimatrix nrows <#>|fullmatrix nrows <#> [ncols
 <#>]}]
\end_layout

\begin_layout LyX-Code
      	[name <output set name>] [out <file>] [outab <file>] [outba <file>]
 
\end_layout

\begin_deeper
\begin_layout Description
<set
\begin_inset space ~
\end_inset

arg0>
\begin_inset space ~
\end_inset

...
 Input matrix data set(s) to calculate Hausdorff distance(s) for.
\end_layout

\begin_layout Description
[outtype] Specify the output type.
\end_layout

\begin_deeper
\begin_layout Description
basic Output the Hausdorff distance for each input matrix as scalar 1D data.
\end_layout

\begin_layout Description
trimatrix
\begin_inset space ~
\end_inset

nrows
\begin_inset space ~
\end_inset

<#> Output Hausdorff distances for each input matrix as a 2D upper-triangular
 matrix with the given number of rows.
 Must have (nrows * (nrows-1)) / 2 input sets.
\end_layout

\begin_layout Description
fullmatrix
\begin_inset space ~
\end_inset

nrows
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

ncols
\begin_inset space ~
\end_inset

<#> Output Hausdorff distances for each input matrix as a full matrix with
 the given number of columns and rows.
 If 
\series bold
ncols
\series default
 is not given, use 
\series bold
nrows
\series default
.
 Must have nrows * ncols input sets.
\end_layout

\end_deeper
\begin_layout Description
[name
\begin_inset space ~
\end_inset

<output
\begin_inset space ~
\end_inset

set
\begin_inset space ~
\end_inset

name>] Name of output data sets.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write Hausdorff distances to.
\end_layout

\begin_layout Description
[outab
\begin_inset space ~
\end_inset

<file>] File to write directed A->B Hausdorff distances to.
\end_layout

\begin_layout Description
[outba
\begin_inset space ~
\end_inset

<file>] File to write directed B->A Hausdorff distances to.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the symmetric Hausdorff distance for one or more matrices.
 The results can be saved as an array or as a full or upper-triangular matrix
 with the specified dimensions.
 The Hausdorff distance H is determined from:
\end_layout

\begin_layout LyX-Code
H = max{dH(A,B), dH(B,A)]
\end_layout

\begin_layout Standard
Where dH(A,B) is the directed Hausdorff distance between sets A and B, etc.
 Colloquially speaking, the directed Hausdorff distance between A and B
 is determined as follows:
\end_layout

\begin_layout Enumerate
What is the closest approach (distance) of each point in A to any point
 in B?
\end_layout

\begin_layout Enumerate
Choose the largest distance from among those distances.
\end_layout

\begin_layout Standard
If desired, the output can be formed into a matrix, which can be useful
 e.g.
 when doing multiple 2D rms calculations on different regions of a trajectory.
 For example, the following input divides a 100 frame trajectory into 10
 frame chunks, calcultes the 2D RMS matrix for each chunk, then performs
 Hausdorff analysis on the resulting matrices and forms a full output matrix.
\end_layout

\begin_layout LyX-Code
parm ../DPDP.parm7
\end_layout

\begin_layout LyX-Code
for beg=1;beg<100;beg+=10 end=10;end+=10 i=1;i++
\end_layout

\begin_layout LyX-Code
  loadcrd ../DPDP.nc 
\backslash
$beg 
\backslash
$end name Chunk
\backslash
$i 
\end_layout

\begin_layout LyX-Code
done 
\end_layout

\begin_layout LyX-Code
# Do the 2drms in chunks 
\end_layout

\begin_layout LyX-Code
for i=1;i<11;i++ 
\end_layout

\begin_layout LyX-Code
  for j=1;j<11;j++ 
\end_layout

\begin_layout LyX-Code
    2drms crdset Chunk
\backslash
$i reftraj Chunk
\backslash
$j M
\backslash
$i.
\backslash
$j 
\end_layout

\begin_layout LyX-Code
  done
\end_layout

\begin_layout LyX-Code
done 
\end_layout

\begin_layout LyX-Code
hausdorff M* out hausdorff.fullmatrix.gnu title hausdorff.matrix.gnu 
\backslash

\end_layout

\begin_layout LyX-Code
  outtype fullmatrix nrows 10
\end_layout

\begin_layout LyX-Code
runanalysis
\end_layout

\begin_layout Standard
This type of calculation lends itself well to parallelization.
 The 
\series bold
parallelanalysis
\series default
 command can be used to run all the 
\series bold
2drms
\series default
 calculations in parallel with MPI-enabled cpptraj:
\end_layout

\begin_layout LyX-Code
parm ../DPDP.parm7
\end_layout

\begin_layout LyX-Code
for beg=1;beg<100;beg+=10 end=10;end+=10 i=1;i++
\end_layout

\begin_layout LyX-Code
  loadcrd ../DPDP.nc 
\backslash
$beg 
\backslash
$end name Chunk
\backslash
$i 
\end_layout

\begin_layout LyX-Code
done 
\end_layout

\begin_layout LyX-Code
# Do the 2drms in chunks 
\end_layout

\begin_layout LyX-Code
for i=1;i<11;i++ 
\end_layout

\begin_layout LyX-Code
  for j=1;j<11;j++ 
\end_layout

\begin_layout LyX-Code
    2drms crdset Chunk
\backslash
$i reftraj Chunk
\backslash
$j M
\backslash
$i.
\backslash
$j 
\end_layout

\begin_layout LyX-Code
  done
\end_layout

\begin_layout LyX-Code
done
\end_layout

\begin_layout LyX-Code
parallelanalysis sync
\end_layout

\begin_layout LyX-Code
runanalysis hausdorff M* out hausdorff.fullmatrix.gnu title hausdorff.matrix.gnu
 
\backslash

\end_layout

\begin_layout LyX-Code
  outtype fullmatrix nrows 10
\end_layout

\begin_layout Subsection
hist | histogram
\end_layout

\begin_layout LyX-Code
hist
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
hist
\end_layout

\end_inset

 <dataset_name>[,<min>,<max>,<step>,<bins>] ...
\end_layout

\begin_layout LyX-Code
	[free <temperature>] [norm | normint] [gnu] [circular] out <filename>
\end_layout

\begin_layout LyX-Code
	[amd <amdboost_data>] [name <outputset name>]
\end_layout

\begin_layout LyX-Code
    [traj3d <file> [trajfmt <format>] [parmout <file>]]
\end_layout

\begin_layout LyX-Code
	[min <min>] [max <max>] [step <step>] [bins <bins>] [nativeout]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
<dataset_name>[,<min>,<max>,<step>,<bins>]
\series default
 Dataset(s) to be histogrammed.
 Optionally, the min, max, step, and/or number of bins can be specified
 for this dimension after the dataset name separated by commas.
 It is only necessary to specify the step or number of bins, an asterisk
 '*' indicates the value should be calculated from available data.
 
\end_layout

\begin_layout Description

\series bold
[free
\begin_inset space ~
\end_inset

<temperature>]
\series default
 If specified, estimate free energy from bin populations using 
\begin_inset Formula $G_{i}=-k_{B}T\ln\left(\frac{N_{i}}{N_{Max}}\right)$
\end_inset

, where K
\begin_inset script subscript

\begin_layout Plain Layout
B
\end_layout

\end_inset

 is Boltzmann's constant, T is the temperature specified by <temperature>,
 N
\begin_inset script subscript

\begin_layout Plain Layout
i
\end_layout

\end_inset

 is the population of bin i and N
\begin_inset script subscript

\begin_layout Plain Layout
Max
\end_layout

\end_inset

 is the population of the most populated bin.
 Bins with no population are given an artificial barrier equivalent to a
 population of 0.5.
\end_layout

\begin_layout Description

\series bold
[norm]
\series default
 If specified, normalize bin populations so the sum over all bins equals
 1.0.
\end_layout

\begin_layout Description
[normint] Normalize bin populations so the integral over them is 1.0.
\end_layout

\begin_layout Description

\series bold
[gnu]
\series default
 Internal output only; data will be gnuplot-readable, i.e.
 a space will be printed after the highest order coordinate cycles.
\end_layout

\begin_layout Description

\series bold
[circular]
\series default
 Internal output only; data will wrap, i.e.
 an extra bin will be printed before min and after max in each direction.
 Useful for e.g.
 dihedral angles.
\end_layout

\begin_layout Description

\series bold
out
\begin_inset space ~
\end_inset

<filename>
\series default
 Write results to file named <filename>.
\end_layout

\begin_layout Description
[amd
\begin_inset space ~
\end_inset

<amdboost_data>] Reweight bins using AMD boost energies in data set <amdboost_da
ta> (in KT).
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<outputset
\begin_inset space ~
\end_inset

name>] Output histogram data set name.
\end_layout

\begin_layout Description
[traj3d
\begin_inset space ~
\end_inset

<file>
\begin_inset space ~
\end_inset

[trajfmt
\begin_inset space ~
\end_inset

<format>]] (3D histograms only) Write a pseudo-trajectory of the 3 data
 sets (1 atom) to <file> with format <format>.
\end_layout

\begin_layout Description
[parmout
\begin_inset space ~
\end_inset

<file>] (3D histograms only) Write a topology corresponding to the pseudo-trajec
tory to <file>.
\end_layout

\begin_layout Description

\series bold
[min
\begin_inset space ~
\end_inset

<min>]
\series default
 Default minimum to bin if not specified.
\end_layout

\begin_layout Description

\series bold
[max
\begin_inset space ~
\end_inset

<max>]
\series default
 Default max to use if not specified.
\end_layout

\begin_layout Description

\series bold
[step
\begin_inset space ~
\end_inset

<step>]
\series default
 Default step size to use if not specified.
\end_layout

\begin_layout Description

\series bold
[bins
\begin_inset space ~
\end_inset

<bins>]
\series default
 Default bin size to use if not specified.
\end_layout

\begin_layout Description
[nativeout] Do not use cpptraj data file framework; only necessary for writing
 out histograms with > 3 dimensions.
\end_layout

\end_deeper
\begin_layout Standard
Create an N-dimensional histrogram, where N is the number of datasets specified.
 For 1-dimensional histograms the xmgrace '.agr' file format is recommended;
 for 2-dimensional hisograms the gnuplot '.gnu' file format is recommended;
 for all other dimensions plot formatting is disabled and the routine uses
 its own internal output format; this is also enabled if 
\series bold
gnu
\series default
 or 
\series bold
circular
\series default
 is specified.
\end_layout

\begin_layout Standard
For example, to create a two dimensional histogram of two datasets 'phi'
 and 'psi':
\end_layout

\begin_layout LyX-Code
dihedral phi :2@C :3@N :3@CA :3@C
\end_layout

\begin_layout LyX-Code
dihedral psi :3@N :3@CA :3@C :4@N
\end_layout

\begin_layout LyX-Code
hist phi,-180,180,*,72 psi,-180,180,*,72 out hist.gnu
\end_layout

\begin_layout Standard
In this case the number of bins (72) has been specified for each dimension
 and '*' has been given for the step size, indicating it should be calculated
 based on min/max/bins.
 The following 'hist' command is equivalent:
\end_layout

\begin_layout LyX-Code
hist phi psi min -180 max 180 bins 72 out hist.gnu
\end_layout

\begin_layout Subsection
integrate
\end_layout

\begin_layout LyX-Code
integrate <dset0> [<dset1> ...] [out <outfile>] [intout <intfile>]
\end_layout

\begin_layout LyX-Code
          [name <name>]
\end_layout

\begin_deeper
\begin_layout Description
<dset0>
\begin_inset space ~
\end_inset

[<dset1>
\begin_inset space ~
\end_inset

...] Data set(s) to integrate.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfile>] If specified, write cumulative sum curves to <outfile>.
\end_layout

\begin_layout Description
[intout
\begin_inset space ~
\end_inset

<intfile>] If specified, write final integral values to <intfile>.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<name>] Output data set(s) name.
\end_layout

\begin_layout Standard
DataSets Created:
\end_layout

\begin_layout Description
<name> Final integral values, 1 for each input data set (indexed from 0).
\end_layout

\begin_layout Description
<name>[Sum]:<idx> Cumulative sum curves if 
\series bold
out
\series default
 was specified, 1 for each input data set (indexed from 0).
\end_layout

\end_deeper
\begin_layout Standard
Integrate specified data set(s) using trapezoid integration.
 If 
\series bold
'out'
\series default
 is specified write cumulative sum curves to <outfile>.
 If 
\series bold
'intout'
\series default
 is specified write final integral values for each set to <intfile>.
\end_layout

\begin_layout Subsection
ired
\end_layout

\begin_layout LyX-Code
ired [relax freq <MHz> [NHdist <distnh>] [noefile <noefilename>]]
\end_layout

\begin_layout LyX-Code
     [order <order>] [orderparamfile <orderfilename>]
\end_layout

\begin_layout LyX-Code
 	tstep <tstep> tcorr <tcorr> out <filename> [norm] [drct]
\end_layout

\begin_layout LyX-Code
 	modes <modesname> [name <output sets name>] [ds2matrix <file>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
[relax
\begin_inset space ~
\end_inset

freq
\begin_inset space ~
\end_inset

<MHz>]
\series default
 Should only be used when ired vectors represent N-H bonds; calculate correlatio
n times 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none

\begin_inset Formula $\tau_{m}$
\end_inset


\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
\lang american
 
\lang english
for each eigenmode and relaxation rates and NOEs for each N-H vector.
 'freq <MHz>' (required) is the Lamor frequency of the measurement.
\end_layout

\begin_deeper
\begin_layout Description
[NHdist
\begin_inset space ~
\end_inset

<distnh>] Specifies the length of the NH bond in Angstroms (default is 1.02).
\end_layout

\begin_layout Description
[noefile
\begin_inset space ~
\end_inset

<noefilename>] File to write the T1, T2, and NOE data to.
\end_layout

\end_deeper
\begin_layout Description
[order
\begin_inset space ~
\end_inset

<order>] Order of the Legendre polynomials to use when calculating spherical
 harmonics (default 2).
\end_layout

\begin_layout Description
[orderparamfile
\begin_inset space ~
\end_inset

<orderfilename>] File to write the S2 data to.
\end_layout

\begin_layout Description

\series bold
[tstep
\begin_inset space ~
\end_inset

<tstep>]
\series default
 Time between snapshots in ps (default 1.0).
\end_layout

\begin_layout Description

\series bold
[tcorr
\begin_inset space ~
\end_inset

<tcorr>]
\series default
 Maximum time to calculate correlation functions for in ps (default 10000.0).
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>
\series default
 Name of file to write plateau and TauM data.
 Also the prefix for the .cmt and .cjt files (see below).
\end_layout

\begin_layout Description

\series bold
[norm]
\series default
 Normalize all correlation functions, i.e., 
\begin_inset Formula $C_{l}(t=0)=P_{l}(t=0)=1.0$
\end_inset

.
\end_layout

\begin_layout Description

\series bold
[drct]
\series default
 Use the direct method to calculate correlations instead of FFT; this will
 be much slower.
\end_layout

\begin_layout Description

\series bold
modes
\begin_inset space ~
\end_inset

<modesname>
\series default
 Name of previously calculated eigenmodes corresponding to IRED vectors.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<name>] Output data set name.
\end_layout

\begin_layout Description
[ds2matrix
\begin_inset space ~
\end_inset

<file>] If specified, write full delta*S^2 matrix (# IRED vector rows by
 # eigenmodes columns) to <file>.
\end_layout

\begin_layout Standard
DataSets Created:
\end_layout

\begin_layout Description
<name>[S2] S2 order parameters for each vector.
\end_layout

\begin_layout Description
<name>[Plateau] Plateau values for each vector.
\end_layout

\begin_layout Description
<name>[TauM] TauM values for each vector.
\end_layout

\begin_layout Description
<name>[dS2] Full delta*S^2 matrix.
\end_layout

\begin_layout Description
<name>[T1] T1 relaxation values for each vector.
\end_layout

\begin_layout Description
<name>[T2] T2 relaxation values for each vector.
\end_layout

\begin_layout Description
<name>[NOE] NOEs for each vector.
\end_layout

\begin_layout Description
<name>[Cm(t)]:X Cm(t) function for vector X.
\end_layout

\begin_layout Description
<name>[Cj(t)]:X Cj(t) function for vector X.
\end_layout

\end_deeper
\begin_layout Standard
Peform IRED
\begin_inset CommandInset citation
LatexCommand citep
key "Prompers02a"
literal "true"

\end_inset

 analysis on previously defined IRED vectors (see vector ired) using eigenmodes
 calculated from those vectors with a previous 'diagmatrix' command.
 The number of defined IRED vectors should match the number of eigenmodes
 calculated.
 Autocorrelation functions for each mode and the corresponding correlation
 time 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none

\begin_inset Formula $\tau_{m}$
\end_inset


\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
\lang american
 
\lang english
will be written to <filename>.cmt.
 Autocorrelation functions for each vector will be written to <filename>.cjt.
 Relaxation rates and NOEs for each N-H vector will be written to <filename>
 or added to the the end of the standard output.
 For the calculation of
\lang american
 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none
\lang english

\begin_inset Formula $\tau_{m}$
\end_inset


\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
\lang american
 
\lang english
the normalized correlation functions and only the first third of the analyzed
 time steps will be used.
 For further information on the convergence of correlation functions see
 [Schneider, Brünger, Nilges, 
\emph on
J.
 Mol.
 Biol.

\emph default
 
\series bold
285
\series default
, 727 (1999)].
\end_layout

\begin_layout Subsubsection*
Example of IRED in Cpptraj
\end_layout

\begin_layout Standard
In 
\shape italic
cpptraj
\shape default
, IRED analysis
\begin_inset CommandInset citation
LatexCommand citep
key "Prompers02a"
literal "true"

\end_inset

 can now be performed in one pass (as opposed to the two passes previously
 required in 
\shape italic
ptraj
\shape default
).
 First, IRED vectors are defined (in this case for N-H bonds) and an IRED
 matrix is calculated and analyzed.
 The IRED vectors are then projected onto the calculated IRED eigenvectors
 in the 
\series bold
\shape italic
ired
\series default
\shape default
 analysis command to calculate the time correlation functions.
 If the parameter 
\shape italic
order
\shape default
 is specified, order parameters based on IRED are calculated.
 By specifying the 
\shape italic
relax
\shape default
 parameter, relaxation rates and NOEs can be obtained for each N-H vector.
 Note that the order of the IRED matrix should be the same as the one specified
 for IRED analysis.
\end_layout

\begin_layout LyX-Code
# Define N-H IRED vectors
\end_layout

\begin_layout LyX-Code
vector v0 @5 ired @6
\end_layout

\begin_layout LyX-Code
vector v1 @7 ired @8
\end_layout

\begin_layout LyX-Code
...
\end_layout

\begin_layout LyX-Code
vector v5 @15 ired @16
\end_layout

\begin_layout LyX-Code
vector v6 @17 ired @18`
\end_layout

\begin_layout LyX-Code
# Define IRED matrix using all previous IRED vectors
\end_layout

\begin_layout LyX-Code
matrix ired name matired order 2
\end_layout

\begin_layout LyX-Code
# Diagonalize IRED matrix
\end_layout

\begin_layout LyX-Code
diagmatrix matired vecs 6 out ired.vec name ired.vec
\end_layout

\begin_layout LyX-Code
# Perform IRED analysis
\end_layout

\begin_layout LyX-Code
ired relax NHdist 1.02 freq 500.0 tstep 1.0 tcorr 100.0 out v0.out 
\backslash

\end_layout

\begin_layout LyX-Code
     noefile noe order 2
\end_layout

\begin_layout Subsection
kde
\end_layout

\begin_layout LyX-Code
kde <dataset> [bandwidth <bw>] [out <file>] [name <dsname>]
\end_layout

\begin_layout LyX-Code
    [min <min>] [max <max] [step <step>] [bins <bins>] [free]
\end_layout

\begin_layout LyX-Code
    [kldiv <dsname2> [klout <outfile>]] [amd <amdboost_data>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[bandwidth
\begin_inset space ~
\end_inset

<bw>] Bandwidth to use for KDE; if not specified bandwidth will be estimated
 using the normal distribution approximation.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] Output file name.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<dsname>] Output data set name.
\end_layout

\begin_layout Description
[min
\begin_inset space ~
\end_inset

<min>] Minimum bin.
\end_layout

\begin_layout Description
[max
\begin_inset space ~
\end_inset

<max>] Maximum bin.
\end_layout

\begin_layout Description
[step
\begin_inset space ~
\end_inset

<step>] Bin step.
\end_layout

\begin_layout Description
[bins
\begin_inset space ~
\end_inset

<bins>] Number of bins.
\end_layout

\begin_layout Description
[free] Calculate free energy from bin population.
\end_layout

\begin_layout Description
[kldiv
\begin_inset space ~
\end_inset

<dsname2>
\begin_inset space ~
\end_inset

[klout
\begin_inset space ~
\end_inset

<outfile>]] Calculate Kullback-Leibler divergence over time of <dataset>
 distribution to <dsname2> distribution.
 Output to <outfile> if 
\series bold
klout
\series default
 specified.
\end_layout

\begin_layout Description
[amd
\begin_inset space ~
\end_inset

<amdboost_data>] Reweight histogram using AMD boost data from data set <amdboost
_data> (in KT).
\end_layout

\end_deeper
\begin_layout Standard
Histogram 1D data set using a Gaussian kernel density estimator.
\end_layout

\begin_layout Subsection
lifetime
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-lifetime"

\end_inset


\end_layout

\begin_layout LyX-Code
lifetime [out <filename>] <dsetarg0> [ <dsetarg1> ...
 ]
\end_layout

\begin_layout LyX-Code
     	[window <windowsize> [name <setname>]] [averageonly]
\end_layout

\begin_layout LyX-Code
     	[cumulative] [delta] [cut <cutoff>] [greater | less] [rawcurve]
\end_layout

\begin_layout LyX-Code
         [fuzz <fuzzcut>] [nosort]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>]
\series default
 Write results to file named <filename>, and lifetime curves to 'crv.<filename>'.
 If performing windowed lifetime analysis, <filename> contains the fraction
 present over time windows, and 2 additional files are written: 'max.<filename>',
 containing max lifetime over windows, and 'avg.<filename>', containing average
 lifetime over windows.
\end_layout

\begin_layout Description

\series bold
<dsetarg0>
\begin_inset space ~
\end_inset

[<dsetarg1>
\begin_inset space ~
\end_inset

...]
\series default
 Argument(s) specifying datasets to be used.
\end_layout

\begin_layout Description

\series bold
[window
\begin_inset space ~
\end_inset

<windowsize>]
\series default
 Size of window (in frames) over which to calculate lifetimes/averages.
 If not specified lifetime/average will be calculated over all frames.
\end_layout

\begin_layout Description

\series bold
[name
\begin_inset space ~
\end_inset

<setname>]
\series default
 Store results in data sets with name <setname>.
\end_layout

\begin_layout Description

\series bold
[averageonly] 
\series default
Just calculate averages (no lifetime analysis).
\end_layout

\begin_layout Description

\series bold
[cumulative]
\series default
 Calculate cumulative lifetimes/averages over windows.
\end_layout

\begin_layout Description
[delta] Calculate difference from previous window average.
\end_layout

\begin_layout Description

\series bold
[cut
\begin_inset space ~
\end_inset

<cutoff>]
\series default
 Cutoff to use when determining if data is 'present' (default 0.5).
\end_layout

\begin_layout Description
[greater] Data is considered present when above the cutoff (default).
\end_layout

\begin_layout Description
[less] Data is considered present when below the cutoff.
\end_layout

\begin_layout Description
[rawcurve] Do not normalize lifetime curves to 1.0.
\end_layout

\begin_layout Description
[fuzz
\begin_inset space ~
\end_inset

<fuzzcut>] Ignore changes in lifetime state that are less than <fuzzcut>
 frames.
\end_layout

\begin_layout Description
[nosort] Do not sort data sets by name.
\end_layout

\begin_layout Standard
Data Sets Created:
\end_layout

\begin_layout Description
<setname> Number of lifetimes for each set, or if 
\series bold
window
\series default
 specified fraction present over time windows.
\end_layout

\begin_layout Description
<setname>[max] Maximum lifetime for each set, or if 
\series bold
window
\series default
 specified maximum lifetime over time windows.
\end_layout

\begin_layout Description
<setname>[avg] Average lifetime for each set, or if 
\series bold
window
\series default
 specified average lifetime over time windows.
\end_layout

\begin_layout Description
<setname>[curve] Lifetime curves.
\end_layout

\begin_layout Standard
The following are created only if 
\series bold
window
\series default
 not specified:
\end_layout

\begin_layout Description
<setname>[frames] Total number of frames lifetime present for each set.
\end_layout

\begin_layout Description
<setname>[name] Name of each set.
\end_layout

\end_deeper
\begin_layout Standard
Perform lifetime analysis for specified data sets.
 Lifetime data can either be determined for the entire set, or for time
 windows of specified size within the set if 
\series bold
window
\series default
 specified.
\end_layout

\begin_layout Standard
A 
\begin_inset Quotes eld
\end_inset

lifetime
\begin_inset Quotes erd
\end_inset

 is defined as the length of time something remains 'present'; data is considere
d present when above or below a certain cutoff (the default is greater than
 0.5, useful for analysis of 
\series bold
\shape italic
hbond
\series default
\shape default
 time series data).
 For example, in the case of a hydrogen bond 
\series bold
'series'
\series default
 data set, if a hydrogen bond is present during a frame the value is 1,
 otherwise it is 0.
 Given the hbond time series data set {1 1 1 0 1 0 0 0 1 1}, the overall
 fraction present is 0.6.
 However, there are 3 lifetimes of lengths 3, 1, and 2 ({1 1 1}, {1}, and
 {1 1}).
 The maximum lifetime is 3 and the average lifetime is 2.0, i.e.
 (3 + 1 + 2) / 3 lifetimes = 2.0.
 One can also construct a 
\begin_inset Quotes eld
\end_inset

lifetime curve
\begin_inset Quotes erd
\end_inset

, which is constructed as the sum of all individual lifetimes.
 By default these curves are normalized to 1.0, but the raw curve can be
 obtained using the 
\series bold
rawcurve
\series default
 keyword.
 For the example data set here the raw lifetime curve would be 3 frames
 long:
\end_layout

\begin_layout LyX-Code
       1 1 1
\end_layout

\begin_layout LyX-Code
       1
\end_layout

\begin_layout LyX-Code
       1 1
\end_layout

\begin_layout LyX-Code
Curve: 3 2 1
\end_layout

\begin_layout Standard
By default data sets are sorted by name unless 
\series bold
nosort
\series default
 is specified.
 The lifetime command can calculate lifetimes over specific time windows
 by using the 
\series bold
window
\series default
 keyword.
 This can be particularly useful if one wants to get a sense for how lifetimes
 are changing over the course of very long time series data.
 In addition, averages can be calculated instead of lifetimes by specifying
 
\series bold
averageonly
\series default
.
 Cumulative averages over windows can be obtained using the 
\series bold
cumulative
\series default
 keyword, or the change from the average value in the previous window can
 be obtained using the 
\series bold
delta
\series default
 keyword.
\end_layout

\begin_layout Standard
The 
\series bold
fuzz
\series default
 keyword can be used to try and smooth the input data by ignoring changes
 in state that occur for fewer frames than <fuzzcut>.
 For example, in the above example hbond time series data set there is a
 one frame change in state between the first and second lifetimes which
 could be interpreted as a transient breaking of the hydrogen bond.
 Using a <fuzzcut> value of 1, this one frame change in state would be ignored,
 and the data set would effectively appear to lifetime as {1 1 1 1 1 0 0
 0 1 1}.
 The state change between the second and third lifetimes is longer than
 <fuzzcut> (3 frames) and so it would remain.
\end_layout

\begin_layout Standard
If 
\series bold
window
\series default
 is not specified, two files are output: <filename> and crv.<filename>.
 The file <filename> contains overall lifetime stats for each set with format:
\end_layout

\begin_layout LyX-Code
#Set <setname> <setname>[max] <setname>[avg] <setname>[frames] <setname>[name]
\end_layout

\begin_layout Standard
where 
\family typewriter
<setname>
\family default
 denotes the total number of lifetimes, 
\family typewriter
<setname>[max]
\family default
 denotes the maximum lifetime, 
\family typewriter
<setname>[avg] 
\family default
denotes the average lifetime, 
\family typewriter
<setname>[frames]
\family default
 denotes the total number of frames present in all lifetimes, and 
\family typewriter
<setname>[name] 
\family default
is the data set name.
 The file crv.<filename> contains the lifetime curves for each set.
\end_layout

\begin_layout Standard
If 
\series bold
window
\series default
 is specified, four files are output: <filename>, max.<filename>, avg.<filename>,
 and crv.<filename>.
 <filename> contains the fraction 
\begin_inset Quotes eld
\end_inset

present
\begin_inset Quotes erd
\end_inset

 over each time window for each set, max.<filename> contains the maximum
 lifetime in each time window for each set, avg.<filename> contains the average
 lifetime over each window for each set, and crv.<filename> contains the
 overall lifetime curves for each set.
 For window output, Gnuplot format is recommended.
\end_layout

\begin_layout Subsubsection*
Example: hbond lifetime analysis
\end_layout

\begin_layout LyX-Code
parm DPDP.parm7
\end_layout

\begin_layout LyX-Code
trajin DPDP.nc
\end_layout

\begin_layout LyX-Code
hbond HB out hbond.dat @N,H,C,O series uuseries solutehb.agr 
\backslash

\end_layout

\begin_layout LyX-Code
  avgout hbavg.dat printatomnum
\end_layout

\begin_layout LyX-Code
# 'run' is used here to process the trajectory and generate hbond data
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
# Perform lifetime analysis
\end_layout

\begin_layout LyX-Code
runanalysis lifetime HB[solutehb] out lifehb.dat
\end_layout

\begin_layout Standard
Calculate ion lifetimes from hbond over windows of size 100 frames:
\end_layout

\begin_layout LyX-Code
hbond ION out ion.dat solventdonor :WAT solventacceptor :WAT@O series
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
lifetime HB[solventhb] out ion.lifetime.100.gnu window 100
\end_layout

\begin_layout Subsection
lowestcurve
\end_layout

\begin_layout LyX-Code
lowestcurve points <# lowest> [step <stepsize>] <dset0> [<dset1> ...]
\end_layout

\begin_layout LyX-Code
                   [out <file>] [name <setname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<#
\begin_inset space ~
\end_inset

lowest> Number of lowest points in each bin to average over.
\end_layout

\begin_layout Description
[step
\begin_inset space ~
\end_inset

<stepsize>] Bin step size
\end_layout

\begin_layout Description
<dset0>
\begin_inset space ~
\end_inset

[<dset1>
\begin_inset space ~
\end_inset

...] Data set(s) to use.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] File to write lowest curve to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Output lowest curve set name.
\end_layout

\end_deeper
\begin_layout Standard
Calculate a curve of the average of the # lowest points in bins of stepsize.
 Essentially each input data set is binned over bins of stepsize, then the
 lowest <#> points are averaged over for each bin.
\end_layout

\begin_layout Subsection
meltcurve
\end_layout

\begin_layout LyX-Code
meltcurve <dset0> [<dset1> ...] [out <outfile>] [name <outsetname>] cut <cut>
\end_layout

\begin_layout Standard
Calculate melting curve from input data sets (i.e.
 fraction 'folded' for each data set) assuming a simple 2-state transition
 model, using data below <cut>as 'folded' and data above <cut> as 'unfolded'.
\end_layout

\begin_layout Subsection
modes
\end_layout

\begin_layout LyX-Code
modes {fluct|displ|corr|eigenval|trajout|rmsip} name <modesname> [name2
 <modesname>]
\end_layout

\begin_layout LyX-Code
  	[beg <beg>] [end <end>] [bose] [factor <factor>] [calcall]
\end_layout

\begin_layout LyX-Code
  	[out <outfile>] [setname <name>]
\end_layout

\begin_layout LyX-Code
    Options for 'trajout': (Generate pseudo-trajectory)
\end_layout

\begin_layout LyX-Code
  	[trajout <name> parm <name> | parmindex <#>
\end_layout

\begin_layout LyX-Code
  	  [trajoutfmt <format>] [trajoutmask <mask>]
\end_layout

\begin_layout LyX-Code
	    [pcmin <pcmin>] [pcmax <pcmax>] [tmode <mode>]]
\end_layout

\begin_layout LyX-Code
    Options for 'corr': (Calculate dipole correlation)
\end_layout

\begin_layout LyX-Code
  	{ maskp <mask1> <mask2> [...] | mask1 <mask> mask2 <mask> }
\end_layout

\begin_layout LyX-Code
  	parm <name> | parmindex <#>
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
Types of Calculations:
\end_layout

\begin_layout Description

\series bold
fluct
\series default
 RMS fluctuations (X, Y, Z, and total) for each atom across specified normal
 modes.
\end_layout

\begin_layout Description

\series bold
displ
\series default
 Displacement of cartesian coordinates in the X, Y and Z directions for
 each atom across specified normal modes.
\end_layout

\begin_layout Description

\series bold
corr
\series default
 Dipole-dipole correlation functions.
 Must also specify 
\series bold
maskp
\series default
 (see below).
\end_layout

\begin_layout Description
eigenval Calculate eigenvalue fractions.
\end_layout

\begin_layout Description
trajout Create a pseudo-trajectory along the given mode from the average
 structure.
\end_layout

\begin_layout Description
rmsip Calculate the root-mean-square inner product between modes specified
 by 
\series bold
name
\series default
 and 
\series bold
name2
\series default
.
\end_layout

\begin_layout Standard
Options:
\end_layout

\begin_layout Description

\series bold
name
\begin_inset space ~
\end_inset

<modesname>
\series default
 Previously read-in or generated Modes data set name.
\end_layout

\begin_layout Description

\series bold
[beg
\begin_inset space ~
\end_inset

<beg>]
\begin_inset space ~
\end_inset

[end
\begin_inset space ~
\end_inset

<end>]
\series default
 If modes taken from datafile, beginning and end modes to read.
 Default for 
\shape italic
beg
\shape default
 is 7 (which skips the first 6 zero-frequency modes in the case of a normal
 mode analysis); for 
\shape italic
end
\shape default
 it is 50.
\end_layout

\begin_layout Description

\series bold
[bose]
\series default
 Use quantum (Bose) statistics in populating the modes.
\end_layout

\begin_layout Description

\series bold
[factor
\begin_inset space ~
\end_inset

<factor>]
\series default
 multiplicative constant on the amplitude of displacement/pseudo-trajectory,
 default 1.0.
\end_layout

\begin_layout Description
[calcall] If specified use all eigenvectors; otherwise eigenvectors associated
 with zero or negative eigenvalues will be skipped.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<outfile>]
\series default
 File to write data results to.
 If not given results are written to STDOUT.
\end_layout

\begin_layout Description
[setname
\begin_inset space ~
\end_inset

<name>] Output data set name.
\end_layout

\begin_layout Standard
Options for 'trajout':
\end_layout

\begin_layout Description
<name> Output trajectory file name.
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmfile/tag>|parmindex
\begin_inset space ~
\end_inset

<#>] Topology file to use (default first Topology loaded).
\end_layout

\begin_layout Description
[trajoutfmt
\begin_inset space ~
\end_inset

<format>] Output trajectory format.
\end_layout

\begin_layout Description
[trajoutmask
\begin_inset space ~
\end_inset

<mask>] Mask of atoms that correspond to how modes were originally generated.
\end_layout

\begin_layout Description
[pcmin
\begin_inset space ~
\end_inset

<pcmin>] Lowest principal component projection value to use for output trajector
y.
\end_layout

\begin_layout Description
[pcmax
\begin_inset space ~
\end_inset

<pcmax>] Highest principal component projection value to use for output
 trajectory.
\end_layout

\begin_layout Description
[tmode
\begin_inset space ~
\end_inset

<mode>] Mode to generate pseudo-trajectory for.
\end_layout

\begin_layout Standard
Options for 'corr':
\end_layout

\begin_layout Description

\series bold
[maskp
\begin_inset space ~
\end_inset

<mask1>
\begin_inset space ~
\end_inset

<mask2>
\begin_inset space ~
\end_inset

[...]]
\series default
 If 
\series bold
corr
\series default
, pairs of atom masks (
\shape italic
mask1
\shape default
, 
\shape italic
mask2
\shape default
; each pair preceded by 
\begin_inset Quotes eld
\end_inset


\family typewriter
maskp
\family default

\begin_inset Quotes erd
\end_inset

 and each mask defining only a single atom) have to be given that specify
 the atoms for which the correlation functions are desired.
\end_layout

\begin_layout Description
mask1
\begin_inset space ~
\end_inset

<mask>
\begin_inset space ~
\end_inset

mask2
\begin_inset space ~
\end_inset

<mask> Instead of 
\series bold
maskp
\series default
, specify two masks; atoms from the first mask will be paired up with atoms
 from the second mask.
\end_layout

\begin_layout Standard
DataSets Created (fluct)
\end_layout

\begin_layout Description
<name>[rmsX] RMS fluctuations in the X direction.
\end_layout

\begin_layout Description
<name>[rmsY] RMS fluctuations in the Y direction.
\end_layout

\begin_layout Description
<name>[rmsZ] RMS fluctuations in the Z direction.
\end_layout

\begin_layout Description
<name>[rms] Total RMS fluctuations.
\end_layout

\begin_layout Standard
DataSets Created (displ)
\end_layout

\begin_layout Description
<name>[displX] Displacement in X direction.
\end_layout

\begin_layout Description
<name>[displY] Displacement in Y direction.
\end_layout

\begin_layout Description
<name>[displZ] Displacement in Z direction.
\end_layout

\begin_layout Standard
DataSets Created (eigenval)
\end_layout

\begin_layout Description
<name>[Frac] Fraction eigenvalue contributes to overall motion.
\end_layout

\begin_layout Description
<name>[Cumulative] Cumulative fraction.
\end_layout

\begin_layout Description
<name>[Eigenval] Value of eigenvlue.
\end_layout

\begin_layout Standard
DataSets Created (rmsip)
\end_layout

\begin_layout Description
<name> Result of RMSIP calculation.
\end_layout

\end_deeper
\begin_layout Standard
Analyze previously calculated eigenmodes obtained from principal component
 analyses (of covariance matrices) or quasiharmonic analyses (diagmatrix
 analysis command).
 Modes are taken from a previously generated data set (i.e.
 from 
\series bold
\shape italic
diagmatrix
\series default
\shape default
) or read in from a data file with 
\series bold
\shape italic
readdata
\series default
\shape default
.
 By default, classical (Boltzmann) statistics are used in populating the
 modes.
 A possible series of commands would be 
\begin_inset Quotes eld
\end_inset


\family sans
\series bold
matrix
\family typewriter
\series default
 covar
\family default
 
\begin_inset Formula $\vert$
\end_inset

 
\family typewriter
mwcovar
\family default
 ...
\begin_inset Quotes erd
\end_inset

 to generate the matrix, 
\begin_inset Quotes eld
\end_inset


\family typewriter
\series bold
diagmatrix
\family default
\series default
 ...
\begin_inset Quotes erd
\end_inset

 to calculate the modes, and, finally, 
\begin_inset Quotes eld
\end_inset


\family typewriter
\series bold
modes
\family default
\series default
 ...
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Standard
For example, to calculate the RMS fluctuations or displacements of the first
 3 eigenmodes caluclated from a mass-weighted covariance matrix:
\end_layout

\begin_layout LyX-Code
matrix mwcovar name mwcvmat out mwcvmat.dat
\end_layout

\begin_layout LyX-Code
diagmatrix mwcvmat name evecs vecs 5
\end_layout

\begin_layout LyX-Code
modes fluct out rmsfluct.dat name evecs beg 1 end 3
\end_layout

\begin_layout LyX-Code
modes displ out resdispl.dat name evecs beg 1 end 3
\end_layout

\begin_layout Standard
Additionally, dipole-dipole correlation functions for modes obtained from
 principle component analysis or quasiharmonic analysis can be computed.
\end_layout

\begin_layout LyX-Code
modes corr out cffromvec.dat name evecs beg 1 end 3 
\backslash

\end_layout

\begin_layout LyX-Code
      maskp @1 @2 maskp @3 @4 maskp @5 @6
\end_layout

\begin_layout Standard
or
\end_layout

\begin_layout LyX-Code
mode corr out cffromvec.dat name evecs beg 1 end 3 mask1 @1,3,5 mask2 @2,4,6
\end_layout

\begin_layout Standard
If 
\series bold
eigenval
\series default
 is specified, the fraction contribution of each eigenvector to the total
 motion is calculated and output with format:
\end_layout

\begin_layout LyX-Code
#Mode Frac.
 Cumulative Eigenval 
\end_layout

\begin_layout Standard
where 
\family typewriter
#Mode
\family default
 is the eigenvector number, 
\family typewriter
Frac.

\family default
 is the eigenvalue over the sum of all eigenvalues, 
\family typewriter
Cumulative
\family default
 is the cumulative sum of 
\family typewriter
Frac.
\family default
, and 
\family typewriter
Eigenval
\family default
 is the eigenvalue itself.
 Note that in order to get an idea for how much each eigenvector contributes
 to all motion, this is best used when all possible eigenvectors have been
 determined for a system.
\end_layout

\begin_layout Standard
In order to visualize eigenvectors, pseudo-trajectories along eigenvectors
 can be created using average coordinates with the 
\series bold
trajout
\series default
 keyword.
 For example, to write a pseudo-trajectory of the first principal component
 from principal component value of -100 to 100 for a previously calculated
 Modes data set corresponding to heavy atoms (no hydrogens) for residues
 1 to 36:
\end_layout

\begin_layout LyX-Code
parm ../GAAC.nowat.parm7
\end_layout

\begin_layout LyX-Code
readdata evecs.dat
\end_layout

\begin_layout LyX-Code
runanalysis modes name evecs.dat trajout test.nc trajoutfmt netcdf 
\backslash

\end_layout

\begin_layout LyX-Code
            trajoutmask :1-36&!@H= pcmin -100 pcmax 100 tmode 1
\end_layout

\begin_layout Subsection
multicurve
\end_layout

\begin_layout LyX-Code
multicurve set <dset> [set <dset> ...] 
\end_layout

\begin_layout LyX-Code
           <dset> { <equation> |
\end_layout

\begin_layout LyX-Code
                    name <dsname> nexp <m> [form {mexp|mexpk|mexpk_penalty}
 }
\end_layout

\begin_layout LyX-Code
           [AX=<value> ...] [out <outfile>] [resultsout <results>]
\end_layout

\begin_layout LyX-Code
           [maxit <max iterations>] [tol <tolerance>]
\end_layout

\begin_layout LyX-Code
           [outxbins <NX> outxmin <xmin> outxmax <xmax>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
set
\begin_inset space ~
\end_inset

<dset>
\begin_inset space ~
\end_inset

[set
\begin_inset space ~
\end_inset

<dset>
\begin_inset space ~
\end_inset

...] Data set(s) to fit.
\end_layout

\begin_layout Description
<equation> Equation to fit of form <Variable> = <Equation>.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-Data-Set-Math"

\end_inset

 for more details on equations 
\emph on
cpptraj
\emph default
 understands.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<dsname> Name of output data sets (required if using 
\series bold
nexp
\series default
).
\end_layout

\begin_layout Description
nexp
\begin_inset space ~
\end_inset

<m> Fit to specified number of exponentials.
\end_layout

\begin_layout Description
form
\begin_inset space ~
\end_inset

<type> Fit to specified exponential form:
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
mexp Multi-exponential, SUM(m)[ An * exp(An+1 * X)]
\end_layout

\begin_layout Description
mexpk Multi-exponential plus constant, A0 + SUM(m)[An * exp(An+1 * X)]
\end_layout

\begin_layout Description
mexpk_penalty Same as mexpk except sum of prefactors constrained to 1.0 and
 exponential constants constrained to < 0.0.
\end_layout

\end_deeper
\begin_layout Description
AX=<value> Value of any constants in specified equation with X starting
 from 0 (can specify more than one).
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<outfile> Write resulting fit curve to <outfile>.
\end_layout

\begin_layout Description
resultsout
\begin_inset space ~
\end_inset

<results> Write details of the fit to <results> (default STDOUT).
\end_layout

\begin_layout Description
maxit
\begin_inset space ~
\end_inset

<max
\begin_inset space ~
\end_inset

iterations> Number of iterations to run curve fitting algotrithm (default
 50).
\end_layout

\begin_layout Description
tol
\begin_inset space ~
\end_inset

<tolerance> Curve-fitting tolerance (default 1E-4).
\end_layout

\begin_layout Description
outxbins
\begin_inset space ~
\end_inset

<NX> Number of points to use when generating final curve (default same number
 of points as input data set).
\end_layout

\begin_layout Description
outxmin
\begin_inset space ~
\end_inset

<xmin> Minimum X value to use for final curve (default same number of points
 as input data set).
\end_layout

\begin_layout Description
outxmax
\begin_inset space ~
\end_inset

<xmax> Maximum X value to use for final curve (default same number of points
 as input data set).
\end_layout

\end_deeper
\begin_layout Standard
Fit each input data set <dset> to <equation>.
 See the 
\series bold
\emph on
curvefit
\series default
\emph default
 command 
\begin_inset CommandInset ref
LatexCommand vpageref
reference "subsec:cpptraj_curvefit"

\end_inset

 for more details.
\end_layout

\begin_layout Subsection
multihist
\end_layout

\begin_layout LyX-Code
multihist [out <filename>] [name <dsname>] [norm | normint] [kde]
\end_layout

\begin_layout LyX-Code
          [min <min>] [max <max>] [step <step>] [bins <bins>] [free <T>]
\end_layout

\begin_layout LyX-Code
          <dsetarg0> [ <dsetarg1> ...
 ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> Output file.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<dsname> Name for resulting histogram data sets.
\end_layout

\begin_layout Description
norm (Only used if not kde) Normalize so that max bin is 1.0.
\end_layout

\begin_layout Description
normint (Default for kde) Normalize integral over histogram to 1.0.
\end_layout

\begin_layout Description
kde Use kernel density estimator to construct histogram.
\end_layout

\begin_layout Description
min
\begin_inset space ~
\end_inset

<min> Histogram minimum (default data set minimum).
\end_layout

\begin_layout Description
max
\begin_inset space ~
\end_inset

<max> Histogram maximum (default data set maximum).
\end_layout

\begin_layout Description
step
\begin_inset space ~
\end_inset

<step> Histogram step.
\end_layout

\begin_layout Description
bins
\begin_inset space ~
\end_inset

<bins> Number of histogram bins.
\end_layout

\begin_layout Description
free
\begin_inset space ~
\end_inset

<T> Calculate free energy from bin populations as G = -R * <T> * ln( Ni
 / Nmax ).
\end_layout

\begin_layout Description
<dsetargX> Data set argument - may specify more than one.
\end_layout

\end_deeper
\begin_layout Standard
Histogram each data set separately in 1D.
 Must specify at least 
\series bold
bins
\series default
 or 
\series bold
step
\series default
.
\end_layout

\begin_layout Subsection
phipsi
\end_layout

\begin_layout LyX-Code
phipsi <dsarg0> [<dsarg1> ...] resrange <range> [out <file>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dsargX> Argument selecting data sets.
 Can specify more than 1.
\end_layout

\begin_layout Description
resrange
\begin_inset space ~
\end_inset

<range> Residue range to use (actually uses data set index).
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<file>] Output file.
\end_layout

\end_deeper
\begin_layout Standard
Calculate the average and standard deviation of [phi] and [psi] data set
 pairs, write to <file> with format:
\end_layout

\begin_layout LyX-Code
#Phi Psi SD(Phi) SD(Psi) Legend
\end_layout

\begin_layout Standard
Where Phi is the average value of phi, Psi is the average value of psi,
 SD(Phi) is the standard deviation of phi, SD(psi) is the standard deviation
 of psi, and Legend contains text describing the phi and psi data sets used
 in the calculation.
 Periodicity is taken into account during averaging.
 The data sets must have been internally labeled as type 'phi'/'psi' and
 must have a data set index set (actions like dihedral and multidihedral
 do this automatically).
 For example:
\end_layout

\begin_layout LyX-Code
parm ../DPDP.parm7
\end_layout

\begin_layout LyX-Code
trajin ../DPDP.nc
\end_layout

\begin_layout LyX-Code
multidihedral DPDP phi psi
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code
phipsi DPDP[phi] DPDP[psi] out phipsi.dat resrange 1-22
\end_layout

\begin_layout Subsection
regress
\end_layout

\begin_layout LyX-Code
regress <dset0> [<dset1> ...] [name <name>] [nx <nxvals>]
\end_layout

\begin_layout LyX-Code
    	[out <filename>] [statsout <filename>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
dsetX Data set(s) to perform linear regression for.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<name> Data set name for resulting linear fits.
\end_layout

\begin_layout Description
nx
\begin_inset space ~
\end_inset

<nxvals> Number of X values to use in output data set(s) (ranging from input
 set min to max X).
 If not specified, input X values used.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<filename> File to write fit lines to.
\end_layout

\begin_layout Description
statsout
\begin_inset space ~
\end_inset

<filename> File to write fit statistics to.
\end_layout

\begin_layout Standard
DataSets Generated:
\end_layout

\begin_layout Description
<name>:<idx> Output fit line(s) (indexed by input set order if more than
 one input set).
\end_layout

\begin_layout Description
<name>[slope]:<idx> Output fit line slope(s).
\end_layout

\begin_layout Description
<name>[intercept]:<idx> Output fit line intercept(s).
\end_layout

\end_deeper
\begin_layout Standard
Perform linear regression on the specified data set(s).
 The fit line is calculated using either the input X values or 
\series bold
<nxvals>
\series default
 values ranging from the input set minimum to maximum X.
 Statistics for the fit(s) are saved to the file specified by 
\series bold
statsout
\series default
 or reported to STDOUT.
 
\end_layout

\begin_layout Standard
For example, to fit data read in from a file and then create a set using
 the fit parameters:
\end_layout

\begin_layout LyX-Code
readdata esurf_vs_rmsd.dat.txt index 1 name XY
\end_layout

\begin_layout LyX-Code
runanalysis regress XY name FitXY statsout statsout.dat
\end_layout

\begin_layout LyX-Code
createset "Y = FitXY[slope] * X + FitXY[intercept]" xstep .2 nx 100
\end_layout

\begin_layout LyX-Code
writedata Y.dat Y
\end_layout

\begin_layout Subsection
remlog
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-remlog"

\end_inset


\end_layout

\begin_layout LyX-Code
remlog {<remlog dataset> | <remlog filename>} [out <filename>] [crdidx |
 repidx]
\end_layout

\begin_layout LyX-Code
   	[stats [statsout <file>] [printtrips] [reptime <file>]] [lifetime <file>]
\end_layout

\begin_layout LyX-Code
   	[reptimeslope <n> reptimeslopeout <file>] [acceptout <file>] [name <setname>
]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
       [edata [edataout <file>]]
\end_layout

\begin_deeper
\begin_layout Description
<remlog
\begin_inset space ~
\end_inset

dataset> Previously read-in REM log data.
\end_layout

\begin_layout Description
<remlog
\begin_inset space ~
\end_inset

filename> REM log file name to read in.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write replica/coordinate index versus time to <filename>.
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
crdidx Print coordinate index vs exchange; output sets contain replica indices.
 
\end_layout

\begin_layout Description
repidx Print replica index vs exchange; output sets contain coordinate indices.
 
\end_layout

\end_deeper
\begin_layout Description
stats
\begin_inset space ~
\end_inset

[statsout
\begin_inset space ~
\end_inset

<file>] Calculate round-trip statistics and optionally write to <file>.
\end_layout

\begin_layout Description
printtrips Print details of each individual round trip.
\end_layout

\begin_layout Description
[reptime
\begin_inset space ~
\end_inset

<file>] Write time spent at each replica to <file>.
\end_layout

\begin_layout Description
[lifetime
\begin_inset space ~
\end_inset

<file>] Print lifetime data at each replica to <file>.
\end_layout

\begin_layout Description
[reptimeslope
\begin_inset space ~
\end_inset

<n>] Calculate the slope of time spent at each replica every <n> exchanges.
\end_layout

\begin_layout Description
[reptimeslopeout
\begin_inset space ~
\end_inset

<file>] File to write 
\series bold
reptimeslope
\series default
 output to.
\end_layout

\begin_layout Description
[acceptout
\begin_inset space ~
\end_inset

<file>] Write overall exchange acceptances to <file>.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Output data set name.
\end_layout

\begin_layout Description
[edata
\begin_inset space ~
\end_inset

[edataout
\begin_inset space ~
\end_inset

<file>]] Extract energy data from replica log, optionally write to file.
\end_layout

\begin_layout Standard
DataSets created:
\end_layout

\begin_layout Description
<setname>:<idx> Replica/coordinate index vs exchange.
\end_layout

\begin_layout Description
<setname>[E]:<idx> If 'edata' specified, energy data from replica log.
\end_layout

\end_deeper
\begin_layout Standard
Analyze previously read in (via 
\series bold
\emph on
readdata
\series default
\emph default
) M-REMD/T-REMD/H-REMD replica log data.
 Statistics calculated include round-trip time, which is the time needed
 for a coordinate set to travel from the lowest replica to the highest and
 back, and the number of exchanges each coordinate spent at each replica.
 For example, to read in REM log data from an Amber M-REMD run and analyze
 it:
\end_layout

\begin_layout LyX-Code
readdata rem.log.1.save rem.log.2.save dimfile remd.dim as remlog nosearch 
\end_layout

\begin_layout LyX-Code
remlog rem.log.1.save stats reptime mremdreptime.dat 
\end_layout

\begin_layout Standard
For an example of 
\series bold
\emph on
remlog
\series default
\emph default
 analysis applied to actual REMD data, see Roe et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Roe2014"
literal "true"

\end_inset

.
\end_layout

\begin_layout Subsection
rms2d
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-rms2d"

\end_inset

 | 2drms
\end_layout

\begin_layout LyX-Code
rms2d
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
rms2d
\end_layout

\end_inset

 [crdset <crd set>] [<name>] [<mask>] [out <filename>]
\end_layout

\begin_layout LyX-Code
      [dme | nofit | srmsd] [mass]
\end_layout

\begin_layout LyX-Code
      [reftraj <traj> [parm <parmname> | parmindex <parm#>] [<refmask>]]
\end_layout

\begin_layout LyX-Code
      [corr <corrfilename>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[crdset
\begin_inset space ~
\end_inset

<crd
\begin_inset space ~
\end_inset

set>] Name of previously generated COORDS DataSet.
 If not specified the default COORDS set will be used.
\end_layout

\begin_layout Description
[<mask>] Mask of atoms to calculate 2D-RMSD for.
 Default is all atoms.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write results to <filename>.
\end_layout

\begin_layout Description
[dme] Calculate distance RMSD instead of coordinate RMSD; this is substantially
 slower.
\end_layout

\begin_layout Description
[nofit] Calculate RMSD without fitting.
\end_layout

\begin_layout Description
[srmsd] Calculate symmetry-corrected RMSD (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_symmrmsd"

\end_inset

).
\end_layout

\begin_layout Description
[mass] Mass-weight RMSD.
\end_layout

\begin_layout Description
[reftraj
\begin_inset space ~
\end_inset

<traj>] Calculate 2D RMSD to frames in trajectory <traj> instead (can also
 be another COORDS set).
\end_layout

\begin_layout Description
[parm
\begin_inset space ~
\end_inset

<parmname>
\begin_inset space ~
\end_inset

|
\begin_inset space ~
\end_inset

parmindex
\begin_inset space ~
\end_inset

<#>] Topology to use for <traj>; only useful in conjunction with 
\series bold
reftraj
\series default
.
\end_layout

\begin_layout Description
[<refmask>] Mask of atoms in reference; only useful in conjunction with
 
\series bold
reftraj
\series default
.
\end_layout

\begin_layout Description
[corr
\begin_inset space ~
\end_inset

<corrfilename>] Calculate pseudo-auto-correlation 
\shape italic
C
\shape default
 for 2D-RMSD as 
\begin_inset Formula $C(i)=\frac{\sum_{j=0}^{j<N-i}\exp(-RMSD(j,j+i))}{N-i}$
\end_inset

, where 
\shape italic
i
\shape default
 is the lag, 
\shape italic
j
\shape default
 is the frame #, and 
\shape italic
N
\shape default
 is the total number of frames.
 An exponential is used to weight the RMSD since 0.0 RMSD is equivalent to
 correlation of 1.0.
 This can only be done if 
\series bold
reftraj
\series default
 is not used.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[Corr] (
\series bold
corr
\series default
 only) Pseudo-auto-correlation.
\end_layout

\end_deeper
\begin_layout Standard

\shape italic
Note: For backwards compatibility with ptraj the command '2drms' will also
 work.
\end_layout

\begin_layout Standard
Calculate the best-fit RMSD of each frame in <crd set> (the default COORDS
 set if none specified) to each other frame.
 This creates an upper-triangle matrix named <name> (or a full matrix if
 
\series bold
reftraj
\series default
 specified).
 The output of the rms2d command can be best-viewed using gnuplot; a gnuplot-for
matted file can be produced by giving <filename> a '.gnu' extension.
 For example, to calculate the RMSD of non-hydrogen atoms of each frame
 in trajectory 
\begin_inset Quotes eld
\end_inset

test.nc
\begin_inset Quotes erd
\end_inset

 to each other frame, writing to a gnuplot-viewable file 
\begin_inset Quotes eld
\end_inset

test.2drms.gnu
\begin_inset Quotes erd
\end_inset

:
\end_layout

\begin_layout LyX-Code
trajin test.nc
\end_layout

\begin_layout LyX-Code
rms2d !(@H=) out test.2drms.gnu
\end_layout

\begin_layout Standard
To calculate the RMSD of atoms named CA of each frame in trajectory 
\begin_inset Quotes eld
\end_inset

test.nc
\begin_inset Quotes erd
\end_inset

 to each frame in 
\begin_inset Quotes eld
\end_inset

ref.nc
\begin_inset Quotes erd
\end_inset

 (assuming test.nc and ref.nc are using the default topology file):
\end_layout

\begin_layout LyX-Code
trajin test.nc
\end_layout

\begin_layout LyX-Code
rms2d @CA out test.2drms.gnu reftraj ref.nc
\end_layout

\begin_layout Subsection
rmsavgcorr
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-rmsavgcorr"

\end_inset


\end_layout

\begin_layout LyX-Code
rmsavgcorr
\begin_inset Index idx
status open

\begin_layout Plain Layout
rmsavgcorr
\end_layout

\end_inset

 [crdset <crd set>] [<name>] [<mask>] [out <filename>] [mass]
\end_layout

\begin_layout LyX-Code
       	[stop <maxwindow>] [offset <offset>]
\end_layout

\begin_layout LyX-Code
       	{reference <ref file> parm <parmfile> | first}
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
[crdset
\begin_inset space ~
\end_inset

<crd
\begin_inset space ~
\end_inset

set>] COORDS data set to use (if not specified the default COORDS set will
 be used).
\end_layout

\begin_layout Description
[<name>] Output data set name.
\end_layout

\begin_layout Description
[<mask>] Atoms to calculate RMS average correlation for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Output filename.
\end_layout

\begin_layout Description
[mass] Mass weight the RMSD calculation.
\end_layout

\begin_layout Description
[stop
\begin_inset space ~
\end_inset

<maxwindow>] Only calculate RMS average correlation up to <maxwindow>.
\end_layout

\begin_layout Description
[offset
\begin_inset space ~
\end_inset

<offset>] Skip every <offset> windows in calculation.
\end_layout

\begin_layout Description
[first] Use first averaged frame as reference for each window (default).
\end_layout

\begin_layout Description
[reference
\begin_inset space ~
\end_inset

<ref
\begin_inset space ~
\end_inset

file>
\begin_inset space ~
\end_inset

[parm
\begin_inset space ~
\end_inset

<parmfile>] Use reference file (with specified parm) as reference for each
 window.
\end_layout

\end_deeper
\begin_layout Standard
The RMS average correlation
\begin_inset CommandInset citation
LatexCommand citep
key "Roe13"
literal "true"

\end_inset

 (RAC) is calculated as the average RMSD of running-averaged coordinates
 over increasing window sizes (or lag).
 Output has format:
\end_layout

\begin_layout LyX-Code
<WindowSize> <RAC>
\end_layout

\begin_layout Standard
The first entry has a window size of 1, and so is just the average RMSD
 of all frames to the specified reference structure.
 The second entry has a window size of two, so it is the average RMSD of
 all frames averaged over two adjacent windows to the specified reference,
 and so on.
 The RAC will be calculated up to the number of frames minus 1 or the value
 specified by 
\series bold
stop
\series default
, whichever is lower.
 The offset can be used to speed up the calculation by skipping window sizes.
 To calculate mass-weighted RMSD specify 
\series bold
mass
\series default
.
 Note that to reduce memory costs it can be useful to strip all coordinates
 not involved in the RMS fit from the system prior to specifying 'rmsavgcorr'.
 For example, to calculate the correlation of C-alpha RMSD of residues 2
 to 12:
\end_layout

\begin_layout LyX-Code
strip !(:2-12@CA)
\end_layout

\begin_layout LyX-Code
rmsavgcorr out rmscorr.dat
\end_layout

\begin_layout Standard
The curve generated by RAC decays towards zero due to the way RAC is defined.
 By the time the "lag" is N-1 (where N is the total number of frames) you
 have only two averaged coordinates: call them Avg1 (averaged over 1 though
 N-1 frames) and Avg2 (averaged over 2 through N frames).
 Barring any extraordinary circumstances the RMSD between Avg1 and Avg2
 will almost certainly be quite low.
 
\end_layout

\begin_layout Standard
The RAC is a way to probe the time scales of interesting events.
 Any deviation from a smoothly decaying curve is an indication that there
 are some significant structural differences occurring over that time interval.
 RAC curves can be particularly useful when comparing independent simulations
 of the same system.
\end_layout

\begin_layout Standard
One thing to keep in mind that since the underlying metric is RMSD, it can
 be sensitive to the reference frame you choose.
 It may be useful to try looking at both RAC from the first frame, as well
 as an averaged reference frame.
 For an example of use see Galindo-Murillo et al.
\begin_inset CommandInset citation
LatexCommand citep
key "Galindo2015"
literal "true"

\end_inset

, in particular Figure 2.
\end_layout

\begin_layout Subsection
rotdif
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-rotdif"

\end_inset


\end_layout

\begin_layout LyX-Code
rotdif [outfile <outfilename>] [usefft]
\end_layout

\begin_layout LyX-Code
  Options for generating random vectors:
\end_layout

\begin_layout LyX-Code
	[nvecs <nvecs>] [rvecin <randvecIn>] [rseed <random seed>]
\end_layout

\begin_layout LyX-Code
	[rvecout <randvecOut>] [rmatrix <set name> [rmout <rmOut>]]
\end_layout

\begin_layout LyX-Code
  Options for calculating vector time correlation functions:
\end_layout

\begin_layout LyX-Code
	[order <olegendre>] [ncorr <ncorr>] [corrout <corrOut>]
\end_layout

\begin_layout LyX-Code
  *** The options below only apply if 'usefft' IS NOT specified.
 ***
\end_layout

\begin_layout LyX-Code
  Options for calculating local effective D, small anisotropy:
\end_layout

\begin_layout LyX-Code
	[deffout <deffOut>] [itmax <itmax>] [tol <tolerance>] [d0 <d0>]
\end_layout

\begin_layout LyX-Code
	[nmesh <NmeshPoints>] dt <tfac> [ti <ti>] tf <tf>
\end_layout

\begin_layout LyX-Code
  Options for calculating D with full anisotropy:
\end_layout

\begin_layout LyX-Code
	[amoeba_tol <tolerance>] [amoeba_itmax <iterations>]
\end_layout

\begin_layout LyX-Code
	[amoeba_nsearch <n>] [scalesimplex <scale>] [gridsearch]
\end_layout

\begin_layout LyX-Code
  *** The options below only apply if 'usefft' IS specified.
 ***
\end_layout

\begin_layout LyX-Code
  Options for curve-fitting:
\end_layout

\begin_layout LyX-Code
	[fit_tol <tolerance>] [fit_itmax <max # iterations>]  
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
outfile
\begin_inset space ~
\end_inset

<outfilename> File to write all output from rotdif command to.
\end_layout

\end_deeper
\begin_layout LyX-Code

\family roman
\emph on
Options for generating random vectors:
\family default

\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
nvecs
\begin_inset space ~
\end_inset

<nvecs> Number of random vectors to generate (default 1000).
\end_layout

\begin_layout Description
rvecin
\begin_inset space ~
\end_inset

<randvecIn> File to read random vectors from (format is 1 per line, 4 columns,
 <#> <VX> <VY> <VZ>).
\end_layout

\begin_layout Description
rseed
\begin_inset space ~
\end_inset

<random
\begin_inset space ~
\end_inset

seed> Seed for random number generator (default 80531).
 Specify -1 to use wallclock time.
\end_layout

\begin_layout Description
rvecout
\begin_inset space ~
\end_inset

<randvecOut> File to write random vectors to (format is 1 per line, 4 columns,
 <#> <VX> <VY> <VZ>).
\end_layout

\begin_layout Description
rmatrix
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name> Data set to read rotation matrices from.
 Rotation matrices will be used to rotate random vectors.
\end_layout

\begin_layout Description
rmout
\begin_inset space ~
\end_inset

<rmOut> Write rotation matrices to file, 1 per line, frame # followed by
 matrix in row-major order.
\end_layout

\end_deeper
\begin_layout LyX-Code

\family roman
\emph on
Options for calculating vector time correlation functions:
\family default

\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
order
\begin_inset space ~
\end_inset

<olegendre> The order of Legendre polynomials to use when calculating vector
 time correlation functions (default 2).
\end_layout

\begin_layout Description
ncorr
\begin_inset space ~
\end_inset

<ncorr> Maximum length of time correlation functions in frames.
 If this is not specified it will be set to (
\series bold
tf
\series default
 - 
\series bold
ti
\series default
) / 
\series bold
dt
\series default
 (recommended).
\end_layout

\begin_layout Description
corrout
\begin_inset space ~
\end_inset

<corrOut> If specified write vector time correlation functions to <corrOut>.X
 with format: <Time> <Px>
\end_layout

\end_deeper
\begin_layout LyX-Code

\family roman
\emph on
Options for calculating local effective D, small anisotropy:
\family default

\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
deffout
\begin_inset space ~
\end_inset

<deffOut> File to write out local effective diffusion constants determined
 in the limit of small anisotropy.
\end_layout

\begin_layout Description
itmax
\begin_inset space ~
\end_inset

<itmax> Maximum number of iterations to determine each local effective diffusion
 constant (small anisotropy) assuming fit to single exponential form (default
 500).
\end_layout

\begin_layout Description
tol
\begin_inset space ~
\end_inset

<tolerance> Tolerance for determining local effective diffusion constant
 (small anisotropy) assuming fit to single exponential form (default 1E-6).
\end_layout

\begin_layout Description
d0
\begin_inset space ~
\end_inset

<d0> Initial guess for small anisotropy diffusion constant in radians^2/ns
 (default 0.03).
\end_layout

\begin_layout Description
nmesh
\begin_inset space ~
\end_inset

<NmeshPoints> Number of points per frame to use when creating cubic-splined-smoo
thed forms of vector time correlation curves (default 2).
\end_layout

\begin_layout Description
dt
\begin_inset space ~
\end_inset

<tfac> Time interval between frames (used in integrating vector time correlation
 curves) in ns.
\end_layout

\begin_layout Description
ti
\begin_inset space ~
\end_inset

<ti> Initial time value in ns for integrating the time correlation functions
 (default 0.0).
\end_layout

\begin_layout Description
tf
\begin_inset space ~
\end_inset

<tf> Final time value in ns for integrating the time correlation functions.
 It is recommended this be less than the maximum simulation time since the
 tails of time correlation functions tend to be noisy.
\end_layout

\end_deeper
\begin_layout LyX-Code

\family roman
\emph on
Options for calculating D with full anisotropy:
\family default

\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
amoeba_tol
\begin_inset space ~
\end_inset

<tolerance> Tolerance for downhill-simplex minimizer (default 1E-7).
\end_layout

\begin_layout Description
amoeba_itmax
\begin_inset space ~
\end_inset

<iterations> Number of iterations to run downhill-simplex minimizer (default
 10000).
\end_layout

\begin_layout Description
amoeba_nsearch
\begin_inset space ~
\end_inset

<n> Number of searches to perform with downhill-simplex minimizer (default
 1).
\end_layout

\begin_layout Description
scalesimplex
\begin_inset space ~
\end_inset

<scale> Factor to use when scaling simplexes (default 0.5).
\end_layout

\begin_layout Description
gridsearch If specified, perform a brute-force grid search to attempt to
 find a better solution for diffusion tensor with full anisotropy (may be
 expensive).
\end_layout

\end_deeper
\begin_layout Standard
Evaluate rotational diffusion properties of a molecule over a trajectory
 according to an expanded version of the procedure laid out by Wong & Case
\begin_inset CommandInset citation
LatexCommand citep
key "wong2008"
literal "true"

\end_inset

.
 Briefly, random vectors (representing the orientation of the molecule)
 are rotated according to rotation matrices obtained from an RMS fit to
 a reference structure (typically an averaged structure).
 For each random vector the time correlation function of the rotated vector
 is calculated using Legendre polynomials of the specified order.
 The integral over this time correlation function (which may be smoothed
 using cubic splines to improve the integration) is then used to find the
 effective diffusion constant (D) in the limit of small anisotropy.
 Then, using each calculated D, the diffusion tensor is determined with
 full anisotropy.
 Finally, a downhill simplex minimizer is used to optimize D with full anisotrop
y; (this last step is not described in the original paper).
\end_layout

\begin_layout Standard
Rotation matrices are generated via an RMS fit to a reference structure
 (see 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-rmsd"

\end_inset

).
 It is recommended that the RMS fit be done to an average structure (see
 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-average"

\end_inset

).
 These rotation matrices are used to rotate each random vector M times (where
 M is the total number of frames), which creates a time series for each
 random vector.
 The time correlation functions are calculated for each random vector time
 series using Legendre polynomials of the specified order (default 2).
 The maximum length of the correlation function (or lag) can be specified
 by 
\series bold
ncorr
\series default
 (in frames).
 If 
\series bold
ncorr
\series default
 is not specified it will be set internally based on the specified values
 of 
\series bold
ti
\series default
, 
\series bold
tf
\series default
, and 
\series bold
dt
\series default
; this is recommended.
 Note that if 
\series bold
ncorr
\series default
 is specified it should be set to a number less than the total number of
 frames since noise in time correlation functions increases as 
\series bold
ncorr
\series default
 approaches the # of frames.
 The integration over the correlation function is from 
\series bold
ti 
\series default
(in whatever units are used of 
\series bold
dt
\series default
, generally ns; 0.0 ns if not specified) to 
\series bold
tf
\series default
 (same units as 
\series bold
ti
\series default
), with the time between frames specified by 
\series bold
dt
\series default
; the final time should be less than the total simulation time (see example
 below).
 The relative size of the mesh used with cubic spline interpolation for
 integration is controlled by 
\series bold
nmesh
\series default
 (size of the mesh is 
\series bold
ncorr
\series default
 points * 
\series bold
nmesh
\series default
); 
\series bold
nmesh
\series default
 = 1 means no interpolation, default is 2.
 Note that if the integral of the correlation function for a vector is negative,
 that vector will be skipped in subsequent calculations (since it would
 imply a negative value for effective diffusion).
\end_layout

\begin_layout Standard
The iterative solver for effective value of the diffusion constant from
 the correlation functions is controlled by 
\series bold
itmax
\series default
, 
\series bold
tol
\series default
, and 
\series bold
d0
\series default
, where 
\series bold
itmax
\series default
 specifies the number of iterations to perform (default 500), 
\series bold
tol
\series default
 specifies the tolerance (default 1E-6), and 
\series bold
d0
\series default
 specifies the initial guess for the diffusion constant in radians^2 / ns
 (default 0.03).
 Effective diffusion constants for each random vector can be written out
 to a file specified by 
\series bold
deffout
\series default
.
 Results are printed to the file specified by 
\series bold
outfile
\series default
.
 Details on the Q and D tensors are given, as well as observed and calculated
 tau for each random vector.
 First, results are printed for analysis in the limit of small anisotropy.
 Next, results are printed for analysis with full anisotropy.
 The results of the full anisotropic calculation are first given using results
 from the small anisotropic analysis as an initial guess, followed by the
 final results after minimization using the downhill simplex (amoeba) minimizer.
\end_layout

\begin_layout Subsubsection*
Example
\end_layout

\begin_layout Standard
There are two important things to keep in mind when using rotdif analysis:
\end_layout

\begin_layout Enumerate
When calculating any kind of diffusive property it is best to simulate in
 the microcanonical (NVE) ensemble with a shorter time step and increased
 SHAKE tolerance; thermostats and barostats will effect diffusion calculations.
\end_layout

\begin_layout Enumerate
Time correlation functions become noisier as the length of the function
 approaches the maximum.
 Therefore in general one should choose parameters for the time correlation
 function that are much shorter than the total simulation length.
 
\end_layout

\begin_layout Standard
For example, given a trajectory 'mdcrd.nc' containing 10000 frames with a
 total simulation time of 200 ns (so the time between frames is 0.02 ns),
 to calculate rotational diffusion using 100 vectors using rotation matrices
 generated via an RMS fit to 'avgstruct.pdb', computing and integrating the
 time correlation function for each vector from 0 to 5 ns (1/40th of the
 simulation), and writing out the effective diffusion constants and results
 to 'deffs.dat' and 'rotdif.out' respectively:
\end_layout

\begin_layout LyX-Code
reference avgstruct.pdb [avg]
\end_layout

\begin_layout LyX-Code
rms R0 @CA,C,N,O ref [avg] savematrices
\end_layout

\begin_layout LyX-Code
trajin mdcrd.nc
\end_layout

\begin_layout LyX-Code
rotdif nvecs 100 rmatrix R0[RM] 
\backslash

\end_layout

\begin_layout LyX-Code
       ti 0.0 tf 5.0 dt 0.02 deffout deffs.dat 
\backslash

\end_layout

\begin_layout LyX-Code
       outfile rotdif.out
\end_layout

\begin_layout Subsection
runningavg
\end_layout

\begin_layout LyX-Code
runningavg <dset1> [<dset2> ...] [name <dsetname>] [out <filename>]
\end_layout

\begin_layout LyX-Code
                   [ [cumulative] | [window <window>] ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dset1>
\begin_inset space ~
\end_inset

[<dset2>
\begin_inset space ~
\end_inset

...] Data set(s) to calculate running average for.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<dsetname>] Output running average data set name.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] File to write results to.
\end_layout

\begin_layout Description
[cumulative] Calculate cumulative running average instead.
\end_layout

\begin_layout Description
[window
\begin_inset space ~
\end_inset

<window>] Size in frames of window over which to calculate running average.
\end_layout

\end_deeper
\begin_layout Standard
Calculate running average over windows of given size for data in selected
 data set(s).
\end_layout

\begin_layout Subsection
slope
\end_layout

\begin_layout LyX-Code
slope <dset0> [<dset1> ...] [out <outfile>] [name <name>]
\end_layout

\begin_layout LyX-Code
  	[type {forward|backward|central}]
\end_layout

\begin_deeper
\begin_layout Description
<dset0>
\begin_inset space ~
\end_inset

[<dset1>
\begin_inset space ~
\end_inset

...] Data set(s) to calculate finite difference for.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfile>] File to write finite difference curves to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<name>] Output data set(s) name.
\end_layout

\begin_layout Description
[type
\begin_inset space ~
\end_inset

{forward|backward|central}] Specify type of finite difference to calculate
 (default forward).
\end_layout

\begin_layout Standard
DataSets generated:
\end_layout

\begin_layout Description
<name>:<idx> Output finite difference curves for each input data set (indexed
 from 0).
\end_layout

\end_deeper
\begin_layout Standard
Calculate finite differences for each input data set.
\end_layout

\begin_layout Subsection
spline
\end_layout

\begin_layout LyX-Code
spline <dset0> [<dset1> ...] [out <outfile>] [meshsize <n> | meshfactor <x>]
\end_layout

\begin_layout LyX-Code
[meshmin <mmin>] [meshmax <mmax>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<dsetX> Data set(s) to perform splining on.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<outfile>] Write splined data to <outfile>.
\end_layout

\begin_layout Description
[meshsize<n>] Size of the mesh to use for splining.
\end_layout

\begin_layout Description
[meshfactor
\begin_inset space ~
\end_inset

<x>] If meshsize is not given, use a mesh of data set size * <x>.
\end_layout

\begin_layout Description
[meshmin
\begin_inset space ~
\end_inset

<mmin>] Mesh X minimum value.
\end_layout

\begin_layout Description
[meshmax
\begin_inset space ~
\end_inset

<mmax>] Mesh X maximum value.
\end_layout

\end_deeper
\begin_layout Standard
Apply cubic splines to the given input data sets to create new data sets.
\end_layout

\begin_layout Subsection
statistics | stat
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj_statistics"

\end_inset


\end_layout

\begin_layout LyX-Code
stat {<name> | ALL} [shift <value>] [out <filename>] [noeout <filename>]
\end_layout

\begin_layout LyX-Code
	 [ignorenv] [name <noe setname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description
<name> Name of data set to analyze.
\end_layout

\begin_layout Description
ALL analyze all data sets.
\end_layout

\begin_layout Description
shift
\begin_inset space ~
\end_inset

<value> Subtract <value> from all elements in each data set.
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write analysis results to <filename> (STDOUT if not specified).
\end_layout

\begin_layout Description
[noeout
\begin_inset space ~
\end_inset

<filename>] (Type 'noe' only) Write summary of NOE results to <filename>.
\end_layout

\begin_layout Description
[ignorenv] (Type 'noe' only) Ignore negative NOE violations (i.e.
 shorter-than-expected distances).
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<noe
\begin_inset space ~
\end_inset

setname>] (Type 'noe' only) Name for output NOE data sets.
\end_layout

\begin_layout Standard
DataSet Aspects for type 'noe' output:
\end_layout

\begin_layout Description
[R6] Averaged 
\begin_inset Formula $1/r^{6}$
\end_inset

distance for each set.
\end_layout

\begin_layout Description
[NViolations] Number of violations based on given bounds for each set.
\end_layout

\begin_layout Description
[AvgViolation] 
\begin_inset Formula $1/r^{6}$
\end_inset

 averaged distance minus expected distance for each set.
\end_layout

\begin_layout Description
[NOEnames] Name of each set.
\end_layout

\end_deeper
\begin_layout Standard
Analyze angles, dihedrals, distances, and/or puckers and calculate various
 properties.
 More specific analyses can be obtained by labelling distances/dihedrals/puckers
 (from e.g.
 the 
\series bold
\shape italic
distance
\series default
\shape default
, 
\series bold
\shape italic
dihedral
\series default
\shape default
, 
\series bold
\shape italic
pucker
\series default
\shape default
 commands or with the 
\series bold
\shape italic
dataset
\series default
\shape default
 command) with the 'type <label>' keyword:
\end_layout

\begin_layout Description
dihedral
\begin_inset space ~
\end_inset

type
\begin_inset space ~
\end_inset

labels: alpha, beta, gamma, delta, epsilon, zeta, chi, c2p h1p, phi, psi,
 omega, pchi
\end_layout

\begin_layout Description
distance
\begin_inset space ~
\end_inset

type
\begin_inset space ~
\end_inset

labels: noe
\end_layout

\begin_layout Description
pucker
\begin_inset space ~
\end_inset

type
\begin_inset space ~
\end_inset

labels: pucker
\end_layout

\begin_layout Standard
For each input data set, the average, standard deviation, initial and final
 values will be reported.
 The cyclic nature of dihedral/pucker data sets is taken into consideration
 when averaging.
\end_layout

\begin_layout Subsubsection
Torsion Analysis
\end_layout

\begin_layout Standard
A table will be written in ASCII format showing the distribution of torsion
 values for each data set.
 More specific information may be printed based on the set type.
 Values in the output marked SNB are from those defined by Schneider, Neidle,
 and Berman.
\begin_inset CommandInset citation
LatexCommand citep
key "Schneider1997"
literal "true"

\end_inset

 For more information on nucleic acid torsion as pertains to RNA see further
 work by Schneider et al..
\begin_inset CommandInset citation
LatexCommand citep
key "Schneider2004"
literal "true"

\end_inset

 
\end_layout

\begin_layout Standard
For example, to perform in-depth analysis on some nucleic acid dihedral
 angles:
\end_layout

\begin_layout LyX-Code
dihedral g0 out dihedrals.dat :1@O5' :1@C5' :1@C4' :1@C3' type gamma 
\end_layout

\begin_layout LyX-Code
dihedral d0 out dihedrals.dat :1@C5' :1@C4' :1@C3' :1@O3' type delta 
\end_layout

\begin_layout LyX-Code
dihedral c0 out dihedrals.dat :1@O4' :1@C1' :1@N9 :1@C4 type chi
\end_layout

\begin_layout LyX-Code
analyze statistics all out stat.dat
\end_layout

\begin_layout Subsubsection
Distance Analysis
\end_layout

\begin_layout Standard
A table will be written in ASCII format showing the distribution of distance
 values < 6.5.
 If a distance is labled as 'type noe' a compact time series will be printed
 in ASCII format showing the NOE as strong, medium, or weak.
 In addition the <r^-6>^(-1/6) averaged value will be reported, as well
 as the number of upper/lower bound violations.
 If 
\series bold
'noeout'
\series default
 is specified, a summary of these results will be written with format:
\end_layout

\begin_layout LyX-Code
<#NOE> <R6> <Nviolation> <AvgViolation> <Name>
\end_layout

\begin_layout Standard
Where <#NOE> is an index, <R6> is the <r^-6>^(-1/6) averaged distance, <Nviolati
on> is the total number of bounds violations, <AvgViolation> is the average
 difference from expected distance 
\shape italic
Rexp
\shape default
 when the distance is violated (note that if not explicitly set, 
\shape italic
Rexp
\shape default
 is set to the upper bound when the lower bound is 0.0, or the average of
 upper and lower bounds otherwise), and <Name> is the data set legend.
\end_layout

\begin_layout Standard
For example, the following input could be used to check certain distances
 for NOE violations:
\end_layout

\begin_layout LyX-Code
distance :3@HB= :10@HG= type noe noe_medium 
\end_layout

\begin_layout LyX-Code
distance :3@HE= :10@HG= type noe noe_strong 
\end_layout

\begin_layout LyX-Code
distance :3@HA :12@HA type noe noe_medium 
\end_layout

\begin_layout LyX-Code
distance :3@HD= :12@HG= type noe noe_medium 
\end_layout

\begin_layout LyX-Code
distance :3@HE= :12@HA type noe noe_strong 
\end_layout

\begin_layout LyX-Code
analyze statistics all out dpdp.noe.dat noeout noe_graph.dat name Res3_NOE
\end_layout

\begin_layout Subsubsection
Pucker Analysis
\end_layout

\begin_layout Standard
A table will be written in ASCII format showing the distribution of pucker
 phases for each data set.
\end_layout

\begin_layout Subsection
ti
\end_layout

\begin_layout LyX-Code
ti <dset0> [<dset1> ...] {nq <n quad pts> | xvals <x values>}
\end_layout

\begin_layout LyX-Code
	[name <set name>] [out <file>] [curveout <ti curve file>]
\end_layout

\begin_layout LyX-Code
	[nskip <#s to skip>]
\end_layout

\begin_layout LyX-Code
	[avgincrement <#> [avgmax <#>] [avgskip <#>]]
\end_layout

\begin_layout LyX-Code
	[bs_samples <samples> [bs_points <points>] [bs_seed <#>]
\end_layout

\begin_layout LyX-Code
	 [bs_fac <factor>]]
\end_layout

\begin_deeper
\begin_layout Description
<dset0>
\begin_inset space ~
\end_inset

[<dset1>
\begin_inset space ~
\end_inset

...] Data set arguments specifying input DV/DL values.
\end_layout

\begin_layout Description
nq
\begin_inset space ~
\end_inset

<n
\begin_inset space ~
\end_inset

quad
\begin_inset space ~
\end_inset

pts> Number of points for Gaussian quadrature integration.
 Expect one data set per point.
\end_layout

\begin_layout Description
xvals
\begin_inset space ~
\end_inset

<x
\begin_inset space ~
\end_inset

values> Comma-separated list of X values for integration.
 Expect one data set per value.
\end_layout

\begin_layout Description
name
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name> Output data set name.
\end_layout

\begin_layout Description
out
\begin_inset space ~
\end_inset

<file> File to write results of integration to.
\end_layout

\begin_layout Description
curveout
\begin_inset space ~
\end_inset

<ti
\begin_inset space ~
\end_inset

curve
\begin_inset space ~
\end_inset

file> File to write TI curves to.
\end_layout

\begin_layout Description
nskip
\begin_inset space ~
\end_inset

<#s
\begin_inset space ~
\end_inset

to
\begin_inset space ~
\end_inset

skip> Comma separated list of number of points to skip.
 For each number given, the TI integration will be repeated.
\end_layout

\begin_layout Description
avgincrement
\begin_inset space ~
\end_inset

<#>
\begin_inset space ~
\end_inset

[avgmax
\begin_inset space ~
\end_inset

<#>]
\begin_inset space ~
\end_inset

[avgskip
\begin_inset space ~
\end_inset

<#>] Starting from point 'avgskip' (default 0), repeat the TI integration
 calculation in increments of <#> up to 'avgmax' (default all points), so
 'avgincrement 10' will do points 0-10, 0-20, etc.
\end_layout

\begin_layout Description
bs_samples
\begin_inset space ~
\end_inset

<samples>
\begin_inset space ~
\end_inset

[bs_points
\begin_inset space ~
\end_inset

<points>]
\begin_inset space ~
\end_inset

[bs_seed<#>]
\begin_inset space ~
\end_inset

[bs_fac
\begin_inset space ~
\end_inset

<factor>] Estimate error via bootstrap analysis, repeating the TI integration
 <samples> times using <points> points or <factor> times the total number
 of points.
 Randomize with given seed.
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[TIcurve] Raw TI curve.
 If 'nskip' index is number of points skipped.
 If bootstrapping, index is sample index.
 If 'avgincrement' the index is the number of points.
\end_layout

\begin_layout Description
[SD] For bootstrap analysis, standard deviation of average free energy over
 samples.
\end_layout

\end_deeper
\begin_layout Standard
Calculate free energy using DV/DL energies from thermodynamic integration.
 The results of integration of the DV/DL curve will be written to 
\series bold
<file>
\series default
, while the curves themselves will be written to 
\series bold
<ti curve file>
\series default
.
 Use 
\series bold
nq
\series default
 to specify number of Gaussian quadrature points; otherwise the lambda values
 should be specified by 
\series bold
xvals
\series default
, where 
\series bold
<x values>
\series default
 is a comma-separated list.
\end_layout

\begin_layout Standard
For example, to perform Gaussian quadrature integration using data sets
 named 'TIdata', repeating the calculation for various number of skipped
 data points:
\end_layout

\begin_layout LyX-Code
ti TIdata nq 9 name Curve out skip.agr curveout curve.agr nskip 0,5,10,15,20,30,40
,50
\end_layout

\begin_layout Subsection
timecorr
\end_layout

\begin_layout LyX-Code
timecorr vec1 <vecname1> [vec2 <vecname2>] out <filename>
\end_layout

\begin_layout LyX-Code
           [order <order>] [tstep <tstep>] [tcorr <tcorr>]
\end_layout

\begin_layout LyX-Code
           [dplr] [norm] [drct] [dplrout <dplrfile>] [ptrajformat]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
vec1
\begin_inset space ~
\end_inset

<vecname1>
\begin_inset space ~
\end_inset

[vec2
\begin_inset space ~
\end_inset

<vecname2>]
\series default
 Vector(s) on which to operate.
 By default the auto-correlation function will be calculated if one vector
 is specified, and the cross-correlation function will be calculated if
 two vectors are specified.
\end_layout

\begin_layout Description

\series bold
out
\begin_inset space ~
\end_inset

<filename>
\series default
 Name of file to write output to.
\end_layout

\begin_layout Description

\series bold
[order
\begin_inset space ~
\end_inset

<order>]
\series default
 Order of Legendre polynomials to use; default 2.
\end_layout

\begin_layout Description

\series bold
[tstep
\begin_inset space ~
\end_inset

<tstep>]
\series default
 Time between snapshots (default 1.0).
\end_layout

\begin_layout Description

\series bold
[tcorr
\begin_inset space ~
\end_inset

<tcorr>]
\series default
 Maximum time to calculate correlation functions for (default 10000.0).
\end_layout

\begin_layout Description

\series bold
[dplr]
\series default
 Output correlation functions 
\begin_inset Formula $C_{l}\equiv<P_{l}/(r(0)^{3}r(\tau)^{3})>$
\end_inset

 and 
\begin_inset Formula $<1/(r(0)^{3}r(\tau)^{3})>$
\end_inset

 in addition to the 
\begin_inset Formula $P_{l}$
\end_inset

 correlation function.
\end_layout

\begin_layout Description

\series bold
[norm]
\series default
 Normalize all correlation functions, i.e., 
\begin_inset Formula $C_{l}(t=0)=P_{l}(t=0)=1.0$
\end_inset

.
\end_layout

\begin_layout Description

\series bold
[drct]
\series default
 Use the direct method to calculate correlations instead of FFT; this will
 be much slower.
\end_layout

\begin_layout Description
[dplrout] (
\series bold
dplr
\series default
 only) Write extra information for each vector related to 
\series bold
dplr
\series default
 option to <dplrfile>.
\end_layout

\begin_layout Description
[ptrajformat] Write output in ptraj style (prevents use of data formatting
 options).
\end_layout

\begin_layout Standard
DataSet Aspects:
\end_layout

\begin_layout Description
[P] P<order> correlation function.
\end_layout

\begin_layout Description
[C] C<order> correlation function (
\series bold
dplr
\series default
 only).
\end_layout

\begin_layout Description
[R3R3] <1/(r(0)
\begin_inset script superscript

\begin_layout Plain Layout
3
\end_layout

\end_inset

r(t)
\begin_inset script superscript

\begin_layout Plain Layout
3
\end_layout

\end_inset

> correlation function (
\series bold
dplr
\series default
 only).
\end_layout

\begin_layout Description
[R] (_TC_DIPOLAR_) Average magnitude (<R>).
\end_layout

\begin_layout Description
[RRIG] (_TC_DIPOLAR_) Sqrt( <R^2> ).
\end_layout

\begin_layout Description
[R3] (_TC_DIPOLAR_) <1/R^3>.
\end_layout

\begin_layout Description
[R6] (_TC_DIPOLAR_) <1/R^6>.
\end_layout

\begin_layout Description
[Name] (_TC_DIPOLAR_) Vector name.
\end_layout

\end_deeper
\begin_layout Standard
Calculate time auto/cross-correlation functions for vectors using spherical
 harmonics theory.
 NOTE: To calculate direct correlation functions for vectors just use the
 
\series bold
\emph on
corr
\series default
\emph default
 analysis command.
 The 
\series bold
norm
\series default
 keyword will normalize the resulting correlation functions.
 Note that if 
\series bold
dplr
\series default
 is specified, a new global data set named _TC_DIPOLAR_ will be created,
 containing extra data for each vector analyzed with a '
\series bold
\shape italic
timecorr
\series default
\shape default
 
\series bold
dplr
\series default
' command.
\end_layout

\begin_layout Subsubsection*
Examples
\end_layout

\begin_layout Standard
Vectors between atoms 5 and 6 as well as 7 and 8 are calculated below, for
 which auto and cross time correlation functions are obtained.
\end_layout

\begin_layout LyX-Code
vector v0 @5 @6
\end_layout

\begin_layout LyX-Code
vector v1 @7 @8
\end_layout

\begin_layout LyX-Code
timecorr vec1 v0 tstep 1.0 tcorr 100.0 out v0.out order 2
\end_layout

\begin_layout LyX-Code
timecorr vec1 v1 tstep 1.0 tcorr 100.0 out v1.out order 2
\end_layout

\begin_layout LyX-Code
timecorr vec1 v0 vec2 v1 tstep 1.0 tcorr 100.0 out v0_v1.out order 2
\end_layout

\begin_layout Standard
Similarly, a vector perpendicular to the plane through atoms 18, 19, and
 20 is obtained and further analyzed.
\end_layout

\begin_layout LyX-Code
vector v2 @18,@19,@20 corrplane
\end_layout

\begin_layout LyX-Code
timecorr vec1 v3 tstep 1.0 tcorr 100.0 out v2.out order 2
\end_layout

\begin_layout Subsection
vectormath
\end_layout

\begin_layout LyX-Code
vectormath vec1 <vecname1> vec2 <vecname2> [out <filename>] [norm] [name
 <setname>]
\end_layout

\begin_layout LyX-Code
           [ dotproduct | dotangle | crossproduct ]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Description

\series bold
vec1
\begin_inset space ~
\end_inset

<vecname1>
\begin_inset space ~
\end_inset

vec2
\begin_inset space ~
\end_inset

<vecname2>
\series default
 Vector(s) on which to operate.
\end_layout

\begin_layout Description

\series bold
[out
\begin_inset space ~
\end_inset

<filename>]
\series default
 Name of file to write output to.
\end_layout

\begin_layout Description
[dotproduct] (Default) Calculate the dot-product of the two vectors.
\end_layout

\begin_layout Description
[dotangle] Calculate angle from dot-product between the two vectors; vectors
 will be normalized.
\end_layout

\begin_layout Description
[crossproduct] Calculate cross-product of the two vectors.
\end_layout

\begin_layout Description
[norm] Normalize the vectors; this will affect any subsequent calculations
 with the vectors.
 This is turned on automatically if 
\series bold
dotangle
\series default
 specified.
\end_layout

\end_deeper
\begin_layout Standard
Calculate dot product, angle from dot product (degrees), or cross product
 for specified vectors.
 Note that 
\series bold
norm
\series default
 normalizes the vectors themselves; the vectors will remain normalized for
 subsequent calculations or output.
 Either 
\series bold
vec1
\series default
 or 
\series bold
vec2
\series default
 can be of size 1; in that case each vector in the set with N frames operates
 on the single vector.
 For example, if 
\series bold
vec1
\series default
 is size N and 
\series bold
vec2
\series default
 is size 1, then each frame of vec1 is operated on the single vector from
 vec2.
\end_layout

\begin_layout Standard
For example, to get the angles between two previously calculated vectors
 v1 and v2:
\end_layout

\begin_layout LyX-Code
vectormath vec1 v1 vec2 v2 dotangle out dotproduct.dat name acos(|V1|*|V2|)
\end_layout

\begin_layout Subsection
wavelet
\end_layout

\begin_layout LyX-Code
wavelet [crdset <set name>] nb <n scaling vals> [s0 <s0>] [ds <ds>]
\end_layout

\begin_layout LyX-Code
        [correction <correction>] [chival <chival>] [type <wavelet>]
\end_layout

\begin_layout LyX-Code
        [out <filename>] [name <setname>]
\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_layout LyX-Code
        [cluster [minpoints <#>] [epsilon <value>] [clusterout <file>]
\end_layout

\begin_layout LyX-Code
           [clustermapout <file>] [cmapdetail] [kdist] [cprefix <PDB prefix>]
\end_layout

\begin_layout LyX-Code
           [overlay <trajfile>] [overlayparm <parmfile>]]
\end_layout

\begin_deeper
\begin_layout Description
[crdset
\begin_inset space ~
\end_inset

<set
\begin_inset space ~
\end_inset

name>] COORDS data set to use 
\end_layout

\begin_layout Description
nb
\begin_inset space ~
\end_inset

<n
\begin_inset space ~
\end_inset

scaling
\begin_inset space ~
\end_inset

vals> Number of scales.
 The smaller the number the better resolution, but slower to plot.
 
\end_layout

\begin_layout Description
[s0
\begin_inset space ~
\end_inset

<s0>] The smallest scale of the wavelet function (default 2dt where dt is
 time between snapshots in ps ) 
\end_layout

\begin_layout Description
[ds
\begin_inset space ~
\end_inset

<ds>] Spacing between discrete scales.
 (Default is 0.25.
 Smaller value of ds gives finer resolution.
 The largest values that give adequate sampling in scale for Morlet and
 Paul are 0.5 and 1.5, respectively)
\end_layout

\begin_layout Description
[correction
\begin_inset space ~
\end_inset

<correction>] The scale-to-wavelength parameter (1.01 for Morlet, 1.389 for
 Paul).
 Automatically set based on wavelet if not otherwise specified.
 
\end_layout

\begin_layout Description
[chival
\begin_inset space ~
\end_inset

<chival>] The value of 
\begin_inset Formula $\chi_{2}^{2}$
\end_inset

at a particular confidence level 
\end_layout

\begin_layout Description
[type
\begin_inset space ~
\end_inset

<wavelet>] Type of wavelet function to use <morlet> or <paul> 
\end_layout

\begin_layout Description
[out
\begin_inset space ~
\end_inset

<filename>] Write results to file named <filename> 
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] Store results in data set with name <setname>
\end_layout

\begin_layout Description
[cluster] Perform wavelet clustering i.e.
 wavelet feature extraction analysis.
\end_layout

\begin_deeper
\begin_layout Description
[minpoints
\begin_inset space ~
\end_inset

<#>] Minimum number of points necessary to form a region of interest.
\end_layout

\begin_layout Description
[epsilon
\begin_inset space ~
\end_inset

<value>] Minimum region of interest size.
\end_layout

\begin_layout Description
[clusterout
\begin_inset space ~
\end_inset

<file>] Output for clustering (see below).
\end_layout

\begin_layout Description
[clustermapout
\begin_inset space ~
\end_inset

<file>] Output cluster map (recommended gnuplot format, see below).
\end_layout

\begin_layout Description
[cmapdetail] Instead of the map being smoothed to cluster regions, show
 full detail.
\end_layout

\begin_layout Description
[kdist] Can be used to determine minpoints and epsilon - see below.
\end_layout

\begin_layout Description
[cprefix
\begin_inset space ~
\end_inset

<PDB
\begin_inset space ~
\end_inset

prefix>] Output cluster region PDBs (only containing from minimum to maximum
 atom and minimum to maximum frame) with given prefix.
\end_layout

\begin_layout Description
[overlay
\begin_inset space ~
\end_inset

<trajfile>] Create a trajectory that can be overlaid with the original trajector
y to highlight atoms of interest.
 Atoms in cluster regions will get their normal coordinates - all others
 are set to the common center of mass.
 
\end_layout

\begin_layout Description
[overlayparm
\begin_inset space ~
\end_inset

<parmfile>] Topology that can be used with the overlay trajectory.
\end_layout

\end_deeper
\begin_layout Standard
<wavelet>: morlet, paul
\end_layout

\end_deeper
\begin_layout Standard
Perform the wavelet analysis using fast Fourier transform (FFT) algorithm
 on specified trajectory and write out to a gnuplot-formatted file named
 <name.gnu>.
 The created Wavelet map provides a clear picture of the significant motions
 which are characterized both in time and space.
 Note that typically the trajectory in question should have rotational and
 translational movement removed (via e.g.
 the 
\series bold
\emph on
rms
\series default
\emph default
 command); otherwise these will be reflected in the wavelet analysis results.
\end_layout

\begin_layout Standard
Wavelet analysis contains two main steps which performs continues wavelet
 transform (CWT) and statistical significance testing as proposed by Torrence
 and Compo
\begin_inset CommandInset citation
LatexCommand citep
key "Torrence1998"
literal "true"

\end_inset

.
 Analysis is executed on one dimensional (1-D) coordinate which is defined
 as the displacement from the starting position.
 For each atom, CWT is calculated over a specified range of scales from
 
\begin_inset Formula $S_{0}$
\end_inset

up to 
\begin_inset Formula $S_{0}2^{(nb-1)ds}$
\end_inset

.
 To obtain the CWT of the trajectory the Fourier transform of atom's displacemen
t and wavelets which scaled by S ( S is calculated from: 
\begin_inset Formula $S=S_{0}2^{jds};\:j=0,1,2,\ldots,nb-1$
\end_inset

) is computed and then the inverse Fourier transform of the product of Fourier
 transforms will be calculated as the CWT.
 After calculating the wavelet coordinates for all atoms, a significance
 testing is performed to determine the significance of each wavelet coordinate.
 For doing this test we need to have an appropriate background spectrum
 to consider as a mean or expected spectrum and compare our wavelet coordinates
 against this background.
 In order to calculate the background spectrum since wavelet spectrum (according
 to the convolution theorem) follows the Fourier spectrum, the Fourier coefficie
nts over every atom's displacement is calculated using the following formula
 and a model (
\begin_inset Formula $\mu_{k}$
\end_inset

) is constructed on average which Fourier coefficients fit (
\begin_inset Formula $X_{n}$
\end_inset

) is the time series which is the atom’s displacement and k is the frequency
 index
\begin_inset CommandInset citation
LatexCommand citep
key "Benson2012"
literal "true"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Formula 
\[
f_{k=\frac{1}{N}}\sum_{n=0}^{N-1}\exp\left(\frac{-2\pi ikn}{N}\right)X_{n}
\]

\end_inset


\end_layout

\begin_layout Standard
This test is implemented based on the null hypothesis that the assumption
 is that Fourier coordinates normally distributed around the expected value,
 then the wavelet coordinates should also be normally distributed.
 Assuming the expected background spectrum and since the square of a normally
 distributed variable is chi-square distributed, then the distribution for
 the square of the absolute values of wavelet coordinates (
\begin_inset Formula $|W_{i,k}|^{2}$
\end_inset

 is as follows (
\begin_inset Formula $\sigma^{2}$
\end_inset

is the variance of the atom's displacement).
\end_layout

\begin_layout Standard
\begin_inset Formula 
\[
\sigma^{2}\mu_{k}\chi_{2}^{2}/2
\]

\end_inset


\end_layout

\begin_layout Standard
Then choosing a confidence level we can determine the minimum acceptable
 value for 
\begin_inset Formula $|W_{i,k}|^{2}$
\end_inset

to be considered as a significant coordinates at that certain confidence
 level.
 In the final map the scales of only those wavelet coordinates which are
 significantly above the expected distribution are stored.
\end_layout

\begin_layout Standard
For example, to perform wavelet analysis on residues 1 to 17 with 40 scaling
 values starting from scaling of 0.2 with a spacing of 0.25 using the Morlet
 wavelet:
\end_layout

\begin_layout LyX-Code
parm nowat.withions.parm7
\end_layout

\begin_layout LyX-Code
trajin nowat.image.nc
\end_layout

\begin_layout LyX-Code
rms :1-17@C*,N*,O*,P* first mass
\end_layout

\begin_layout LyX-Code
wavelet nb 40 s0 0.2 ds 0.25 correction 1.01 chival 1.6094 type morlet 
\backslash

\end_layout

\begin_layout LyX-Code
        :1-17 out wavelet.gnu usemap
\end_layout

\begin_layout Subsubsection*
Wavelet Analysis Feature Extraction
\end_layout

\begin_layout Standard
Wavelet analysis feature extraction (WAFEX)
\begin_inset CommandInset citation
LatexCommand citep
key "Heidari2016"
literal "true"

\end_inset

 uses a density-based clustering algorithm (a modified version of the DBSCAN
 algorithm) to highlight physical and temporal regions that have significant
 motions from wavelet mapsand can extract the specific atoms and frames
 involved in these motions for further analysis.
 Cluster regions shown in the map will be smoother by default for easier
 visualization (unless 
\series bold
cmapdetail
\series default
 is specified).
 Details of the clustering are provided via the 
\series bold
clusterout
\series default
 keyword with format:
\end_layout

\begin_layout LyX-Code
#Cluster [points] [minatm] [maxatm] [minfrm] [maxfrm] [avgval]
\end_layout

\begin_deeper
\begin_layout Description
#Cluster Cluster region number.
\end_layout

\begin_layout Description
points Number of points in the cluster.
\end_layout

\begin_layout Description
minatm Starting atom of the region.
\end_layout

\begin_layout Description
maxatm End atom of the region.
\end_layout

\begin_layout Description
minfrm Starting frame of the region.
\end_layout

\begin_layout Description
maxfrm End frame of the region.
\end_layout

\begin_layout Description
avgval Average value of points in the region.
\end_layout

\end_deeper
\begin_layout Standard
For example, to create a 2D gnuplot map highlight regions of interest called
 'cluster.gnu' one could use the following input.
\end_layout

\begin_layout LyX-Code
parm ../DPDP.parm7
\end_layout

\begin_layout LyX-Code
trajin ../DPDP.nc
\end_layout

\begin_layout LyX-Code
rms @C,CA,N first
\end_layout

\begin_layout LyX-Code
wavelet nb 10 s0 2 ds 0.25 type morlet correction 1.01 chival 0.25 
\backslash

\end_layout

\begin_layout LyX-Code
        :1-22 name DPDP 
\backslash

\end_layout

\begin_layout LyX-Code
        cluster clustermapout cluster.gnu clusterout cluster.dat 
\backslash

\end_layout

\begin_layout LyX-Code
          minpoints 66 epsilon 10.0
\end_layout

\begin_layout LyX-Code
datafile cluster.gnu usemap palette kbvyw
\end_layout

\begin_layout Standard
Some experimentation with 
\series bold
kdist
\series default
 may be required to obtain reasonable values for 
\series bold
minpoints
\series default
 and 
\series bold
epsilon
\series default
.
 See 
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj_dbscan_Hints"

\end_inset

 as well as the Heidari et al paper for further discussion.
\end_layout

\begin_layout Section
Analysis Examples
\begin_inset CommandInset label
LatexCommand label
name "sec:cpptraj-Matrix-Vector-Analysis-Examples"

\end_inset


\end_layout

\begin_layout Standard
Please note that typically for principal component analysis (PCA) the trajectory
 needs to be aligned against a reference structure to remove overall global
 and translation motion.
 Use the 
\family sans
\series bold
\emph on
rms
\family default
\series default
\emph default
 command for this.
 
\end_layout

\begin_layout Subsection

\series bold
Cartesian covariance matrix calculation and projection (PCA)
\end_layout

\begin_layout Standard
After calculating modes, snapshots can be projected onto these in an additional
 pass through the trajectory.
 It is very important that the snapshots used when projecting are exactly
 the same as those used to generate the original covariance matrix.
 This example takes advantage of the COORDS data set functionality in cpptraj
 to save snapshots for the purposes of projection.
\end_layout

\begin_layout LyX-Code

\series bold
# Step one.
 Generate average structure.
\end_layout

\begin_layout LyX-Code

\series bold
# RMS-Fit to first frame to remove global translation/rotation.
\end_layout

\begin_layout LyX-Code
parm myparm.parm7
\end_layout

\begin_layout LyX-Code
trajin mytraj.nc
\end_layout

\begin_layout LyX-Code
rms first !@H=
\end_layout

\begin_layout LyX-Code
average crdset AVG
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code

\series bold
# Step two.
 RMS-Fit to average structure.
 Calculate covariance matrix.
\end_layout

\begin_layout LyX-Code

\series bold
# Save the fit coordinates.
\end_layout

\begin_layout LyX-Code
rms ref AVG !@H=
\end_layout

\begin_layout LyX-Code
matrix covar name MyMatrix !@H=
\end_layout

\begin_layout LyX-Code
createcrd CRD1
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code

\series bold
# Step three.
 Diagonalize matrix.
\end_layout

\begin_layout LyX-Code
runanalysis diagmatrix MyMatrix vecs 2 name MyEvecs
\end_layout

\begin_layout LyX-Code

\series bold
# Step four.
 Project saved fit coordinates along eigenvectors 1 and 2
\end_layout

\begin_layout LyX-Code
crdaction CRD1 projection evecs MyEvecs !@H= out project.dat beg 1 end 2
\end_layout

\begin_layout Subsection
Dihedral covariance matrix calculation and projection for backbone phi/psi
 (PCA)
\end_layout

\begin_layout LyX-Code
parm ../1rrb_vac.prmtop 
\end_layout

\begin_layout LyX-Code
trajin ../1rrb_vac.mdcrd
\end_layout

\begin_layout LyX-Code

\series bold
# Generation of phi/psi dihedral data
\end_layout

\begin_layout LyX-Code
multidihedral BB phi psi resrange 2
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code

\series bold
# Calculate dihedral covariance matrix and obtain eigenvectors
\end_layout

\begin_layout LyX-Code
matrix dihcovar dihedrals BB[*] out dihcovar.dat name DIH
\end_layout

\begin_layout LyX-Code
diagmatrix DIH vecs 4 out modes.dihcovar.dat name DIHMODES
\end_layout

\begin_layout LyX-Code
run
\end_layout

\begin_layout LyX-Code

\series bold
# Project along eigenvectors
\end_layout

\begin_layout LyX-Code
projection evecs DIHMODES out dih.project.dat beg 1 end 4 dihedrals BB[*]
 
\end_layout

\begin_layout LyX-Code
run
\end_layout

\end_body
\end_document
