...
[lectures/latex.git] / posic / thesis / basics.tex
1 \chapter{Basics}
2
3 \begin{quotation}
4 \dq We may regard the present state of the universe as the effect of the past and the cause of the future. An intellect which at any given moment knew all of the forces that animate nature and the mutual positions of the beings that compose it, if this intellect were vast enough to submit the data to analysis, could condense into a single formula the movement of the greatest bodies of the universe and that of the lightest atom; for such an intellect nothing could be uncertain and the future just like the past would be present before its eyes.\dq{}
5 \cite{laplace}
6 \begin{flushright}
7 {\em Marquis Pierre Simon de Laplace, 1814.}
8 \end{flushright}
9 \end{quotation}
10
11 \section{Molecular dynamics simulations}
12
13 Pierre Simon de Laplace phrased this vision in terms of a controlling, omniscient instance - the {\em Laplace demon} - which would be able to look into the future as well as into the past due to the deterministic nature of processes, governed by the solution of differential equations.
14 Although Laplace's vision is nowadays corrected by chaos theory and quantum mechanics, it expresses two main features of classical mechanics, the determinism of processes and time reversibility of the fundamental equations.
15 This understanding was one of the first ideas for doing molecular dynamics simulations, considering an isolated system of particles, the behaviour of which is fully determined by the solution of the classical equations of motion.
16
17 \subsection{Introduction to molecular dynamics simulations}
18
19 Basically, molecular dynamics (MD) simulation is a technique to compute a system of particles, referred to as molecules, with their positions, volocities and forces among each other evolving in time.
20 The MD method was first introduced by Alder and Wainwright in 1957 \cite{alder1,alder2} to study the interactions of hard spheres.
21 The basis of the approach are Newton's equations of motion to describe classicaly the many-body system.
22 MD simulation is the numerical way of solving the $N$-body problem which cannot be solved analytically ($N>3$).
23 Quantum mechanical effects are taken into account by an analytical interaction potential between the nuclei.
24
25 By MD simulation techniques a complete description of the system in the sense of classical mechanics on the microscopic level is obtained.
26 This microscopic information has to be translated to macroscopic observables by means of statistical mechanics.
27
28 The basic idea is to integrate Newton's equations numerically.
29 A system of $N$ particles of masses $m_i$ ($i=1,\ldots,N$) at positions ${\bf r}_i$ and velocities $\dot{{\bf r}}_i$ is given by
30 \begin{equation}
31 m_i \frac{d^2}{dt^2} {\bf r}_i = {\bf F}_i \, \textrm{.}
32 \end{equation}
33 The forces ${\bf F}_i$ are obtained from the potential energy $U(\{{\bf r}\})$:
34 \begin{equation}
35 {\bf F}_i = - \nabla_{{\bf r}_i} U({\{\bf r}\}) \, \textrm{.}
36 \end{equation}
37
38 Given the initial conditions ${\bf r}_i(t_0)$ and $\dot{{\bf r}}_i(t_0)$ the equations can be integrated by a certain integration algorithm.
39 The solution of these equations provides the complete information of a system evolving in time.
40
41 The following chapters cover the tools of the trade necessary for the MD simulation technique.
42 Three ingredients are required for an MD simulation:
43 \begin{enumerate}
44 \item A model for the interaction between system constituents is needed.
45       Interaction potentials and their accuracy for describing certain systems of elements will be outlined in chapter \ref{subsection:interact_pot}.
46 \item An integrator is needed, which propagtes the particle positions and velocities from time $t$ to $t+\delta t$, realised by a finite difference scheme which moves trajectories discretely in time.
47       In chapter \ref{subsection:integrate_algo} a detailed overview of the available integration algorithms is given, including their advantages and disadvantages.
48 \item A statistical ensemble has to be chosen, which allows certain thermodynamic quantities to be controlled or to stay constant.
49       This is discussed in chapter \ref{subsection:statistical_ensembles}
50 \end{enumerate}
51
52 In addition special techniques will be outlined which reduce the complexity of the MD algorithm, though the force/energy evaluation almost inevitably dictates the overall speed.
53
54 \subsection{Integration algorithms}
55 \label{subsection:integrate_algo}
56
57 \subsection{Interaction potentials}
58 \label{subsection:interact_pot}
59
60 The potential energy of $N$ interacting atoms can be written in the form
61 \begin{equation}
62 U(\{{\bf r}\}) = \sum_i U_1({\bf r}_i) + \sum_i \sum_{j>i} U_2({\bf r}_i,{\bf r}_j) + \sum_i \sum_{j>i} \sum_{k>j>i} U_3({\bf r}_i,{\bf r}_j,{\bf r}_k) \ldots
63 \end{equation}
64 where $U$ is the total potential energy.
65 $U_1$ is a single particle potential describing external forces.
66 Examples of single particle potentials are the gravitational force or an electric field.
67 $U_2$ is a two body pair potential which only depends on the distance $r_{ij}$ between the two atoms $i$ and $j$.
68 If not only pair potentials are considered, three body potentials $U_3$ or multi body potentials $U_n$ can be included.
69 Mainly these higher order terms are avoided since they are not easy to model and it is rather time consuming to evaluate potentials and forces originating from these many body terms.
70
71 Ordinary pair potentials have a close-packed structure like face-centered cubic (FCC) or hexagonal close-packed (HCP) as a ground state.
72 A pair potential is thus unable to describe properly elements with other structures than FCC or HCP.
73 Silicon and carbon for instance, have a diamand/zincblende structure with four covalent bonded neighbours, which is far from a close-packed structure.
74 A three body potential has to be included for these types of elements.
75
76 In the following, relevant potentials for this work are discussed. 
77
78 \subsubsection{The Lennard-Jones potential}
79
80 The L-J potential is a realistic two body pair potential and is of the form
81 \begin{equation}
82 U^{LJ}(r) = 4 \epsilon \Big[ \Big( \frac{\sigma}{r} \Big)^{12} - \Big( \frac{\sigma}{r} \Big)^6 \Big] \, \textrm{,}
83 \label{eq:lj-p}
84 \end{equation}
85 where $r$ denotes the distance between the two atoms.
86
87 The attractive tail for large separations $(\sim r^{-6})$ is essentially due to correlations between electron clouds surrounding the atoms. The attractive part is also known as {\em van der Waals} or {\em London} interaction.
88 It can be derived classically by considering how two charged spheres induce dipol-dipol interactions into each other, or by considering the interaction between two oscillators in a quantum mechanical way.
89
90 The repulsive term $(\sim r^{-12})$ captures the non-bonded overlap of the electron clouds.
91 It does not have a true physical motivation, other than the exponent being larger than $6$ to get a steep rising repulsive potential wall at short distances.
92 Chosing $12$ as the exponent of the repulsive term it is just the square of the attractive term which makes the potential evaluable in a very efficient way.
93
94 The constants $\epsilon$ and $\sigma$ are usually determined by fitting to experimental data.
95 $\epsilon$ accounts to the depth of the potential well, where $\sigma$ is regarded as the radius of the particle, also known as the van der Waals radius.
96
97 Writing down the derivation of the Lennard-Jones potential in respect to $x_i$ (the $i$th component of the distance vector ${\bf r}$)
98 \begin{equation}
99 \frac{\partial}{\partial x_i} U^{LJ}(r) = 4 \epsilon x_i \Big( -12 \frac{\sigma^{12}}{r^{14}} + 6 \frac{\sigma^6}{r^8} \Big)
100 \label{eq:lj-d}
101 \end{equation}
102 one can easily identify $\sigma$ by the equilibrium distance of the atoms $r_e=\sqrt[6]{2} \sigma$.
103 Applying the equilibrium distance into \eqref{eq:lj-p} $\epsilon$ turns out to be the negative well depth.
104 The $i$th component of the force $F^j$ on particle $j$ is obtained by
105 \begin{equation}
106 F_i^j = - \frac{\partial}{\partial x_i} U^{LJ}(r) \, \textrm{.}
107 \label{eq:lj-f}
108 \end{equation}
109
110 \subsubsection{The Stillinger Weber potential}
111
112 The Stillinger Weber potential \cite{stillinger_weber} \ldots
113
114 \begin{equation}
115 U = \sum_{i,j} U_2({\bf r}_i,{\bf r}_j) + \sum_{i,j,k} U_3({\bf r}_i,{\bf r}_j,{\bf r}_k)
116 \end{equation}
117
118 \begin{equation}
119 U_2(r_{ij}) = \left\{
120   \begin{array}{ll}
121     \epsilon A \Big( B (r_{ij} / \sigma)^{-p} - 1\Big) \exp \Big[ (r_{ij} / \sigma - 1)^{-1}  \Big]  & r_{ij} < a \sigma \\
122     0 & r_{ij} \ge a \sigma
123   \end{array} \right.
124 \end{equation}
125
126 \begin{equation}
127 U_3({\bf r}_i,{\bf r}_j,{\bf r}_k) = 
128 \epsilon \Big[ h(r_{ij},r_{ik},\theta_{jik}) + h(r_{ji},r_{jk},\theta_{ijk}) + h(r_{ki},r_{kj},\theta_{ikj}) \Big]
129 \end{equation}
130
131 \begin{equation}
132 h(r_{ij},r_{ik},\theta_{jik}) =
133 \lambda \exp \Big[ \gamma (r_{ij}/\sigma -a)^{-1} + \gamma (r_{ik}/\sigma - a)^{-1} \Big] \Big( \cos \theta_{jik} + \frac{1}{3} \Big)^2
134 \end{equation}
135
136 \subsubsection{The Tersoff potential}
137
138 Tersoff proposed an empirical interatomic potential for covalent systems.
139 The Tersoff potential explicitly incorporates the dependence of bond order on local envirenments, permitting an improved description of covalent materials.
140 Tersoff applied the potential to silicon \cite{tersoff_silicon1,tersoff_silicon2,tersoff_silicon3}, carbon \cite{tersoff_carbon} and also to multicomponent systems like $SiC$ \cite{tersoff_multi}.
141 The basic idea is that, in real systems, the bond order depends upon the local environment.
142 An atom with many neighbours forms weaker bonds than an atom with few neighbours.
143
144 The interatomic potential is taken to have the form
145 \begin{eqnarray}
146 E & = & \sum_i E_i = \frac{1}{2} \sum_{i \ne j} V_{ij} \textrm{ ,} \\
147 V_{ij} & = & f_C(r_{ij}) [ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) ] \textrm{ .}
148 \end{eqnarray}
149 $E$ is the total energy of the system, constituted either by the sum over the site energies $E_i$ or by the bond energies $V_{ij}$.
150 The indices $i$ and $j$ correspond to the atoms of the system with $r_{ij}$ being the distance from atom $i$ to atom $j$.
151
152 The functions $f_R$ and $f_A$ represent a repulsive and an attractive pair potential.
153 The repulsive part is due to the orthogonalization energy of overlapped atomic wave functions.
154 The attractive part is associated with the bonding.
155 \begin{eqnarray}
156 f_R(r_{ij}) & = & A_{ij} \exp (- \lambda_{ij} r_{ij} ) \\
157 f_A(r_{ij}) & = & -B_{ij} \exp (- \mu_{ij} r_{ij} )
158 \end{eqnarray}
159 The function $f_C$ is the potential cutoff function to limit the range of the potential.
160 It is designed to have a smooth transition of the potential at distances $R_{ij}$ and $S_{ij}$.
161 \begin{equation}
162 f_C(r_{ij}) = \left\{
163   \begin{array}{ll}
164     1, & r_{ij} < R_{ij} \\
165     \frac{1}{2} + \frac{1}{2} \cos \Big[ \pi (r_{ij} - R_{ij})/(S_{ij} - R_{ij}) \Big], & R_{ij} < r_{ij} < S_{ij} \\
166     0, & r_{ij} > S_{ij}
167   \end{array} \right.
168 \end{equation}
169
170 The function $b_{ij}$ represents a measure of the bond order, monotonically decreasing with the coordination of atoms $i$ and $j$.
171 It is of the form:
172 \begin{eqnarray}
173 b_{ij} & = & \chi_{ij} (1 + \beta_i^{n_i} \zeta^{n_i}_{ij})^{-1/2n_i} \\
174 \zeta_{ij} & = & \sum_{k \ne i,j} f_C (r_{ik}) \omega_{ik} g(\theta_{ijk}) \\
175 g(\theta_{ijk}) & = & 1 + c_i^2/d_i^2 - c_i^2/[d_i^2 + (h_i - \cos \theta_{ijk})^2]
176 \end{eqnarray}
177 where $\theta_{ijk}$ is the bond angle between bonds $ij$ and $ik$.
178 This is illustrated in Figure \ref{img:tersoff_angle}.
179
180 \printimg{!h}{width=8cm}{tersoff_angle.eps}{Angle between bonds of atoms $i,j$ and $i,k$.}{img:tersoff_angle}
181
182 In order to calculate the forces the derivation of the potential with respect to $x^i_n$ (the $n$th component of the position vector of atom $i$ $\equiv$ ${\bf r}_i$) has to be known.
183 This is gradually done in the following.
184 The $n$th component of the force acting on atom $i$ is
185 \begin{eqnarray}
186 F_n^i & = & - \frac{\partial}{\partial x_n^i} \sum_{j \neq i} V_{ij} \nonumber\\
187  & = & \sum_{j \neq i} \Big( \partial_{x_n^i} f_C(r_{ij}) \big[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \big] + \nonumber\\
188 & & + f_C(r_{ij}) \big[ \partial_{x_n^i} f_R(r_{ij}) + b_{ij} \partial_{x_n^i} f_A(r_{ij}) + f_A(r_{ij}) \partial_{x_n^i} b_{ij} \big] \Big) \textrm{ .}
189 \end{eqnarray}
190 For the implementation it is helpful to seperate the two and three body terms.
191 \begin{eqnarray}
192 F_n^i & = & \sum_{j \neq i} \Big( f_R(r_{ij}) \partial_{x_n^i} f_C(r_{ij}) + f_C(r_{ij}) \partial_{x_n^i} f_R(r_{ij}) \Big) + \nonumber\\
193 & + & \sum_{j \neq i} \Big( \partial_{x_n^i} f_C(r_{ij}) b_ij f_A(r_{ij}) + f_C(r_{ij}) \big[ b_{ij} \partial_{x_n^i} f_A(r_{ij}) + f_A(r_{ij}) \partial_{x_n^i} b_{ij} \big] \Big)
194 \end{eqnarray}
195 The cutoff function $f_C$ derivated with repect to $x^i_n$ is
196 \begin{equation}
197 \partial_{x^i_n} f_C(r_{ij}) =
198   - \frac{1}{2} \sin \Big( \pi (r_{ij} - R_{ij}) / (S_{ij} - R_{ij}) \Big) \frac{\pi (x^i_n - x^j_n)}{(S_{ij} - R_{ij}) r_{ij}}
199 \label{eq:d_cutoff}
200 \end{equation}
201 for $R_{ij} < r_{ij} < S_{ij}$ and otherwise zero.
202 The derivations of the repulsive and attractive part are:
203 \begin{eqnarray}
204 \partial_{x_n^i} f_R(r_{ij}) & = & - \lambda_{ij} \frac{x_n^i - x_n^j}{r_{ij}} A_{ij} \exp (-\lambda_{ij} r_{ij})\\
205 \partial_{x_n^i} f_A(r_{ij}) & = & \mu_{ij} \frac{x_n^i - x_n^j}{r_{ij}} B_{ij} \exp (-\mu_{ij} r_{ij}) \textrm{ .}
206 \end{eqnarray}
207 The angle $\theta_{ijk}$ can be expressed by the atom distances with the law of cosines:
208 \begin{eqnarray}
209 \theta_{ijk} & = & \arccos \Big( (r_{ij}^2 + r_{ik}^2 - r_{jk}^2)/(2 r_{ij} r_{ik}) \Big) \\
210 \partial_{x^i_n} \theta_{ijk} & = & 
211 \frac{-1}{\sqrt{1 - ((r_{ik}^2+r_{ij}^2-r_{jk}^2)/2r_{ik}r_{ij})^2}} \times \nonumber\\
212  & & \times \Big( \frac{4 r_{ik}r_{ij} (2 x^i_n - x^k_n - x^j_n) + 2(x^j_n - x^i_n)\frac{r_{ik}}{r_{ij}} + 2(x^k_n - x^i_n)\frac{r_{ij}}{r_{ik}} }{4 r^2_{ik} r^2_{ij}}\Big) \label{eq:d_theta}
213 \end{eqnarray}
214 Using the expressions \eqref{eq:d_cutoff} and \eqref{eq:d_theta} the derivation of $b_{ij}$ with respect to $x^i_n$ can be written as:
215 \begin{eqnarray}
216 \partial_{x^i_n} b_{ij} & = &
217 - \frac{1}{2n_i} \chi_{ij} \Bigg( 1 + \beta_i^{n_i} \Bigg[ \sum_{k \ne i,j} \bigg( f_C(r_{ik}) \omega_{ik} \Big( 1 + \frac{c_i^2}{d_i^2} - \frac{c_i^2}{d_i^2 + (h_i - \cos \theta_{ijk})^2} \Big) \bigg)^{n_i} \Bigg] \Bigg)^{-\frac{1}{2n_i} - 1} \times \nonumber\\
218 && \times n_i \beta_i^{n_i} \sum_{k \ne i,j} \Bigg( \Bigg[ f_C(r_{ik}) \omega_{ik} \Big( 1 + \frac{c_i^2}{d_i^2} - \frac{c_i^2}{d_i^2 + (h_i - \cos \theta_{ijk})^2}  \Big) \Bigg]^{n_i -1} \times \nonumber\\
219 && \times \Bigg[ \omega_{ik} \Big( 1 + \frac{c_i^2}{d_i^2} - \frac{c_i^2}{d_i^2 + (h_i - \cos \theta_{ijk})^2} \Big) \partial_{x^i_n} f_C(r_{ik}) + \nonumber\\
220 && + f_C(r_{ik}) \omega_{ik} \frac{c_i^2}{(d_i^2 + (h_i - \cos \theta_{ijk})^2)^2} \times \nonumber\\
221 && \times 2 \Big( h_i - \cos \theta_{ijk} \Big) \sin \theta_{ijk} \partial_{x^i_n} \theta_{ijk} \Bigg] \Bigg)
222 \end{eqnarray}
223
224
225 \subsubsection{The Brenner potential}
226
227 \subsection{Statistical ensembles}
228 \label{subsection:statistical_ensembles}
229