From 87dfdb8723bfc4fbb4537717462e32d62dc0d90a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Sep 2020 00:14:01 -0400 Subject: [PATCH] add comments/warnings to docs of fix property/atom and fix store/state about restarting --- doc/src/fix_property_atom.rst | 36 ++++++++++++++++++++++------------- doc/src/fix_store_state.rst | 9 +++++++++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/doc/src/fix_property_atom.rst b/doc/src/fix_property_atom.rst index eaf246c1a3..35749dbbfc 100644 --- a/doc/src/fix_property_atom.rst +++ b/doc/src/fix_property_atom.rst @@ -105,7 +105,7 @@ keyword with a value of *yes*\ . This will invoke extra communication when ghost atoms are created (at every re-neighboring) to insure the new properties are also defined for the ghost atoms. -.. note:: +.. admonition:: Properties on ghost atoms If you use this command with the *mol*\ , *q* or *rmass* vectors, then you most likely want to set *ghost* yes, since these properties @@ -115,7 +115,7 @@ new properties are also defined for the ghost atoms. atoms to have these values. LAMMPS will issue a warning it you define those vectors but do not set *ghost* yes. -.. note:: +.. admonition:: Limitations on ghost atom properties The properties for ghost atoms are not updated every timestep, but only once every few steps when neighbor lists are re-built. Thus @@ -126,12 +126,6 @@ new properties are also defined for the ghost atoms. that can be invoked from within a :doc:`pair style ` or :doc:`fix ` or :doc:`compute ` that you write. -.. note:: - - If this fix is defined **after** the simulation box is created, - a 'run 0' command should be issued to properly initialize the storage - created by this fix. - ---------- This fix is one of a small number that can be defined in an input @@ -139,6 +133,12 @@ script before the simulation box is created or atoms are defined. This is so it can be used with the :doc:`read_data ` command as described below. +.. note:: + + If this fix is defined **after** the simulation box is created, + a 'run 0' command may be needed to properly initialize the storage + created by this fix. + Per-atom properties that are defined by the :doc:`atom style ` are initialized when atoms are created, e.g. by the :doc:`read_data ` or :doc:`create_atoms ` commands. The per-atom properties defined by this fix are not. So @@ -271,11 +271,21 @@ example to heavy water: Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -This fix writes the per-atom values it stores to :doc:`binary restart files `, so that the values can be restored when a -simulation is restarted. See the :doc:`read_restart ` -command for info on how to re-specify a fix in an input script that -reads a restart file, so that the operation of the fix continues in an -uninterrupted fashion. +This fix writes the per-atom values it stores to :doc:`binary restart +files `, so that the values can be restored when a simulation +is restarted. See the :doc:`read_restart ` command for +info on how to re-specify a fix in an input script that reads a restart +file, so that the operation of the fix continues in an uninterrupted +fashion. + +.. warning:: + + When reading data from a restart, the fix command has to be specified + **exactly** the same way as before. LAMMPS will only check whether a + fix is of the same style and has the same fix ID and in case of a match + will then try to initialize the fix with the data stored in the binary + restart file. If the fix property/atom command does not match exactly, + data can be corrupted or LAMMPS may crash. None of the :doc:`fix_modify ` options are relevant to this fix. No global or per-atom quantities are stored by this fix for diff --git a/doc/src/fix_store_state.rst b/doc/src/fix_store_state.rst index 5f42e3ef5d..3841ef6359 100644 --- a/doc/src/fix_store_state.rst +++ b/doc/src/fix_store_state.rst @@ -111,6 +111,15 @@ command for info on how to re-specify a fix in an input script that reads a restart file, so that the operation of the fix continues in an uninterrupted fashion. +.. warning:: + + When reading data from a restart, the fix command has to be specified + **exactly** the same way as before. LAMMPS will only check whether a + fix is of the same style and has the same fix ID and in case of a match + will then try to initialize the fix with the data stored in the binary + restart file. If the fix store/state command does not match exactly, + data can be corrupted or LAMMPS may crash. + None of the :doc:`fix_modify ` options are relevant to this fix.