Car-Parrinello Molecular Dynamics (part 2)
Playing with emass and dt
We will change the
values of "emass" (the electronic fictitious mass) and "dt"
and try to see the effects that these changes produce on the quality of the
results.
Born-Oppenheimer Molecular Dynamics
Open the sample input
file "si.in.00" . Most of the input
parameters are already familiar to us. Let's look at the differences with
respect to the Car-Parrinello input file
prompt> diff si.in.00 ../Si_cp/si.in.00
32c32 < electron_dynamics = 'cg',
---
> electron_dynamics = 'sd',
The main difference
consists in the different minimization algorithm used to find the electronic
ground state. "cg" stands for "conjugate gradients". Notice
that the variables "nstep" and "dt" are not used in a cg
minimization. We are now ready to execute the electronic minimization:
/usr/local/apps/espresso-5.1/bin/cp.x < si.in.00 > si.out.00
Random displacement of the atoms from their ideal positions
NB: This section is identical to the corresponding CP section
After having determined the electronic ground state of the
ideal system, we now diplace the atoms randomly from their ideal positions.
Let's construct the input file for the next calculation ("01"). Copy
the previous file into a new file
cp si.in.00 si.in.01
and
modify the new file "si.in.01" as follows. We need to read the old
configuration from the stored unit "50", so we need to change the
restart mode from "from_scratch" to
restart_mode = "restart"
and
we need to add the line
ndr = 50
If we want to keep
the information (positions, wfc's, etc) of the "ideal" crystal, we
better write on a different unit, so we need to change the value of
"ndw" as
ndw = 51
Notice that unit
"50" will not be touched if ndr.ne.ndw.
The randomization is obtained by adding to the "&ions" namelist
the following parameters:
tranp = .true.
amprp = 0.1d0
All ionic positions
will be displaced with respect to the positions read from unit "ndr",
by a random quantity of the order of "amprp" (in atomic units).
The code will now displace the ions randomly, and perform a "conjugate
gradients" electronic minimization on the distorted configuration:
/usr/local/apps/espresso-5.1/bin/cp.x < si.in.01 > si.out.01
Let's dance! (BO)
We are now ready to
perform a BO-MD simulation. Let's construct the new input file
("02"). Copy the previous file into a new file
cp si.in.01 si.in.02
and
modify the new file "si.in.02" as follows.
For "safety" reasons, it is convenient to update the read-write units
as
ndr = 51 ndw = 52
It is also essential
to remove the randomization parameters (we don't want to randomize the ions
again, they are already displaced). The "tranp" and "amprp"
parameters must be removed.
Ions will move according to a second-order (Verlet) dynamics, and we want them
to start with zero velocities, so we need to set
ion_dynamics = 'verlet'
ion_velocities = 'zero'
in
the "&ions" namelist. On the contrary, electrons will now have to
be minimized at every step using a cg algorithm. The value of "dt"
can be increased to
dt = 40.0d0,
and
the value of "nstep" can be correspondingly decreased to
nstep = 250,
In this way we will
produce a trajectory with the same total duration (0.24 ps) as the CP one. The
variable "iprint" can be removed, as we want to print out the
relevant quantities every step now. For convenience, we may also want to reset
the time step counter
restart_mode = 'reset_counters',
We also clean up the
directory by removing the si.cel and si.pos files.
rm si.pos si.cel
The code will now
perform a Born-Oppenheimer MD simulation:
/usr/local/apps/espresso-5.1/bin/cp.x < si.in.02 > si.out.02
We will use XCrysDen
to visualize the trajectories and the utility "gofr.x" to produce
pair correlations functions that we will compare with the ones obtained from
the CP run.
S. Scandolo – MASTANI
2014 (modified by Vardha and Madhura)