html>
Car-Parrinello Molecular Dynamics (part 2)
Playing with emass and dt
Born-Oppenheimer Molecular Dynamics
prompt> diff si_bo.in.00 si.in.00 3c3 < calculation = 'cp', --- > calculation = 'fpmd', 13c13 < prefix = 'si_bo' --- > prefix = 'si' 32c32 < electron_dynamics = 'cg', --- > electron_dynamics = 'sd',The different value of "calculation" is related to the still incomplete merging of two different codes. It will disappear in future distributions of the package. 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:
../bin/cp.x < si_bo.in.00 > si_bo.out.00
Random displacement of the atoms from their ideal positions
NB: This section is identical to the corresponding CP section
cp si_bo.in.00 si_bo.in.01and modify the new file "si_bo.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 = 50If 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 = 51Notice that unit "50" will not be touched if ndr.ne.ndw.
tranp = .true. amprp = 0.1d0All 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).
../bin/cp.x < si_bo.in.01 > si_bo.out.01
Let's dance! (BO)
cp si_bo.in.01 si_bo.in.02and modify the new file "si_bo.in.01" as follows.
ndr = 51 ndw = 52It 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.
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_bo.cel and si_bo.pos files.
rm si_bo.pos si_bo.celThe code will now perform a Born-Oppenheimer MD simulation:
../bin/cp.x < si_bo.in.02 > si_bo.out.02We 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.