Introduction to Molecular Simulation Chapter 1. Classical mechanics 1 Chapter 1. Classical Mechanics and Numerical Methods 1.1 Mechanics – The study of motion Humans long ago observed motions of earthbound and celestial objects and intuitively discovered that the motions of inanimate objects (“mechanics”) follow certain predictable patterns. Without this realization pre-modern architects, astronomers, navigators, etc. would not have been able to achieve many of their accomplishments which in many cases are as impressive as modern ones. Indeed animals must observe and intuitively understand the operation of laws of nature. Without this understanding, a hawk would not know how steep and fast to dive to have a chance at catching a rabbit, or a gibbon would not know how fast and what angle to pounce to reach the next branch of a tree high above the forest floor. A great discovery of modern science is that mathematical laws governing mechanics quantitatively determine how positions and velocities of objects change with time and how they are affected by forces. The great insight of Sir Isaac Newton in discovering the laws of mechanics was that the same mathematic principles which apply to motion of objects on earth, which move within distance scales of 1 to 100s of meters and times scales of seconds to hours, also apply to the motion of celestial objects like the moon, earth, and sun, which move on distance scales of 10 8 to 10 11 meters and time scales in the range of hours to years. Limiting ourselves to motions encountered on earth and objects within the solar system, the applicability of the Newton’s laws of mechanics spans a 10 11 range of distances and a 10 9 range of times. Over time scientists became familiar with the structure of matter and discovered that the atomic and molecular building blocks of materials have sizes in the range of 10 –9 to 10 –7 meters. The motions of these molecules would occur on time scales much shorter than seconds. The question naturally arose whether on the opposing end of small length and time scales, it is possible to assume that the same mechanical laws which govern human scale motions, also govern the motion of molecules in solid, liquid, and gas which occur on length scales of 10 –9 to 10 –7 m. That indeed (with caveats) the laws of classical mechanics apply to the motion on atomic and molecular scales is the working assumption in developing methods for molecular simulations. 1 In classical molecular simulations the laws of mechanics are applied to predict the motions and energies of molecules under different external thermodynamic conditions. In molecular systems, the positions and velocities of atoms and the nature and magnitude of forces acting on atoms depend on the chemical structure, temperature, and pressure of the simulated system. The mechanical approach can be used to study diverse phenomena, such as a solvated protein interacting with a drug substrate, a DNA molecule in a saline solution, an organic material adsorbing on the surface of a solid, or a solid material undergoing a melting transition. The mechanical laws governing the positions, velocities, and forces between molecules at different times are expressed as differential equations. The particular form of the differential equations, and the meaning of the mechanical variables themselves, depend on whether classical or quantum mechanics are used to describe the system. Most of our focus is on the classical mechanical description, but parallel quantum mechanical 1 These statements, of course, neglect effects related to relativity and quantum mechanics.
21
Embed
1.1 Mechanics The study of motion 2 Notes...mechanics apply to the motion on atomic and molecular scales is the working assumption in developing methods for molecular simulations.
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
Introduction to Molecular Simulation Chapter 1. Classical mechanics
1
Chapter 1. Classical Mechanics and Numerical Methods
1.1 Mechanics – The study of motion Humans long ago observed motions of earthbound and celestial objects and intuitively
discovered that the motions of inanimate objects (“mechanics”) follow certain predictable
patterns. Without this realization pre-modern architects, astronomers, navigators, etc.
would not have been able to achieve many of their accomplishments which in many cases
are as impressive as modern ones. Indeed animals must observe and intuitively
understand the operation of laws of nature. Without this understanding, a hawk would not
know how steep and fast to dive to have a chance at catching a rabbit, or a gibbon would
not know how fast and what angle to pounce to reach the next branch of a tree high above
the forest floor.
A great discovery of modern science is that mathematical laws governing
mechanics quantitatively determine how positions and velocities of objects change with
time and how they are affected by forces. The great insight of Sir Isaac Newton in
discovering the laws of mechanics was that the same mathematic principles which apply
to motion of objects on earth, which move within distance scales of 1 to 100s of meters
and times scales of seconds to hours, also apply to the motion of celestial objects like the
moon, earth, and sun, which move on distance scales of 108 to 10
11 meters and time
scales in the range of hours to years. Limiting ourselves to motions encountered on earth
and objects within the solar system, the applicability of the Newton’s laws of mechanics
spans a 1011
range of distances and a 109 range of times.
Over time scientists became familiar with the structure of matter and discovered
that the atomic and molecular building blocks of materials have sizes in the range of 10–9
to 10–7
meters. The motions of these molecules would occur on time scales much shorter
than seconds. The question naturally arose whether on the opposing end of small length
and time scales, it is possible to assume that the same mechanical laws which govern
human scale motions, also govern the motion of molecules in solid, liquid, and gas which
occur on length scales of 10–9
to 10–7
m. That indeed (with caveats) the laws of classical
mechanics apply to the motion on atomic and molecular scales is the working assumption
in developing methods for molecular simulations.1
In classical molecular simulations the laws of mechanics are applied to predict the
motions and energies of molecules under different external thermodynamic conditions. In
molecular systems, the positions and velocities of atoms and the nature and magnitude of
forces acting on atoms depend on the chemical structure, temperature, and pressure of the
simulated system. The mechanical approach can be used to study diverse phenomena,
such as a solvated protein interacting with a drug substrate, a DNA molecule in a saline
solution, an organic material adsorbing on the surface of a solid, or a solid material
undergoing a melting transition.
The mechanical laws governing the positions, velocities, and forces between
molecules at different times are expressed as differential equations. The particular form
of the differential equations, and the meaning of the mechanical variables themselves,
depend on whether classical or quantum mechanics are used to describe the system. Most
of our focus is on the classical mechanical description, but parallel quantum mechanical
1 These statements, of course, neglect effects related to relativity and quantum mechanics.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
2
descriptions for the motions of molecules can be formulated and will be occasionally
discussed.
We begin this first chapter by reviewing analytical solutions of some simple
systems using classical Newtonian mechanics in Section 1.1 and 1.2. These systems serve
to introduce some of the concepts and notation used later in the chapter and throughout
this book. While the systems described are macroscopic, they serve as models for
describing atomic and molecular motions in later chapters. An introduction of numerical
computation techniques, namely the finite-difference (Euler) method and more
sophisticated Verlet and leapfrog methods to solve Newton’s equations of motion follow
in Sections 1.3 and 1.4. These methods form the core of any molecular dynamics
simulation and all further developments are constructed on the foundation of these
numerical methods. The numerical solution of the harmonic oscillator is discussed in
detail in Section 1.5. The generalization of the mechanical ideas to many-atom systems is
briefly discussed in Section 1.6. Finally, in anticipation of their use in developing
molecular dynamics simulation methods, the Lagrangian and Hamiltonian formulations
of mechanics are introduced in the last section of this chapter. These formulations are
alternatives to Newton’s laws of motion which are much more appropriate for linking
mechanical motions of molecules in the system to the external environment in a way that
satisfies the laws of thermodynamics and statistical mechanics.
1.2 Classical Newtonian Mechanics The three laws that govern the motion of macroscopic objects moving at low speeds
compared to the speed of light where first stated together by Isaac Newton in 1687. These
laws are: 1) Any object moves in a straight line with constant speed (i.e., with constant
velocity) unless acted on by a force; 2) The acceleration (change of velocity with time) of
the object is proportional to the force acting on it, the proportionality constant is the mass
of the object. This law is summarized in the vector formula F = ma. If more than one
force acts on the object, the vector sum of the forces determine the acceleration; 3) For
each force on an object, the object exerts a force of equal magnitude pointing in the
opposite direction.[Young, Halliday, Fowles] Newton’s laws do not specify if and how
the forces depend on the position of the object or time and this is the subject of additional
empirical observation and analysis of the motion. In actuality, the force laws for any
specific type of interaction (gravity, mass connected to a spring, electro-magnetic
interactions, etc.) are devised so that the laws of motion are satisfied.
In systems with many interacting molecules, Newton’s three laws of motion give a
set of equations which describe the time dependence of position, ri(t), velocity, vi(t) [or
momentum pi(t) = mivi(t)], and force Fi(t) [or equivalently, the acceleration ai(t)] for all
atoms i. Other mechanical quantities for each atom and molecule, such as energy and
angular momentum, can be calculated from these fundamental mechanical variables at
any time as needed.
In most mechanical systems, the force on an object varies with its position and
proximity to other objects. In these cases, velocities and forces vary dynamically and the
simple algebraic formula F = ma does not suffice to determine the motion of the
constituting particles in the system over all times. Newton invented the calculus of
infinitesimals to predict motions in cases of position-dependent forces, but as we will see,
Introduction to Molecular Simulation Chapter 1. Classical mechanics
3
he was also the first to suggest to what amounts to a numerical algebraic method to deal
with this problem of position dependent forces.
In modern notation, Newton’s second law of motion is written as a set of
differential equations, second order in time, the solutions of which give the time variation
of Cartesian coordinates. For the xi, yi, and zi components of the position vector ri of atom
i in an N-atom system, Newton’s second law is written as,
i
iiz
ii
i
iiy
ii
i
iix
ii
z
UF
dt
zdm
y
UF
dt
ydm
x
UF
dt
xdm
}{
}{
}{
,2
2
,2
2
,2
2
rr
rr
rr
(1.1)
Fi({r}) is the force vector on atom i, which can depend on the set {r} of positions of all
other atoms in the system. The positions and velocities of different atoms are coupled
through the forces acting between them.
In Eq. (1.1) forces are written in terms of partial derivatives of the scalar potential
energy, Ui({r}) of atom i with respect to its three position components. This is
convenient since in many cases, the mathematical form of the potential energy function is
more readily determined than the force.
For a system with N-atoms, Newton’s equations of motion give a set of 3N coupled
second-order differential equations. These equations can be solved by analytical methods
(very rarely) or using numerical methods (most of the time), the latter of which are the
main focus of molecular dynamics methodology. Solutions of these coupled equations
give the time dependence of the set of coordinates {r(t)} and velocities {v(t)} [or
momenta {p(t)}] for all atoms in the system. To determine a unique solution for the
positions and velocities, 6N initial conditions for the coordinates and velocities of all
atoms at time t = 0 are required. The positions of the atoms at different times, {r(t)}
constitutes the spatial trajectory (orbit) of the system. The sets of {r(t)} and {p(t)} at
different times constitute the phase space trajectory of the system.
For a limited number of low-dimensional systems where the coupled equations of
motion are separable, Newton’s equations can be solved analytically to give a closed-
form solution of the spatial and phase space trajectory. In Section 1.2, solutions to
Newton’s equations of motion for some simple mechanical systems are reviewed and the
concept of phase space is introduced. The phase space trajectory of a system is important
in describing the mechanics of many-atom systems and plays a central role in statistical
mechanics and its application to molecular dynamics simulation methodology.
1.3 Analytical solutions of Newton’s equations and phase space 1.2.1 Motion of an object under constant gravitational force
A mechanical system studied by Newton (and Galileo Galilei among others before him)
was the motion of an object near the Earth’s surface where there is a constant
gravitational acceleration of a = g = –9.8 m/s2 pointing towards the center of the Earth,
see Figure 1.1(a). Newton’s equation of motion for a mass thrown perpendicularly
upwards (in the positive y-direction) in the Earth’s gravitational field is,
Introduction to Molecular Simulation Chapter 1. Classical mechanics
4
mgFdt
ydm y
2
2
. (1.2)
Starting at an initial position y(0) and initial velocity of vy(0) at a time t = 0, integrating
this equation once with respect to time and using the initial conditions, gives the time
variation of the velocity of the particle,
)0()( yy vgttvdt
dy . (1.3)
Integrating Eq. (1.3) with respect to time, gives the time variation of the position,
)0()0(2
1)( 2 ytvgtty y (1.4)
The spatial trajectories for a mass at two sets of initial conditions y(0) and vy(0), and the
time dependence of the momentum are shown in Fig. 1.1(b), and the corresponding phase
space trajectories are shown in Figure 1.1(c).
The potential energy of a mass in the Earth’s gravitational field at any time is,
( ) [ ( ) (0)]U t mg y t y . (1.5)
The gravitational potential energy near the surface of the Earth increases linearly with
position above the reference point, y(0), usually taken to be the surface of the Earth. The
total mechanical energy which is the sum of kinetic and potential energies of the mass
during any time t of its motion is,
)]0()([)(2
1)( 2 ytymgtmvtE . (1.6)
Substituting the velocity and position from Eqs. (1.3) and (1.4), respectively, into Eq.
(1.6), shows that for a particular trajectory, the total energy is constant at all times and
depends on the initial conditions through the value of the parameters y(0) and vy(0),
21( ) (0) (0) .
2yE t mv mgy const (1.7)
Introduction to Molecular Simulation Chapter 1. Classical mechanics
5
Figure 1.1. (a) The coordinate system for a mass moving under the influence of constant
gravitational acceleration. (b) The time dependence of the position and momentum for a particle
of mass 1 kg starting at y(0) = 0, thrown upwards with initial speed of v(0) = 10 m/s (full lines)
and 5 m/s (dashed line). (c) Two y-py phase space trajectories for the motions in part (b). All
points in the y-py phase plane are covered by trajectories which are determined by the initial
conditions of the motion. Two “states” corresponding to volume elements dxdp in the phase space
are shown in (c).
The phase space trajectory or streamline of the projectile is determined by explicitly
eliminating time from Eqs. (1.3) and (1.4),
22 2 0
2
( )1( ) (0) ( ) (0)
2 2
yy y
p t Ey t y v t v
g mgm g
. (1.8)
For the motion of a mass in a constant gravitational field, the coordinate y, and the
“conjugate” momentum py form the phase space of the mechanical system. Trajectories
for two sets of initial conditions, or more fundamentally for two specific energy values,
are shown in Figure 1.1(c). Time does not enter the phase space description but implicitly
determines the direction of motion along the trajectory.
The concept of phase space is used extensively when discussing statistical
mechanics. For a one-dimensional motion of a single mass in the y-direction, phase space
is two-dimensional and consists of coordinate and its conjugate momentum, {y, py}. For a
three-dimensional motion of a single mass, the phase space is six dimensional and
consists of coordinate-momentum pairs, {x, y, z, px , py , pz}.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
6
The “state” in phase space is determined by the volume element about each phase
space point. For example, in the one dimension motion mentioned above, a state is a
volume element dydpy about the point {y, py} shown in Fig. 1.1(c). States on the same
phase space trajectory all have the same energy. All points in phase space correspond to
states which belong to a unique trajectory. As we shall see, the smallest phase space
volume element (state) is determined by the Heisenberg uncertainty principle, dx∙dpx = h.
1.3.2 One-dimensional harmonic oscillator
One of the most important mechanical systems in physics and chemistry is the harmonic
oscillator which describes the motion of a mass m connected to a spring governed by
Hooke’s law (1660, after the English scientist Robert Hooke), F = –k(x – x0). In the
harmonic oscillator, the force is linearly proportional to the displacement ξ = x – x0 of the
mass from a relaxed position x0 and points in the direction opposite the displacement and
towards the relaxed position x0. The force constant of the spring, k, determines the
“stiffness”, i.e., how much force must be exerted to extend or compress the spring by a
unit length. Note that a harmonic spring behaves symmetrically with respect to extension
or compression. The potential energy of the spring is a quadratic function of the
displacement, U = ½k(x – x0)2. These relations are shown in Figure 1.2(a).
The one-dimensional single-mass harmonic oscillator can also represent the relative
motion of two masses connected by a spring with force constant k, see Appendix A1.1.
For the one-dimensional harmonic oscillator, Newton’s second law is written as,
)]0([2
2
xxkFdt
xdm x . (1.9)
This equation is simplified by using the displacement, ξ, as the variable, and defining the
angular frequency ω = (k/m)1/2
to give,
022
2
dt
d. (1.10)
Equation (1.10) is a homogenous second-order differential equation with constant
coefficients.[Boyce] The general solution of Eq. (1.10) gives the time dependence of the
displacement (t) as a sum of complex exponential functions, or equivalently as a sum of
sine and cosine functions,
1 2 1 2cos( ) sin( ) sin( )i t i tc e c e C t C t A t . (1.11)
In the final form, the parameters A and represent the amplitude and phase of the
motion, respectively. These solutions can be verified by substituting Eq.(1.11) into
Eq.(1.10). Pairs of constants (c1,c2), (C1,C2), or (A, ) characterize the specific trajectory
of the mass. The sinusoidal motion in the last expression in Eq. (1.11) gives the
harmonic oscillator its name. The frequency and period of the harmonic oscillator are =
/2π and τ = 1/, respectively. The time-dependence of the velocity of the mass is
calculated from the time-derivative of Eq. (1.11),
)cos()( tAdtdtv . (1.12)
The constants (A,) are determined by the two initial conditions, namely the values of the
initial displacement (0) and velocity v(0) at t = 0.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
7
Figure 1.2 (a) The quadratic potential energy function and linear force function for a one-
dimensional harmonic oscillator with an angular frequency ω = 5 s-1
. In the rest state, the mass is
at ξ = x – x0 = 0. (b) The time dependence of the displacement ξ and momentum for a particle of
mass 1 kg with ξ(0) = 0 and pξ(0) = 1.0 kgm/s (full line) and 0.5 m/s (dashed line). (c) The ξ-pξ
ellipses characterizing the phase space trajectory of the harmonic oscillator. The major and minor
axes of the ellipse depend on the initial conditions of the spring. All points in the ξ-pξ phase space
are covered by trajectories. For a specific spring and mass, initial conditions determine which
elliptical trajectory passes through a point in phase space.
As an example of a specific trajectory, consider a mass, m = 1 kg connected to a
harmonic spring that gives it an angular frequency of = 5 s-1
. If initially the mass is at
x(0) = x0 (i.e., (0) = 0) and has an initial velocity v(0) = 1.0 m/s, the specific solutions of
the harmonic oscillator, Eqs. (1.11) and (1.12) are )sin(2.0)( tt and )cos()( ttv
, respectively, shown in Figure 1.2(b). A second trajectory with the initial conditions, (0)
= 0 and v(0) = 0.5 m/s is also shown in this figure.
The total mechanical energy of the harmonic oscillator system is a sum of the
kinetic and potential energies determined using Eqs. (1.11) and (1.12),
E(t) = K(t) + U(t) = mv(t)2/2 + k(t)
2/2 = (m2
A2 + kA
2)/2 = kA
2. (1.13)
The total energy is constant and depends on the initial conditions through the amplitude
parameter A.
Eliminating the time variable between Eqs. (1.11) and (1.12) gives the phase
space trajectory of the harmonic oscillator,
1)(
)(
)()()()()(2
2
2
222
2
2
2
22
2
2
2
mE
tp
mE
t
Am
tp
A
t
A
tv
A
t
. (1.14)
which is an ellipse in {, p} phase space. The trajectories for two different initial
conditions corresponding to different energy values are shown in Figure 1.2(c). Each
state in phase space is represented by a volume element ddp around the point {, p}
Introduction to Molecular Simulation Chapter 1. Classical mechanics
8
and is associated with a unique trajectory. Note that the phase space trajectory of each
mechanical system is a reflection of the specific nature of the forces, or more exactly, the
“Hamiltonian” of the system, see below.
1.3.3 Radial force functions in three-dimensions
Determining the spatial and phase space trajectories of a mass subject to a radially
directed force proportional to 1/r2 requires considerably greater of mathematical effort.
This force describes the motion of particles interacting with gravitational and electrostatic
forces. For radial 1/r2 forces, Newton’s second law is,
2/3222
2
2/3222
2
32
2
)(
)(
yx
yK
dt
ydm
yx
xK
dt
xdm
r
KF
dt
dm
rr
r (1.15)
Details of the analytical solution of Newton’s equations of motion for these cases are
given in Appendix A1.2 where we prove that the motion of the mass subject to a radial
force in Eq. (1.15) remains confined to the xy-plane.[Synge, Fowles] The two
equations in Eq. (1.15) cannot be solved directly in the Cartesian coordinate system,
however, they can be solved after transformation to polar coordinates {r(t), θ(t)}. The
spatial trajectory or orbit of the motion of the mass in polar coordinates is,
)(cos
211
)(
1
2
2
2t
mK
EmK
tr
(1.16)
where ℓ is the angular momentum of the mass with respect to the origin r = 0, see Eq.
(A1.12), and E is the energy determined by initial conditions of the motion. See
Appendix A1.2 for full details. For non-zero angular momenta (i.e., where the mass is not
moving head-on towards the center of force), the orbit is elliptic if E < 0, parabolic for E
= 0, and hyperbolic for E > 0. These three cases are shown in Figure 1.3. States with E <
0 orbit around the origin (one of the foci of the ellipse) and for obvious reasons are called
bound states.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
9
Figure 1.3. The spatial orbit of a mass moving in a 1/r2 force field (1/r potential energy
function) in three energy regimes, E < 0 (elliptic motion), E = 0 (parabolic motion), and E > 0
(hyperbolic motion). Coordinates are plotted in reduced units as x* = xℓ2/mK and y* = yℓ
2/mK.
The radial force has a four-dimensional Cartesian {x, y, px, py} or polar {r, θ, pr, pθ}
phase space. For each trajectory, the angular momentum pθ = ℓ is constant and so with
known constant E and ℓ values (determined from initial conditions), the motion is limited
to a two-dimensional hypersurface in phase space. The phase space state of this system is
determined by a volume element dxdydpxdpy (or the corresponding volume element in
polar coordinates) about each point which is on a unique phase space trajectory. Similar
to spatial trajectories, phase space trajectories indicate whether the system is bound or
free.
Similar to gravitation, electrostatic forces have 1/r2 distance dependence and
although the study of planetary motion is more familiar, the trajectories mentioned above
are also observed in molecular systems as a result of electrostatic attractions. For
electrostatic repulsions, only positive energy trajectories are possible.
The harmonic oscillator is model for interactions between bound atoms within a
molecule. As discussed in detail in Chapter 2, van der Waals intermolecular forces and
corresponding potential energy functions between non-bonded atoms (in different
molecules or distant atoms on the same molecule), require a different mathematical form.
The Lennard-Jones potential is a commonly used function form for van der Waals
interactions between non-bonded atoms,
6
12
12
1212 4
rrrU
. (1.17)
In Eq. (1.17), r12 = (r1 – r2)1/2
is the radial distance between two atoms, ε is the depth of
the potential well and σ is the distance at which the potential becomes zero, see Figure
1.4(a). The Lennard-Jones potential includes contributions from a repulsive term,
(σ/r12)12
, which dominates at short distances and an attractive term, –(σ/r12)6, which
dominates at large distances, see Chapter 2. In Appendix A1.1 it is shown that the relative
motion of two atoms interacting with a Lennard-Jones potential can represent the motion
of single object with a reduced mass as a function of the relative distance r = r12. The
Lennard-Jones potential is often written in terms of the reduced distance r* = r/σ and
potential energy ]*)1(*)1[(4*)(* 612 rrUrU . The Lennard-Jones force is,
])()(2[)24()()( 713 rrrrUrF . The force is negative (attractive)
when r > and positive (repulsive) when r < .
An object moving in regions of the Lennard-Jones potential phase space where the
total system energy is negative, is in a bound state and undergoes anharmonic oscillatory
motion. Unlike the harmonic oscillator, the Lennard-Jones potential decays to zero as the
mass moves away from the origin of force. As the mass moves inwards to distances less
than the potential minimum, the repulsion increases sharply with a slope significantly
greater than a harmonic spring. The Lennard-Jones potential and the corresponding force
are plotted in Figure 1.4(a).
Introduction to Molecular Simulation Chapter 1. Classical mechanics
10
Figure 1.4. (a) The reduced Lennard-Jones potential, U*=U/ε and the corresponding reduced
force F*=F/(24ε/σ). (b) The reduced position (r* = r/σ) and momentum, p* = p/(εm)1/2
as a
function of reduced time, t* = t/[σ(m/ε)1/2
], for trajectories with head-on collisions with initial
positions r0* = 0.95, 1.005, 1.05, 1.1, 1.2 and 0 initial momentum. Note the anharmonic nature of
the oscillations. (c) The phase space trajectories of the Lennard-Jones potential for the initial
conditions given in part (b). The closed phase space trajectories of the bound states are not
elliptical.
The one-dimensional motion of a mass subject to the Lennard-Jones potential
placed at five initial placements of the mass at positions near r*(0) = r(0)/σ = 1, with
initial momentum of p*(0) = 0 are shown in Figure 1.4(b). Unlike the harmonic
oscillator, the motion is not symmetric with respect to stretching and compression about
the minimum of the potential. For the trajectory with initial position at r*(0) = 1.10 which
is near the minimum of the Lennard-Jones potential ( *
minr = 1.122), the change of the
position and velocity with time are approximately harmonic and position-momentum (r-
pr) phase space trajectories are close to an ellipse in shape, see Fig. 1.4(c). For initial
displacements r*(0) away from the minimum of the potential, the motion becomes non-
sinusoidal and the trajectory deviates from the elliptic shape; see for example, the r*(0) =
1.005 trajectory in Figure 1.4(c).
The states with r*(0) > 1 have a net negative energy and give rise to “bound states”
with closed phase space trajectories. In these case, the mass remains in the vicinity of the
force center at all times. “Free state” trajectories with r0* < 1 have a net positive energy,
with non-periodic motion and trajectories in phase space which are not closed curves, see
corresponding trajectories for r0* = 0.95 in Fig. 1.4(b) and 1.4(c).
For systems with masses interacting with Lennard-Jones or other realistic potential
energy functions, analytical solutions of Newton’s equations are difficult to determine or
unavailable. The fact that the positions, velocities, and forces on the molecules obey
Introduction to Molecular Simulation Chapter 1. Classical mechanics
11
Newton’s equations of motion is sufficient to allow the use numerical methods to
calculate the trajectory. Indeed, the trajectories shown in Figures 1.4(b) and 1.4(c) are
calculated for a one particle head-on (one-dimensional) collision in a Lennard-Jones
potential using numerical methods discussed in the next section.
The Lennard-Jones potential is a radial potential and motion of a mass subject to
this potential has constant angular momentum. The phase space trajectories shown in
Figure 1.4(c) are for head-on, one dimensional collisions with zero angular momentum,
pθ = 0.
1.3.4 Motion under the influence of a drag force
A mass moving in air is subject to air resistance or drag which imparts a frictional
decelerating force to its motion.[Bradbury,Fowles] If the mass is not moving at too great
a speed, the drag force is considered to be proportional to its speed. The drag force
defined in this manner is non-conservative, meaning that it cannot be expressed as a
derivative of a corresponding potential. The drag force is actually the result of the
collision of the object with molecules in the atmosphere. This leads to energy exchange
between the object and the atmosphere and the speed dependent drag force is an
approximate way of capturing this effect. The energy of the moving object in isolation is
not conserved when it moves under a drag force.
For the object moving perpendicular to the surface of the earth under the operation
of a velocity-dependent atmospheric drag force, Newton’s second law is,
2
2 y yd y dy
m F mg bv mg bdtdt
. (1.18)
The positive constant b is called the drag coefficient. For an object like a parachute with a
large cross section, the drag coefficient is large, but for a compact object like a ball
bearing, the drag coefficient may be relatively small. Equation (1.18) is a second order
ordinary differential equation with constant coefficients which can be solved by
rearranging and multiplying both sides by exp(bt/m), [Boyce]
2
2
bt m bt m bt md y b dy d dye e ge
m dt dt dtdt
. (1.19)
Integrating both sides of the Eq. (1.19) from the initial time t = 0 where the speed is vy(0)
gives,
( ) (0) 1bt m bt my y
mgv t v e e
b
. (1.20)
At long times, the velocity approaches the so-called the terminal velocity mg/b. In this
long time limit, gravitation and drag forces cancel each other and the mass moves with
constant velocity in air. The quantity τ = m/b determines the time scale it takes for the
mass to reach the terminal velocity. For a mass originally at y(0), integrating Eq. (1.20)
gives the time dependence of the position of the falling mass,
( ) (0) (0) 1bt my
mg m mgy t y v e t
b b b
(1.21)
Introduction to Molecular Simulation Chapter 1. Classical mechanics
12
The time dependence of the position and speed of the object are shown in Fig. 1.5(a).
Figure 1.5. (a) The time variation of the position and velocity of a mass dropped from a reduced
height yb2/gm
2 = 100, with an initial velocity vyb/mg = 0. After an initial period of increasing
velocity, the mass approaches a terminal velocity. (b) The phase space trajectory of the mass as it
is released from a height above the surface of the earth and falls downwards.
In this case, since the force is non-conservative, an explicit expression for the
potential energy for motion under the influence of the drag force cannot be written.
However, we can gain insight into the behavior of the system by first multiplying both
sides of Eq. (1.18) by vy = dvy/dt,
2
2
2 y y yd y
m v mgv bvdt
, (1.22)
which can be written as,
2
2
2
1ybvmgy
dt
dym
dt
d
. (1.23)
The term in brackets is the energy of the object falling in the absence of the drag force. If
we identify the brackets with the energy of the object, E, the change of energy of the
object as it falls is,
2y
dEbv
dt . (1.24)
With a positive constant b, the mechanical energy of the isolate moving object decreases
as it falls. The change in mechanical energy is converted to heat in the object and the
atmosphere medium in which the object is falling. [Bradbury] Non-conservative forces
such as the drag force often summarize complex interactions of the system with the
environment in relatively simple force terms.
The phase space trajectory of an object moving under a drag force is shown in Fig.
15(b). Unlike the previous cases discussed in Sec. 1.2, the energy of the object along the
phase space trajectory is not constant.
An application of motion subject to drag forces in molecular simulations is given in
Chapter 6 where the coupling of a molecular system to its environment for reaching
temperature and/or pressure equilibrium is effectively modeled as a type of drag force.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
13
1.8 The Lagrangian and Hamiltonian formulations of classical mechanics
Newton’s laws in Cartesian coordinates are intuitive and but as seen in the case of
radially symmetric forces, these forms of the equations are not always straightforward to
work with when seeking analytical solutions for the trajectories. In these cases, the
Cartesian coordinates in the equations of motion are transformed to use the knowledge of
the symmetry in the forces to simplify the analysis.
In contrast, the Lagrangian and Hamiltonian formulations of classical mechanics
can be written for any coordinate system. These approaches furthermore incorporate
energy concepts into the formulation of the equations of motion which makes their
analysis straightforward to interpret and physically insightful.[Fowles,Berendsen 2007]
Additionally, the Lagrangian and Hamiltonian formulations allow the introduction of
“non-conservative” forces which couple the mechanical system to external bodies. These
applications are important when implementing thermostats and barostats in molecular
simulations.
The Lagrangian function, L, is defined as the difference between the kinetic, K, and
potential energy U of a system. The Lagrangian is written in terms of coordinates, q, and
their conjugate velocities, q of the particles in the system. The “dot” notation on the
coordinate to represent velocity was first introduced by Newton and emphasizes the
relation between a coordinate and the velocity corresponding to the time derivative
(“fluxion”) of that coordinate. In this notation, the Lagrangian is given as,
})({2
1ii iii UmUKL qqq (1.42)
The coordinates and velocities in Eq. (1.42) can be expressed in Cartesian coordinates or
any other system such as spherical or cylindrical coordinates. The Euler–Lagrange
equations for each particle i with mass mi are a generalization of Newton’s equations of
motion using the Lagrangian function,
0
ii
LL
dt
d
qq. (1.43)
For simple conservative mechanical systems where the potential only depends on the
coordinates, the Euler-Lagrange equations reduce Newton’s equations of motion. For
example, the Lagrangian for the one-dimensional harmonic oscillator is,
22
2
1
2
1kxxmL . (1.44)
Substituting this Lagrangian in Eq. (1.42) gives Newton’s second law for this system.
An important advantage of the Euler-Lagrange equations is that they are valid for
mechanical variables q and q in any coordinate system. As illustrated in Appendix A1.2
for the case of radial forces, the Newtonian equations of motion in the form of a = F/m
are only strictly valid for Cartesian coordinates. In other coordinate systems, additional
“force” terms related to the change of coordinate system may be introduced in Newton’s
equations.
In the Hamiltonian approach, first introduced by the Irish physicist Sir Rowan
Hamilton in 1835, the dynamics are described in terms of the coordinates and their
conjugate momenta in any coordinate system. The momentum pi, conjugate to a
coordinate qi is defined as,
Introduction to Molecular Simulation Chapter 1. Classical mechanics
14
i
iL
qp
(1.45)
The Hamiltonian function for a system is the sum of kinetic and potential energy, written
in terms of coordinates qi, and their conjugate momenta, pi,
)}{()}{(),( iiii UKH qpqp . (1.46)
Mathematically, the Hamiltonian function is a Legendre transformation of the Lagrangian
function as defined by,
),(),(),( iii iiiiii
iii LLL
H qqpqqqq
qqp
, (1.47)
but this connection is not further explored here.[McQuarrie] The Hamiltonian function
represents the total energy of a system and is widely used in mechanical analyses.
Hamiltonian equations of motion are a set of two first-order differential equations in time,
i
ii
i
ii
H
dt
d
H
dt
d
q
pp
p
qq
(1.48)
Similar to the Euler-Lagrange equation, for cases where the potential is conservative (and
the force is the negative derivative of the potential), Hamilton’s equations of motion
reduce to Newton’s equations of motion. The Hamiltonian formulation is the basis of
describing the phase space trajectory in terms of the positions and momenta.
As an illustration of the use of Hamilton’s equations of motion, the momentum for
the one-dimensional harmonic oscillator is,
xmL
pi
i
, (1.49)
which gives the Hamiltonian for this system as,
2
2
12
2
k
m
pH . (1.50)
Hamilton’s equations of motion for the harmonic oscillator thus are,
kdt
dpp
m
p
dt
d
(1.51)
These two equations may be solved separately to give the time variation of the coordinate
and momentum, as given in Eqs.(1.11) and (1.12). The structure of the Hamiltonian
equations gives direct insight into the dynamical nature of the motion. Eliminating time
between the two equations in Eq. (1.51) directly gives the phase space trajectory of the
harmonic oscillator,
.22 constmkpdkmdpp
dtkdp
dtm
pd
(1.52)
The last equation is the elliptical trajectory in the two-dimensional phase space of the
dynamic variables ξ and its conjugate momentum pξ shown in Fig. 1.2. This example
Introduction to Molecular Simulation Chapter 1. Classical mechanics
15
illustrates the utility of the Hamiltonian approach for extracting information about the
phase space trajectory of a system without having to solve for the time dependence of the
individual coordinates and momenta first.
* * *
Introduction to Molecular Simulation Chapter 1. Classical mechanics
16
Appendices
Appendix A1.1 Separation of motion in two-particle systems with radial forces
If two objects interact with a force that depends only on the distance between the two and
not their relative orientations, the equations of motion describing the system can be
separated into two one-particle equations. The two masses connected by a harmonic
spring or interacting with gravitational, electrostatic, and Lennard-Jones potentials are
examples of these types of motion. The proof is elementary and follows writing the
Newton’s second law for the two particles in Cartesian coordinates. Consider two
particles at positions r1 and r2,
211221212
22
2
21122
12
1
rrrrr
rrr
FFdt
dm
Fdt
dm
(A1.1)
The center of mass position, Rcm, and relative coordinates, rrel, for the two particles are
defined as,
21
21
2211
rrr
rrR
rel
cmmm
mm
(A1.2)
The relation between the two set of coordinates is shown in Figure A1.1.
Figure A1.1. The coordinate system transformation from r1 and r2 to Rcm and r12 = rrel. The
position of the center of mass depends on the relative mass of the two particles.
The Cartesian position vectors of the two particles in terms of the center of mass
and relative positions are,
relcm
relcm
mm
m
mm
m
rRr
rRr
21
12
21
21
(A1.3)
Substituting the second derivatives of Rcm and rrel from Eq. (A1.3) into Eq.(A.1.1) gives
two new equations of motion for the center of mass and relative motion,
Introduction to Molecular Simulation Chapter 1. Classical mechanics
17
relrelrel
cm
FFmm
mm
dt
ddt
d
rrr
R
12
12
12
21
21
2
2
2
2
1
0
(A1.4)
In the new coordinate system, the motion of the center of mass and relative coordinates
are no longer coupled. The center of mass moves with no acceleration (constant velocity)
and the equation of motion for the rrel has the same functional form as the Cartesian
equations of motions in Eq. (A.1.1), but in terms of the relative coordinate and reduced
mass μ = m1m2/(m1+m2).
The one-particle systems described in the Secs. 1.2.2 and 1.2.3 apply to the relative
motion of two-particle systems interacting with radial force functions. For example, the
bound or free nature of the relative motion in the gravitational or Lennard-Jones
potentials determines whether the two particles in the system stay in a closed trajectory or
have sufficient kinetic energy to overcome the potential energy well acting between them
and move apart.
Appendix A1.2 Motion under spherically symmetric forces
To illustrate the difficulty of solving Newton’s equations of motion to a system with a
spherically symmetric (radial) force function, consider a mass m subject to a radially
directed 1/r2 gravitational or Coulombic force shown in Figure A1.2(a).
Figure A1.2. (a) The motion of a mass subject to a radial force F(r) pointing towards an origin.
The motion remains confined to the xy-plane. (b) Points in a plane can be described by Cartesian
coordinates x and y or polar coordinates r and θ.
Newton’s second law for the motion of this mass in vector form of the three-
dimensional Cartesian coordinates is,
32
2
r
KF
dt
dm
rr
r . (A1.5)
The force is proportional to 1/r2 and points towards the center of force in the direction
opposite the vector r. For gravitational motion of a comet of mass m around the sun, for
example, the constant K = GMsm where G is the gravitational constant and Ms is the mass
of the sun. In the case of Coulombic force, for the motion of a charge q subject to a force
from the charge Q located at the origin, K = –Qq/4πε0, where ε0 is the permittivity of
vacuum. The force is always attractive for gravitational interactions, but may be attractive
or repulsive for Coulombic interactions based on the relative signs of the charges.
Introduction to Molecular Simulation Chapter 1. Classical mechanics
18
The motion of the mass subject to a radial force may at first seem three-
dimensional. However, calculating the time variation of the angular momentum (L =
r×mv) shows that the motion of the mass is confined to a plane. The time variation of the
angular momentum L of a mass subject to a radial force is,
00 Frarvvv
rvr
vrL mmdt
dm
dt
dmm
dt
d
dt
d. (A.1.6)
We used the fact that for radial forces, r and F vectors are parallel and oppositely
directed and so their cross product is zero. The angular momentum vector can only be
constant if both r and mv vectors always lie in the same plane. This observation, which
holds for any radially directed force, reduces the dimensionality of the motion. Assuming
the mass moves in the xy-plane, the radial distance r is (x2+ y
2)1/2
. From Eq. (A1.5), the
two Newtonian equations of motion for the Cartesian coordinates are,
2/3222
2
2/3222
2
)(
)(
yx
yKym
dt
ydm
yx
xKxm
dt
xdm
(A1.7)
We used Newton’s notation with each dot representing one order of the time derivative.
Analytical solutions to these two coupled second-order differential equations cannot be
directly found. However, since the force only involves the radial distance, a change of
coordinates from Cartesian to polar coordinates, r and θ, shown in Figure A1.2(b)
simplifies the description.
The transformation of Cartesian to polar coordinates is,
sin
cos
ry
rx (A1.8)
The Cartesian velocities can be written in terms of the time derivatives of the polar
coordinates,
cossin
sincos
rry
rrx (A1.9)
Substituting the polar equivalents to the Cartesian accelerations in Eq. (A1.8) gives,
0cos)2(sin
0sin)2(cos
2
2
2
2
rrmr
Krr
rrmr
Krr
(A1.10)
Multiplying the first line of Eq. (A1.10) by cosθ and the second line by sinθ and adding
the two resulting equations, gives,
0)(2
2 r
Krrm . (A1.11)
Substituting Eq. (A1.11) into either of the two equations in
(A1.10), we get a second equation,
.0)(1
)2( 22 constmrmrdt
d
rrrm , (A1.12)
Introduction to Molecular Simulation Chapter 1. Classical mechanics
19
where the constant, , is identified as the magnitude of the angular momentum of the
mass. That 2mr is the magnitude of the angular momentum can be verified by writing
out the Cartesian coordinates and velocities in the cross product L = r×mv in terms of
polar coordinates and velocities given in Eqs. (A1.8) and (A1.9).
Substituting from Eq. (A1.12) in Eq. (A1.11) gives the radial equation which
determines the time variation of the radial coordinate,
023
2
r
K
mrrm
. (A1.13)
Note the analogy between Eq. (A1.13) and Newton’s second law in Cartesian
coordinates, ma = F. In Eq. (A1.13), in addition to the force related to the gravitation (or
Coulombic interaction) K/r2, there is a contribution to the radial acceleration from
32 mr which is called the centripetal force which originates from the coordinate
transformation. The form ma = F does not hold for the polar coordinates since 2rKrm .
The change from Cartesian to polar coordinates which better reflect the symmetry
of the forces, introduces relevant mechanical quantities, such as angular momentum, into
the analysis in a natural manner as we solve the Newtonian equations of motion. These
secondary quantities clarify the content of the equations and simplify the interpretation of
the results.
The radial equation can be solved to get mathematical form of the trajectory (orbit)
in polar coordinates by defining a new variable u = 1/r. Applying the chain rule,
2
22
2
2
222
111
d
ud
m
u
d
ud
md
du
dt
d
mr
d
du
md
du
udt
d
d
du
udt
du
uudt
dr
(A1.14)
Substituting the time derivatives of Eq. (A1.14) into Eq. (A1.13) gives a parametric
equation for the coordinates,
22
2
mKu
d
ud
. (A1.15)
The general solution of this inhomogeneous second-order linear differential equation
(verify by substitution) is,
cos2
CmK
u
. (A1.16)
To determine the constant C, we write the kinetic energy as the difference between the
total energy and the potential energy U = K/r = Ku,
2 2 2 2 2
2 2
m mx y r r E U E Ku (A1.17)
Substituting Eqs. (A1.16), (A1.12), and (A1.14) into (A1.17)
gives the value for C as,
4
22
2
2
KmmEC . (A1.18)
Introduction to Molecular Simulation Chapter 1. Classical mechanics
20
Finally, substituting this value of C into Eq. (A1.16) gives a description of the (u,θ) orbit
in terms of the energy of the system,
cos2
112
2
2 mK
EmKu
. (A1.19)
Equation (A1.19) is the equation for the conical intersections in polar coordinates. As
shown in Fig. 1.3, the orbit of the particle is an ellipse if E < 0, a parabola if E = 0, and a
hyperbola if E > 0. The ellipse, of course, is a closed curve where the mass remains
bound to the center of force, whereas in parabolic and hyperbolic orbits where the motion
is unbound, the mass approaches the center of force from large distances, but maintains
enough kinetic energy to ultimately escape from the potential well. The initial conditions,
which determine the energy and angular momentum of the motion, also determine the
nature of the orbit.
A similar analysis can be carried out for the Lennard-Jones force corresponding to
the potential of Eq. (1.17). The analog to Eq. (A1.13) is,
0212
713
3
2
rrmrrm
. (A1.20)
Solving this equation gives the trajectory of two interacting Lennard-Jones molecules.
Similar to the case of a 1/r potential, the molecules interacting with a Lennard-Jones
potential are constrained to move in two dimensions and have bound and unbound
trajectories. Some bound trajectories for the Lennard-Jones potential are shown in Figure
1.5. Further details of the Lennard-Jones potential trajectories are given in Stogryn and
Hirschfelder.[Stogryn]
In the above, the dynamics of systems with radial forces have been analyzed by
transforming the Cartesian coordinate system to polar coordinates. This transformation
can be performed, but as illustrated, is somewhat cumbersome. To demonstrate the utility
of the Lagrangian and Hamiltonian approaches for this problem, using Eqs. (A1.9) we
write the Lagrangian for this system,
r
Krr
mrUyxUKL 22222
2)( . (A1.21)
The Lagrangian equations of motion Eq. (1.43) for this system become,
0)2(0
00
2
2
2
rrrmLL
dt
d
r
Krrm
r
L
r
L
dt
d
(A1.22)
These equations are identical to Eqs. (A1.13) and (A1.12) but have been derived in a
more direct manner. The momenta conjugate to the radial and angular coordinates are,
2mrL
p
rmr
Lpr
(A1.23)
and the Hamiltonian for this system is,
Introduction to Molecular Simulation Chapter 1. Classical mechanics
21
r
Kp
mrp
mr
Krr
mLpprH rr 2
2
2222
2
1
2
1)(
2 (A1.24)
Hamilton’s equations of motion for this system are,
0
2
23
2
Hp
mr
p
p
H
r
K
mr
p
r
Hp
mpp
Hr
r
r
r
(A1.25)
The second equation is the radial equation and the fourth equation gives the conservation
of angular momentum. The phase space for the radial motion has four dimensions,
namely r, pr, θ, and pθ, but the conservation of angular momentum shows that pθ is