The .md File

The .md File

The .md file defines the parameters for the molecular dynamics simulation carry out by the mdwc package, the .md file must have the same format as the sample files (testing_data/c_8_data/c_8.md, testing_data/LaMnO3_data/LaMnO3.md), as an example we reproduce the c_8.md here:

Qmass          0.5
temp_cons      250.89
#temp_line      250.6, 275.6,
#temp_plat      250.0, 280.0, 290.5,
#temp_step      5,   2,   3,
bmass          10.0
Pressure       0.00025
dt             0.01
correct_spteps 8
md_steps       2
abinit_steps   5
number_atom_fix_constrains 0
atom_fixed_constrains 6, 7, #costrains over atoms 6 and 7
atom_fixed_position 14.96 4.57 0.00, 14.96 0.00 4.77,
atom_fix_coordinate 1 1 1, 1 1 1,
number_bond_constrains 0
bond_constrains 1 2, 1 3, #costrains between atoms 1 and 2, 7 and 8
bond_distance 6.76275, 6.89948
number_angle_constrains 0
angle_constrains 1 2 3, 4 5 6,#constrain of angle formed 3 4 5 with vertex at 3
value_cosine_angle 0.532, 0.915
number_cell_parameter_constrain 0
cell_parameter_constrain 1, 2,#constrain over the length of the first cell vector
cell_parameter_value 19.9400, 9.1400
number_cell_angle_constrain 0
cell_angle_constrain 1 2, 2 3, #constrain over the angle between the 2 and 3 cell vectors
value_cosine_cell_angle 0.0000, 0.0000
volume_constrain 0
volume_value 1738.634
..WARNING::
It is important to note that all the flags must have values, otherwise the program won’t have enough information to carry on the calculations, any comment must start with the comment symbol “#”.

Temperature Control

There are three types of temperature control in this MD implementation: temperature can be constant with flag temp_cons, it can increase or decrease linearly with flag temp_line, or it can increase or decrease in systematic plateaus with flag temp_plat, and temp_step defines the number of steps in every temperature plateau. At the time of a simulation only one of the three temperature flags must be active, the other ones must have a comment symbol # in front.

Constant Temperature For a constant temperature simulation the flag is:

temp_cons 250.89

here 250.89 is the temperature in Kelvin for the simulation.

Linear Control Temperature For a simulation where the temperature increase or decrease linearly the flag is:

temp_line      250.6, 275.6,

the first number is the starting temperature in Kelvin, the second temperature is the final temperature in Kelvin. After the numerical value

of the temperatures, there must be a “,”.

Plateus Control Temperature For a simulation where the temperature increase of decrease in plateaus the flag is:

temp_plat      250.0, 280.0, 290.5,

every value defines the temperature for every plateau, there must be a “,” after every temperature value. In addition of the specification to the temperatures of every plateau, the system needs to know the number of steps for every plateau. The flag with the number of steps per plateau is:

temp_step      10,   5,   5,

the total number of steps must be equal to the total number of steps in the simulation (md_steps*abinit_steps), moreover the number of different temp_step must be equal to the number of plateaus, and every number of steps must be separated by a “,”.

The Flags in the .md File

Qmass Mass of the thermostat, the units are hartree*femtoseconds^2

bmas Mass of the barostat in units of (hartree/bohr^3)*femtoseconds^2

Pressure External pressure over the structure in units of (hartree/bohr^3)

dt Value of the time differential for integration the unit of time is the femtosecond, we don’t recommend using a dt bigger than 0.1 which would be equivalent to 0.1femtoseconds.

corect_steps number of steps for the predictor-corrector algorithm that performs the integration of the equations of motion.

..WARNING::
The md steps A molecular dynamic simulation is a systematic update of the positions of a system of particles, every one of those updates is a md_step, usually, after the update of the positions, the forces between particles are recalculated. In this implementation of MD we follow a different path, instead of calculating the forces after every update of the positions, we do it once every md_steps, so that, during those md_steps the system uses the same forces and strains. The forces and strains are calculated after the md_steps are performed, the number of times the forces and strains are calculated is given by abinit_steps, then the total number of steps in molecular dynamics is md_total_steps = md_steps*abinit_steps, with md_steps for every abinit_step.

md_steps Number of molecular dynamic steps in between callings of abinit for new forces and strains.

abinit_steps Number of times abinit is going to be called to get forces and strains.

Constraints Definitions

Fix Atom Constraints

number_atom_fix_constrains defines the number of atoms that are going to be constrained to a given position, for example to fix three atoms:

number_atom_fix_constrains 0

atom_fixed_constrains number or id of the atoms to fix, for example, if we want to fix the atoms 1, 2 and 3 (as they are ordered in the .in file), we should write:

atom_fixed_constrains 1, 2, 3,

notice that there must be a ‘,’ after every number, even at the end of the last one.

atom_fixed_position coordinates of positions where the atoms are to be fixed, the coordinates must be points in three-dimensional space in units of Bohr, where every 3D point is separated by “,” an example assuming we want to fix three atoms:

atom_fixed_position 0.00 0.00 0.00, 5.25 2.36 1.25, 4.21 3.65 4.72,

notice that there must be a ‘,’ after every 3D point, even at the end of the last one.

