# 4.2.12. DYNAMIX¶

The DYNAMIX program performs molecular dynamics (MD) simulations in Molcas. Here the nuclei are moved according to the classical Newton’s equations which are solved numerically using the velocity Verlet algorithm [65]. The algorithm requires coordinates, velocities and forces as input. DYNAMIX can be used with any electronic structure method in Molcas. Also environmental effects can be taken into account in the MD simulation: the solvent can be considered implicitly using the reaction field keyword in GATEWAY or explicitly in hybrid QM/MM calculation which requires the ESPF program.

When multiple electronic states are involved in a MD simulation, a trajectory surface hopping (TSH) algorithm allows non-adiabatic transitions between different states. This TSH algorithm evaluates the change of the wavefunction along the trajectory and induces a hop if certain criteria a met (for further details read the RASSI section). In the current implementation the surface hopping algorithm can be used only with state averaged CASSCF wavefunction. However, an extension for CASPT2 and other methods are in preparation.

The Tully algorithm is available in a separate module SURFACEHOP.

## 4.2.12.1. Dependencies¶

The coordinates and the forces are required by the DYNAMIX program. DYNAMIX reads the initial coordinates from the RUNFILE and updates them in each iteration. In addition DYNAMIX depends on the ALASKA program, since it generates forces.

## 4.2.12.2. Files¶

### 4.2.12.2.1. Input files¶

velocity.xyz

Contains the initial velocities of the MD simulation.

### 4.2.12.2.2. Output files¶

RUNFILE

Trajectory information such as current time, velocities, etc. are stored in this file.

md.xyz

The coordinates for each step of the MD trajectory are saved here.

md.energies

The potential, kinetic and total energies are written to this file. In case of multiple electronic states, the energies of all roots are saved.

## 4.2.12.3. Input¶

This section describes the input syntax of DYNAMIX in the Molcas program package. In general a MD simulation requires a FOREACH loop which contains several programs to compute the energy and ALASKA for subsequent gradient computation. The input of the DYNAMIX begins with the program name, and is followed by the only compulsory keyword VELV which specifies the velocity Verlet algorithm:

&DYNAMIX
VELV


### 4.2.12.3.1. General keywords¶

VELVerlet

This keyword specifies the velocity Verlet algorithm [65] to solve Newton’s equations of motion. It’s the only compulsory keyword in the program.

DTime

Defines the $$\delta t$$ which is the time step in the MD simulation and which is used for the integration of Newton’s equations of motion. The program expects the time to be given in floating point format and in atomic unit of time (1 a.u. of time = $$2.42\cdot10^{-17}$$ s). (Default = 10).

VELOcities

Specifies how the initial velocities are generated. This keyword is followed by an integer on the next line. The internal unit of the velocities is [bohr$$\cdot$$(a.u. of time)$$^{-1}$$].

0 — Zero velocities. (Default)

1 — The velocities are read from the file $Project.velocity.xyz in$WorkDir. This file contains velocities in the xyz format given in the same order as the atoms in coordinate file. The unit of the velocities is [bohr$$\cdot$$(a.u. of time)$$^{-1}$$].

&RASSCF
LUMORB
FileOrb= $Project.GssOrb Symmetry= 1 Spin= 1 nActEl= 2 0 0 Inactive= 7 RAS2= 2 CIroot= 3 3 1 >> COPY$Project.JobIph $Project.JobOld >> ENDIF &RASSCF JOBIPH; CIRESTART Symmetry= 1 Spin= 1 nActEl= 2 0 0 Inactive= 7 RAS2= 2 CIroot= 3 3 1 MDRLXR= 2 >> COPY$Project.JobIph $Project.JobOld &ALASKA &DYNAMIX VELVer DT= 10.0 VELO= 3 THER= 2 TEMP=300 HOP= 1 >> END DO  ## 4.2.12.4. Dynamixtools¶ This tool can be found into the Tools/ folder and it will provide some general tools to manage molecular dynamics calculations. At the moment it can be used to generate intial conditions (geometries and momenta) following a Boltzmann distribution, based on a frequency calculation. It is working with a freq.molden file (.h5 support coming soon…). From the command prompt: $ python3 dynamixtools.py -h
usage: dynamixtools.py [-h] [-s SEED] [-l LABEL] -i I [-b BOL] -t TEMP

optional arguments:
-h, --help            show this help message and exit
-s SEED, --seed SEED  indicate the SEED to use for the generation of randoms
-l LABEL, --label LABEL
label for your project (default is "geom")
-i I, --input I       path of the frequency h5 or molden file
-b BOL, --boltzmann BOL
number of initial condition following Boltzmann
distribution (default 1)
-t TEMP, --temperature TEMP
temperature in kelvin for the initial conditions


Having a water.freq.molden file, this is the command to generate 200 initial conditions using 3435432 as seed and a temperature of 300 kelvin:

\$ python3 dynamixtools.py -i water.freq.molden -t 300 -b 200 -s 3435432