document the use and generation of "DATE:" and "UNITS:" tags

This commit is contained in:
Axel Kohlmeyer 2020-06-14 14:41:04 -04:00
parent a8c0e8d30a
commit 8736565977
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
4 changed files with 29 additions and 5 deletions

View File

@ -47,7 +47,13 @@ The file is written in the format used as input for the
:doc:`bond_style <bond_style>` *table* option with *keyword* as the
section name. Each line written to the file lists an index number
(1-N), a distance (in distance units), an energy (in energy units),
and a force (in force units).
and a force (in force units). In case a new file is created, the first
line will be a comment with a "DATE:" and "UNITS:" tag with the current
date and :doc:`units <units>` settings. For subsequent invocations of
the bond_write command for the same file, data will be appended and the
current units settings will be compared to the data from the header, if
present, and bond_write will refuse to add a table if the units are not
the same.
Restrictions
""""""""""""

View File

@ -86,7 +86,17 @@ Potential files provided with LAMMPS are in the potentials directory
of the distribution. For some potentials, such as EAM, other archives
of suitable files can be found on the Web. They can be used with
LAMMPS so long as they are in the format LAMMPS expects, as discussed
on the individual doc pages.
on the individual doc pages. The first line of potential files may
contain metadata with upper case tags followed their value. These may
be parsed and used by LAMMPS. Currently supported are the "DATE:"
tag and the "UNITS:" tag. For pair styles that have been programmed
to support the metadata, the value of the "DATE:" tag is printed to
the screen and logfile so that the version of a potential file can be
later identified. The "UNITS:" tag indicates the :doc:`units <units>`
setting required for this particular potential file. If the potential
file ware created for a different sets of units, LAMMPS will terminate
with an error. If the potential file does not contain the tag, no
check will be made.
When a pair_coeff command using a potential file is specified, LAMMPS
looks for the potential file in 2 places. First it looks in the

View File

@ -124,11 +124,14 @@ best effect:
----------
The format of a tabulated file is a series of one or more sections,
defined as follows (without the parenthesized comments):
The format of a tabulated file has an (optional) header followed by a
series of one or more sections, defined as follows (without the
parenthesized comments). The header must start with a `#` character
and the DATE: and UNITS: tags will be parsed and used:
.. parsed-literal::
# DATE: 2020-06-10 UNITS: real CONTRIBUTOR: ... (header line)
# Morse potential for Fe (one or more comment or blank lines)
MORSE_FE (keyword is first text on line)

View File

@ -34,7 +34,12 @@ the currently defined pair potential. This is useful for plotting the
potential function or otherwise debugging its values. If the file
already exists, the table of values is appended to the end of the file
to allow multiple tables of energy and force to be included in one
file.
file. In case a new file is created, the first line will be a comment
containing a "DATE:" and "UNITS:" tag with the current date and the
current :doc:`units <units>` setting as argument. For subsequent
invocations of the pair_write command, the current units setting is
compared against the entry in the file, if present, and pair_write
will refuse to add a table if the units are not the same.
The energy and force values are computed at distances from inner to
outer for 2 interacting atoms of type itype and jtype, using the