Qbox tools
A set of scripts are available in the util directory of the distribution
for post-processing the output of Qbox.
Plot scripts
The following scripts are used to plot the value of various quantities during
molecular dynamics simulations. These scripts use gnuplot to display results.
- Plot the
total energy <etotal> during a simulation or
geometry optimization. To make a plot of the total energy in the output file
mdrun.r
, use:
$ ./etotal.plt mdrun.r
To plot the energy in the range of steps 120 to 150,
use:
$ ./etotal.plt -range [120:150] md1.r
To plot the energy for a sequence of runs md1.r, md2.r, md3.r
,
use:
$ ./etotal.plt md1.r md2.r md3.r
- Compare the total
energy of two simulations on the same plot. Use:
$ ./etotal_cmp.plt md1.r md2.r
- Plot the
value of the total energy during self-consistent iterations
(tag <etotal_int>). This is used to check the quality of
convergence of the electronic ground state during Born-Oppenheimer
simulations.
- Compare the
value of the total energy during non self-consistent iterations
(tag <etotal_int>) from two simulations on the same plot.
- Plot the constant of the motion
<econst> during a simulation.
This value is the sum of the Kohn-Sham energy and
the ionic kinetic energy. It should be ideally constant during an MD
simulation (without thermostat).
- Plot both the constant of
the motion <econst> and the total energy <etotal>
during a simulation.
- Plot both the
constant of
the motion <econst> and the total energy <etotal> in two
simulations for comparison. Use:
$ ./econste_cmp.plt md1.r md2.r
- Plot the constant of
the motion <econst> the total energy <etotal> and the sum
<econst>+<ekin_e>=<ekin_ec> on the same plot.
This is used to monitor
the quality of a Car-Parrinello simulation, checking that the kinetic
energy of the electrons <ekin_e> does not grow too fast
- Plot the ionic temperature
<temp_ion> during a simulation.
- Plot all components of the ionic
forces during a simulation. This can be used to monitor convergence during
a geometry optimization run.
- Plot the components of the vectors
defining the unit cell during a simulation. Used in simulations with varying
cell size/shape.
- Plot the components of the stress
tensor during an MD simulation (values in GPa).
- Plot the volume of the unit
cell during a simulation.
Analysis scripts
Post-processing shell scripts
-
Extract atomic trajectories
from Qbox output and print a file in xyz format. Use:
$ ./qbox_xyz.sh md.r > md.xyz
This script uses the xsltproc
program to extract and
process XML data from the Qbox output file. The xsltproc
program is included in most modern Linux distributions.
[Note: This script is provided as an example of XSLT script. The
qbox_xyz.py
script performs the same function.]
-
Generate a Qbox input file
file from a Qbox sample file.
-
Generate a Qbox input file
file from an xyz file. The resulting file must be edited to include the
correct species names and cell size
-
Generate a Quantum Espresso input
file from a Qbox sample file. The resulting file must be edited to include
the correct pseudopotential file names and other parameters.
-
Separate a
sample XML file into two files
atomset.xml
and wf.xml
containing the header and the wavefunction respectively. Use:
$ ./split_sample sample.xml
The resulting files can be edited and then reassembled into a sample using
$ cat atomset.xml wf.xml > new_sample.xml
This is useful when trying to edit the <atomset> part of the sample
since it avoids having to edit a large file.
- Generate a
sys file (to be used as input by Qbox) from a sample file. Use:
$ ./sample_to_sys.sh sample.xml > sample.sys
The sys file contains "atom" commands.
- Generate a
Qbox input file from a sample file. Use:
$ ./sample_to_move.sh sample.xml > move.i
The file move.i contains "move" commands, and can be used to move atoms to the
positions defined in sample.xml (see the syntax of the Qbox move command).
- Generate a
Qbox input file defining a supercell from an input file definint a
primitive cell. Use:
$ ./qbox_replicate.sh cell.sys n0 n1 n2 > supercell.sys
The file supercell.sys contains Qbox commands defining a supercell obtained
by replicating the cell defined in cell.sys. Replication is performed n0, n1
and n2 times in the directions of the lattice vectors a0, a1 and a2.