Molecular Dynamics

Contents

Molecular Dynamics#

ASAP provides a flexible GUI to facilitate all the steps involved in the workflow of Molecular Dynamics simulations (MD) with a selected calculator.
The project starts with the definition of the atomic structure of the system. We refer the user to section Structure Modeling in ASAP to find more information on the ASAP structure builder/viewer interface.
After the atomic structure is defined, edit the type of project by selecting Molecular Dynamics from the list of possible project types implemented in ASAP.
Note that you can run MD using either ASE (MD-ASE) or SIESTA (MD-SIESTA). MD-ASE is compatible with both SIESTA and Quantum Espresso calculators. MD-SIESTA, on the other hand, is exclusively compatible with SIESTA calculator. We recommend using MD-SIESTA when working with the SIESTA calculator.
Workflow md project type button
Workflow md project type
After selecting the project type, click on the Parameters icon to open the Parameter widget.
Workflow md parameters button
You can use the Parameter widget to set up the input parameters related to the selected type of project (Settings), edit the masses, magnetic moments and atomic positions of the system (Variables).
We describe below the settings and variables relevant for MD calculations, i.e. Velocity Distribution, as it affects the systems dynamics. We refer the user to chapter Parameters for more information on all parameters that can be tuned in the Parameter widget.
Settings
Workflow md settings widget nve

The settings widget associated with a MD type of project offers the following options:

  • t-step. This parameter controls the length of the time step in the MD simulation. If the time step is too large, the dynamics of the system will show unphysical non-energy conservation behavior, population of high-frequency modes, even melting. Therefore, if the system includes light atoms as Hydrogen, it is necessary to consider a reduced time step. It is always safer to choose a small time step. However, this will increase computation time. We advise examining the system under study and select the time step carefully. For most metallic systems, a time step of 5 fs would be a good choice. Systems with light atoms (e.g. hydrogen), and/or with strong bonds (e.g. C-C, C-H) will require a smaller time step.
    The time units are selected at the rigth of this parameter. The options are femto-seconds (fs), i.e. 10\(^{-15}\) seconds, and pico-seconds (ps), i.e. 10\(^{-12}\) s.
  • n steps. Number of steps of the MD simulation. The number of steps multiplied by the time step will give a full-time MD calculation.

  • Logging frequency defines how frequently the information of a running MD calculation is stored. During the MD simulation, atomic positions and velocities are stored. This is very useful to visualise and analyse the calculations.

  • Algorithm. ASAP currently has different statistical ensembles integrated by the following algorithms:

    • Verlet (NVE): Standard Verlet algorithm. Microcanonical ensemble, where the number of atoms (N), volume (V) and total energy (E) are conserved.

    • Nosé thermostat (NVT): MD with temperature controlled by means of a Nosé thermostat. Only available for MD-SIESTA

    • Parrinello-Rahman (NP): MD with pressure controlled by the Parrinello-Rahman method. Only available for MD-SIESTA

    • Nosé Parrinello-Rahman (NPT): isothermal–isobaric ensemble, where the number of atoms (N), pressure (P) and temperature (T) are conserved. MD with temperature is controlled by means of a Nosé thermostat and pressure controlled by the Parrinello-Rahman method.

    • Annealing. MD with annealing to a desired temperature and/or pressure. Only available for MD-SIESTA

We explain below the additional settings that you can tune for each of the algorithms listed above.
Standard Verlert algorithm (NVE)
Microcanonical ensemble, where the number of atoms (N), volume (V) and total energy (E) are conserved.
Workflow md nve siesta settings
  • Initial T. Initial temperature for the MD run. Represents the intial kinetick energy distribution of the particles. The atoms are assigned random velocities drawn from the Maxwell-Bolzmann distribution with the corresponding temperature. The constraint of zero center of mass velocity is imposed. In units of K, eV or meV.

