dump_observer
Writes atomistic properties such as positions, velocities and forces for each of the supplied NEP potentials, or for their average, in the extended XYZ format. In addition to the output interval and the quantity flags described under Syntax below, it takes a mode keyword, which can be set to either observe or average.
If set to observe, the first of the supplied NEP potentials, the main potential, propagates the molecular dynamics run. Every potential, the main potential included, is evaluated every interval_thermo and interval_exyz time steps at the positions written to the files. Every interval_thermo timesteps files in the style of thermo.out will be written, and every interval_exyz timesteps extended XYZ-files will be written. The files are named according to the following convention:
.out: observer0.out, observer1.out, …, observer(N-1).out for N supplied potentials.
.xyz: observer0.xyz, observer1.xyz, …, observer(N-1).xyz for N supplied potentials.
With a single potential, the files are named observer.out and observer.xyz.
The index of these observer(index) files correspond to the index of each potential in the run.in file. Thus, observer0 corresponds to the first potential, observer1 to the second and so on. In this mode, observer0 corresponds to the main potential. The energy, virial and forces in each file are those of the respective potential alone. The stress field in the extended XYZ files holds the pressure tensor in eV/ų, which adds the kinetic contribution of the velocities to the virial of the respective potential. The forces exclude those that other keywords add to the atoms, such as add_force and add_efield. Evaluating the potentials leaves the molecular dynamics run unchanged.
If set to average, all supplied NEP potentials will be evaluated at every timestep, with the average of all potentials used to propagate the molecular dynamics. In this case, two files will be written: observer.out every interval_thermo timesteps, and observer.xyz every interval_exyz timesteps. observer.out holds the thermo vector of the run, which the average potential propagates. observer.xyz holds the per-atom arrays of the run, and takes its energy and stress from the same thermo vector. A row of observer.out equals the row of thermo.out of the same step. The forces in observer.xyz include those that other keywords add to the atoms, such as add_force and add_efield. Under PIMD, the energy and forces in observer.xyz are the averages over the beads. The virial adds the term of the centroid virial estimator to the average over the beads. The stress field holds the pressure tensor of the thermo vector, whose kinetic contribution uses the target temperature.
Note that the supplied potentials must have their atomic species written in the same order, i.e. the line nep* n_species species0 species1 must be the same in all potential files.
Syntax
dump_observer <mode> <interval_thermo> <interval_exyz> <has_velocity> <has_force>
mode corresponds to the two cases described above, and can be either observe or average.
interval_thermo parameter is the output interval (number of steps) for writing thermo files.
interval_exyz parameter is the output interval (number of steps) of writing exyz files.
has_velocity can be 1 or 0, which means the velocities will or will not be included in the exyz output.
has_force can be 1 or 0, which means the forces will or will not be included in the exyz output.
Examples
Example 1
To use one NEP potential to propagate the MD (nep0), and another (nep1) to observe thermo properties every 100 steps and write exyz files every 1000 steps, write:
potential nep0
potential nep1
...
dump_observer observe 100 1000 1 1
before the run keyword. This will generate four output files, observer0.xyz, observer0.out, observer1.xyz and observer1.out, containing thermo properties and positions, velocities and forces as calculated with nep0 and nep1 respectively.
Example 2
To run MD with an average of two NEP potentials, nep0 and nep1, and dump the positions, velocities and forces every 1000 steps, write:
potential nep0
potential nep1
...
dump_observer average 100 1000 1 1
before the run keyword. This will generate two output files, observer.out containing thermo properties and observer.xyz, containing positions, velocities and forces as calculated with the average of nep0 and nep1. observer.out will be written every 100 timesteps, and observer.xyz every 1000 timesteps.
Caveats
This keyword is not propagating. That means, its effect will not be passed from one run to the next.
Every run appends to the output files, named as described above. In observe mode, the runs share one .out and one .xyz file for each potential. In average mode, they share observer.out and observer.xyz.