ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/openmdDocs/openmdDoc.tex
(Generate patch)

Comparing trunk/openmdDocs/openmdDoc.tex (file contents):
Revision 4104 by gezelter, Mon Apr 28 21:06:04 2014 UTC vs.
Revision 4105 by gezelter, Mon Apr 28 21:41:01 2014 UTC

# Line 10 | Line 10
10   \pagestyle{plain}
11   \pagenumbering{arabic}
12   \usepackage{floatrow}
13 + \usepackage[margin=0.5cm,font=small,format=hang]{caption}
14 +
15   \oddsidemargin 0.0cm
16   \evensidemargin 0.0cm
17   \topmargin -21pt
# Line 29 | Line 31
31   \lstset{language=C,frame=TB,basicstyle=\footnotesize\ttfamily, %
32          xleftmargin=0.25in, xrightmargin=0.25in,captionpos=b, %
33          abovecaptionskip=0.5cm, belowcaptionskip=0.5cm, escapeinside={~}{~}}
34 < \renewcommand{\lstlistingname}{Scheme}
34 > \renewcommand{\lstlistingname}{Example}
35  
36 + \lstnewenvironment{code}[1][]%
37 +  {\noindent\minipage{\linewidth}\vspace{0.5\baselineskip}
38 +   \lstset{language=C,basicstyle=\footnotesize\ttfamily,%
39 +     captionpos=b,aboveskip=0.5cm,belowskip=0.5cm,abovecaptionskip=0.5cm,%
40 +     belowcaptionskip=0.5cm,%
41 +     escapeinside={~}{~},frame=single,#1}}
42 +  {\endminipage}
43 +
44 +
45 +
46   \begin{document}
47  
48   \newcolumntype{A}{p{1.5in}}
# Line 185 | Line 197 | formats are described in the following sections.
197   $<$Snapshot$>$} block.  Both the {\tt $<$MetaData$>$} and {\tt $<$Snapshot$>$}
198   formats are described in the following sections.
199  
200 < \begin{lstlisting}[float,caption={[The structure of an {\sc OpenMD} file]
200 > \begin{code}[caption={[The structure of an {\sc OpenMD} file]
201   The basic structure of an {\sc OpenMD} file contains HTML-like tags to
202   define simulation meta-data and subsequent instantaneous configuration
203 < information. A well-formed {\sc OpenMD} file must contain one $<$MetaData$>$
204 < block and {\it at least one} $<$Snapshot$>$ block.  Each
205 < $<$Snapshot$>$ is further divided into $<$FrameData$>$ and
206 < $<$StuntDoubles$>$ sections.},
195 < label=sch:mdFormat]
203 > information. A well-formed {\sc OpenMD} file must contain one {\tt <MetaData>}
204 > block and {\it at least one} {\tt <Snapshot>} block.  Each
205 > {\tt <Snapshot>} is further divided into {\tt <FrameData>} and
206 > {\tt <StuntDoubles>} sections.},label={sch:mdFormat}]
207   <OpenMD>
208    <MetaData>
209        // see section ~\ref{sec:miscConcepts}~ for details on the formatting
# Line 218 | Line 229 | label=sch:mdFormat]
229    <Snapshot>         // Further information on <Snapshot> blocks
230    </Snapshot>        // can be found in section ~\ref{section:coordFiles}~.
231   </OpenMD>
232 < \end{lstlisting}
232 > \end{code}
233  
234  
235   \section{OpenMD Files and $<$MetaData$>$ blocks}
# Line 234 | Line 245 | Scheme~\ref{sch:mdExample}.
245   shown in Scheme~\ref{sch:mdFormat} and example file is shown in
246   Scheme~\ref{sch:mdExample}.
247  
248 < \begin{lstlisting}[float,caption={[An example of a complete OpenMD
248 > \begin{code}[caption={[An example of a complete OpenMD
249   file] An example showing a complete OpenMD file.},
250   label={sch:mdExample}]
251   <OpenMD>
# Line 273 | Line 284 | statusTime = 50;  // statistics file frequency
284      </StuntDoubles>
285    </Snapshot>
286   </OpenMD>
287 < \end{lstlisting}
287 > \end{code}
288  
289   Within the {\tt $<$MetaData$>$} block it is necessary to provide a
290   complete description of the molecule before it is actually placed in
# Line 287 | Line 298 | become Scheme~\ref{sch:mdExPrime}.
298   Scheme~\ref{sch:mdIncludeExample}, and the new {\sc OpenMD} file would
299   become Scheme~\ref{sch:mdExPrime}.
300  
301 < \begin{lstlisting}[float,caption={An example molecule definition in an
301 > \begin{code}[caption={An example molecule definition in an
302   include file.},label={sch:mdIncludeExample}]
303   molecule{
304    name = "Ar";
# Line 296 | Line 307 | molecule{
307      position( 0.0, 0.0, 0.0 );
308    }
309   }
310 < \end{lstlisting}
310 > \end{code}
311  
312 < \begin{lstlisting}[float,caption={Revised OpenMD input file
312 > \begin{code}[caption={Revised OpenMD input file
313   example.},label={sch:mdExPrime}]
314   <OpenMD>
315    <MetaData>
# Line 331 | Line 342 | statusTime = 50;
342      </StuntDoubles>
343    </Snapshot>
344   </OpenMD>
345 < \end{lstlisting}
345 > \end{code}
346  
347   \section{\label{section:atomsMolecules}Atoms, Molecules, and other
348   ways of grouping atoms}
# Line 402 | Line 413 | rigid body can be seen in Scheme
413   rigid body can be seen in Scheme
414   \ref{sch:rigidBody}.
415  
416 < \begin{lstlisting}[float,caption={[Defining rigid bodies]A sample
416 > \begin{code}[caption={[Defining rigid bodies]A sample
417   definition of a molecule containing a rigid body and a cutoff
418   group},label={sch:rigidBody}]
419   molecule{
# Line 428 | Line 439 | molecule{
439      members(0, 1, 2);
440    }
441   }
442 < \end{lstlisting}
442 > \end{code}
443  
444   \section{\label{sec:miscConcepts}Creating a $<$MetaData$>$ block}
445  
# Line 636 | Line 647 | quaternions to save space in the output files.
647   complete rotation matrix, directional entities are written out using
648   quaternions to save space in the output files.
649  
650 < \begin{lstlisting}[float,caption={[The format of the {\tt $<$Snapshot$>$} block]
650 > \begin{code}[caption={[The format of the {\tt $<$Snapshot$>$} block]
651   An example of the format of the {\tt $<$Snapshot$>$} block.  There is an
652   initial sub-block called {\tt $<$FrameData$>$} which contains the time
653   stamp, the three column vectors of $\mathsf{H}$, and optional extra
# Line 645 | Line 656 | additional information is present on the line.  Atoms
656   configuration of each integrable object.  For each integrable object,
657   the global index is followed by a short string describing what
658   additional information is present on the line.  Atoms with only
659 < position and velocity information use the ``pv'' string which must
659 > position and velocity information use the {\tt pv} string which must
660   then be followed by the position and velocity vectors for that atom.
661 < Directional atoms and Rigid Bodies typically use the ``pvqj'' string
661 > Directional atoms and Rigid Bodies typically use the {\tt pvqj} string
662   which is followed by position, velocity, quaternions, and
663 < lastly, body fixed angular momentum for that integrable object.},
653 < label=sch:dumpFormat]
663 > lastly, body fixed angular momentum for that integrable object.},label={sch:dumpFormat}]
664    <Snapshot>
665      <FrameData>
666          Time: 0
# Line 665 | Line 675 | label=sch:dumpFormat]
675           3      pvqj        x y z vx vy vz  qw qx qy qz jx jy jz
676      </StuntDoubles>
677    </Snapshot>
678 < \end{lstlisting}
678 > \end{code}
679  
680   There are three {\sc OpenMD} files that are written using the combined
681   format.  They are: the initial startup file (\texttt{.md}), the
# Line 716 | Line 726 | An example is given in the {\sc OpenMD} file in Scheme
726   \end{enumerate}
727   An example is given in the {\sc OpenMD} file in Scheme~\ref{sch:initEx1}.
728  
729 < \begin{lstlisting}[float,caption={Example declaration of the
730 < $\text{I}_2$ molecule and the HCl molecule in $<$MetaData$>$ and
731 < $<$Snapshot$>$ blocks.  Note that even though $\text{I}_2$ is
732 < declared before HCl, the $<$Snapshot$>$ block follows the order {\it in
729 > \begin{code}[caption={Example declaration of the
730 > $\text{I}_2$ molecule and the HCl molecule in {\tt <MetaData>} and
731 > {\tt <Snapshot>} blocks.  Note that even though $\text{I}_2$ is
732 > declared before HCl, the {\tt <Snapshot>} block follows the order {\it in
733   which the components were included}.}, label=sch:initEx1]
734   <OpenMD>
735    <MetaData>
# Line 763 | Line 773 | component{
773      </StuntDoubles>
774    </Snapshot>
775   </OpenMD>
776 < \end{lstlisting}
776 > \end{code}
777  
778   \section{The Statistics File}
779  
# Line 826 | Line 836 | A simple example of a forceField file is shown in sche
836   A simple example of a forceField file is shown in scheme
837   \ref{sch:frcExample}.
838  
839 < \begin{lstlisting}[float,caption={[An example of a complete OpenMD
839 > \begin{code}[caption={[An example of a complete OpenMD
840   force field file for straight-chain united-atom alkanes.] An example
841   showing a complete OpenMD force field for straight-chain united-atom
842   alkanes.}, label={sch:frcExample}]
# Line 873 | Line 883 | end TorsionTypes
883   CH3   CH2  CH2  CH2  Trappe  0.0  0.70544  -0.13549  1.5723  
884   CH2   CH2  CH2  CH2  Trappe  0.0  0.70544  -0.13549  1.5723  
885   end TorsionTypes
886 < \end{lstlisting}
886 > \end{code}
887  
888   \section{\label{section:ffOptions}The Options block}
889  
# Line 884 | Line 894 | the various keywords and their possible values are giv
894   the various keywords and their possible values are given in Scheme
895   \ref{sch:optionsBlock}.
896  
897 < \begin{lstlisting}[caption={[A force field Options block showing default values
897 > \begin{code}[caption={[A force field Options block showing default values
898   for many force field options.] A force field Options block showing default values
899   for many force field options.  Most of these options do not need to be
900   specified if the default values are working.},
# Line 910 | Line 920 | end Options
920   GayBerneNu                = 1.0
921   EAMMixingMethod           = "Johnson"      // can also be "Daw"
922   end Options
923 < \end{lstlisting}
923 > \end{code}
924  
925   \section{\label{section:ffBase}The BaseAtomTypes block}
926  
# Line 938 | Line 948 | simulations in Jmol or VMD.
948   ability to print out the names of the base atom types for displaying
949   simulations in Jmol or VMD.
950  
951 < \begin{lstlisting}[caption={[A simple example of a BaseAtomTypes
951 > \begin{code}[caption={[A simple example of a BaseAtomTypes
952   block.] A simple example of a BaseAtomTypes block.},
953   label={sch:baseAtomTypesBlock}]
954   begin BaseAtomTypes
# Line 958 | Line 968 | end BaseAtomTypes
968   Ba      137.327
969   Cl      35.453
970   end BaseAtomTypes
971 < \end{lstlisting}
971 > \end{code}
972  
973   \section{\label{section:ffAtom}The AtomTypes block}
974  
# Line 967 | Line 977 | from the oxygen base type.
977   shows an example where multiple types of oxygen atoms can inherit mass
978   from the oxygen base type.
979  
980 < \begin{lstlisting}[caption={[An example of a AtomTypes block.] A
980 > \begin{code}[caption={[An example of a AtomTypes block.] A
981   simple example of an AtomTypes block which
982   shows how multiple types can inherit from the same base type.},
983   label={sch:atomTypesBlock}]
# Line 992 | Line 1002 | end AtomTypes
1002   feo     Fe
1003   lio     Li
1004   end AtomTypes
1005 < \end{lstlisting}
1005 > \end{code}
1006  
1007   \section{\label{section:ffDirectionalAtom}The DirectionalAtomTypes
1008    block}
# Line 1009 | Line 1019 | body frame.
1019   and in quadrupole tensors that are not necessarily diagonal in the
1020   body frame.
1021  
1022 < \begin{lstlisting}[caption={[An example of a DirectionalAtomTypes block.] A
1022 > \begin{code}[caption={[An example of a DirectionalAtomTypes block.] A
1023   simple example of a DirectionalAtomTypes block.},
1024   label={sch:datomTypesBlock}]
1025   begin DirectionalAtomTypes
# Line 1021 | Line 1031 | end DirectionalAtomTypes                    
1031   CO2             43.06   43.06   0.0    // single-site model for CO2
1032   end DirectionalAtomTypes                    
1033  
1034 < \end{lstlisting}
1034 > \end{code}
1035  
1036   For a DirectionalAtom that represents a linear object, it is
1037   appropriate for one of the moments of inertia to be zero.  In this
# Line 1069 | Line 1079 | the {\tt NonbondedInteractionTypes} block (see section
1079   the {\tt NonbondedInteractionTypes} block (see section
1080   \ref{section:ffNBinteraction}).
1081  
1082 < \begin{lstlisting}[caption={[An example of a LennardJonesAtomTypes block.] A
1082 > \begin{code}[caption={[An example of a LennardJonesAtomTypes block.] A
1083   simple example of a LennardJonesAtomTypee block.   Units for
1084   $\epsilon$ are kcal / mol and for $\sigma$ are \AA\ .},
1085   label={sch:LJatomTypesBlock}]
# Line 1086 | Line 1096 | end LennardJonesAtomTypes
1096   CH2             0.0866          3.95
1097   CH              0.0189          4.68
1098   end LennardJonesAtomTypes
1099 < \end{lstlisting}
1099 > \end{code}
1100  
1101   \subsection{\label{section:ffCharge}The ChargeAtomTypes block}
1102  
# Line 1111 | Line 1121 | of free space.
1121   charge of an electron in Coulombs.  $\epsilon_0$ is the permittivity
1122   of free space.
1123  
1124 < \begin{lstlisting}[caption={[An example of a ChargeAtomTypes block.] A
1124 > \begin{code}[caption={[An example of a ChargeAtomTypes block.] A
1125   simple example of a ChargeAtomTypes block.   Units for
1126   charge are in multiples of electron charge.},
1127   label={sch:ChargeAtomTypesBlock}]
# Line 1126 | Line 1136 | end ChargeAtomTypes
1136   Na+             1.0
1137   Cl-            -1.0
1138   end ChargeAtomTypes
1139 < \end{lstlisting}
1139 > \end{code}
1140  
1141   \subsection{\label{section:ffMultipole}The MultipoleAtomTypes
1142    block}
# Line 1178 | Line 1188 | the unit vector pointing along $\mathbf{r}_{ij}$
1188   ($\boldsymbol{\hat{r}}_{ij}=\mathbf{r}_{ij}/|\mathbf{r}_{ij}|$).
1189  
1190  
1191 < \begin{lstlisting}[caption={[An example of a MultipoleAtomTypes block.] A
1191 > \begin{code}[caption={[An example of a MultipoleAtomTypes block.] A
1192   simple example of a MultipoleAtomTypes block.   Dipoles are given in
1193   units of Debyes, and Quadrupole moments are given in units of Debye
1194   \AA~(or $10^{-26} \mathrm{~esu~cm}^2$)},
# Line 1198 | Line 1208 | end MultipoleAtomTypes
1208   // name dq phi theta psi dipole_moment  Qxx    Qyy     Qzz
1209   SSD     dq 0.0 0.0   0.0     2.35      -1.682  1.762   -0.08
1210   end MultipoleAtomTypes
1211 < \end{lstlisting}
1211 > \end{code}
1212  
1213   Specifying a MultipoleAtomType requires declaring how the
1214   electrostatic frame for the site is rotated relative to the body-fixed
# Line 1265 | Line 1275 | in Ref. \citealp{Golubkov06}
1275   efficiently compute forces and torques for this potential can be found
1276   in Ref. \citealp{Golubkov06}
1277  
1278 < \begin{lstlisting}[caption={[An example of a GayBerneAtomTypes block.] A
1278 > \begin{code}[caption={[An example of a GayBerneAtomTypes block.] A
1279   simple example of a GayBerneAtomTypes block.  Distances ($d$ and $l$)
1280   are given in \AA\ and energies ($\epsilon_X, \epsilon_S, \epsilon_E$)
1281   are in units of kcal/mol. $dw$ is unitless.},
# Line 1276 | Line 1286 | end GayBerneAtomTypes                  
1286   GBC6H6          4.65    2.03    0.540           0.540           1.9818    0.6
1287   GBCH3OH         2.55    3.18    0.542           0.542           0.55826   1.0
1288   end GayBerneAtomTypes                  
1289 < \end{lstlisting}
1289 > \end{code}
1290  
1291   \subsection{\label{section:ffSticky}The StickyAtomTypes block}
1292  
# Line 1374 | Line 1384 | reference~\citealp{fennell04}.
1384   density corrected SSD models can be found in
1385   reference~\citealp{fennell04}.
1386  
1387 < \begin{lstlisting}[caption={[An example of a StickyAtomTypes block.] A
1387 > \begin{code}[caption={[An example of a StickyAtomTypes block.] A
1388   simple example of a StickyAtomTypes block.  Distances ($r_l$, $r_u$,
1389   $r_{l}'$ and $r_{u}'$) are given in \AA\ and energies ($v_0, v_{0}'$)
1390   are in units of kcal/mol. $w_0$ is unitless.},
# Line 1386 | Line 1396 | end StickyAtomTypes
1396   SSD     0.07715 3.7284          3.7284  2.75      3.35  2.75    4.0
1397   SSD1    0.07715 3.6613          3.6613  2.75      3.35  2.75    4.0
1398   end StickyAtomTypes
1399 < \end{lstlisting}
1399 > \end{code}
1400  
1401   \section{\label{section::ffMetals}Metallic Atom Types}
1402  
# Line 1468 | Line 1478 | files.  
1478   $\mbox{kcal mol}^{-1}$ as in the rest of the {\sc OpenMD} force field
1479   files.  
1480  
1481 < \begin{lstlisting}[caption={[An example of a EAMAtomTypes block.] A
1481 > \begin{code}[caption={[An example of a EAMAtomTypes block.] A
1482   simple example of a EAMAtomTypes block. Here the only data provided is
1483   the name of a {\tt funcfl} file which contains the raw data for spline
1484   interpolations for the density, functional, and pair potential.},
# Line 1481 | Line 1491 | end EAMAtomTypes
1491   Pd      Pd.u3.funcfl
1492   Pt      Pt.u3.funcfl
1493   end EAMAtomTypes
1494 < \end{lstlisting}
1494 > \end{code}
1495  
1496   \subsection{\label{section:ffSC}The SuttonChenAtomTypes block}
1497  
# Line 1516 | Line 1526 | crystal.  Interested readers are encouraged to consult
1526   crystal.  Interested readers are encouraged to consult reference
1527   \citealp{Qi99} for further details.
1528  
1529 < \begin{lstlisting}[caption={[An example of a SCAtomTypes block.] A
1529 > \begin{code}[caption={[An example of a SCAtomTypes block.] A
1530   simple example of a SCAtomTypes block.  Distances ($\alpha$)
1531   are given in \AA\ and energies ($\epsilon$) are (by convention) given in
1532   units of eV.  These units must be specified in the {\tt Options} block
# Line 1536 | Line 1546 | end SCAtomTypes
1546   Au      0.0078052       53.581  8.0     11.0    4.0651
1547   Au2     0.0078052       53.581  8.0     11.0    4.0651
1548   end SCAtomTypes
1549 < \end{lstlisting}
1549 > \end{code}
1550  
1551   \section{\label{section::ffShortRange}Short Range Interactions}
1552   The internal structure of a molecule is usually specified in terms of
# Line 1650 | Line 1660 | The order of terms in the BondTypes block is:
1660   \item any other parameters required by the {\tt BondType}
1661   \end{itemize}
1662  
1663 < \begin{lstlisting}[caption={[An example of a BondTypes block.] A
1663 > \begin{code}[caption={[An example of a BondTypes block.] A
1664   simple example of a BondTypes block.  Distances ($b_0$)
1665   are given in \AA\ and force constants are given in
1666   units so that when multiplied by the correct power of distance they
# Line 1668 | Line 1678 | end BondTypes
1678   //Atom1 Atom2   Quartic         b0        K4      K3      K2      K1      K0
1679   //Atom1 Atom2   Polynomial      b0        n       Kn      [m      Km]
1680   end BondTypes
1681 < \end{lstlisting}
1681 > \end{code}
1682  
1683   There are advantages and disadvantages of all of the different types
1684   of bonds, but specific simulation tasks may call for specific
# Line 1761 | Line 1771 | The order of terms in the BendTypes block is:
1771   \item any other parameters required by the {\tt BendType}
1772   \end{itemize}
1773  
1774 < \begin{lstlisting}[caption={[An example of a BendTypes block.] A
1774 > \begin{code}[caption={[An example of a BendTypes block.] A
1775   simple example of a BendTypes block.  By convention, equilibrium angles
1776   ($\theta_0$) are given in degrees but force constants are given in
1777   units so that when multiplied by the correct power of angle (in
# Line 1784 | Line 1794 | end BendTypes
1794   //Polynomial
1795   //Atom1 Atom2   Atom3   Polynomial    theta0      n       Kn  [m   Km]
1796   end BendTypes
1797 < \end{lstlisting}
1797 > \end{code}
1798  
1799   Note that the parameters for a particular bend type are the same for
1800   any bending triplet of the same atomic types (in the same or reversed
# Line 1909 | Line 1919 | units of kcal/mol.
1919   kcal/mol/degrees$^2$.  All other torsion parameters are measured in
1920   units of kcal/mol.
1921  
1922 < \begin{lstlisting}[caption={[An example of a TorsionTypes block.] A
1922 > \begin{code}[caption={[An example of a TorsionTypes block.] A
1923   simple example of a TorsionTypes block.  Energy constants are given in
1924   kcal / mol, and when required by the form, $\delta$ angles are given
1925   in degrees.},
# Line 1933 | Line 1943 | end TorsionTypes
1943   //Atom1 Atom2   Atom3   Atom4   Polynomial  n Kn     [m  Km]
1944   S       CH2     CH2     C       Polynomial  0 2.218   1  2.905  2 -3.136  3 -0.7313  4 6.272  5 -7.528
1945   end TorsionTypes
1946 < \end{lstlisting}
1946 > \end{code}
1947  
1948   Note that the parameters for a particular torsion type are the same
1949   for any torsional quartet of the same atomic types (in the same or
# Line 1987 | Line 1997 | V_{\text{torsion}}(\omega) =  \frac{d}{2} \left(\omega
1997   V_{\text{torsion}}(\omega) =  \frac{d}{2} \left(\omega - \omega_0\right).
1998   \end{equation*}
1999   \end{itemize}
2000 < \begin{lstlisting}[caption={[An example of an InversionTypes block.] A
2000 > \begin{code}[caption={[An example of an InversionTypes block.] A
2001   simple example of a InversionTypes block.  Angles ($\delta_n$ and
2002   $\omega_0$) angles are given in degrees, while energy parameters ($v,
2003   K_n$) are given in kcal / mol.   The Harmonic Inversion type has a
# Line 2004 | Line 2014 | end InversionTypes
2014   //ImproperCosine
2015   //Atom1 Atom2   Atom3   Atom4   ImproperCosine  Kn  n  delta_n  [Kn n delta_n]
2016   end InversionTypes
2017 < \end{lstlisting}
2017 > \end{code}
2018  
2019   \section{\label{section::ffLongRange}Long Range Interactions}
2020  
# Line 2047 | Line 2057 | V_{\text{NB}}(r) = 4 \epsilon_{ij} \left(
2057   \end{equation*}
2058   \end{itemize}
2059  
2060 < \begin{lstlisting}[caption={[An example of a NonBondedInteractions block.] A
2060 > \begin{code}[caption={[An example of a NonBondedInteractions block.] A
2061   simple example of a NonBondedInteractions block. Distances ($\sigma,
2062   r_0$) are given in \AA, while energies ($\epsilon, D0$) are in
2063   kcal/mol.  The Morse potentials have an additional parameter $\beta_0$
# Line 2075 | Line 2085 | end NonBondedInteractions
2085   Au      ON      RepulsivePower   3.47005  0.186208   11
2086   Au      NO      RepulsivePower   3.53955  0.168629   11
2087   end NonBondedInteractions
2088 < \end{lstlisting}
2088 > \end{code}
2089  
2090   \section{\label{section:electrostatics}Electrostatics}
2091  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines