1% 2% $Id$ 3% 4\label{sec:prepare} 5\def\bmu{\mbox{\boldmath $\mu$}} 6\def\bE{\mbox{\bf E}} 7\def\br{\mbox{\bf r}} 8\def\tT{\tilde{T}} 9\def\t{\tilde{1}} 10\def\ip{i\prime} 11\def\jp{j\prime} 12\def\ipp{i\prime\prime} 13\def\jpp{j\prime\prime} 14\def\etal{{\sl et al.}} 15\def\nwchem{{\bf NWChem}} 16\def\nwargos{{\bf nwargos}} 17\def\nwtop{{\bf nwtop}} 18\def\nwrst{{\bf nwrst}} 19\def\nwsgm{{\bf nwsgm}} 20\def\esp{{\bf esp}} 21\def\md{{\bf md}} 22\def\prepare{{\bf prepare}} 23\def\argos{{\bf ARGOS}} 24\def\amber{{\bf AMBER}} 25\def\charmm{{\bf CHARMM}} 26 27The \prepare\ module is used to set up the necessary files for a molecular 28dynamics simulation with \nwchem. User supplied coordinates can be used to 29generate topology and restart files. The topology file contains all static 30information about a molecular system, such as lists of atoms, bonded 31interactions and force field parameters. The restart file contains all 32dynamic information about a molecular system, such as coordinates, velocities 33and properties. 34 35Without any input, the prepare module checks the existence of a topology 36and restart file for the molecular systems. If these files exist, the module 37returns to the main task level without action. The module will generate these 38files when they do not exist. Without any input to the module, the generated 39system will be for a non-solvated isolated solute system. 40 41To update existing files, including solvation, the module requires input 42directives read from an input deck, 43 44\begin{verbatim} 45prepare 46 ... 47end 48\end{verbatim} 49 50The prepare module performs three sub-tasks: 51\begin{itemize} 52\item[{\bf *}] 53{\bf sequence generation}\\ 54This sub-task analyzes the supplied coordinates from a PDB-formatted file 55or from the input geometry, and generates a sequence file, containing the 56description of the system in terms of basic building blocks found as 57fragment or segment files in the database directories for the force field 58used. If these files do not exist, they are generated based on the supplied 59coordinates. This process constists of generating a fragment file with the 60list of atoms with their force field dependent atom types, partial atomic 61charges calculated from a Hartree Fock calculation for the fragment, followed 62by a restrained electrostatic potential fit, and a connectivity list. From 63the information on this fragment file the lists of all bonded interactions 64are generated, and the complete lists are written to a segment file. 65\item[{\bf *}] 66{\bf topology generation}\\ 67Based on the generated or user-supplied sequence file and the force field 68specific segment database files, this sub-task compiles the lists of atoms, 69bonded interactions, excluded pairs, and substitutes the force field 70parameters. Special commands may be given to specify interaction parameters 71that will be changing in a free energy evaluation. 72\item[{\bf *}] 73{\bf restart generation}\\ 74Using the user supplied coordinates and the topology file for the chemical 75system, this sub-task generates a restart file for the system with coordinates, 76velocities and other dynamic information. This step may include solvation 77of the chemical system and specifying periodic boundary conditions. 78\end{itemize} 79 80Files involved in the preparation phase exist in the following hierarchy: 81\begin{itemize} 82\item[{\bf *}] 83{\bf standards}\\ 84The standard database files contain the original force field information. 85These files are to reside in a directory that is specified in the file 86\$HOME/.nwchemrc. There will be such a directory for each supported force 87field. These directories contain fragment files (with extension frg), 88segment files (with extension sgm) and a parameter file (with the name 89of the force field and with extension par). 90\item[{\bf *}] 91{\bf extensions}\\ 92These database files contain generally accepted extensions to the original 93force field and are to reside in a separate directory that is specified in 94the file \$HOME/.nwchemrc. There will be such a directory for each supported 95force field. These directories contain fragment files (with extension frg), 96segment files (with extension sgm) and a parameter file (with the name 97of the force field and with extension par). 98\item[{\bf *}] 99{\bf contributed}\\ 100These database files contain contributed definitions, also required for 101the quality assurance tests and are to reside in a separate directory 102that is specified in the file \$HOME/.nwchemrc. 103There will be such a directory for each supported 104force field. These directories contain fragment files (with extension frg), 105segment files (with extension sgm) and a parameter file (with the name 106of the force field and with extension par). 107\item[{\bf *}] 108{\bf user preferences}\\ 109These database files contain user preferred extensions to the original 110force field and are to reside in a separate directory that is specified in 111the file \$HOME/.nwchemrc. Separate directories of this type should be 112defined for each supported force field. 113This directory may contain fragment files (with extension frg), 114segment files (with extension sgm) and a parameter file (with the name 115of the force field and with extension par). 116\item[{\bf *}] 117{\bf temporary files}\\ 118Temporary database files contain user preferred extensions to the original 119force field and are to reside in a separate directory that is specified in 120the file \$HOME/.nwchemrc. There may be such a directory for each supported 121force field. This directory may contain fragment files (with extension frg), 122segment files (with extension sgm) and a parameter file (with the name 123of the force field and with extension par). 124\item[{\bf *}] 125{\bf current files}\\ 126Database files that contain user preferred extensions to the original 127force field and are to reside in a separate directory that is specified in 128the file \$HOME/.nwchemrc. Typically this will be the current working 129directory, although it may be defined as a specific directory. 130This directory may contain fragment files (with extension frg), 131segment files (with extension sgm) and a parameter file (with the name 132of the force field and with extension par). If not specified, 133files will be taken from the current directory. 134\end{itemize} 135 136Data is taken from the database files searched in the above order. If data 137is specified more than once, the last found values are used. For example, 138if some standard segment is redefined in a temporary file, the latter one 139will be used. This allows the user to redefine standards or extensions 140without having to modify those database files, which may reside in a 141generally available, non-modifyable directory. If a filename is specified 142rather than a directory, the filename indicates the parameter file 143definition. All other files (frg and sgm files) will be take from the 144specified directory. 145\par 146The most common problems with the \prepare\ module are 147\begin{itemize} 148\item[{\bf ~}] 149The format of the pdb file does not conform to the pdb standard. In 150particular, atom names need to correspond with definitions in the 151fragment and segment database files, and should adhere to IUPAC 152recommendations as adopted by the pdb standard. If this problem 153occurs, the pdb file will need to be corrected. 154\item[{\bf ~}] 155Non-standard segments may contain atoms that could not be atom typed 156with the existing typing rules in the force field parameter files. 157When this happens, additional typing rules can be included in the 158parameter file, or the fragment file may be manually typed. 159\item[{\bf ~}] 160Parameters for atom types or bonded interactions do not exist in 161the force field. When this happens, additional parameters may be 162defined in the parameter files, or the segment file may be edited 163to include explicit parameters. 164\item[{\bf ~}] 165The atoms names in the pdb file do not match the names in the 166already existing frg or sgm file. NWChem will remove the unknown 167atoms and replace them with the ones it expects, but the geometry 168will be changed. It is best to run the prepare module the first time 169with the print level set to debug, and to look for messages like 170``Not found: atom''. Of course, this is to be expected when 171using PDB files without explicit hydrogen atoms. 172\end{itemize} 173 174\section{Default database directories} 175 176The file \$HOME/.nwchemrc may contain the following entries that determine 177which files are used by the prepare module. 178 179\begin{verbatim} 180ffield <string ffname> 181\end{verbatim} 182 183This entry specifies the default force field. Database files supplied with 184\nwchem\ currently support values for \verb+ffname+ of {\bf amber}, referring 185to AMBER95, and {\bf charmm}, referring to the academic CHARMM22 force field. 186 187\begin{verbatim} 188<string ffname>_(1-9) <string ffdir>[\{<string parfile>\}] 189\end{verbatim} 190 191Entries of this type specify the directory \verb+ffdir+ in which force field 192database files can be found. Optionally the parameterfile in this directory 193may be specified as \verb+parfile+. 194The prepare module will only use files in directories 195specified here. One exception is that files in the current work directory 196will be used if no directory with current files is specified. The directories 197are read in the order 1-9 with duplicate parameters taken from the last 198occurrence found. Note that multiple parameter files may be specified that will 199be read in the order in which they are specified. 200 201\begin{verbatim} 202<string solvnam> <string solvfil> 203\end{verbatim} 204 205This entry may be used to identify a pure solvent restart file \verb+solvfil+ 206by a name \verb+solvnam+ 207 208An example file \$HOME/.nwchemrc is: 209 210\begin{verbatim} 211ffield amber 212amber_1 /home/svc-nwchem/nwchem-5.1.1/src/data/amber_s/ 213amber_2 /home/svc-nwchem/nwchem-5.1.1/src/data/amber_x/amber.par,glycam.par 214amber_3 /home/svc-nwchem/nwchem-5.1.1/src/data/amber_q/ 215spce /home/svc-nwchem/nwchem-5.1.1/src/data/solvents/spce.rst 216thfs /home/svc-nwchem/nwchem-5.1.1/src/data/solvents/thfs.rst 217clfm /home/svc-nwchem/nwchem-5.1.1/src/data/solvents/clfm.rst 218meoh /home/svc-nwchem/nwchem-5.1.1/src/data/solvents/meoh.rst 219charmm_1 /home/svc-nwchem/nwchem-5.1.1/src/data/charmm_s/charmm.par 220charmm_2 /home/svc-nwchem/nwchem-5.1.1/src/data/charmm_x/ 221\end{verbatim} 222 223\section{System name and coordinate source} 224 225\begin{verbatim} 226system <string sys_calc> 227\end{verbatim} 228 229The system name can be explicitly specified for the \prepare\ module. 230If not specified, the system name will be taken from a specification 231in a previous \md\ input block, or derived from the run time database 232name. 233 234\begin{verbatim} 235source ( pdb | rtdb ) 236\end{verbatim} 237 238The source of the coordinates can be explicitly specified to be from 239a PDB formatted file \verb+sys+.pdb, or from a geometry object in the run 240time database. If not specified, a pdb file will be used when it exists 241in the current directory or the rtdb geometry otherwise. 242 243\begin{verbatim} 244model <integer modpdb default 0> 245\end{verbatim} 246 247If a PDB formatted source file contains different MODELs, the \verb+model+ 248keyword can be used to specify which MODEL will be used to generate the 249topology and restart file. If not specified, the first MODEL found on the 250PDB file will be read. 251 252\begin{verbatim} 253altloc <character locpdb default ' '> 254\end{verbatim} 255 256The \verb+altloc+ keyword may be used to specify the use of alternate 257location coordinates on a PDB file. 258 259\begin{verbatim} 260chain <character chnpdb default ' '> 261\end{verbatim} 262 263The \verb+chain+ keyword may be used to specify the chain identifier 264for coordinates on a PDB file. 265 266\begin{verbatim} 267histidine ( hid | hie | hip ) 268\end{verbatim} 269specifies the default protonation state of histidine. 270 271\begin{verbatim} 272sscyx 273\end{verbatim} 274 275Keyword \verb+sscyx+ may be used to rename cysteine residues that form 276sulphur bridges to CYX. 277 278\begin{verbatim} 279hbuild 280\end{verbatim} 281 282Keyword \verb+hbuild+ may be used to add hydrogen atoms to the 283unknown segments of the structure found on the pdb file. Placement 284of hydrogen atoms is based on geometric criteria, and the resulting 285fragment and segment files should be carefully examined for correctness. 286 287The database directories are used as specified in the file $.nwchemrc$. Specific 288definitions for the force field used may be changed in the input file using 289 290\begin{verbatim} 291directory_(1-9) <string ffdir>[<string parfile>] 292\end{verbatim} 293 294\section{Sequence file generation} 295 296If no existing sequence file is present in the current directory, 297or if the \verb+new_seq+ keyword was specified in the \prepare\ 298input deck, a new sequence file is generated from information 299from the pdb file, and the following input directives. 300 301\begin{verbatim} 302maxscf <integer maxscf default 20> 303\end{verbatim} 304 305Variable maxscf specifies the maximum number of atoms in a segment for 306which partial atomic charges will be determined from an SCF calculation 307followed by RESP charge fitting. For larger segments a crude partial 308charge guestimation will be done. 309 310\begin{verbatim} 311qscale <real qscale default 1.0> 312\end{verbatim} 313 314Variable qscale specifies the factor with which SCF/RESP determined 315charges will be multiplied. 316 317\begin{verbatim} 318modify sequence { <integer sgmnum>:<string sgmnam> } 319\end{verbatim} 320 321This command specifies that segment {\bf sgmnam} should be used 322for segment with number {\it sgmnum}. This command can be used 323to specify a particular protonation state. For example, the 324following command specifies that residue 114 is a hystidine 325protonated at the N$_\epsilon$ site and residue 202 is a hystidine 326protonated at the N$_\delta$ site: 327 328\begin{verbatim} 329modify sequence 114:HIE 202:HID 330\end{verbatim} 331 332Links between atoms can be enforced with 333 334\begin{verbatim} 335link <string atomname> <string atomname> 336\end{verbatim} 337 338For example, to link atom {\rm SG} in segment 20 with atom {\rm FE} 339in segment 55, use: 340 341\begin{verbatim} 342link 20:_SG 55:FE 343\end{verbatim} 344 345\par 346The format of the sequence file is given in Table~\ref{tbl:nwmdseq}. 347In addition to the list of segments this file also includes links 348between non-standard segments or other non-standard links. 349These links are generated based on distances found between 350atoms on the pdb file. When atoms are involved in such non-standard 351links that have not been identified in the fragment of segment 352files as a non-chain link atom, the prepare module will ignore 353these links and report them as skipped. If one or more of these links 354are required, the user has to include them with explicit link 355directives in the sequence file, making them forced links. 356Alternatively, these links can be made forced-links by changing 357\verb+link+ into \verb+LINK+ in the sequence file. 358 359\begin{verbatim} 360fraction { <integer imol> } 361\end{verbatim} 362 363Directive \verb+fraction+ can be used to separate solute molecules 364into fractions for which energies will be separately reported 365during molecular dynamics simulations. The listed molecules will be 366the last molecule in a fraction. Up to 10 molecules may be 367specified in this directive. 368 369\begin{verbatim} 370counter <integer num> <string ion> 371\end{verbatim} 372 373Directive \verb+counter+ adds \verb+num+ counter ions of type 374\verb+ion+ to the sequence file. Up to 10 \verb+counter+ 375directives may appear in the input block. 376 377\begin{verbatim} 378counter <real factor> 379\end{verbatim} 380 381This directive scales the counter ion charge by the specified factor 382in the determination of counter ions positions. 383 384\section{Topology file generation} 385 386\begin{verbatim} 387new_top [ new_seq ] 388\end{verbatim} 389 390Keyword \verb+new_top+ is used to force the generation of a new topology 391file. An existing topology file for the system in the current directory 392will be overwritten. If keyword \verb+new_seq+ is also specified, an 393existing sequence file will also be overwritten with a newly generated 394file. 395 396\begin{verbatim} 397amber | charmm 398\end{verbatim} 399 400The prepare module generates force field specific fragment, segment and 401topology files. The force field may be explicitly specified in the prepare 402input block by specifying its name. 403Currently \amber\ and \charmm\ are the supported force fields. 404A default force field may be specified in the file \$HOME/.nwchemrc. 405 406\begin{verbatim} 407standard <string dir_s>[<string par_s>] 408extensions <string dir_x>[<string par_x>] 409contributed <string dir_q>[<string par_q>] 410user <string dir_u>[<string par_u>] 411temporary <string dir_t>[<string par_t>] 412current <string dir_c>[<string par_c>] 413\end{verbatim} 414 415The user can explicitly specify the directories where force field 416specific databases can be found. These include force field standards, 417extensions, quality assurance tests, user preferences, temporary , and 418current database files.\\ 419Defaults for the directories where database files reside may be specified 420in the file \$HOME/.nwchemrc for each of the supported force fields. 421Fragment, segment and sequence files generated by the \prepare\ module are 422written in the temporary directory. When not specified, the current 423directory will be used. 424Topology and restart files are always created in the current directory. 425 426 427The following directives control the modifications of a 428topology file. These directives are executed in the order in which 429they appear in the \prepare\ input deck. The topology modifying 430commands are not stored on the run-time database and are, therefor, 431not persistent. 432 433\begin{verbatim} 434modify atom <string atomname> [set <integer mset> | initial | final] \ 435 ( type <string atomtyp> | charge <real atomcharge> | \ 436 polar <real atompolar> | dummy | self | quantum | quantum_high ) 437\end{verbatim} 438 439These \verb+modify+ commands change the atom type, partial atomic charge, 440atomic polarizability, specify a dummy, self-interaction and quantum atom, 441respectively. If \verb+mset+ is specified, the modification will only 442apply to the specified set, which has to be 1, 2 or 3. If not specified, 443the modification will be applied to all three sets. The quantum region in 444QM/MM simulations is defined by specifying atoms with the \verb+quantum+ 445or \verb+quantum_high+ label. For atoms defined \verb+quantum_high+ 446basis sets labeled \verb+X_H+ will be used. 447The \verb+atomnam+ 448should be specified as \verb+<integer isgm>:<string name>+, where 449\verb+isgm+ is the segment number, and \verb+name+ is the atom name. A 450leading blank in an atom name should be substituted with an underscore. 451The modify commands may be combined. For example, the following directive 452changes for the specified atom the charge and atom type in set 2 and 453specifies the atom to be a dummy in set 3. 454 455\begin{verbatim} 456modify atom 12:_C1 set 2 charge 0.12 type CA set 3 dummy 457\end{verbatim} 458 459With the following directives modifications can be made for entire 460segments. 461 462\begin{verbatim} 463modify segment <integer isgm> \ 464 [protonation <integer iprot> | set <integer mset> | initial | final] \ 465 ( dummy | self | uncharged | quantum | quantum_high ) 466\end{verbatim} 467 468where \verb+protonation+ specifies a modification of the default protonation 469state of the segment as specified in the segment file. This option only applies 470to Q-HOP simulations. 471 472Modifications to bonded interaction parameters can be made with the 473following modify commands. 474 475\begin{verbatim} 476modify ( bond <string atomtyp> <string atomtyp> | \ 477 angle <string atomtyp> <string atomtyp> <string atomtyp> | \ 478 torsion <string atomtyp> <string atomtyp> <string atomtyp> \ 479 <string atomtyp> [ multiplicity <integer multip> ] | \ 480 plane <string atomtyp> <string atomtyp> <string atomtyp> \ 481 <string atomtyp> ) [set <integer mset> | initial | final] \ 482 <real value> <real forcon> 483\end{verbatim} 484 485where \verb+atomtyp+ and \verb+mset+ are defined as above, \verb+multip+ 486is the torsion ultiplicity for which the modification is to be applied, 487\verb+value+ is the reference bond, angle, torsion angle of out-of-plane 488angle value respectively, and \verb+forcon+ is the force constant for 489bond, angle, torsion angle of out-of-plane angle. When \verb+multip+ 490or \verb+mset+ are not defined the modification will be applied to 491all multiplicities and sets, respectively, for the identified bonded 492interaction. 493 494After modifying atoms to quantum atoms the bonded interactions in which 495only quantum atoms are involved are removed from the bonded lists using 496 497\begin{verbatim} 498update lists 499\end{verbatim} 500 501Error messages resulting from parameters not being defined for bonded 502interaction in which only quantum atoms are involved are ignored using 503 504\begin{verbatim} 505ignore 506\end{verbatim} 507 508To specify that a free energy calculation will be carried out using the 509topology file, the following keyword needs to be specified, 510 511\begin{verbatim} 512free 513\end{verbatim} 514 515To specify that a Q-HOP simulation will be carried out using the topology 516file, the following keyword needs to be specified, 517 518\begin{verbatim} 519qhop 520\end{verbatim} 521 522To specify that only the first set of parameters should be used, even if multiple 523sets have been defined in the fragment or segment files, the following keyword needs 524to be specified, 525 526\begin{verbatim} 527first 528\end{verbatim} 529 530Note that keywords \verb+free+, \verb+qhop+ and \verb+qhop+ are mutually exclusive. 531\section{Appending to an existing topology file} 532 533\begin{verbatim} 534noe <string atom1> <string atom3> \ 535 <real dist1> <real dist2> <real dist3> <real forc1> <real forc2> 536\end{verbatim} 537 538This directive specifies a distance restraint potential between atoms 539$atom1$ and $atom2$, with a harmonic function with force constant 540$forc1$ between $dist1$ and $dist2$, and a harmonic function with 541force constant $forc2$ between $dist2$ and $dist3$. For distances 542shorter than $dist1$ or larger than $dist3$, a constant force is 543applied such that force and energy are continuous at $dist1$ 544and $dist3$, respectively. Distances are given in nm, force constants 545in kJ mol$^{-1}$ nm$^{-2}$. 546 547\begin{verbatim} 548select <integer isel> { <string atoms> } 549\end{verbatim} 550 551Directive \verb+select+ specifies a group of atoms used in the 552definition of potential of mean force potentials. 553 554The selected atoms are specified by the string \verb+atoms+ which 555takes the form 556 557\begin{verbatim} 558[{isgm [ - jsgm ] [,]} [:] [{aname[,]}] 559\end{verbatim} 560 561For example, all carbon and oxygen atoms in segments 3 562and 6 through 12 are selected for group 1 by 563 564\begin{verbatim} 5653,6-12:_C????,_O???? 566\end{verbatim} 567 568\begin{verbatim} 569pmf [all] [bias] zalign <integer isel> <real forcon1> <real forcon2> 570pmf [combine] [bias] xyplane <integer isel> <real forcon1> <real forcon2> 571pmf [constraint] [bias] (distance | zdistance) <integer isel> <integer jsel> \ 572 <real dist1> <real dist2> <real forcon1> <real forcon2> 573pmf [bias] angle <integer isel> <integer jsel> <integer ksel> \ 574 <real angle1> <real angle2> <real forcon1> <real forcon2> 575pmf [bias] torsion <integer isel> <integer jsel> <integer ksel> <integer lsel> \ 576 <real angle1> <real angle2> <real forcon1> <real forcon2> 577pmf [bias] basepair <integer isel> <integer jsel> \ 578 <real dist1> <real dist2> <real forcon1> <real forcon2> 579pmf [bias] (zaxis | zaxis-cog) <integer isel> <integer jsel> <integer ksel> \ 580 <real dist1> <real dist2> <real forcon1> <real forcon2> 581\end{verbatim} 582 583Directive \verb+pmf+ specifies a potential of mean force potential 584in terms of the specified atom selection. Option \verb+zalign+ specifies 585the atoms in the selection to be restrained to a line parallel to the 586z-axis. Option \verb+xyplane+ specifies the atoms in the selection to 587be restrained to a plane perpendicular to the z-axis. Options 588\verb+distance+, \verb+angle+ and \verb+torsion+, are defined in terms 589of the center of geometry of the specified atom selections. 590Keyword \verb+basepair+ is used to specify a harmonic potential between 591residues \verb+isel+ and \verb+jsel+. Keywords \verb+zaxis+ and \verb+zaxis-cog+ 592can be used to pull atoms toward the z-axis. 593Option \verb+all+ may be specified to apply an equivalent pmf to each 594of the equivalent solute molecules in the system. 595Option \verb+combine+ may be specified to apply the specified pmf to 596the atoms in all of the equivalent solute molecules. 597Option \verb+constraint+ may be specified to a distance pmf to treat 598the distance as a contraint. 599Option \verb+bias+ may be specified to indicate that this function 600should be treated as a biasing potential. Appropriate corrections 601to free energy results will be evaluated. 602 603\section{Generating a restart file} 604 605\begin{verbatim} 606new_rst 607\end{verbatim} 608 609Keyword \verb+new_rst+ will cause an existing restart file to be 610overwritten with a new file. 611 612The follwing directives control the manipulation of restart 613files, and are executed in the order in which they 614appear in the \prepare\ input deck. 615 616\begin{verbatim} 617solvent name <string*3 slvnam default ``HOH''> \ 618 model <string slvmdl default ``spce''> 619\end{verbatim} 620 621The solvent keyword can be used to specify the three letter solvent name 622as expected on the PDB formatted file, and the name of the solvent model 623for which solvent coordinates will be used. 624 625\begin{verbatim} 626solvate [ < real rshell default 1.2 > ] \ 627 ( [ cube [ <real edge> ]] | \ 628 [ box [ <real xedge> [ <real xedge> [ <real xedge> ]]]] | \ 629 [ sphere <real radius> ] | 630 [ troct <real edge> ]) 631\end{verbatim} 632 633Solvation can be specified to be in a cubic box with specified edge, 634rectangular box with specified edges, or in a sphere with specified 635radius. Solvation in a cube or rectangular box will automatically also 636set periodic boundary conditions. Solvation in a sphere will only allow 637simulations without periodic boundary conditions. The size of the cubic 638and rectangular boxes will be expanded by a length specified by the 639expand variable. If no shape is specified, solvation will be done for 640a cubic box with an edge that leaves rshell nm between any solute atom and 641a periodic image of any solute atom after the solute has been centered. 642An explicit \verb+write+ is not needed to write the restart file. 643The \verb+solvate+ will write out a file \verb+sys_calc+.rst. 644If not specified, the dimension of the solvation cell will be as large 645as to have at least a distance of \verb+rshell+ nm between any solute atom 646and the edge of the cell. The experimental \verb+troct+ directive generates 647a truncated octrahedral box. 648 649\begin{verbatim} 650touch <real touch default 0.23> 651\end{verbatim} 652 653The variable \verb+touch+ specifies the minimum distance between a solvent 654and solute atom for which a solvent molecule will be accepted for solvation. 655 656\begin{verbatim} 657envelope <real xpndw default 0.0> 658\end{verbatim} 659sets the expand vealues to be used in \verb+solvate+ operations. 660 661\begin{verbatim} 662expand <real xpndw default 0.1> 663\end{verbatim} 664 665The variable \verb+xpndw+ specifies the size in nm with which the simulation 666volume will be increased after solvation. 667 668\begin{verbatim} 669read [rst | rst_old | pdb] <string filename> 670write [rst | [solute [<integer nsolvent>]] ( [large] pdb | xyz)] <string filename> 671\end{verbatim} 672 673These directives read and write the file \verb+filename+ in the specified 674format. The \verb+solute+ option instructs to write out the coordinates 675for solute and all, or if specified the first \verb+nsolvent+, crystal solvent 676molecules only. 677If no format is specified, it will be derived from the extension of the 678filename. Recognized extensions are rst, rst\_old (read only), pdb, xyz 679(write only) and pov (write only). 680Reading and then writing the same restart file will cause the 681sub-block size information to be lost. If this information needs to be 682retained a shell copy command needs to be used. 683The \verb+large+ keyword allows PDB files to be written with more than 9999 684residues. Since the PDB file will not conform to the PDB convention, this 685option should only be used if required. NWChem will be able to read the 686resulting PDB file, but other codes may not. 687 688\begin{verbatim} 689scale <real scale default -1.0> 690\end{verbatim} 691 692This directive scales the volume and coordinates written to povray files. 693A negative value of scale (default) scales the coordinates to lie 694in [-1:1]. 695 696\begin{verbatim} 697cpk [<real cpk default 1.0>] 698\end{verbatim} 699 700This directive causes povray files to contain cpk model output. The 701optional value is used to scale the atomic radii. A neagtive value 702of cpk resets the rendering to stick. 703 704\begin{verbatim} 705center | centerx | centery | centerz 706\end{verbatim} 707 708These directives center the solute center of geometry at the origin, 709in the y-z plane, in the x-z plane or in the x-y plane, respectively. 710 711\begin{verbatim} 712orient 713\end{verbatim} 714 715This directive orients the solute principal axes. 716 717\begin{verbatim} 718translate [atom | segment | molecule] \ 719 <integer itran> <integer itran> <real xtran(3)> 720\end{verbatim} 721 722This directive translates solute atoms in the indicated range by xtran, 723without checking for bad contacts in the resulting structure. 724 725\begin{verbatim} 726rotate [atom | segment | molecule] \ 727 <integer itran> <integer itran> <real angle> <real xrot(3)> 728\end{verbatim} 729 730This directive rotates solute atoms in the indicated range by angle 731around the vector given by xrot,, 732without checking for bad contacts in the resulting structure. 733 734\begin{verbatim} 735remove solvent [inside | outside] [x <real xmin> <real xmax>] \ 736[y <real ymin> <real ymax>] [z <real zmin> <real zmax>] 737\end{verbatim} 738 739This directive removes solvent molecules inside or outside the 740specified coordinate range. 741 742\begin{verbatim} 743periodic 744\end{verbatim} 745 746This directive enables periodic boundary conditions. 747 748\begin{verbatim} 749vacuo 750\end{verbatim} 751 752This directive disables periodic boundary conditions. 753 754\begin{verbatim} 755grid <integer mgrid default 24> <real rgrid default 0.2> 756\end{verbatim} 757 758This directive specifies the grid size of trial counter-ion positions and 759minimum distance between an atom in the system and a counter-ion. 760 761%\begin{verbatim} 762%fix ( atoms | segments ) ( beyond | within ) <real rfix> <string atmfix> 763%\end{verbatim} 764% 765%The \verb+fix+ keyword may be used to specify that the identified 766%atoms should remain fixed during any operation. 767% 768 769\begin{verbatim} 770crop 771\end{verbatim} 772prints minimum and maximum solute coordinates. 773 774\begin{verbatim} 775boxsize 776\end{verbatim} 777specifies to redetermine the box size. 778 779\begin{verbatim} 780cube 781\end{verbatim} 782specifies to redetermine the smallest cubic box size. 783 784\begin{verbatim} 785box <real xsize> <real ysize> <real zsize> 786\end{verbatim} 787 788The \verb+box+ directive resets the box size. 789 790\begin{verbatim} 791align <string atomi> <string atomj> <string atomk> 792\end{verbatim} 793 794The \verb+align+ directive orients the system such that 795\verb+atomi+ and \verb+atomj+ are on the z-axis, and \verb+atomk+ 796in the x=y plane. 797 798\begin{verbatim} 799repeat [randomx | randomy | randomz] [chains | molecules | fractions ] \ 800 <integer nx> <integer ny> <integer nz> [<real dist>] [<real zdist>] 801\end{verbatim} 802 803The \verb+repeat+ directive causes a subsequent \verb+write pdb+ 804directive to write out multiple copies of the system, with \verb+nx+ 805copies in the x, \verb+ny+ copies in the y, and \verb+nz+ copies in 806the z-direction, with a minimum distance of \verb+dist+ between any 807pair of atoms from different copies. If \verb+nz+ is -2, an inverted 808copy is placed in the z direction, with a separation of \verb+zdist+ nm. 809If \verb+dist+ is negative, the box dimensions will be used. 810For systems with solvent, this directive should be used with a negative 811\verb+dist+. 812Optional keywords \verb+chains+, \verb+molecules+ and \verb+fractions+ 813specify to write each repeating solute unit as a chain, to repeat 814each solute molecule, or each solute fraction separately. Optional 815keywords \verb+randomx+, \verb+randomy+, and \verb+randomz+ can be used 816to apply random rotations for each repeat unit around a vector through 817the center of geometry of the solute in the x, y or z direction. 818 819\begin{verbatim} 820skip <integer ix> <integer iy> <integer iz> 821\end{verbatim} 822 823The \verb+skip+ directive can be used to skip single repeat unit 824from the \verb+repeat+ directive. Up to 100 \verb+skip+ directives 825may be specified, and will only apply to the previously specified 826\verb+repeat+ directive. 827 828\begin{verbatim} 829(collapsexy | collapsez) [ <integer nmoves>] 830\end{verbatim} 831specifies to move all solute molecules toward the \verb+z+-axis or 832\verb+x=y+-plane, respectively, to within a distance of \verb+touch+ 833nm between any pair of atoms from different solute molecules. Parameter 834\verb+nmoves+ specifies the number of collapse moves that will be made. 835Monatomic ions will move with the nearest multi-atom molecule. 836 837\begin{verbatim} 838collapse_group <integer imol> <integer jmol> 839\end{verbatim} 840specifies that molecule jmol will move together with molecule imol in 841collapse operations. 842 843\begin{verbatim} 844merge <real xtran(3)> <string pdbfile> 845\end{verbatim} 846specifies to merge the coordinates found on the specified pdb file 847into the current structure after translation by xtran(3). 848