The dump position keyword

From GPUMD
Jump to navigation Jump to search

Purpose

Dump the atom positions (coordinates).

Grammar

  • This keyword's usage will have the following format:
dump_position interval <optional_args>

where the interval parameter is the output interval (number of steps) of the atom positions.

The optional_args provide additional functionality. Keywords can be in any order, but associated parameters must follow exactly. The optional arguments are:

  • format output_format
output_format: The file format to output the positions in. Currently, xyz and netcdf are accepted.
  • precision output_precision: The precision of the atom position output data (details below)
output_precision: single or double

If output_format is not provided, the default value is xyz. If output_format is xyz, the default output_precision is determined by the %g format in C (i.e. not a specific precision but shortest representation of floating point). If output_precision is single, nine-decimal digits are output (%0.9f format), and seventeen-decimal digits (%0.17f format) are used when output_precision is double.

The netcdf output_format option requires an external package to operate. The binary format NetCDF package instructions can be found here. The NetCDF format follows the AMBER conventions. When output_format is netcdf, the default precision is double which outputs full 64-bit floating point. The double output_precision does the same whereas the single option writes 32-bit floating point values. The single option is good for saving space, but does not follow the official AMBER 1.0 conventions. All NetCDF output files can be read by VMD and OVITO for visualization. The NetCDF files also stores cell lengths and angles which can be used in the visualization software to illustrate boundaries and show periodic copies of the structure.

Examples

Example 1

To dump the positions every 1000 steps for a run, one can add

   dump_position 1000

before the run keyword.

Example 2

To dump the positions every 1000 steps to a NetCDF file with 32-bit floating point values, one can add

   dump_position 1000 format netcdf precision single

before the run

Caveats

  • This keyword is not propagating. That is, its effect will not be passed from one run to the next.
  • The xyz format has an appending behavior and will result in a single movie.xyz file no matter how many times the simulation is run.
  • The netcdf format appends for different runs in the same simulation. If the precision changes between different runs, the first defined precision will still be used (i.e. changes in precision are ignored during a simulation). Re-running the simulation will create a new output file.

Output file

Related keywords