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