This algorithm assumes the system is isolated, this is specially useful when studying systems where energy conservation is crucial, such as understanding the long-term behavior of isolated systems or exploring energy landscapes.
Nosé thermostat (NVT)
MD with temperature controlled by means of a Nosé thermostat. Only available for MD-SIESTA
Workflow md nvt siesta settings
  • Initial T. Initial temperature for the MD run. The atoms are assigned random velocities drawn from the Maxwell-Bolzmann distribution with the corresponding temperature. The constraint of zero center of mass velocity is imposed. In units of K, eV or meV.

  • Target temperature. Target temperature for Nosé thermostat. In units of K, eV or meV.

  • Nosé mass. Generalised mass of Nosé variable. This determines the time scale of the Nosé variable dynamics, and the coupling of the thermal bath to the physical system.

Parrinello-Rahman (NP)
MD with pressure contNosérolled by the Parrinello-Rahman method. Only available for MD-SIESTA
Workflow md np siesta settings
  • Initial T. Initial temperature for the MD run. The atoms are assigned random velocities drawn from the Maxwell-Bolzmann distribution with the corresponding temperature. The constraint of zero center of mass velocity is imposed (in units of K, eV or meV).

  • Target pressure. Target pressure for Parrinello-Rahman method. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\) .

  • Parinello-Raman mass. Generalised mass of Parrinello-Rahman variable. This determines the time scale of the Parrinello-Rahman variable dynamics, and its coupling to the physical system.

Nosé Parrinello-Rahman (NPT)
Isothermal–isobaric ensemble, where the number of atoms (N), pressure (P) and temperature (T) are conserved. MD with temperature is controlled by means of a Nosé thermostat and pressure controlled by the Parrinello-Rahman method.
ASAP widget for MD-ASE
If you try to change the algorithm to NPT the following warning will pop up:
Workflow md npt ase settings warning
Click Yes to continue with the default unit cell or define one in the 3D structure editor.
Workflow md npt ase settings
  • Temperature. In units of K, eV or meV.

  • External stress. In units of eV/Angström\(^{3}\) or GPa.

  • T-time. Frequency of the temperature updates (in units of fs).

  • P-time. Frequency of the pressure updates (in units of fs).

  • B-mod. Bulk modulus. Measures a material’s resistance to uniform compresion (in units of eV/Angström\(^{3}\) or GPa).

The P-factor, in units of eV/Angström\(^{3}\), is automatically computed as a function of the P-time and B-mod parameters: P-factor=P-time\(^2\cdot\)B-mod.
Note that you can tune the stress tensor by modifying the values that appear in the table.
Additionally, ASAP will warn you if the MD simulation box for the atomic structure is not an upper triangular matrix. In this case, the NPT algorithm will likely fail.
Workflow md npt ase settings warning fail
ASAP widget for MD-SIESTA
Workflow md npt siesta settings
  • Initial T. Initial temperature for the MD run. The atoms are assigned random velocities drawn from the Maxwell-Bolzmann distribution with the corresponding temperature. The constraint of zero center of mass velocity is imposed. In units of K, eV or meV.

  • Target temperature. Target temperature for Parrinello-Rahman method. In units of K, eV or meV.

  • Target pressure. Target pressure for Parrinello-Rahman method. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\).

  • Nosé mass. Generalised mass of Nosé variable. This determines the time scale of the Nosé variable dynamics, and the coupling of the thermal bath to the physical system.

  • Parinello-Raman mass. Generalised mass of Parrinello-Rahman variable. This determines the time scale of the Parrinello-Rahman variable dynamics, and its coupling to the physical system.

Annealing
MD with annealing to a desired temperature and/or pressure. Only available for MD-SIESTA
Anneal. opt.. The annealing options are desired temperature and/or pressure.
Workflow md settings widget annealing

If the Temperature is selected, the additional settings are:

Workflow md settings widget annealing t
  • Target temperature. Target temperature for annealing MD. In units of K, eV or meV.

  • Tau relax. Relaxation time to reach target temperature and/or pressure in annealing MD. Note that this is a relaxation time, and as such it gives a rough estimate of the time needed to achieve the given targets. As a normal simulation also exhibits oscillations, the actual time needed to reach the averaged targets will be significantly longer.

