Fix zlib usage with TNG
[alexxy/gromacs.git] / manual / defunits.tex
1 %
2 % This file is part of the GROMACS molecular simulation package.
3 %
4 % Copyright (c) 2013, by the GROMACS development team, led by
5 % Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 % and including many others, as listed in the AUTHORS file in the
7 % top-level source directory and at http://www.gromacs.org.
8 %
9 % GROMACS is free software; you can redistribute it and/or
10 % modify it under the terms of the GNU Lesser General Public License
11 % as published by the Free Software Foundation; either version 2.1
12 % of the License, or (at your option) any later version.
13 %
14 % GROMACS is distributed in the hope that it will be useful,
15 % but WITHOUT ANY WARRANTY; without even the implied warranty of
16 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 % Lesser General Public License for more details.
18 %
19 % You should have received a copy of the GNU Lesser General Public
20 % License along with GROMACS; if not, see
21 % http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 % Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23 %
24 % If you want to redistribute modifications to GROMACS, please
25 % consider that scientific software is very special. Version
26 % control is crucial - bugs must be traceable. We will be happy to
27 % consider code for inclusion in the official distribution, but
28 % derived work must not be called official GROMACS. Details are found
29 % in the README & COPYING files - if they are missing, get the
30 % official version at http://www.gromacs.org.
31 %
32 % To help us fund GROMACS development, we humbly ask that you cite
33 % the research papers on the package. Check out http://www.gromacs.org.
34
35 \chapter{Definitions and Units}
36 \label{ch:defunits}
37 \section{Notation}
38 The following conventions for mathematical typesetting 
39 are used throughout this document:
40
41 \centerline{
42 \begin{tabular}{l|l|c}
43 Item            &       Notation        & Example       \\
44 \hline  
45 Vector          &       Bold italic     & $\rvi$        \\
46 Vector Length   &       Italic          & $r_i$         \\
47 \end{tabular}
48 }
49
50 We define the {\em lowercase} subscripts 
51 $i$, $j$, $k$ and $l$ to denote particles:
52 $\rvi$ is the {\em position vector} of particle $i$, and using this 
53 notation:
54 \bea
55 \rvij   =       \rvj-\rvi       \\
56 \rij    =       | \rvij |
57 \eea
58 The force on particle $i$ is denoted by $\ve{F}_i$ and 
59 \beq
60 \ve{F}_{ij} = \mbox{force on $i$ exerted by $j$}
61 \eeq
62 Please note that we changed notation as of version 2.0 to $\rvij=\rvj-\rvi$ since this
63 is the notation commonly used. If you encounter an error, let us know.
64
65 \section{\normindex{MD units}\index{units}}
66 {\gromacs} uses a consistent set of units that produce values in the
67 vicinity of unity for most relevant molecular quantities. Let us call
68 them {\em MD units}. The basic units in this system are nm, ps, K,
69 electron charge (e) and atomic mass unit (u), see
70 \tabref{basicunits}.
71 \begin{table}
72 \centerline{
73 \begin{tabular}{|l|c|l|}
74 \dline
75 Quantity        & Symbol&  Unit                                         \\
76 \hline                  
77 length          &  r    &  nm $= 10^{-9}$ m                             \\
78 mass            &  m    &  u (atomic mass unit) $=$ 
79                                 1.6605402(10)$\times 10^{-27}$ kg       \\
80                 &       &  ($1/12$ the mass of a $^{12}$C atom)         \\
81                 &       &  $1.6605402(10)\times 10^{-27}$ kg            \\
82 time            &  t    &  ps $= 10^{-12}$ s                            \\
83 charge          &  q    &  {\it e} $=$ electronic charge $=
84                                 1.60217733(49)\times 10^{-19}$ C        \\
85 temperature     &  T    &  K                                            \\
86 \dline
87 \end{tabular}
88 }
89 \caption[Basic units used in {\gromacs}.]{Basic units used in
90 {\gromacs}. Numbers in parentheses give accuracy.}
91 \label{tab:basicunits}
92 \end{table}
93
94 Consistent with these units are a set of derived units, given in
95 \tabref{derivedunits}.
96 \begin{table}
97 \centerline{
98 \begin{tabular}{|l|c|l|}
99 \dline
100 Quantity        & Symbol   & Unit                               \\
101 \hline
102 energy          & $E,V$    & kJ~mol$^{-1}$                      \\
103 Force           & $\ve{F}$ & kJ~mol$^{-1}$~nm$^{-1}$            \\
104 pressure        & $p$      & kJ~mol$^{-1}$~nm$^{-3} =
105                                 10^{30}/N_{AV}$~Pa              \\
106                 &          & $1.660\,54\times 10^6$~Pa $= 
107                                 16.6054$~bar                    \\
108 velocity        & $v$      & nm~ps$^{-1} = 1000$ m s$^{-1}$             \\
109 dipole moment   & $\mu$    & \emph{e}~nm                                \\ 
110 electric potential& $\Phi$ & kJ~mol$^{-1}$~\emph{e}$^{-1} = 
111                                 0.010\,364\,272(3)$ Volt        \\
112 electric field  & $E$      & kJ~mol$^{-1}$~nm$^{-1}$~\emph{e}$^{-1} =
113                                 1.036\,427\,2(3) \times 10^7$~V m$^{-1}$        \\
114 \dline
115 \end{tabular}
116 }
117 \caption{Derived units}
118 \label{tab:derivedunits}
119 \end{table}
120
121 The {\bf electric conversion factor} $f=\frac{1}{4 \pi
122 \varepsilon_o}=138.935\,485(9)$ kJ~mol$^{-1}$~nm~e$^{-2}$. It relates
123 the mechanical quantities to the electrical quantities as in
124 \beq
125  V = f \frac{q^2}{r} \mbox{\ \ or\ \ } F = f \frac{q^2}{r^2}
126 \eeq
127
128 Electric potentials $\Phi$ and electric fields $\ve{E}$ are
129 intermediate quantities in the calculation of energies and
130 forces. They do not occur inside {\gromacs}. If they are used in
131 evaluations, there is a choice of equations and related units. We
132 strongly recommend following the usual practice of including the factor
133 $f$ in expressions that evaluate $\Phi$ and $\ve{E}$:
134 \bea
135 \Phi(\ve{r}) = f \sum_j \frac{q_j}{|\ve{r}-\ve{r}_j|}   \\
136 \ve{E}(\ve{r}) = f \sum_j q_j \frac{(\ve{r}-\ve{r}_j)}{|\ve{r}-\ve{r}_j|^3}
137 \eea
138 With these definitions, $q\Phi$ is an energy and $q\ve{E}$ is a
139 force. The units are those given in \tabref{derivedunits}:
140 about 10 mV for potential. Thus, the potential of an electronic charge
141 at a distance of 1 nm equals $f \approx 140$ units $\approx
142 1.4$~V. (exact value: 1.439965 V)
143
144 {\bf Note} that these units are mutually consistent; changing any of the
145 units is likely to produce inconsistencies and is therefore {\em
146 strongly discouraged\/}! In particular: if \AA \ are used instead of
147 nm, the unit of time changes to 0.1 ps. If kcal mol$^{-1}$ (= 4.184
148 kJ mol$^{-1}$) is used instead of kJ mol$^{-1}$ for energy, the unit of time becomes
149 0.488882 ps and the unit of temperature changes to 4.184 K. But in
150 both cases all electrical energies go wrong, because they will still
151 be computed in kJ mol$^{-1}$, expecting nm as the unit of length. Although
152 careful rescaling of charges may still yield consistency, it is clear
153 that such confusions must be rigidly avoided.
154   
155 In terms of the MD units, the usual physical constants take on
156 different values (see \tabref{consts}). All quantities are per mol rather than per
157 molecule. There is no distinction between Boltzmann's constant $k$ and
158 the gas constant $R$: their value is
159 $0.008\,314\,51$~kJ~mol$^{-1}$~K$^{-1}$.
160 \begin{table}
161 \centerline{
162 \begin{tabular}{|c|l|l|}
163 \dline
164 Symbol  & Name                  & Value                                 \\
165 \hline
166 $N_{AV}$& Avogadro's number     & $6.022\,136\,7(36)\times 10^{23}$  mol$^{-1}$ \\
167 $R$     & gas constant  & $8.314\,510(70)\times 10^{-3}$~kJ~mol$^{-1}$~K$^{-1}$ \\
168 $k_B$   & Boltzmann's constant  & \emph{idem}   \\
169 $h$     & Planck's constant     & $0.399\,031\,32(24)$~kJ~mol$^{-1}$~ps \\
170 $\hbar$ & Dirac's constant      & $0.063\,507\,807(38)$~kJ~mol$^{-1}$~ps \\
171 $c$     & velocity of light     & $299\,792.458$~nm~ps$^{-1}$ \\
172 \dline
173 \end{tabular}
174 }
175 \caption{Some Physical Constants}
176 \label{tab:consts}
177 \end{table}
178
179 \section{Reduced units\index{reduced units}}
180 When simulating Lennard-Jones (LJ) systems, it might be advantageous to
181 use reduced units ({\ie}, setting
182 $\epsilon_{ii}=\sigma_{ii}=m_i=k_B=1$ for one type of atoms). This is
183 possible. When specifying the input in reduced units, the output will
184 also be in reduced units. The one exception is the {\em
185 temperature}, which is expressed in $0.008\,314\,51$ reduced
186 units. This is a consequence of using Boltzmann's constant in the
187 evaluation of temperature in the code. Thus not $T$, but $k_BT$, is the
188 reduced temperature. A {\gromacs} temperature $T=1$ means a reduced
189 temperature of $0.008\ldots$ units; if a reduced temperature of 1 is
190 required, the {\gromacs} temperature should be 120.2717.
191
192 In \tabref{reduced} quantities are given for LJ potentials:
193 \beq
194 V_{LJ} = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^{6} \right]
195 \eeq
196
197 \begin{table}
198 \centerline{
199 \begin{tabular}{|l|c|l|}
200 \dline
201 Quantity        & Symbol        & Relation to SI                        \\
202 \hline
203 Length          & r$^*$         & r $\sigma^{-1}$                       \\
204 Mass            & m$^*$         & m M$^{-1}$                            \\
205 Time            & t$^*$         & t $\sigma^{-1}$ $\sqrt{\epsilon/M}$ \\
206 Temperature     & T$^*$         & k$_B$T $\epsilon^{-1}$                \\
207 Energy          & E$^*$         & E $\epsilon^{-1}$             \\
208 Force           & F$^*$         & F $\sigma~\epsilon^{-1}$              \\
209 Pressure        & P$^*$         & P $\sigma ^3 \epsilon^{-1}$           \\
210 Velocity        & v$^*$         & v $\sqrt{M/\epsilon}$         \\
211 Density         & $\rho^*$      & N $\sigma ^3~V^{-1}$          \\
212 \dline
213 \end{tabular}
214 }
215 \caption{Reduced Lennard-Jones quantities}
216 \label{tab:reduced}
217 \end{table}
218
219
220 % LocalWords:  ij basicunits derivedunits kJ mol mV kcal consts LJ BT
221 % LocalWords:  nm ps