M10 Angular momentum is conserved or not

From Micro and Nano Mechanics Group
Revision as of 04:25, 8 July 2009 by Kwkang (talk | contribs)
Jump to navigation Jump to search

Manual 10 for MD++
Angular momentum is conserved or not?

Keonwook Kang, Seunghwa Ryu and Wei Cai

Jul 06 , 2009



In molecular dynamics simulations, positions and velocities of atoms are updated following Newton's equations of motion. Naturally, we would expect that linear and angular momenta (of an isolated system such as NVE ensemble) are conserved during the time integration, or

where P is linear momentum and L is angular mumentum. Usually, we subtract ceter-of-mass velocity nofrom the velocity of each atom so that the whole system can not drift and the linear momentume becomes zero.

where vCM is defined as

.

Similarly, we can additionaly subtract velocity component contributing rotation so that the whole system can not rotate and the angular momentum becomes zero as

.

The angular velocity Ω is obtained from

and moment-of-inertia matrix I is expressed as

,

where E3 is a 3 by 3 identity matrix.



Let's see whether MD simulation results conserve both linear and angular momenta. For the test simulation, a diamomd cubic structure of 216 silicon atoms are equilbriated under periodic boundary conditions for 10,000 steps using NVE ensemble.

Figure 1
Init N216 PBC.jpg Linearmom.jpg Angmom.jpg
(a) (b) (c)

The linear momentum is conserved within the machine precision in figure 1(b), while the angular momentum is not as shown in figure 1(c). According to Allen and Tildesley[1], the reason is told as

If the system is invariant to rotation about an axis, then the corresponding angular momentum component is conserved. ... In the case of the periodic boundary conditions, ... none of them were spherically symmetrical; in fact it is impossible (in Euclidean space) to construct a spherically symmetric periodic system. Hence, ... total angular momentum is not conserved in most molecular dynamics simulations.

Basically, what it says is that in most MD simulations angular momentum is no longer conserved if periodic boudary conditions are used and atoms move across the simulation cell boundary.

Let's check the above statement via another test simulation, where a Si cluster of 216 atoms are equilbrated with the same initial velocity. In this simulation, the simulation box has margin surrounding the Si cluster such that the cluster no longer sees its periodic images.

Figure 2
Init noPBC.jpg Linearmom noPBC.jpg Angmom noPBC.jpg
(a) (b) (c)

In figure 2(b) and 2(c), we can see that linear and angular momenta are conserved within the machine precision in this test simulation.



Since the angular momentum is not conserved in MD simulations under periodic boundary conditions, it is usually unnecessary to make angular momentum be zero when the velocities of atoms are initialized. However, when we perform simulations of nanowires or rods, it is desirable to prevent the rotation around wire axis. For example, if a nanowire is aligned along the z-direction, we want to let the z-component of angular momentum be zero, or Lz = 0.

In MD++ there is a variable zerorot, depending on whose value components of the angular momentum can be selletively zero. If zerorot = "x", x-component of angular momentum will be zero. If zerorot = "all", all three components of the angular momentum will be zero. The default value of zerorot is "none". The other possible values are "y" and "z".

In the next test simulation, a Si NW is aligned along the z-direction and we expect Lz = 0.

Figure 3
Init nw.jpg Linearmom nw.jpg Angmom nw.jpg
(a) (b) (c)

In figure 3(b) and 3(c), we can see that all three components of linear momentum and z-component of angular momentum are conserved during equilibriation.

MD++ script for this simulation is given below.

# -*-shell-script-*-
# Check linear momentum and angular momentum conservation 

#*******************************************
# Definition of procedures
#*******************************************
proc initmd { n } {
#MD++ setnolog
MD++ setoverwrite
MD++ dirname = "runs/si-test-$n"
MD++ NNM = 300
}
#end of proc initmd

proc create_crystal { N } {
#--------------------------------------------
# Create Perfect Lattice Configuration
#
MD++ latticestructure = diamond-cubic
MD++ latticeconst = 5.431 #(A) for Si
MD++ latticesize  = \[ 1 0 0  $N \
                       0 1 0  $N \
                       0 0 1  $N \]
MD++ makecrystal finalcnfile = perf.cn writecn
}