If the Pressure is selected, the additional settings are:

Workflow md settings widget annealing p
  • Target pressure. The target pressure is achieved by velocity and unit cell rescaling, in a given time determined by the variable Tau relax. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\).

  • Bulk modulus estimation. Estimation (may be rough) of the bulk modulus of the system. This is needed to set the rate of change of cell shape to reach target pressure. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\).

  • Tau relax. Relaxation time to reach target temperature and/or pressure in annealing MD. Note that this is a relaxation time, and as such it gives a rough estimate of the time needed to achieve the given targets. As a normal simulation also exhibits oscillations, the actual time needed to reach the averaged targets will be significantly longer. In units of fs and ps.

If both Temperature and Pressure are selected, the additional settings are:

Workflow md settings widget annealing tp
  • Target temperature. The target temperature is achieved by velocity and unit cell rescaling, in a given time determined by the variable Tau relax. In units of K, eV or meV.

  • Target pressure. The target pressure is achieved by velocity and unit cell rescaling, in a given time determined by the variable Tau relax. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\).

  • Bulk modulus estimation. Estimation (may be rough) of the bulk modulus of the system. This is needed to set the rate of change of cell shape to reach target pressure. In units of GPa, eV/Angström\(^{3}\) or Ry/Bohr\(^{3}\).

  • Tau relax. Relaxation time to reach target temperature and/or pressure in annealing MD. Note that this is a relaxation time, and as such it gives a rough estimate of the time needed to achieve the given targets. As a normal simulation also exhibits oscillations, the actual time needed to reach the averaged targets will be significantly longer. In units of fs and ps.

Variables
The Velocity Distribution widget is only available when selecting MD-ASE.
The Velocity Distribution widget shows the list of elements and the components of their velocity vectors.
Workflow md variables velocity

The initial velocities are initially set to zero, however, they can be changed manually. The constraint on zero center of mass velocity is imposed automatically. Random velocities drawn by a Maxwell-Boltzmann distribution can be assigned to atoms of the system. You can set a desired temperature in the Maxwell-Boltzmann box. Press the Initialize now button to set up the initial velocities.

Workflow md variables velocity initialise

To maintain the system at the target temperature select the Force tick-box.

Workflow md variables velocity force
Press the OK button to close the parameter widget once the parameters are properly set.
Click on the Calculator icon to select the computational engine to be used during geometry optimisation.
Workflow md calc select
We refer the user to chapter Calculators for further information on ASAP available calculators.
Click on the Run icon to open the Run widget. Then click on the Run button to submit the molecular dynamics calculation. See chapter Runners for further information on the computational resources configuration in ASAP.
Workflow md run select
Workflow md run widget

After submitting a job (run), the Calculator output tab in Run widget shows the complete calculation output in real time. In addition, the Task output tab in Run widget shows relevant information on the Molecular Dynamic output in real-time.

Workflow md run output task

Analysis#

When the calculation is completed, select the Exit and analyse button to open the analysis widget.
Workflow md analyse run widget
The MD analysis widget is equivalent for MD-ASE and MD-SIESTA.
The MD series widget offers three plot types: Time series, Statistical properties and Radial distribution function.
Workflow md analyse run widget plot types
At the top right corner of the widget, you can find the most important output parameters calculated during the MD run.
  • \(\langle Ek \rangle\) and \(\langle T \rangle\) are the average kinetic energy and average temperature, respectively. These parameters are helpful to control the evolution of the system during dynamic run.

  • \(\langle \Delta T^{2} \rangle\) represents the average temperature variation observed during an MD run. This parameter provides insight into the magnitude of temperature fluctuation that occur throughout the simulation. This measurement is particularly valuable for analyses conducted near phase transitions, as it effectively captures significant fluctuations that often manifest in such scenarios.

  • 2\(\langle T \rangle^{2}\)/N is the averaged square temperature normalised by the degrees of freedom (N). It is an indirect measure of specific heat.

