• No results found

2.4 Computational Methods

2.4.2 Molecular Dynamics

MD can be thought to closely model experiments, in the method with which simulations are performed [32]. A model is created, analogous to a physical sample, the sample is then prepared (the system is equilibrated), and then an experiment is run and data collected.

If equilibration or preparation is handled incorrectly, the collected data could be wrong or at the very least unreliable in either case. Accordingly, great care should be taken not only in running simulations, but also with the processes that are used to set up and equilibrate the desired systems.

The majority of the work within this thesis was completed using MD techniques, which are based on the aforementioned relationship between interatomic potential energy and force. However, to model dynamics, particle positions and velocities must be computed.

Since the masses of each particle are known (based on atomic weights), Newton’s Second Law of Motion can be applied to determine velocities or in other words, the trajectories of the particles such that new positions at a time t + δt can be established. To solve the

position at new time, Newton’s second law is integrated numerically (by finite difference approximations), however this requires the previous two atomic positions as initial condi-tions [32]. Instead, the Velocity Verlet method is used in which the acceleration, velocity, and position at time t are known and used to compute values at the next step in time, some δt ahead. Regardless of the method used, once the new variables are computed, several other quantities can be calculated that are of use in post-processing analysis of the system.

For MD computations, the state of a system is identified by the positions (q1. . . qN) and momenta (p1. . . pN) of a set of particles, either atoms or molecules, whose electronic properties are not directly considered [5]. Thus, for a system of N particles with masses mi, a classical description can be formed by the Hamiltonian, H, which describes the total energy of the system as a sum of kinetic and potential energies, as shown in Equation 2.17.

H (q, p) = K (p) + V (q) (2.17)

Subsequently, the kinetic and potential energy of the system are represented by,

K =

The kinetic energy is directly related to the momenta of all particles in the system, while the potential energy is constructed from particle interactions based on position. Sys-tem Sys-temperature is directly related to the kinetic energy. The first term in the potential energy equation describes any external forces acting on the particle, whereas the rest are interaction terms, which will be described in detail later. For computational efficiency, the potential energy term is usually truncated after the three-body interaction term, thus re-sulting in an effective interatomic potential energy, Vef f. From the Hamiltonian, equations of motion for the system are derived (as mentioned above) which dictates overall behavior of the set of particles. Finally, it is important to note that, the time derivative of the

Hamiltonian is zero, and thus energy in the system is conserved.

In MD calculations, it’s easily shown that the number of atoms in the system can quickly grow into the billions if the model is trying to capture larger scale behavior. As the number of particles in the system grows, so does the computing time required to solve Newton’s equations of motion. Additionally, if systems terminate a given distance away from the simulation box center, edge and surface effects must be considered, further complicating MD simulations. To combat these issues and still provide useful information regarding physical systems, MD simulations employ the technique of periodic boundary conditions (PBCs) show in a 2-D representation in Figure 2.24. Here, the shaded region of dimension L2, is the actual simulation space which contains all the atoms in the current simulation.

Atoms in boxes A-H represent the images of each atom, 1-5, in the shaded region and move in the same manner. It’s worth noting that the properties of such images do not need to be stored, but rather this diagram is strictly for visualization purposes. Should an atom in the central region move out of the shaded box and into an outside position, that atoms image will take its place, as shown with Atom 1. The position of the new atom image in the simulation cell will be a distance L away from the last known position of the original atom.

Figure 2.24: Diagram of periodic boundary conditions for atomistic simulations. The central gray box in the actual simulation space where the lettered spaces A-H represent the periodic images of atoms [5].

An impending question is how large must the central region be such that it correctly models the intended physical behavior? One of the main driving factors is the cutoff radius of the interatomic potential. Forces are computed for any pair of atoms within this radius and if the simulation space is on the same order of magnitude or smaller than this radius, forces will be computed between an atom and its own image, obviously a non-physical quantity. A general guideline established for liquids is that any dimension L of the simulation cell should be no smaller than 6σ in order to prevent this self-imaging phenomena [5]. Further complications arise when potentials have long-range interactions to consider, which is discussed in depth in Ref. [5].

When performing MD simulations, the above information is all pertinent however it does not fully relate these systems to macroscopic quantities such as pressure and tem-perature. To accomplish such a relationship, ensemble averaging is performed. For this work, several different ensembles are used, including the micro-canonical (NVE), canonical (NVT), and isothermal-isobaric (NPT) ensembles. N represents the number of particles in a system, V is the system volume, E is total energy, P is total pressure, and T is of course temperature. For each of these ensembles, the variables in parentheses are held fixed while others allowed to fluctuate, representing a connection to macroscopic experiment. For ex-ample, an experiment may be performed under constant P and T, which is commensurable to the canonical ensemble.

Beyond MD, another computational method used in this work are energy minimiza-tions, which are a form of Molecular Statics (MS). When constructing atomic systems for computation, there is no guarantee that the as-built positions will correspond to the mini-mum energy configuration for the system. Therefore, energy minimizations are performed prior to enabling dynamics such that the system starts at a minimum energy. For this study, the conjugate gradient method is used, such that new atomic positions are calcu-lated from known interatomic potentials and previous atom locations [69]. The stopping criteria for a given minimization can either be the energy tolerance or interatomic force between atoms.

There are many MD codes available for use including AMBER, CHARMM, and

GRO-MACS some of which are open-source while others are not. This work solely uses LAMMPS, the Large-scale Atomic/Molecular Massively Parallel Simulator developed by Steve Plimp-ton at Sandia National Labs [73]. LAMMPS, as its name implies, has great application to parallel computing, which is the focus of this work, utilizing Lehigh’s Corona cluster. In addition, versions of LAMMPS in recent years include many advancements in user control over their predecessors including atomic deposition, which proves very useful for the stud-ies to be discussed in later chapters. While not used directly in this thesis, it is necessary to highlight the advantages and important features of Monte Carlo methods, which are frequently used when studying material systems.