#--------------------------------------------
proc setup_md { } { MD++ {
equilsteps = 0  timestep = 0.001 # (ps)
atommass = 28.0855 # (g/mol) Si
DOUBLE_T = 0  equilsteps = 0
saveprop = 1 savepropfreq = 10 openpropfile #run
savecn = 0 savecnfreq = 10000
plotfreq = 20
vt2 = 2e28  #1e28 2e28 5e28
wallmass = 2e3     # atommass * NP = 14380
boxdamp = 1e-3     # optimal damping for 216 atoms and wallmass 1e-3
randseed = 12345 srand48
#MD++  srand48bytime
saveH # Use current H as reference (H0), needed for specifying stress
fixboxvec  = [ 0 1 1
               1 0 1
               1 1 0 ]
stress = [ 0 0 0
           0 0 0
           0 0 0 ]
output_fmt = "curstep EPOT Tinst VIRIAL(0) VIRIAL(4) DVIRIALDexx(0) DVIRIALDexx(4)"
writeall = 1
} }

#*******************************************
# Main program starts here
#*******************************************
set T 300
initmd NW
create_crystal 5
MD++ input = \[ 3 2 0 0 5 0 \] makecylinder

MD++ input = \[1 1 1\] changeH_keepR
MD++ input = \[2 2 1\] changeH_keepR

setup_md
MD++ totalsteps = 10000
MD++ T_OBJ = $T DOUBLE_T = 1 timestep = 0.001

MD++ initvelocity_type = "Gaussian" zerorot = "z" initvelocity
MD++ finalcnfile = init.cn writecn
MD++ finalcnfile = init.cfg writeatomeyecfg
  
MD++ ensemble_type = "NVE" integrator_type = "VVerlet"
MD++ {output_fmt = "curstep EPOT KATOM Tinst HELMP \
              TSTRESSinMPa_xx TSTRESSinMPa_yy TSTRESSinMPa_zz \
              TSTRESSinMPa_xy TSTRESSinMPa_xz TSTRESSinMPa_yz \
              H_11 H_22 H_33 H_12 H_13 H_21 H_23 H_31 H_32 \
              [MD++_Get P_com(0)] [MD++_Get P_com(1)] [MD++_Get P_com(2)] \
              [MD++_Get L_com(0)] [MD++_Get L_com(1)] [MD++_Get L_com(2)]" }
MD++ run

MD++ finalcnfile = equil.cn writecn
MD++ finalcnfile = equil.cfg writeatomeyecfg
MD++ quit

The MD++ variable zerorot can be used with the MD++ command initvelocity as shown above. Or it can be used with another command zerorotation. Internally, initvelocity calls the function zero_rotation() depending on the value of zerorot.



Upto here we have considered MD simulations of NVE ensemble. People might wonder whether the linear and the angular momenta will be conserved in case of canonical or NVT ensemble. In MD++, Nosé-Hoover thermostat is used for NVT ensemble. Nosé's Hamiltonian is expressed in time scaling variable s as

,

where ri and pi are scaled coordinate and momentum of atoms. And they are related with real coordinate ri and momenutm pi as

.

The real time step are related with the scaled time step as

.

Q is thermal mass, g is number of degree of freedom, and ps is the conjugate momentum of s. Then, the time derivative of the linear and the angular momenta in real coordinate and momentum can be expressed as

.

The 1st terms on the right hand side are zeros, since the linear and the angular momentum are conserved in scaled formulation. However, s is varing as a function of time and . Thus the linear and angular momenta in real varaiable formulation would not be constant in time, unless the following is satisfied.

.

In other words, only if the linear and angular momenta are intially zeros, those quantites are conserved in NVT ensemble. Besides, it is known that Nosé thermostat will generate the trajectory of canonical ensemble if the total momentum is zero.[2]

Below are shown the linear and the angular momenta as functions of integration step in MD simulation of NVT ensemble.

Figure 4
Init noPBC.jpg Linearmom NVT.jpg Angmom NVT.jpg
(a) (b) (c)

Notes

  1. M. P. Allen and D. J. Tildesley, Computer Simulations of Liquids, Oxford Science Publications (2004) pp.72-73
  2. T. Çagin and J. R. Ray, Isothermal molecular-dynamics ensembles, Phys. Rev. A. (1988) 37 pp. 4510--4513