atom_fix_coordinate Allow for fixing the atoms to a given set of the (x,y,z) coordinates, this can be done by setting a 1 in the coordinate where the constraint is going to be activated and a 0 where there is not going to be a constraint, for instance, if you want the atoms declared in atom_fixed_constrains to be held at the positions given at atom_fixed_position then atom_fix_coordinate must be declared as:

atom_fix_coordinate 1 1 1, 1 1 1, 1 1 1,

But if for example, you want to fix the atom 1 to 0.00 only in the x coordinate, and fix the atom 2 to y= 2.36, and 3 fixed in y = 3.65 and z = 4.72, then the declaration should look like:

atom_fix_coordinate 1 0 0, 0 1 0, 0 1 1,

Notice the set of three numbers representing every atom are separated by “,” and don’t forget the “,” at the end of the last one too.

In the case where there are no bond constraints then number_atom_fix_constrains 0, for instance

number_atom_fix_constrains 0
atom_fixed_constrains 0,
atom_fixed_position 0.00 0.00 0.00,
atom_fix_coordinate 0 0 0,

Bond constraints

number_bond_constrains defines the number of bonds that are going to be constrained, for example to constrain to bonds:

number_bond_constrains 2

bond_constrains the pairs of particles under the constraints, for instance, to constrain the distance between the particles 1 2, and 1 3 we write:

bond_constrains 1 2, 1 3,

notice that there must be a ‘,’ after every pair, even at the end of the last pair.

bond_distance here is where the distance (in bohr) of every pair is defined, every distance must be separated by a ‘,’ (so no ‘,’ after the last distance), for example:

bond_distance 6.76275, 6.89948

In the case where there are no bond constraints then number_bond_constrains 0, for instance:

number_bond_constrains 0
bond_constrains 0 0,
bond_distance 0

Angle constraints

number_angle_constrains defines the number of 3 atoms angles that are going to be constrained, if you want to constant two angles for example:

number_angle_constrains 2

angle_constrains the triplets of atoms that make up the angles to be constrained, it is important to note, that, in every triplet of atoms ‘a’, ‘ b’, ‘c’ the ‘a’ atom is the vertex of the angle. Similar to bond_constrains the triplets must be separated by ‘,’ and there must be a ‘,’ after the last triplet, for instance:

angle_constrains 1 2 3, 4 5 6,

value_cosine_angle the angle constraint is enforced by the cosine of the angle instead of the angle, here is where the values of the constraints (cosine of the angle) are defined, the value of every constraint must be separated by a ‘,’ (so no ‘,’ after the last one) for example:

value_cosine_angle 0.532, 0.915

In the case where there are no bond constraints use number_angle_constrains 0, for instance:

number_angle_constrains 0
angle_constrains 0 0 0,
value_cosine_angle 0.00

Cell parameter constraint

number_cell_parameter_constrain defines the number of cell parameters to be constrained, the cell is made up by three primitive vectors, understanding the cell parameter as the norm of one of these vectors.

It is important to note that the primitive vectors are ordering following the abinit definition in the .in file, for example to constrain one cell parameter:
::
number_cell_parameter_constrain 1

cell_parameter_constrain gives the cell vectors over which the constraint is going to hold, the number of every vector must be separated by ‘,’. For instance, if we want to put constraints over the cell parameters belonging to the first and second primitive vectors, we would use:

cell_parameter_constrain 1, 2,

notice that every number is separated by ‘,’ in addition, there is a comma at the end of the last number.

cell_parameter_value here is where the length (in bohr) of the restricted cell parameters is defined, there must be one per every cell_parameter_constrain, the values must be separated by commas, but there is no need for a comma after the last value, for example for the case of two constraints:

cell_parameter_value 19.9400, 9.1400

In the case where no cell parameter constraints are needed the declaration in the .md file should look like:

number_cell_parameter_constrain 0
cell_parameter_constrain 0,
cell_parameter_value 0.0

Cell_angle_costrain

number_cell_angle_constrain number of angles between the primitive vectors that are going to be constrained, for example to indicate that you are going to constraint two angles:

number_cell_angle_constrain 2

cell_angle_constrain indicates which angles are going to be a constraint, by writing the pair of primitive vectors that define the angle with the vertex at [0.0 0.0 0.0]. For instance, if two angles are to be constrained, the angles between the primitive vectors 1 2, and 2 3, the indication in the .md file must look like:

cell_angle_constrain 1 2, 2 3,

as usual, there is a comma at the end of every pair.

value_cosine_cell_angle here is where the value of the restriction is defined, in this implementation the angle restrictions are enforced by the cosine of the angle, then the values in this flag must be the cosine of the angle. For instance, if you want the angle to be restricted to 90 degrees then the value that you should put at value_cosine_cell_angle is 0.00, for instance, for the case with two angles:

value_cosine_cell_angle 0.0000, 0.0000

In the case where no cell angle constraints are needed the declaration in the .md file should look like:

number_cell_angle_constrain 0
cell_angle_constrain 0 0,
value_cosine_cell_angle 0.0000

Volume costrain

volume_constrain if there is volume constrain the value must be 1 otherwise the value is 0.

volume_value the value to which the volume is going to be a constraint in bohr^3.

In the case of no volume constraint the .md file should look like:

volume_constrain 0
volume_value 0.00