# [DFTB-Plus-User] Question about angular momentum conservation in molecular dynamics runs into DFTB

Benjamin Hourahine benjamin.hourahine at strath.ac.uk
Tue Jun 3 11:40:08 CEST 2008

```Hello Reinaldo,

the short answer is 'it depends'. Different types of MD have distinct behaviour
in this regard. Some codes also remove the total angular momentum of the
system (we haven't done this), and some thermostats give random or meaningless
angular momentum over a calculation (I assume this is what you're referring to
by "I know that for isolated systems the angular momentum is not conserved and
it could undergo nonsense rotations.")  Additionally, for an isolated molecule
angular momenta is a well defined property for both open and periodic boundary
conditions, but it is not well defined for an extended solid in periodic
boundaries.

Pure Velocity Verlet without thermostating conserves angular momentum exactly
for a small enough time step. For a finite time step there will be numerical
error. As a small test, for an H2 molecule with an initial set up of a H-H
separation of 0.74279076 AA, and tangential velocities of 0.1 A/ps for each
atom:

The starting conditions are
v x r = .0742790520000000 AA^2/ps  Energy = -0.674956 H

After 500 MD steps:

Time step  r x v             Total MD energy
fs
0.8       .1359178513272960  Energy -0.674956 H
0.4       .0885965729417264  Energy -0.674956 H
0.2       .0777874235669016  Energy -0.674956 H
0.1       .0751516878121300  Energy -0.674956 H
0.05      .0744969487239744  Energy -0.674956 H

As you can see this property requires quite a short time step (so around the
usual choice of 0.1* maximum vibrational frequency works).  This error is also
somewhat magnified as we use Cartesian coordinates instead of internal
coordinates. To set this run up I've used some features that will be in the 1.1
DFTB+ release due out in the next week.

Alternatively, if you use the Andersen thermostat in the code, angular
momentum is not conserved, since this method works by randomly re-selecting
atomic velocities from a Boltzmann distribution. This has the effect that
angular momentum will randomly fluctuate around 0 within a distribution set by
the temperature. We will also supply a Berendsen thermostat in version 1.1, but
the angular momentum conservation of this is also poor (look up the 'flying
icecube effect' if you are interested).

There are several thermostats that can conserve angular momentum, but none of
these are implemented at the moment.

Regards

Ben

Dr. B. Hourahine, Department of Physics, SUPA, University of Strathclyde,
John Anderson Building, 107 Rottenrow, Glasgow G4 0NG, United Kingdom
Ph +44 141 548 2325 FAX +44 141 552 2891 benjamin.hourahine at strath.ac.uk

The University of Strathclyde is a Scottish resisted charitable body, number SC015263

-----Original Message-----
From: dftb-plus-user-bounces at dftb-plus.info on behalf of Reinaldo Pis Diez
Sent: Mon 02/06/2008 21:01
To: dftb-plus-user at dftb-plus.info
Subject: [DFTB-Plus-User] Question about angular momentum conservation in molecular dynamics runs into DFTB

Dear DFTB+ users and developers,

I was trying to follow the code to figure out how the angular momentum
conservation is handled into the programme during a MD run but I didn't
succeed.
I know that for isolated systems the angular momentum is not conserved
and it could undergo nonsense rotations. However, MD runs in DFTB+ does
not exhibit such a behaviour. How DFTB+ handles angular momentum
conservation in isolated molecules or where do I have to look at into
the code?