Molecular Dynamics

N2 Dimer

As a simple example, we will explore the sytem discussed in the lecture – N2 dimer. Create a cell file as follows:

%block lattice_abc
10 10 10
90 90 90 ! alpha beta gamma in degrees
%endblock lattice_abc

%block positions_abs
N 5.00 5.00 5.00
N 6.15 5.00 5.00
%endblock positions_abs

kpoints_mp_grid 1 1 1

fix_com = true
fix_all_cell = true
and a param file as follows:

cut_off_energy = 300 eV
xc_functional = LDA
opt_strategy = speed

task = molecular dynamics
md_ensemble = NVT
md_temperature = 300 K
md_thermostat = Langevin
md_delta_t = 1.0 fs
md_num_iter = 1000

a. Run this. Plot a graph of temperature vs time – does it look correct?
Hint: try \\ $ grep Temp N2.castep | awk ‘{print c++,$3}’ > N2.T
to get a 2-column file of temperature vs MD step.) Is there an initial transient?

b. What is the effect of electronic convergence (cut_off_energy, elec_energy_tol etc) on the energy conservation? What is the effect of changing the time step or the thermostat used? Plot a graph of “Hamilt Energy” vs MD step to see.

c. Make a movie of your dynamics. Use md2xyz to convert the trajectory into a format that most visualization codes can read and then load into an appropriate program (e.g. Jmol).

d. Calculate the average bond length as a function of temperature – is the system harmonic or anharmonic?

H2 Molecule

Set up a similar calculation using the H2 molecule and run it for a similar amount of time.

  • Do you have any problems?
  • How can you solve them?

Extension activities

If you wish to explore further, you can use MD to study any system (aperiodic, supercell, bulk etc) that you are interested in. There are many properties that can be calculated from MD (eg use mdtep) and/or sampled within MD run. For example, if you have population analysis turned on, set md_sample_iter=10 to re-run it every 10 steps during the MD run.

There is a sample input file at : http://www.castep.org/files/mdtep_sample.input Which may be useful.