dump_netcdf

Write the atomic positions (coordinates) and (optionally) velocities in NetCDF format to a movie.nc file.

Syntax

This keyword has the following format:

dump_netcdf <interval> <has_velocity> [{optional_args}]

The interval parameter is the output interval (number of steps) of the atom positions. has_velocity can be 1 or 0, which means the velocities will or will not be included in the output. The optinal arguments (optional_args) provide additional functionality. Currently, the following optional argument is accepted:

  • precision

    • If value is single, the output data are 32-bit floating point numbers.

    • If value is double, the output data are 64-bit floating point numbers.

    The default value is double.

Requirements and specifications

  • This keyword requires an external package to operate. Instructions for how to set up the NetCDF package can be found here.

  • The NetCDF format follows the AMBER specifications.

  • The single option is good for saving space, but does not follow the official AMBER 1.0 conventions.

  • NetCDF output files can be read for example by VMD or OVITO for visualization.

  • The NetCDF files also contain cell lengths and angles, which can be used in the visualization software to illustrate boundaries and show periodic copies of the structure.

Examples

Single precision without veolocities

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

dump_netcdf 1000 0 precision single

before the run command.

Double precision with velocities

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

dump_netcdf 1000 1

before the run command.

Caveats

  • Following the AMBER 1.0 conventions, length is in units of Ångström and velocity is in units of Ångström/picosecond.

  • This keyword is not propagating. That means, its effect will not be passed from one run to the next.

  • The output appends to the same file for different runs in the same simulation. Re-running the simulation will create a new output file.

  • If the file “movie.nc” already exists in the current directory, it will not be overwritten. Instead, files will be generated with names “movie_2.nc”, “movie_3.nc”, …, “movie_n.nc”.

  • 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).