MD Seminar 2019 Lecture Note (M. Matsumoto): p. 76 5.8 Open Source Codes for Molecular Simulation You can make your own simulation code and tools by yourself, of course. But several codes are available, either as an open source or a commertial software. Here given are examples. 5.8.1 LAMMPS For details, see https://lammps.sandia.gov/ This code (well, actually a group of many codes) is a classical molecular dynamics code with a focus on materials modeling. It’s an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator. 1.1. Overview of LAMMPS LAMMPS is a classical molecular dynamics (MD) code that models ensembles of particles in a liquid, solid, or gaseous state. It can model atomic, polymeric, biological, solid-state (metals, ceramics, oxides), granular, coarse-grained, or macro- scopic systems using a variety of interatomic potentials (force fields) and boundary conditions. It can model 2d or 3d systems with only a few particles up to millions or billions. LAMMPS can be built and run on a laptop or desktop machine, but is designed for parallel computers. It will run on any parallel machine that supports the MPI message-passing library. This includes shared-memory boxes and distributed- memory clusters and supercomputers. LAMMPS is written in C++. Earlier versions were written in F77 and F90. See the History page of the website for details. All versions can be downloaded from the LAMMPS website. LAMMPS is designed to be easy to modify or extend with new capabilities, such as new force fields, atom types, boundary conditions, or diagnostics. See the Modify doc page for more details. In the most general sense, LAMMPS integrates Newton ’ s equations of motion for a collection of interacting particles. A single particle can be an atom or molecule or electron, a coarse-grained cluster of atoms, or a mesoscopic or macroscopic clump of material. The interaction models that LAMMPS includes are mostly short-range in nature; some long-range models are included as well. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small sub-domains of equal computational cost, one of which is assigned to each processor. Processors communicate and store “ ghost ”atom information for atoms that border their sub-domain.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 76
5.8 Open Source Codes for Molecular Simulation
You can make your own simulation code and tools by yourself, of course. But several codes are available,
either as an open source or a commertial software. Here given are examples.
5.8.1 LAMMPS For details, see https://lammps.sandia.gov/
This code (well, actually a group of many codes) is a classical molecular dynamics code with a focus
on materials modeling. It’s an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator.
1.1. Overview of LAMMPSLAMMPS is a classical molecular dynamics (MD) code that models ensembles of particles in a liquid, solid, or gaseous
state. It can model atomic, polymeric, biological, solid-state (metals, ceramics, oxides), granular, coarse-grained, or macro-scopic systems using a variety of interatomic potentials (force fields) and boundary conditions. It can model 2d or 3d
systems with only a few particles up to millions or billions.
LAMMPS can be built and run on a laptop or desktop machine, but is designed for parallel computers. It will run onany parallel machine that supports the MPI message-passing library. This includes shared-memory boxes and distributed-
memory clusters and supercomputers. LAMMPS is written in C++. Earlier versions were written in F77 and F90. See the
History page of the website for details. All versions can be downloaded from the LAMMPS website.LAMMPS is designed to be easy to modify or extend with new capabilities, such as new force fields, atom types,
boundary conditions, or diagnostics. See the Modify doc page for more details.
In the most general sense, LAMMPS integrates Newton ’s equations of motion for a collection of interacting particles.A single particle can be an atom or molecule or electron, a coarse-grained cluster of atoms, or a mesoscopic or macroscopic
clump of material. The interaction models that LAMMPS includes are mostly short-range in nature; some long-rangemodels are included as well. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the
simulation domain into small sub-domains of equal computational cost, one of which is assigned to each processor. Processors
communicate and store“ ghost”atom information for atoms that border their sub-domain.
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 77
5.8.2 GROMACS For details, see http://www.gromacs.org/
Another popular package for molecular simulations is GROMACS.
About GromacsGROMACS is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for
systems with hundreds to millions of particles. It is primarily designed for biochemical molecules like proteins, lipids andnucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the
nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological
systems, e.g. polymers.GROMACS supports all the usual algorithms you expect from a modern molecular dynamics implementation, (check the
online reference or manual for details), but there are also quite a few features that make it stand out from the competition:
GROMACS provides extremely high performance compared to all other programs. A lot of algorithmic optimizations havebeen introduced in the code; we have for instance extracted the calculation of the virial from the innermost loops over
pairwise interactions, and we use our own software routines to calculate the inverse square root. In GROMACS 4.6 andup, on almost all common computing platforms, the innermost loops are written in C using intrinsic functions that the
compiler transforms to SIMD machine instructions, to utilize the available instruction-level parallelism. These kernels are
available in either single and double precision, and in support all the different kinds of SIMD support found in x86-family(and other) processors.
5.8.3 Visuallization tools: VMD and Jmol
For details, see https://www.ks.uiuc.edu/Research/vmd/
For details, see http://jmol.sourceforge.net/
Example of VMD image.Example of Jmol image.
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 78
6 Various Methods for Particle Simulations
So far described is a method called “molecular dynamics simulation”. This belongs to a category of
“particle simulations50) ”, which include various other types. In this section, several examples of particle
methods are introduced. Refer to textbooks51) for more details.
6.1 BD method
Consider a colloidal system, in which organic or inorganic particles of typical size 0.1−10µm are dispersed
in aqueous solutions. When you observe the particles, they show random motions due to the thermal
fluctuations of small molecules surrounding them, which is the Brownian motions. If you are interested
only in the dynamics of colloidal particles, you can assume a simpler form of an equation of motion (often
called a “ ラ ン ジュ バ ン
Langevin equation”) for each particle, such as
md2r
dt2= −∇U − γv + Fr (6-55)
where ∇U is the external force acting on the particle, −γv is the friction force proportional to the particle
velocity, and Fr is the random force by the surrounding small molecules. Motions of colloidal particles
can be traced by numerically integrating Eq. (6-55), which is known as the Brownian dynamics (BD)
simulation52) The basic concept is “separation of scales”; small molecules exhibit very fast motions
and short-ranged interactions, typical scales of which are ps and nm, while macromolecules have slower
(e.g., µs) dynamics with long-ranged (e.g., µm) interactions. Thus we can smear out the dynamics of
small molecules.
50) In some fields of numerical simulation, “particle simulations” are a special type of “mesh-free” (or meshless) scheme.51) MPS 法については,例えば 越塚誠一, 粒子法 (計算力学レクチャーシリーズ), 丸善 2005.BD 法や DPD 法については,例えば 佐藤 明, HOW TO 分子シミュレーション―分子動力学法、モンテカルロ法、ブラウン動力学法、散逸粒子動力学法, 共立出版 2004.
52) Some details are described in 熱物理工学 Thermal Science and Engineering.
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 79
6.2 DPD method
The dissipative particle dynamics (DPD,散逸粒子動力学) method53) is another type of coarse-grained (粗
視化) schemes; we roughly trace the motion of “particle clusters,” instead of each molecule. The governing
equation of motion is similar to Eq. (6-55), but each “particle” essentially represents a cluster of molecules.
The degree of “coarse graining” varies from several molecules per particle to ∼ 104 molecules per particle.
The DPD simulation has become popular recently in fields of polymer science and bio/medical science.
53) R. D. Groot, P. B. Warren, “Dissipative Particl Dynamis: Bridging the Gap between Atomistic and Mesoscopic Simu-lation,” J. Chem. Phys., 107 (1997) 4423–4435.
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 80
6.3 Particle Hydrodynamic Simulation: SPH vs. MPS
When you numerically treat complicated shapes or boundaries in continuum mechanics, it is very
time-consuming to generate appropriate meshes or lattices; thus meshfree schemes are promising. The
smoothed particle hydrodynamics (SPH) method54) is based on the idea that materials (solid, liquid, or
sometimes gas) are represented as assembly of many “fictitious particles”. Each particle is assumed to
obey a Newtonian equation of motion, derived from the original continuum mechanics. Properties (e.g.,
density, temperature, and pressure/stress) at each spatial point are evaluated as a “smoothed” average
of the particles. For details, refer to some references55) .
The concept of the moving particle simulation (MPS) method is similar to that of SPH, but it uses
54) J. J. Monaghan, “Simulating Free Surface Flows with SPH,” J. Computational Phys., 110 (1994) 399–406.55) 入門的な解説としては,たとえばhttp://www.ccs.tsukuba.ac.jp/Astro/Members/takashi/pub/sph.pdf
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 81
6.4 Stochastic Approach: Monte Carlo methods
All of above schemes are a ”deterministic (決定論的)” approach57) , which means that particles obey
some sort of equations of motion. In some situations, however, we are mainly concerned with the particle
distribution, instead of instant position of each particle. Fot that purpose, various types of Monte Carlo
(MC) methods have been developed as a ”stochastic (確率論的)” approach, where we are not interested
in the trajectory of each particle, but the probablity distribution is the main output.
1. Metropolis MC58) : Particles are randomly moved with a probability proportional to the Boltzmann
factor exp[− ∆E
kBT
], where ∆E is the energy difference between the configurations before and after
the motion. The system will approach a macroscopic equilibrium state with temperature T after
sufficient number of movements.
2. DSMC (Direct Simulation MC): Originally developed for rarefied gas dynamics (希薄気体力学),
where the Boltzmann transport equation for the distribution function is stochastically solved.
57) Also in the BD and the DPD schemes, the random forces play an important role. In this sense, the BD and the DPDmay be categorized into the stochastic approach.58) Some details are given in 熱物理工学 Thermal Science and Engineering and also in 熱物性論 Thermophysics forThermal Engineering.
MD Seminar 2019 Lecture Note (M. Matsumoto): p. 82
7 MD Simulation in Research: Thermo-Fluidal Systems
7.1 Why nano scale?
• Spatial reasons
• Temporal reasons
7.2 Method
• Quantam systems
– Monte Carlo method
– Molecular dynamics method (ab initio MD, first principle MD)