1%
2% $Id$
3%
4\label{sec:nwARGOS}
5%\newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}
6\newcommand{\mc}[3]{\mbox{\bf #3}}
7\newcommand{\vb}[1]{\mbox{\verb.#1.}}
8\newcommand{\none}{\multicolumn{2}{|c|}{ }}
9%%%%%%%\renewcommand{\thetable}{\Roman{table}}
10\newcommand{\mcc}[1]{\multicolumn{2}{c}{#1}}
11\def\bmu{\mbox{\boldmath $\mu$}}
12\def\bE{\mbox{\bf E}}
13\def\br{\mbox{\bf r}}
14\def\tT{\tilde{T}}
15\def\t{\tilde{1}}
16\def\ip{i\prime}
17\def\jp{j\prime}
18\def\ipp{i\prime\prime}
19\def\jpp{j\prime\prime}
20\def\etal{{\sl et al.}}
21\def\nwchem{{\bf NWChem}}
22\def\nwargos{{\bf nwargos}}
23\def\prepare{{\bf prepare}}
24\def\nwtop{{\bf nwtop}}
25\def\nwrst{{\bf nwrst}}
26\def\nwsgm{{\bf nwsgm}}
27\def\argos{{\bf ARGOS}}
28
29\section{Introduction}
30
31\subsection{Spacial decomposition}
32The molecular dynamics module of \nwchem\ uses a distribution of data
33based on a spacial decomposition of the molecular system, offering
34an efficient parallel implementation in terms of both memory
35requirements and communication costs, especially for simulations of
36large molecular systems.
37
38Inter-processor communication using the global array tools and the
39design of a data structure allowing distribution based on spacial
40decomposition are the key elements in taking advantage of
41the distribution of memory requirements and computational work with
42minimal communication.
43
44In the spacial decomposition approach, the physical simulation
45volume is divided into rectangular boxes, each of which is
46assigned to a processor. Depending on the conditions of the
47calculation and the number of available processors, each processor
48contains one or more of these spacially grouped boxes.
49The most important aspects of this decomposition are the dependence
50of the box sizes and communication cost on the number of processors
51and the shape of the boxes, the frequent reassignment of atoms to
52boxes leading to a fluctuating number of atoms per box, and the
53locality of communication which is the main reason for the efficiency
54of this approach for very large molecular systems.
55
56To improve efficiency, molecular systems are broken up into separately
57treated solvent and solute parts. Solvent molecules are assigned to
58the domains according to their center of geometry and are always owned
59by a one node. This avoids solvent--solvent bonded interactions
60crossing node boundaries.  Solute molecules are broken up into
61segments, with each segment assigned to a processor based on its
62center of geometry.  This limits the number of solute bonded
63interactions that cross node boundaries.  The processor to which a
64particular box is assigned is responsible for the calculation of all
65interactions between atoms within that box.  For the calculation of
66forces and energies in which atoms in boxes assigned to different
67processors are involved, data are exchanged between processors. The
68number of neighboring boxes is determined by the size and shape of the
69boxes and the range of interaction. The data exchange that takes place
70every simulation time step represents the main communication
71requirements.  Consequently, one of the main efforts is to design
72algorithms and data structures to minimize the cost of this
73communication. However, for very large molecular systems, memory
74requirements also need to be taken into account.
75
76To compromise between these requirements exchange of data is performed
77in successive point to point communications rather than using the
78shift algorithm which reduces the number of communication calls
79for the same amount of communicated data.
80
81For inhomogeneous systems, the computational load of evaluating
82atomic interactions will generally differ between box pairs.
83This will lead to load imbalance between processors.
84Two algorithms have been implemented that allow for dynamically
85balancing the workload of each processor.
86One method is the dynamic resizing of boxes such that boxes gradually
87become smaller on the busiest node, thereby reducing the computational
88load of that node. Disadvantages of this method are that the
89efficiency depends on the solute distribution in the simulation volume
90and the redistribution of work depends on the number of nodes which
91could lead to results that depend on the number of nodes used.
92The second method is based on the dynamic redistribution of intra-node
93box-box interactions. This method represents a more coarse load
94balancing scheme, but does not have the disadvantages of the box
95resizing algorithm. For most molecular systems the box pair
96redistribution is the more efficient and preferred  method.
97
98The description of a molecular system consists of static and dynamic
99information. The static information does not change during a
100simulation and includes items such as connectivity, excluded and third
101neighbor lists, equilibrium values and force constants for all
102bonded and non-bonded interactions. The static information is called
103the topology of the molecular system, and is kept on a separate
104topology file. The dynamic information includes coordinates and
105velocities for all atoms in the molecular system, and is kept in a
106so-called restart file.
107
108The \nwchem\ molecular dynamics module is the parallel implementation
109of the vectorized code \argos\ developed at the University of Houston.
110
111\subsection{Topology}
112\label{sec:nwatopology}
113The static information about a molecular system that is needed for
114a molecular simulation is provided to the simulation module in a
115topology file.
116Items in this file include, among many other things,
117a list of atoms, their non-bonded parameters for van der Waals and
118electrostatic interactions, and the complete connectivity in terms
119of bonds, angles and dihedrals.
120
121In molecular systems, a distinction is made between
122{\it solvent} and {\it solute}, which are treated separately.
123A solvent molecule is defined only once in the topology file,
124even though many solvent molecules usually are included in the
125actual molecular system. In the current implementation only one
126solvent can be defined. Everything that is not solvent in the
127molecular system is solute. Each solute atom in the system must
128be explicitly defined in the topology.
129
130Molecules are defined in terms of one or more {\it segment}s.
131Typically, repetitive parts of a molecule are each defined as a single
132segment, such as the amino acid residues in a protein.
133Segments  can be quite complicated to define and are, therefore,
134collected in a set of database files.
135The definition of a molecular system in terms of segments is a
136{\it sequence}.
137
138Topology files are created using the \prepare\ module.
139
140\subsection{Files}
141\label{sec:nwafilenames}
142
143File names used have the form \verb+$system$_$calc$.$ext$+, with
144exception of the topology file (Section \ref{sec:nwatopology}), which is named
145\verb+$system$.top+.
146Anything that refers to the definition of the chemical system can be used
147for \verb+$system$+, as long as no periods or underlines are used.
148The identifier \verb+$calc$+ can be anything that refers to the type of
149calculation to be performed for the system with the topology defined.
150This file naming convention allows for the creation of a single
151topology file \verb+$system$.top+ that can be used for a number of
152different calculations, each identified with a different \verb+$calc$+.
153For example, if {\tt crown.top} is the name of the topology file for
154a crown ether, {\tt crown\_em}, {\tt crown\_md}, {\tt crown\_ti} could
155be used with appropriate extensions for the filenames for energy
156minimization, molecular dynamics simulation and multi-configuration
157thermodynamic integration, respectively. All of these calculations
158would use the same topology file {\tt crown.top}.
159
160\label{sec:nwaextensions}
161
162The extensions \verb+<ext>+ identify the kind of information on a file,
163and are pre-determined.
164\begin{table}[htbp]
165\begin{center}
166\begin{tabular}{ll}
167{\bf acf} & free energy correlation data file\\
168{\bf cnv} & free energy convergence file\\
169{\bf coo} & coordinate trajectory file\\
170{\bf day} & dayfile\\
171{\bf dbg} & debug file\\
172{\bf dre} & distance restraints file\\
173{\bf emt} & minimization trajectory file\\
174{\bf fet} & free energy step contribution file\\
175{\bf frg} & fragment file\\
176{\bf gib} & free energy data file\\
177{\bf mri} & free energy multiple run input file\\
178{\bf mro} & free energy multiple run output file\\
179{\bf nw}  & \nwchem\ input file\\
180{\bf nwout}  & \nwchem\ output file\\
181{\bf out} & molecular dynamics output file\\
182{\bf pdb} & PDB formatted coordinate file\\
183{\bf prp} & property file\\
184{\bf qrs} & quenched restart file, resulting from an energy minimization\\
185{\bf rdf} & radial distribution function output file\\
186{\bf rdi} & radial distribution function input file\\
187{\bf rst} & restart file, used to start or restart a simulation \\
188{\bf seq} & sequence file, describing the system in segments\\
189{\bf sco} & solute coordinate trajectory file\\
190{\bf sgm} & segment file, describing segments\\
191{\bf slv} & solvent coordinate file\\
192{\bf svl} & solute velocity trajectory file\\
193{\bf syn} & synchronization time file\\
194{\bf tst} & test file\\
195{\bf tim} & timing analysis file\\
196{\bf top} & topology file, contains the static description of a system\\
197{\bf vel} & velocity trajectory file\\
198\end{tabular}
199\end{center}
200\caption{List of file extensions for nwchem chemical system files.}
201\end{table}
202
203
204\subsection{Databases}
205Database file used by the \prepare\ module are found in directories
206with name \verb+$ffield$_$level$+, \\
207where \verb+$ffield$+ is any of the
208supported force fields (Section \ref{sec:nwaforcefields}).
209The source of the data is identified by \verb+$level$+, and can be
210\begin{center}
211\begin{tabular}{lll}
212\hline
213level   & Description                 & Availability \\
214{\bf s} & original published data     & public       \\
215{\bf x} & additional published data   & public       \\
216{\bf q} & contributed data            & public       \\
217{\bf u} & user preferred data         & private      \\
218{\bf t} & user defined temporary data & private      \\
219\hline
220\end{tabular}
221\end{center}
222
223Typically, only the level {\bf s} and {\bf x} databases are publicly
224available.
225The user is responsible for the private level {\bf u} and {\bf t}
226database files. When the \prepare\ module scans the databases, the priority
227is {\bf t}$>${\bf u}$>${\bf x}$>${\bf s}$>$.
228
229The extension \verb+<ext>+ defines the type of database file within each
230database directory.
231\begin{table}[htbp]
232\begin{center}
233\begin{tabular}{ll}
234{\bf frg} & fragments\\
235{\bf par} & parameters\\
236{\bf seq} & sequences\\
237{\bf sgm} & segments\\
238\end{tabular}
239\end{center}
240\caption{List of database file extensions.}
241\end{table}
242
243
244The paths of the different database directories should be defined in a file
245{\tt .nwchemrc} in a user's home directory, and provides the user the
246option to select which database files are scanned.
247
248\subsection{Force fields}
249\label{sec:nwaforcefields}
250Force fields recognized are
251\begin{center}
252\begin{tabular}{ll}
253\hline
254Keyword      & Force field   \\
255{\tt amber}  & AMBER95       \\
256{\tt charmm} & CHARMM        \\
257%{\tt cvff}   & CVFF          \\
258%{\tt gromos} & GROMOS87      \\
259%{\tt oplsa}  & OPLS/AMBER3.0 \\
260%{\tt oplsg}  & OPLS/GROMOS87 \\
261\hline
262\end{tabular}
263\end{center}
264
265\section{Format of fragment files}
266Fragment files contain the basic information needed to specify all
267interactions that need to be considered in a molecular simulation.
268The format of the fragment files is described in Table \ref{tbl:nwafrag}.
269Normally these files are created by the \prepare\ module. Manual
270editing is needed when, for example, the \prepare\ module could not
271complete atom typing, or when modified charges are required.
272
273\begin{table}[htbp]
274\begin{center}
275\begin{tabular}{p{15mm}p{12mm}l}
276\hline\hline
277Card & Format & Description \\ \hline
278I-1-1  & a1     & \$ and \# for comments that describe the fragment \\ % $ for emacs
279\hline
280I-2-1  & i5     & number of atoms in the fragment\\
281I-2-2  & i5     & number of parameter sets\\
282I-2-3  & i5     & default parameter set\\
283I-2-4  & i5     & number of z-matrix definition\\
284\hline
285\mc{3}{l}{For each atom one deck II} \\
286\hline
287II-1-1  & i5     & atom sequence number \\
288II-1-2  & a6     & atom name \\
289II-1-3  & a5     & atom type \\
290II-1-4  & a1     & dynamics type\\
291        &        & \verb+ + : normal\\
292        &        & \verb+D+ : dummy atom\\
293        &        & \verb+S+ : solute interactions only\\
294        &        & \verb+Q+ : quantum atom\\
295        &        & other : intramolecular solute interactions only\\
296II-1-5  & i5     & link number\\
297        &        & 0: no link\\
298        &        & 1: first atom in chain\\
299        &        & 2: second atom in chain\\
300        &        & 3 and up: other links\\
301II-1-6  & i5     & environment type\\
302        &        & 0: no special identifier\\
303        &        & 1: planar, using improper torsion\\
304        &        & 2: tetrahedral, using improper torsion\\
305        &        & 3: tetrahedral, using improper torsion\\
306        &        & 4: atom in aromatic ring\\
307II-1-7  & i5     & charge group\\
308II-1-8  & i5     & polarization group\\
309II-1-9  & f12.6  & atomic partial charge\\
310II-1-10 & f12.6  & atomic polarizability\\
311\hline
312\mc{3}{l}{Any number of cards in deck III to specify complete
313connectivity} \\
314\hline
315III-1-1  & 16i5   & connectivity, duplication allowed\\
316\hline\hline
317\end{tabular}
318\caption{The format of fragment files.\label{tbl:nwafrag}}
319\end{center}
320\end{table}
321
322\section{Creating segment files}
323\label{sec:nwanwsgm}
324The \prepare\ module is used to generate segment files
325from corresponding fragment files. A segment file contains all
326information for the calculation of bonded and non-bonded interactions
327for a given chemical system using a specific force field.
328
329Which atoms form a fragment is specified in the coordinate file,
330currently only in PDB format.
331the restriction is that bonded interactions may only involve atoms on at
332most two segments does no longer exist as of \nwchem\ release 3.2.1.
333The segment entries define three sets of parameters
334for each interaction.
335
336Free energy perturbations can be performed using set 1 for the
337generation of the ensemble while using sets 2 and/or 3
338as perturbations. Free energy multiconfiguration thermodynamic
339integration and multistep thermodynamic perturbation calculations are
340performed by gradually changing the interactions in the system from
341parameter set 2 to parameter set 3. These modifications can be
342edited into the segment files manually, or introduced directly into
343the topology file using the \verb+modify+ commands in the input for
344the \prepare\ module.
345
346The format of a segment is
347described in Tables \ref{tbl:nwaseg1}--\ref{tbl:nwaseg6}.
348
349\begin{table}[htbp]
350\begin{center}
351\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
352\hline\hline
353Deck  & Format & Description \\ \hline
354I-0-1 &        & \# lines at top are comments \\
355I-1-1 & a1     & \$ to identify the start of a segment \\ %$ for emacs
356I-1-2 & a10    & name of the segment, the tenth character\\
357      &        & N: identifies beginning of a chain\\
358      &        & C: identifies end of a chain\\
359      &        & blank: identifies chain fragment\\
360      &        & M: identifies an integral molecule\\
361I-2-1 & i5     & number of atoms in the segment\\
362I-2-2 & i5     & number of bonds in the segment\\
363I-2-3 & i5     & number of angles in the segment\\
364I-2-4 & i5     & number of proper dihedrals in the segment\\
365I-2-5 & i5     & number of improper dihedrals in the segment\\
366\hline
367\end{tabular*}
368\caption{Segment file format, table 1 of 6.\label{tbl:nwaseg1}}
369\end{center}
370\end{table}
371
372\begin{table}[htbp]
373\begin{center}
374\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
375\hline\hline
376Deck & Format & Description \\ \hline
377\mc{3}{l}{For each atom one deck II} \\
378II-1-1  & i5     & atom sequence number \\
379II-1-2  & a6     & atom name \\
380II-1-3  & a5     & atom type, generic set 1 \\
381II-1-4  & a1     & dynamics type\\
382        &        & \verb+ + : normal\\
383        &        & \verb+D+ : dummy atom\\
384        &        & \verb+S+ : solute interactions only\\
385        &        & \verb+Q+ : quantum atom\\
386        &        & other : intramolecular solute interactions only\\
387II-1-4  & a5     & atom type, generic set 2 \\
388II-1-5  & a1     & dynamics type\\
389        &        & \verb+ + : normal\\
390        &        & \verb+D+ : dummy atom\\
391        &        & \verb+S+ : solute interactions only\\
392        &        & \verb+Q+ : quantum atom\\
393        &        & other : intramolecular solute interactions only\\
394II-1-6  & a5     & atom type, generic set 3 \\
395II-1-7  & a1     & dynamics type\\
396        &        & \verb+ + : normal\\
397        &        & \verb+D+ : dummy atom\\
398        &        & \verb+S+ : solute interactions only\\
399        &        & \verb+Q+ : quantum atom\\
400        &        & other : intramolecular solute interactions only\\
401II-1-8  & i5     & charge group\\
402II-1-9  & i5     & polarization group\\
403II-1-10 & i5     & link number\\
404II-1-11 & i5     & environment type\\
405        &        & 0: no special identifier\\
406        &        & 1: planar, using improper torsion\\
407        &        & 2: tetrahedral, using improper torsion\\
408        &        & 3: tetrahedral, using improper torsion\\
409        &        & 4: atom in aromatic ring\\
410II-2-1  & f12.6  & atomic partial charge in e, set 1\\
411II-2-2  & f12.6  & atomic polarizability/$4\pi\epsilon_o$ in nm$^3$, set 1\\
412II-2-3  & f12.6  & atomic partial charge in e, set 2\\
413II-2-4  & f12.6  & atomic polarizability/$4\pi\epsilon_o$ in nm$^3$, set 2\\
414II-2-5  & f12.6  & atomic partial charge in e, set 3\\
415II-2-6  & f12.6  & atomic polarizability/$4\pi\epsilon_o$ in nm$^3$, set 3\\
416\hline
417\end{tabular*}
418\caption{Segment file format, table 2 of 6.\label{tbl:nwaseg2}}
419\end{center}
420\end{table}
421
422\begin{table}[htbp]
423\begin{center}
424\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
425\hline\hline
426Deck & Format & Description \\ \hline
427\mc{3}{l}{For each bond a deck III} \\
428III-1-1 & i5     & bond sequence number \\
429III-1-2 & i5     & bond atom i \\
430III-1-3 & i5     & bond atom j \\
431III-1-4 & i5     & bond type \\
432        &        & 0: harmonic\\
433        &        & 1: constrained bond\\
434III-1-5 & i5     & bond parameter origin\\
435        &        & 0: from database, next card ignored \\
436        &        & 1: from next card\\
437III-2-1 & f12.6  & bond length in nm, set 1\\
438III-2-2 & e12.5  & bond force constant in kJ nm$^2$ mol$^{-1}$, set 1 \\
439III-2-3 & f12.6  & bond length in nm, set 2\\
440III-2-4 & e12.5  & bond force constant in kJ nm$^2$ mol$^{-1}$, set 2 \\
441III-2-5 & f12.6  & bond length in nm, set 3\\
442III-2-6 & e12.5  & bond force constant in kJ nm$^2$ mol$^{-1}$, set 3 \\
443\hline
444\end{tabular*}
445\caption{Segment file format, table 3 of 6.\label{tbl:nwaseg3}}
446\end{center}
447\end{table}
448
449\begin{table}
450\begin{center}
451\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
452\hline\hline
453Deck & Format & Description \\ \hline
454\mc{3}{l}{For each angle a deck IV} \\
455IV-1-1 & i5     & angle sequence number \\
456IV-1-2 & i5     & angle atom i \\
457IV-1-3 & i5     & angle atom j \\
458IV-1-4 & i5     & angle atom k \\
459IV-1-5 & i5     & angle type \\
460       &        & 0: harmonic\\
461IV-1-6 & i5     & angle parameter origin\\
462       &        & 0: from database, next card ignored \\
463       &        & 1: from next card\\
464IV-2-1 & f12.6  & angle in radians, set 1\\
465IV-2-2 & e12.5  & angle force constant in kJ mol$^{-1}$, set 1 \\
466IV-2-3 & f12.6  & angle in radians, set 2\\
467IV-2-4 & e12.5  & angle force constant in kJ mol$^{-1}$, set 2 \\
468IV-2-5 & f12.6  & angle in radians, set 3\\
469IV-2-6 & e12.5  & angle force constant in kJ mol$^{-1}$, set 3 \\
470\hline
471\end{tabular*}
472\caption{Segment file format, table 4 of 6.\label{tbl:nwaseg4}}
473\end{center}
474\end{table}
475
476\begin{table}[htbp]
477\begin{center}
478\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
479\hline\hline
480Deck & Format & Description \\ \hline
481\mc{3}{l}{For each proper dihedral a deck V} \\
482V-1-1 & i5     & proper dihedral sequence number \\
483V-1-2 & i5     & proper dihedral atom i \\
484V-1-3 & i5     & proper dihedral atom j \\
485V-1-4 & i5     & proper dihedral atom k \\
486V-1-5 & i5     & proper dihedral atom l \\
487V-1-6 & i5     & proper dihedral type \\
488      &        & 0: $C\cos(m\phi-\delta)$\\
489V-1-7 & i5     & proper dihedral parameter origin\\
490      &        & 0: from database, next card ignored \\
491      &        & 1: from next card\\
492V-2-1 & i5     & multiplicity, set 1\\
493V-2-2 & f12.6  & proper dihedral in radians, set 1\\
494V-2-3 & e12.5  & proper dihedral force constant in kJ mol$^{-1}$, set 1 \\
495V-2-4 & i5     & multiplicity, set 2\\
496V-2-5 & f12.6  & proper dihedral in radians, set 2\\
497V-2-6 & e12.5  & proper dihedral force constant in kJ mol$^{-1}$, set 2 \\
498V-2-7 & i5     & multiplicity, set 3\\
499V-2-8 & f12.6  & proper dihedral in radians, set 3\\
500V-2-9 & e12.5  & proper dihedral force constant in kJ mol$^{-1}$, set 3 \\
501\hline
502\end{tabular*}
503\caption{Segment file format, table 5 of 6.\label{tbl:nwaseg5}}
504\end{center}
505\end{table}
506
507\begin{table}[htbp]
508\begin{center}
509\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
510\hline\hline
511Deck & Format & Description \\ \hline
512\mc{3}{l}{For each improper dihedral a deck VI} \\
513VI-1-1 & i5     & improper dihedral sequence number \\
514VI-1-2 & i5     & improper dihedral atom i \\
515VI-1-3 & i5     & improper dihedral atom j \\
516VI-1-4 & i5     & improper dihedral atom k \\
517VI-1-5 & i5     & improper dihedral atom l \\
518VI-1-6 & i5     & improper dihedral type \\
519       &        & 0: harmonic\\
520VI-1-7 & i5     & improper dihedral parameter origin\\
521       &        & 0: from database, next card ignored \\
522       &        & 1: from next card\\
523VI-2-1 & f12.6  & improper dihedral in radians, set 1\\
524VI-2-2 & e12.5  & improper dihedral force constant in kJ mol$^{-1}$, set 1 \\
525VI-2-3 & f12.6  & improper dihedral in radians, set 2\\
526VI-2-4 & e12.5  & improper dihedral force constant in kJ mol$^{-1}$, set 2 \\
527VI-2-5 & f12.6  & improper dihedral in radians, set 3\\
528VI-2-6 & e12.5  & improper dihedral force constant in kJ mol$^{-1}$, set 3 \\
529\hline\hline
530\end{tabular*}
531\caption{Segment file format, table 6 of 6.\label{tbl:nwaseg6}}
532\end{center}
533\end{table}
534
535
536\section{Creating sequence files}
537A sequence file describes a molecular system in terms of segments. This
538file is generated by the \prepare\ module for the molecular system
539provided on a PDB-formatted coordinate file.
540The file format is given in Table \ref{tbl:nwaseq}
541
542\begin{table}[htbp]
543\begin{center}
544\begin{tabular*}{150mm}{p{15mm}p{12mm}l}
545\hline\hline
546Card & Format & Description \\ \hline
547I-1-1  & a1     & \$ to identify the start of a sequence \\ %$ for emacs
548I-1-2  & a10    & name of the sequence\\
549\mc{3}{l}{Any number of cards 1 and 2 in deck II to specify the system} \\
550II-1-1 & i5     & segment number\\
551II-1-2 & a10    & segment name, last character will be determined from chain\\
552II-1-3 & i5     & link segment 1, if blank previous segment in chain\\
553II-1-4 & i3     & link atom, if blank link atom 2\\
554II-1-5 & i5     & link segment 2, if blank next segment in chain\\
555II-1-6 & i3     & link atom, if blank link atom 1\\
556II-1-7 & i5     & link segment 3\\
557II-1-8 & i3     & link atom in link segment 3\\
558II-1-9 & i5     & link segment 4\\
559II-1-0 & i3     & link atom in link segment 4\\
560II-1-1 & i5     & link segment 5\\
561II-1-2 & i3     & link atom in link segment 5\\
562II-1-3 & i5     & link segment 6\\
563II-1-4 & i3     & link atom in link segment 6\\
564II-1-5 & i5     & link segment 7\\
565II-1-6 & i3     & link atom in link segment 7\\
566II-1-7 & i5     & link segment 8\\
567II-1-8 & i3     & link atom in link segment 8\\
568II-1-9 & i5     & link segment 9\\
569II-1-0 & i3     & link atom in link segment 9\\
570II-1-1 & i5     & link segment 10\\
571II-1-2 & i3     & link atom in link segment 10\\
572II-2-1 & a      & \verb+break+ to identify a break in the molecule chain\\
573II-2-1 & a      & \verb+molecule+ to identify the end of a solute molecule\\
574II-2-1 & a      & \verb+fraction+ to identify the end of a solute fraction\\
575II-2-1 & a5     & \verb+link + to specify a link\\
576II-2-2 & i5     & segment number of first link atom\\
577II-2-3 & a4     & name of first link atom \\
578II-2-4 & i5     & segment number of second link atom\\
579II-2-5 & a4     & name of second link atom \\
580II-2-1 & a      & \verb+solvent+ to identify solvent definition on next card\\
581II-2-1 & a      & \verb+stop+ to identify the end of the sequence\\
582II-2-1 & a6     & \verb+repeat+ to repeat next $ncard$ cards $ncount$
583times\\
584II-2-2 & i5     & number of cards to repeat ($ncards$)\\
585II-2-3 & i5     & number of times to repeat cards ($ncount$)\\
586\mc{3}{l}{Any number of cards in deck II to specify the system} \\
587\hline\hline
588\end{tabular*}
589\caption{Sequence file format.\label{tbl:nwaseq}}
590\end{center}
591\end{table}
592
593\section{Creating topology files}
594\label{sec:nwanwtop}
595
596The topology (Section \ref{sec:nwatopology}) describes all static information
597that describes a molecular system. This includes the connectivity in
598terms of bond-stretching, angle-bending and torsional interactions, as well as
599the non-bonded van der Waals and Coulombic interactions.
600
601The topology of a molecular system is generated by the \prepare\ module
602from the sequence in terms of segments as specified on the PDB file.
603For each unique segment specified in this file the
604segment database directories are searched for the segment definition.
605For segments not found in one of the database directories a segment definition
606is generated in the temporary directory if a fragment file was found.
607If a fragment file could not be found, it is generated by the \prepare\ module
608base on what is found on the PDB file.
609
610When all segments are found or created, the parameter substitutions are
611performed, using force field parameters taken from the parameter
612databases. After all lists have been generated the
613topology is written to a local topology file \verb+$system$.top+.
614
615\section{Creating restart files}
616\label{sec:nwanwrst}
617
618Restart files contain all dynamical information about a molecular
619system and are created by the \prepare\ module if a topology file
620is available. The \prepare\ module will automatically generate
621coordinates for hydrogen atoms and monatomic counter ions
622not found on the PDB formatted coordinate file, if no fragment or
623segment files were generated using that PDB file.
624
625The \prepare\ module has a number of other optional input command,
626including solvation.
627
628\section{Molecular simulations}
629The type of molecular dynamics simulation is specified by the
630\nwchem\ task directive.
631\begin{verbatim}
632task md [ energy || optimize || dynamics || thermodynamics ]
633\end{verbatim}
634where the theory keyword {\tt md} specifies use of the molecular
635dynamics module, and the operation keyword is one of
636\begin{description}
637\item
638{\tt energy} for single configuration energy evaluation
639\item
640{\tt optimize} for energy minimization
641\item
642{\tt dynamics} for molecular dynamics simulations and single step
643thermodynamic perturbation free energy molecular dynamics simulations
644\item
645{\tt thermodynamics} for combined multi-configuration thermodynamic
646integration and multiple step thermodynamic perturbation free
647energy molecular dynamics simulations.
648\end{description}
649
650\section{System specification}
651The chemical system for a calculation is specified in the topology
652and restart files. These files should be created using the utilities
653\nwtop\ and \nwrst\ before a simulation can be performed.
654The names of these files are determined from the \nwchem\ \verb+start+
655directive.
656There is no default. If the \verb+rtdb+ name is given as {\tt system\_calc},
657the topology file used is {\tt system.top}, while all other files
658are named {\tt system\_calc.ext}.
659
660\section{Parameter set}
661\begin{description}
662
663\item
664\begin{verbatim}
665set <integer iset>
666\end{verbatim}
667specifies the use of parameter set \verb+<iset>+ for the
668molecular dynamics simulation.
669The topology file contains three separate parameters sets that can
670be used. The default for \verb+<iset>+ is 1.
671
672\item
673\begin{verbatim}
674pset <integer isetp1> [<integer isetp2>]
675\end{verbatim}
676specifies the parameter sets to be used as perturbation potentials
677in single step thermodynamic perturbation free energy evaluations,
678where \verb+<isetp1>+ specifies the first perturbation parameter set and
679\verb+<isetp2>+ specifies the second perturbation parameter set. Legal
680values for \verb+<isetp1>+ are 2 and 3. Legal value for \verb+<isetp2>+ is
6813, in which case \verb+<isetp1>+ can only be 2. If specified, \verb+<iset>+
682is automatically set to 1.
683\end{description}
684
685\section{Energy minimization algorithms}
686The energy minimization of the system as found in the restart file
687is performed with the following directives. If both are specified,
688steepest descent energy minimization precedes conjugate gradient
689minimization.
690
691%\begin{description}
692\begin{description}
693\item
694\begin{verbatim}
695sd <integer msdit> [init <real dx0sd>] [min <real dxsdmx>] \
696                   [max <real dxmsd>]
697\end{verbatim}
698specifies the variables for steepest descent energy minimizations,
699where \verb+<msdit>+ is the maximum number of steepest descent steps taken,
700for which the default is 100, \verb+<dx0sd>+ is the initial step size in nm
701for which the default is 0.001, \verb+<dxsdmx>+ is the threshold for the
702step size in nm for which the default is 0.0001, and \verb+<dxmsd>+ is the
703maximum allowed step size in nm for which the default is 0.05.
704\item
705\begin{verbatim}
706cg <integer mcgit> [init <real dx0cg>] [min <real dxcgmx>] \
707                   [cy <integer ncgcy>]
708\end{verbatim}
709specifies the variables for conjugate gradient energy minimizations,
710where \verb+<mcgit>+ is the maximum number of conjugate gradient steps
711taken, for which the default is 100, \verb+<dx0cg>+ is the initial search
712interval size in nm for which the default is 0.001, \verb+<dxcgmx>+ is the
713threshold for the step size in nm for which the default is 0.0001, and
714\verb+<ncgcy>+ is the number of conjugate gradient steps after which the
715gradient history is discarded for which the default is 10. If conjugate
716gradient energy minimization is preceded by steepest descent energy
717minimization, the search interval is set to twice the final step of the
718steepest descent energy minimization.
719\end{description}
720%\end{description}
721
722\section{Multi-configuration thermodynamic integration}
723The following keywords control free energy difference simulations.
724Multi-configuration thermodynamic integrations are always combined
725with multiple step thermodynamic perturbations.
726\begin{description}
727
728\item
729\begin{verbatim}
730(forward || reverse) [[<integer mrun> of] <integer maxlam>]
731\end{verbatim}
732specifies the direction and number of integration steps in free
733energy evaluations, with {\tt forward} being the default direction.
734\verb+<mrun>+ is the number of ensembles that will be generated in
735this calculation, and \verb+<maxlam>+ is the total number of ensembles
736to complete the thermodynamic integration. The default value for
737\verb+<maxlam>+ is 21. The default value of \verb+<mrun>+ is the
738value of \verb+<maxlam>+.
739
740\item
741\begin{verbatim}
742error <real edacq>
743\end{verbatim}
744specifies the maximum allowed statistical error in each generated
745ensemble, where \verb+<edacq>+ is the maximum error allowed in the
746ensemble average derivative of the Hamiltonian with respect to
747$\lambda$ with a default of 5.0 kJ~mol$^{-1}$.
748
749\item
750\begin{verbatim}
751drift <real ddacq>
752\end{verbatim}
753specifies the maximum allowed drift in the free energy result,
754where \verb+<ddacq>+ is the maximum drift allowed in the
755ensemble average derivative of the Hamiltonian with respect to
756$\lambda$with a default of 5.0 kJ~mol$^{-1}$ps$^{-1}$.
757
758\item
759\begin{verbatim}
760factor <real fdacq>
761\end{verbatim}
762specifies the maximum allowed change in ensemble size
763where \verb+<fdacq>+ is the minimum size of an ensemble relative to the
764previous ensemble in the calculation with a default value of 0.75.
765
766\item
767\begin{verbatim}
768decomp
769\end{verbatim}
770specifies that a free energy decomposition is to be carried out.
771Since free energy contributions are path dependent, results from a
772decomposition analysis can not be unambiguously interpreted, and
773the default is not to perform this decomposition.
774
775\item
776\begin{verbatim}
777sss [delta <real delta>]
778\end{verbatim}
779specifies that atomic non-bonded interactions describe a dummy atom
780in either the initial or final state of the thermodynamic calculation
781will be calculated using separation-shifted scaling, where \verb+<delta>+
782is the separation-shifted scaling factor with a default of 0.075 nm$^2$.
783This scaling method prevents problems associated with singularities in
784the interaction potentials.
785
786\item
787\begin{verbatim}
788new || renew || extend
789\end{verbatim}
790specifies the initial conditions for thermodynamic calculations.
791{\tt new} indicates that this is an initial mcti calculation, which
792is the default. {\tt renew} instructs to obtain the initial
793conditions for each $\lambda$ from the {\bf mro}-file from a previous
794mcti calculation, which has to be renamed to an {\bf mri}-file. The
795keyword {\tt extend} will extend a previous mcti calculation from the
796data read from an {\bf mri}-file.
797\end{description}
798
799\section{Time and integration algorithm directives}
800Following directives control the integration of the equations of motion.
801\begin{description}
802
803\item
804\begin{verbatim}
805leapfrog || vverlet
806\end{verbatim}
807specifies the integration algorithm,
808where {\tt leapfrog} specifies the default leap frog integration, and
809{\tt vverlet} specifies the velocity Verlet integrator.
810
811\item
812\begin{verbatim}
813equil <integer mequi>
814\end{verbatim}
815specifies the number of equilibration steps \verb+<mequi>+, with a default
816of 100.
817
818\item
819\begin{verbatim}
820data <integer mdacq> [over <integer ldacq>]]
821\end{verbatim}
822specifies the number of data gathering steps \verb+<mdacq>+ with a
823default of 500. In multi-configuration thermodynamic integrations
824\verb+<mequi>+ and \verb+<mdacq>+ are for each of the ensembles, and
825variable \verb+<ldacq>+ specifies the minimum number of data gathering steps
826in each ensemble. In regular molecular dynamics simulations \verb+<ldacq>+
827is not used. The default value for \verb+<ldacq>+ is the value of \verb+<mdacq>+.
828
829\item
830\begin{verbatim}
831time <real stime>
832\end{verbatim}
833specifies the initial time \verb+<stime>+ of a molecular simulation in ps,
834with a default of 0.0.
835
836\item
837\begin{verbatim}
838step <real tstep>
839\end{verbatim}
840specifies the time step \verb+<tstep>+ in ps, with 0.001 as the default value.
841\end{description}
842
843\section{Ensemble selection}
844Following directives control the ensemble type.
845
846\begin{description}
847
848\item
849\begin{verbatim}
850isotherm [<real tmpext>] [trelax <real tmprlx> [<real tmsrlx>]]
851\end{verbatim}
852specifies a constant temperature ensemble using Berendsen's thermostat,
853where \verb+<tmpext>+ is the external temperature with a default of 298.15~K,
854and \verb+<tmprlx>+ and \verb+<tmsrlx>+ are temperature relaxation times in ps
855with a default of 0.1. If only \verb+<tmprlx>+ is given the complete system
856is coupled to the heat bath with relaxation time \verb+<tmprlx>+. If both
857relaxation times are supplied, solvent and solute are independently coupled
858to the heat bath with relaxation times \verb+<tmprlx>+ and \verb+<tmsrlx>+,
859respectively.
860
861\item
862\begin{verbatim}
863isobar [<real prsext>] [trelax <real prsrlx> ] \
864       [compress <real compr>]
865\end{verbatim}
866specifies a constant pressure ensemble using Berendsen's piston,
867where \verb+<prsext>+ is the external pressure with a default of 1.025~10$^5$ Pa,
868\verb+<prsrlx>+ is the pressure relaxation time in ps with a default of 0.5, and
869\verb+<compr>+ is the system compressibility in m$^2$N$^{-1}$ with a
870default of 4.53E-10.
871\end{description}
872
873\section{Velocity reassignments}
874Velocities can be periodically reassigned to reflect a certain temperature.
875\begin{description}
876\item
877\begin{verbatim}
878vreass <integer nfgaus> <real tgauss>
879\end{verbatim}
880specifies that velocities will be reassigned every \verb+<nfgaus>+ molecular
881dynamics steps, reflecting a temperature of \verb+<tgauss>+~K. The default
882is not to reassign velocities, i.e.\ \verb+<nfgaus>+ is 0.
883\end{description}
884
885\section{Cutoff radii}
886Cutoff radii can be specified for short range and long range interactions.
887\begin{description}
888\item
889\begin{verbatim}
890cutoff [short] <real rshort> [long <real rlong>] \
891       [qmmm <real rqmmm>]
892\end{verbatim}
893specifies the short range cutoff radius \verb+<rshort>+, and the long range
894cutoff radius \verb+<rlong>+ in nm. If the long range cutoff radius
895is larger than the short range cutoff radius the twin range method will
896be used, in which short range forces and energies are evaluated every
897molecular dynamics step, and long range forces and energies with a
898frequency of \verb+<nflong>+ molecular dynamics steps. Keyword
899\verb+qmmm+ specifies the radius of the zone around quantum atoms
900defining the QM/MM bare charges.
901The default value for \verb+<rshort>+, \verb+<rlong>+ and \verb+<rqmmm>+
902is 0.9~nm.
903\end{description}
904
905\section{Polarization}
906First order and self consistent electronic polarization models have
907been implemented.
908\begin{description}
909\item
910\begin{verbatim}
911polar (first || scf [[<integer mpolit>] <real ptol>])
912\end{verbatim}
913specifies the use of polarization potentials,
914where the keyword {\tt first} specifies the first order polarization
915model, and {\tt scf} specifies the self consistent polarization field
916model, iteratively determined with a maximum of \verb+<mpolit>+
917iterations to within a tolerance of \verb+<ptol>+ D in the generated
918induced dipoles. The default is not to use polarization models.
919\end{description}
920
921\section{External electrostatic field}
922\begin{description}
923
924\item
925\begin{verbatim}
926field <real xfield> [freq <real xffreq>] [vector <real xfvect(1:3)>]
927\end{verbatim}
928specifies an external electrostatic field,
929where \verb+<xfield>+ is the field strength, \verb+<xffreq>+ is the
930frequency in MHz and \verb+<xfvect>+ is the external field vector.
931\end{description}
932
933\section{Constraints}
934Constraints are satisfied using the SHAKE
935coordinate resetting procedure.
936\begin{description}
937
938\item
939\begin{verbatim}
940shake [<integer mshitw> [<integer mshits>]]  \
941      [<real tlwsha> [<real tlssha>]]
942\end{verbatim}
943specifies the use of SHAKE constraints,
944where \verb+<mshitw>+ is the maximum number of solvent SHAKE iterations,
945and \verb+<mshits>+ is the maximum number of solute SHAKE iterations. If
946only \verb+<mshitw>+ is specified, the value will also be used for \verb+<mshits>+.
947The default maximum number of iterations is 100 for both.
948\verb+<tlwsha>+ is the solvent SHAKE tolerance in nm, and \verb+<tlssha>+ is
949the solute SHAKE tolerance in nm. If only \verb+<tlwsha>+ is specified, the
950value given will also be used for \verb+<tlssha>+. The default tolerance
951is 0.001~nm for both.
952
953\item
954\begin{verbatim}
955noshake (solvent || solute)
956\end{verbatim}
957disables SHAKE and treats the bonded interaction according to the force
958field.
959
960\end{description}
961
962\section{Long range interaction corrections}
963Long range electrostatic interactions are implemented using the
964smooth particle mesh Ewald technique, for neutral periodic cubic systems in
965the constant volume ensemble, using pair interaction potentials. Particle-mesh
966Ewald long range interactions can only be used in molecular dynamics simulations
967using effective pair potentials, and not in free energy simulations, QMD or
968QM/MM simulations.
969
970\begin{description}
971\item
972\begin{verbatim}
973pme [grid <integer ng>] [alpha <real ealpha>] \
974    [order <integer morder>] [fft <integer imfft>]
975\end{verbatim}
976specifies the use of smooth particle-mesh Ewald long range
977interaction treatment,
978where \verb+ng+ is the number of grid points per dimension,
979\verb+ealpha+ is the Ewald coefficient in nm$^{-1}$, with a default
980that leads to a tolerance of $10^{-4}$ at the short range cutoff radius,
981and \verb+morder+ is order of the Cardinal B-spline
982interpolation which must be an even number and at least 4 (default
983value). A platform specific 3D fast Fourier transform is used, if
984available, when \verb+imfft+ is set to 2.
985\end{description}
986
987\section{Fixing coordinates}
988The solvent or solute part of a system may be fixed or unfixed using
989the following keywords. Fixing part of the system will not propagate to
990simulations using restart files written. In the commands \verb+fix+
991and \verb+unfix+, the keywords \verb+all+, \verb+solvent+,
992\verb+solute+ and \verb+non-H+ specify the entire molecular system,
993the solvent, the solute and the solute atoms other than hydrogen,
994respectively.
995\begin{description}
996\item
997\begin{verbatim}
998fix (all || solvent || solute || non-H)
999\end{verbatim}
1000fixes all atoms, solvent molecule, solute atom or solute non-hydrogen atoms,
1001respectively.
1002\item
1003\begin{verbatim}
1004unfix (all || solvent || solute || non-H)
1005\end{verbatim}
1006makes all atoms, solvent molecule, solute atom or solute non-hydrogen atoms,
1007respectively, dynamic.
1008\end{description}
1009
1010\section{Autocorrelation function}
1011For the evaluation of the statistical error of multi-configuration
1012thermodynamic integration free energy results a correlated data
1013analysis is carried out, involving the calculation of the
1014autocorrelation function of the derivative of the Hamiltonian with
1015respect to the control variable $\lambda$.
1016\begin{description}
1017
1018\item
1019\begin{verbatim}
1020auto <integer lacf> [fit <integer nfit>] [weight <real weight>]
1021\end{verbatim}
1022controls the calculation of the autocorrelation,
1023where \verb+<lacf>+ is the length of the autocorrelation function, with
1024a default of 1000, \verb+<nfit>+ is the number of functions used in the
1025fit of the autocorrelation function, with a default of 15, and
1026\verb+<weight>+ is the weight factor for the autocorrelation function,
1027with a default value of 0.0.
1028\end{description}
1029
1030\section{Print options}
1031Keywords that control print to the output file, with extension {\bf out}.
1032Print directives may be combined to a single directive.
1033
1034\begin{description}
1035
1036\item
1037\begin{verbatim}
1038print topol [nonbond] [solvent] [solute]
1039\end{verbatim}
1040specifies printing the topology information,
1041where {\tt nonbond} refers to the non-bonded interaction parameters,
1042{\tt solvent} to the solvent bonded parameters, and {\tt solute} to the
1043solute bonded parameters. If only {\tt topol} is specified, all
1044topology information will be printed to the output file.
1045
1046\item
1047\begin{verbatim}
1048print step <integer nfoutp> [extra] [energy]
1049\end{verbatim}
1050specifies the frequency \verb+nfoutp+ of printing molecular dynamics step
1051information to the output file. If the keyword {\tt extra} is specified
1052additional energetic data are printed for solvent and solute separately.
1053If the keyword {\tt energy} is specified, information is printed for
1054all bonded solute interactions.
1055The default for \verb+nfoutp+ is 0. For molecular dynamics simulations
1056this frequency is in time steps, and for multi-configuration thermodynamic
1057integration in $\lambda$-steps.
1058
1059\item
1060\begin{verbatim}
1061print stat <integer nfstat>
1062\end{verbatim}
1063specifies the frequency \verb+<nfstat>+ of printing statistical information
1064of properties that are calculated during the simulation.
1065For molecular dynamics simulation
1066this frequency is in time steps, for multi-configuration thermodynamic
1067integration in $\lambda$-steps.
1068\end{description}
1069
1070\section{Periodic updates}
1071Following keywords control periodic events during a molecular
1072dynamics or thermodynamic integration simulation.
1073Update directives may be combined to a single directive.
1074
1075\begin{description}
1076\item
1077\begin{verbatim}
1078update pairs <integer nfpair>
1079\end{verbatim}
1080specifies the frequency \verb+<nfpair>+ in molecular dynamics steps of
1081updating the pair lists. The default for the frequency is 1.
1082In addition, pair lists are also updated after each step in which
1083recording of the restart or trajectory files is performed. Updating
1084the pair lists includes the redistribution of atoms that changed
1085domain and load balancing, if specified.
1086
1087\item
1088\begin{verbatim}
1089update long <integer nflong>
1090\end{verbatim}
1091specifies the frequency \verb+<nflong>+ in molecular dynamics steps
1092of updating the long range forces. The default frequency is 1.
1093The distinction of short range and long range forces is only
1094made if the long range cutoff radius was specified to be larger
1095than the short range cutoff radius. Updating the long range forces
1096is also done in every molecular dynamics step in which the
1097pair lists are regenerated.
1098
1099\item
1100\begin{verbatim}
1101update center <integer nfcntr> [fraction <integer idscb(1:5)>]
1102\end{verbatim}
1103specifies the frequency \verb+<nfcntr>+ in molecular dynamics steps in
1104which the center of geometry of the solute(s) is translated to the
1105center of the simulation volume. The solute fractions determining the
1106solutes that will be centered are specified by the keyword
1107{\tt fraction} and the vector \verb+<idscb>+, with a maximum of 5 entries.
1108This translation is implemented such that it has no effect on any
1109aspect of the simulation. The default is not to center, i.e. nfcntr is
11100. The default fraction used to center solute is 1.
1111
1112\item
1113\begin{verbatim}
1114update motion <integer nfslow>
1115\end{verbatim}
1116specifies the frequency \verb+<nfslow>+ in molecular dynamics steps of
1117removing the center of mass motion.
1118
1119\item
1120\begin{verbatim}
1121update analysis <integer nfanal>
1122\end{verbatim}
1123specifies the frequency \verb+<nfanal>+ in molecular dynamics steps of
1124invoking the analysis module.
1125
1126\item
1127\begin{verbatim}
1128update rdf <integer nfrdf> [range <real rrdf>] [bins <integer ngl>]
1129\end{verbatim}
1130specifies the frequency \verb+<nfrdf>+ in molecular dynamics steps of
1131calculating contributions to the radial distribution functions.
1132The default is 0. The range of the radial distribution
1133functions is given by \verb+<rrdf>+ in nm, with a default of the short
1134range cutoff radius. Note that radial distribution functions are not
1135evaluated beyond the short range cutoff radius. The number of
1136bins in each radial distribution function is given by \verb+<ngl>+, with
1137a default of 1000.
1138If radial distribution function are to be
1139calculated, a {\bf rdi} files needs to be available in which the
1140contributions are specified as follows.
1141\begin{center}
1142\begin{tabular}{lll}
1143\hline\hline
1144Card & Format & Description \\ \hline
1145I-1  & i & Type, 1=solvent-solvent, 2=solvent-solute,
11463-solute-solute\\
1147I-2  & i & Number of the rdf for this contribution\\
1148I-3  & i & First atom number \\
1149I-4  & i & Second atom number \\
1150\hline
1151\end{tabular}
1152\end{center}
1153\end{description}
1154
1155\section{Recording}
1156The following keywords control recording data to file.
1157Record directives may be combined to a single directive.
1158
1159\begin{description}
1160
1161%\item
1162%The file format of selected recording files is specified with
1163%\begin{verbatim}
1164%record (binary || ascii [ecce || argos])
1165%\end{verbatim}
1166%with the default of ascii in ecce readable format.
1167
1168\item
1169\begin{verbatim}
1170record rest <integer nfrest> [keep]
1171\end{verbatim}
1172specifies the frequency \verb+<nfrest>+ in molecular dynamics steps
1173of rewriting the restart file, with extension \verb+rst+.
1174For multi-configuration
1175thermodynamic integration simulations the frequency is in
1176steps in $\lambda$. The default is not to record. The restart
1177file is used to start or restart simulations. The keyword {\tt keep}
1178causes all restart files written to be kept on disk, rather than
1179to be overwritten.
1180
1181\item
1182\begin{verbatim}
1183record coord <integer nfcoor>
1184\end{verbatim}
1185specifies the frequency \verb+<nfcoor>+ in molecular dynamics steps
1186of writing information to the coordinate file, with extension \verb+coo+.
1187For multi-configuration
1188thermodynamic integration simulations the frequency is in
1189steps in $\lambda$. The default is not to record.
1190
1191\item
1192\begin{verbatim}
1193record scoor <integer nfscoo>
1194\end{verbatim}
1195specifies the frequency \verb+<nfscoo>+ in molecular dynamics steps
1196of writing information to the solute coordinate file, with extension
1197\verb+sco+. For multi-configuration
1198thermodynamic integration simulations the frequency is in
1199steps in $\lambda$. The default is not to record.
1200
1201\item
1202\begin{verbatim}
1203record veloc <integer nfvelo>
1204\end{verbatim}
1205specifies the frequency \verb+<nfvelo>+ in molecular dynamics steps
1206of writing information to the velocity file, with extension \verb+vel+.
1207For multi-configuration
1208thermodynamic integration simulations the frequency is in
1209steps in $\lambda$. The default is not to record.
1210
1211\item
1212\begin{verbatim}
1213record svelo <integer nfsvel>
1214\end{verbatim}
1215specifies the frequency \verb+<nfsvel>+ in molecular dynamics steps
1216of writing information to the solute velocity file, with extension
1217\verb+svl+. For multi-configuration
1218thermodynamic integration simulations the frequency is in
1219steps in $\lambda$. The default is not to record.
1220
1221\item
1222\begin{verbatim}
1223record prop <integer nfprop>
1224\end{verbatim}
1225specifies the frequency \verb+<nfprop>+ in molecular dynamics steps
1226of writing information to the property file, with extension
1227\verb+prp+. For multi-configuration
1228thermodynamic integration simulations the frequency is in
1229steps in $\lambda$. The default is not to record.
1230
1231\item
1232\begin{verbatim}
1233record mind <integer nfem>
1234\end{verbatim}
1235specifies the frequency \verb+<nfem>+ in energy minimization steps of
1236writing the minimization trajectory to file, with extension \verb+emt+.
1237
1238\item
1239\begin{verbatim}
1240record free <integer nffree>
1241\end{verbatim}
1242specifies the frequency \verb+<nffree>+ in multi-configuration
1243thermodynamic integration steps to record data to the
1244free energy data file, with extension \verb+gib+.
1245The default is 1, i.e.\ to record at every $\lambda$.
1246
1247\item
1248\begin{verbatim}
1249record cnv
1250\end{verbatim}
1251specifies that free energy convergence data will be written to the
1252free energy convergence file, with extension \verb+cnv+.
1253
1254\item
1255\begin{verbatim}
1256record acf
1257\end{verbatim}
1258specifies that free energy derivative autocorrelation data will be
1259written to the free energy autocorrelation file, with extension
1260\verb+acf+.
1261
1262\item
1263\begin{verbatim}
1264record fet
1265\end{verbatim}
1266that free energy vs.\ time data will be recorded to the free energy
1267data file, with extension \verb+fet+.
1268
1269\item
1270\begin{verbatim}
1271record sync <integer nfsync>
1272\end{verbatim}
1273specifies the frequency  \verb+<nfsync>+ in molecular dynamics steps
1274of writing information to the synchronization file, with extension
1275\verb+syn+.
1276The default is not to record.
1277The information written is the simulation time, the wall clock time
1278of the previous MD step, the wall clock time of the previous force
1279evaluation, the total synchronization time, the largest
1280synchronization time and the node on which the largest synchronization
1281time was found. The recording of synchronization times is part of the
1282load balancing algorithm. Since load balancing is only performed when
1283pair-lists are updated, the frequency \verb+<nfsync>+ is correlated
1284with the frequency of pair-list updates \verb+<nfpair>+.
1285\end{description}
1286
1287\section{Program control options}
1288\begin{description}
1289\item
1290\begin{verbatim}
1291load [reset] ( none || size [<real factld>] || pairs ||
1292     (pairs [<integer ldpair>] size [<real factld>]) )
1293\end{verbatim}
1294determines the type of dynamic load balancing performed,
1295where the default is {\tt none}. Load balancing option {\tt size}
1296is resizing boxes on a node, and {\tt pairs} redistributes the
1297box-box interactions over nodes. Keyword \verb+reset+ will reset the
1298load balancing read from the restart file. The level of box resizing
1299can be influenced with $factld$. The boxes on the busiest node are
1300resized with a factor
1301\begin{equation}
1302\left( 1 - factld * { {T_{sync} \over n_p} - t^{min}_{sync} \over t_{wall}}
1303\right)^{1\over 3}
1304\end{equation}
1305where $T_{sync}$ is the accumulated synchronization time of all nodes,
1306$n_p$ is the total number of nodes, $t^{min}_{sync}$ is the synchronization
1307time of the busiest node, and $t_{wall}$ is the wall clock time of the
1308molecular dynamics step.\\
1309For the combined load balancing, \verb+ldpair+ is the number of successive pair
1310redistribution load balancing steps in which the accumulated synchronization
1311time increases, before a resizing load balancing step will be attempted.\\
1312Load balancing is only performed in molecular dynamics steps in which the
1313pair-list is updated.
1314
1315\item
1316\begin{verbatim}
1317nodes <integer npx> <integer npy> <integer npz>
1318\end{verbatim}
1319specifies the distribution of the available nodes over the three
1320Cartesian dimensions. The default distribution is chosen such that,
1321\verb+<npx>+$*$\verb+<npy>+$*$\verb+<npz>+=\verb+<np>+
1322and \verb+<npx>+ $<=$ \verb+<npy>+ $<=$ \verb+<npz>+,
1323where \verb+<npx>+, \verb+<npy>+ and \verb+<npz>+ are the nodes in the
1324x, y and z dimension respectively, and \verb+<np>+ is the number of nodes
1325allocated for the calculation. Where more than one combination
1326of \verb+<npx>+, \verb+<npy>+ and \verb+<npz>+ are possible, the
1327combination is chosen with the minimum value of
1328\verb+<npx>+$+$\verb+<npy>+$+$\verb+<npz>+. To change the default setting
1329the following optional input option is provided.
1330
1331\item
1332\begin{verbatim}
1333boxes <integer nbx> <integer nby> <integer nbz>
1334\end{verbatim}
1335specifies the distribution of boxes,
1336where \verb+<nbx>+, \verb+<nby>+ and \verb+<nbz>+ are the number of
1337boxes in x, y and z direction, respectively.
1338The molecular system is decomposed into boxes that form the smallest
1339unit for communication of atomic data between nodes. The size of the
1340boxes is per default set to the short-range cutoff radius. If
1341long-range cutoff radii  are used the box size is set to half the
1342long-range cutoff radius if it is larger than the short-range cutoff.
1343If the number of boxes in a dimension is less than the number of
1344processors in that dimension, the number of boxes is set to the number
1345of processors.
1346
1347\item
1348\begin{verbatim}
1349extra <integer madbox>
1350\end{verbatim}
1351sets the number of additional boxes for which memory is allocated.
1352In rare events the amount of memory set aside per node is insufficient
1353to hold all atomic coordinates assigned to that node. This leads to
1354execution which aborts with the message that {\tt mwm} or {\tt msa} is too
1355small. Jobs may be restarted with additional space allocated by
1356where \verb+<madbox>+ is the number of additional boxes that are allocated
1357on each node. The default for \verb+<madbox>+ is 6.
1358In some cases \verb+<madbox>+ can be reduced to 4 if memory usage is a
1359concern. Values of 2 or less will almost certainly result in memory
1360shortage.
1361
1362\item
1363\begin{verbatim}
1364mwm <integer mwmreq>
1365\end{verbatim}
1366sets the maximum number of solvent molecules \verb+<mwmreq>+ per node,
1367allowing increased memory to be allocated for solvent molecules. This
1368option can be used if execution aborted because \verb+mwm+ was too
1369small.
1370
1371\item
1372\begin{verbatim}
1373msa <integer msareq>
1374\end{verbatim}
1375sets the maximum number of solute atoms \verb+<msareq>+ per node,
1376allowing increased memory to be allocated for solute atoms. This
1377option can be used if execution aborted because \verb+msa+ was too
1378small.
1379
1380\item
1381\begin{verbatim}
1382memory <integer memlim>
1383\end{verbatim}
1384sets a limit \verb+<memlim>+ in kB on the allocated amount of memory used by
1385the molecular dynamics module.
1386Per default all available memory is allocated. Use of this command
1387is required for QM/MM simulations only.
1388%\item
1389%For development purposes debug information can be written to the debug
1390%file with extension {\bf dbg} with
1391%\begin{verbatim}
1392%debug <i idebug>
1393%\end{verbatim}
1394%where $idebug$ specifies the type of debug information being written.
1395\end{description}
1396