Check the Geometry tick-box, at the right side of the MD series widget, to visualise the geometry at any of the steps of the MD run.
The option View angles allows you to rotate the system around cartesian axes X, Y and Z by 90º.
Workflow md analyse run widget rotate

Press the View in 3D… button to visualise the image with ASE GUI at the selected step.

Workflow md analyse run widget 3d

Press the Play button to visualise the structure’s evolution during the MD run in three dimensions.

Workflow md analyse 3d visualise

You can visualise the results of MD as time series (y-axis) of:

  • kinetic energy

    Workflow md analyse time series kinetic energy
  • kinetic and potential. For the visualisation of both kinetic and potential energies.

    Workflow md analyse time series kinetic and potential energies
  • potential energy

    Workflow md analyse time series potential energy
  • pressure. The option is only available if provided by the calculator.

  • temperature.

    Workflow md analyse time series temperature
  • total energy

    Workflow md analyse time series total energy

Notice that you can modify the logging step range that will be shown in the visualisation,

Workflow md analyse time series total energy step range

and visualise the Time series as a function of steps or time (in unit of fs).

Workflow md analyse time series x axis time

After editing a parameter, click the Update the plot button.

Workflow md analyse update plot button yellow
You have the option to visualize various statistical measures, explained below, over a range of steps or time (in fs units) by selecting ’Statistical Properties’ from the ’Plot Types’ menu.
Note that it is possible to select certain atoms from the system with the Range of atom indices feature. You can select the particles one by one, e.g. (0,1,2,3…) or in batches, e.g. (0-4).
Additionally, you can choose which chemical specieses’ information to display by clicking them in the Chemical species feature.
  • Mean-square displacement: The average square distance taken over all particles. Gives the deviation of the position of a particle with respect to a reference position over a certain period of time (units of Angström\(^{2}\)).

    Workflow md analyse statistical properties msd
  • Diffusion coefficient: Amount of substance passing through a certain boundary per unit area and per unit time (units of Angström\(^{2}\)/fs).

    Workflow md analyse statistical properties diffusion coef
  • Root-mean-square displacement: measures the variability of the positions of the particles with respect to a reference position over a certain period of time. It is particularly useful to compare two data sets of a system that has been transformed in some way (units of Angström).

    Workflow md analyse statistical properties rmsd
  • Velocity correlation function (VCF): average of the product of the velocities of all the particles at two different times (t, t+\(\Delta\)t). This function quantifies the rate at which the particles return to equilibrium state after a small perturbation.

    Workflow md analyse statistical properties vcf
  • Power spectrum: allows the user to visualize the frequency distribution of the velocity correlation function (units of fs). It helps to identify characteristic frequencies and modes of vibration of the system. Note that for this statistical property the options for the abscissa axis are not steps or (explicitly) time, but frequency as a function of time (units of fs) or inverse of time (Hz), inverse of wavelength (units of cm-1) and energy (units of eV, meV, and Rydberg and Hartree units of energy).

    Workflow md analyse statistical properties power spectrum
Click the Substract center of mass check-box to dismiss the contribution of the center of mass of the system (option available for Mean-square displacement, Diffusion coefficient and Root mean-square displacement).
The Radial distribution plot type allows you to visualize the Radial Distribution Function (RDF). RDF measures the probability of finding an atom at a distance r (units of Ångström) given that there is an atom at position r=0. Essentially, it is an histogram of interatomic distances.
Workflow md analyse rdf

You can tune the following parameters:

  • Num. intervals: parameter defining the sampling of the x axis.

  • Snapshot step: to select a specific moment in time of the MD run.

  • Min radius: minimum radial distance for the RDF.

  • Max radius: maximum radial distance for the RDF.

  • Units: optionally units of Angström, nanometers or or Bohr radius.

  • Plot style: optionally lines or bars.

    Workflow md analyse rdf style