Unverified Commit e7639d49 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2297 from akohlmey/more-fix-tests

Add a few more unit tests for fixes and fix some issues related to it
parents a70a5be2 cd7ba1d0
Loading
Loading
Loading
Loading
+11 −20
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command
* style_name = *npt/cauchy*
* one or more keyword/value pairs may be appended
* keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint* or *update*
* keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint*

  .. parsed-literal::

@@ -45,9 +45,8 @@ Syntax
       *scaleyz* value = *yes* or *no* = scale yz with lz
       *scalexz* value = *yes* or *no* = scale xz with lz
       *flip* value = *yes* or *no* = allow or disallow box flips when it becomes highly skewed
       *cauchystat* cauchystat values = alpha continue
         alpha = strength of Cauchy stress control parameter
         continue = *yes* or *no* = whether of not to continue from a previous run
       *alpha* value = strength of Cauchy stress control parameter
       *continue* value = *yes* or *no* = whether of not to continue from a previous run
       *fixedpoint* values = x y z
         x,y,z = perform barostat dilation/contraction around this point (distance units)

@@ -56,7 +55,7 @@ Examples

.. code-block:: LAMMPS

   fix 1 water npt/cauchy temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0
   fix 1 water npt/cauchy temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0 alpha 0.001

Description
"""""""""""
@@ -573,14 +572,7 @@ can only be used if the second dimension in the keyword is periodic,
and if the tilt factor is not coupled to the barostat via keywords
*tri*\ , *yz*\ , *xz*\ , and *xy*\ .

Without the *cauchystat* keyword, the barostat algorithm
controls the Second-Piola Kirchhoff stress, which is a stress measure
referred to the unmodified (initial) simulation box.  If the box
deforms substantially during the equilibration, the difference between
the set values and the final true (Cauchy) stresses can be
considerable.

The *cauchystat* keyword modifies the barostat as per Miller et
The *alpha* keyword modifies the barostat as per Miller et
al. (Miller)_"#nc-Miller" so that the Cauchy stress is controlled.
*alpha* is the non-dimensional parameter, typically set to 0.001 or
0.01 that determines how aggressively the algorithm drives the system
@@ -598,13 +590,12 @@ sequence over several fixes.

Setting *alpha* to zero is not permitted.  To "turn off" the
cauchystat control and thus restore the equilibrium stress
fluctuations, two subsequent fixes should be used.  In the first, the
cauchystat flag is used and the simulation box equilibrates to the
correct shape for the desired stresses.  In the second, the *fix*
statement is identical except that the *cauchystat* keyword is removed
(along with related *alpha* and *continue* values). This restores the
original Parrinello-Rahman algorithm, but now with the correct simulation
box shape from the first fix.
fluctuations, two subsequent fixes should be used.  In the first, fix
npt/cauchy is used and the simulation box equilibrates to the
correct shape for the desired stresses.  In the second,
:doc:`fix npt <fix_nh>` is used instead which uses the
original Parrinello-Rahman algorithm, but now with the corrected
simulation box shape from using fix npt/cauchy.

This fix can be used with dynamic groups as defined by the
:doc:`group <group>` command.  Likewise it can be used with groups to
+10 −1
Original line number Diff line number Diff line
@@ -50,7 +50,16 @@ atom.

**Restart, fix_modify, output, run start/stop, minimize info:**

No information about this fix is written to :doc:`binary restart files <restart>`.
This fix writes the locations of the initial per-chunk center of mass
coordinates to :doc:`binary restart files <restart>`.  See the
:doc:`read_restart <read_restart>` command for info on how to
re-specify a fix in an input script that reads a restart file, so that
the fix continues in an uninterrupted fashion.  Since this fix depends
on an instance of :doc:`compute chunk/atom <compute_chunk_atom>`
it will check when reading the restart if the chunk still exists and
will define the same number of chunks. The restart data is only applied
when the number of chunks matches. Otherwise the center of mass
coordinates are recomputed.

The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy stored in all the springs to the system's potential
+14 −3
Original line number Diff line number Diff line
@@ -59,9 +59,20 @@ the time the fix is specified, and that value is used as the target.

**Restart, fix_modify, output, run start/stop, minimize info:**

No information about this fix is written to :doc:`binary restart files <restart>`.  None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix.  No global or per-atom quantities are stored
by this fix for access by various :doc:`output commands <Howto_output>`.
This fix writes the currently used reference RG (:math:`R_{G0}`) to
:doc:`binary restart files <restart>`.  See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an input
script that reads a restart file, so that the fix continues in an
uninterrupted fashion.

None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix.

This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`.  The scalar is the reference
radius of gyration :math:`R_{G0}` used by the fix.  energy change due to
this fix.  The scalar value calculated by this fix is "intensive".

No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.  This fix is not invoked during :doc:`energy minimization <minimize>`.

+7 −2
Original line number Diff line number Diff line
@@ -126,7 +126,11 @@ thermal degrees of freedom, and the bias is added back in.

**Restart, fix_modify, output, run start/stop, minimize info:**

No information about this fix is written to :doc:`binary restart files <restart>`.
This fix writes the cumulative global energy change to :doc:`binary
restart files <restart>`.  See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the fix continues in an uninterrupted
fashion.

The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix.  You can use it to assign a temperature :doc:`compute <compute>`
@@ -136,7 +140,8 @@ this fix and by the compute should be the same.

The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change implied by a velocity rescaling to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
system's potential energy as part of :doc:`thermodynamic output
<thermo_style>`.

This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`.  The scalar is the cumulative
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class FixRigidNH : public FixRigid {

  double mtk_term1,mtk_term2;         // Martyna-Tobias-Klein corrections

  double t_current,t_target;
  double t_current;
  double p_current[3],p_target[3];

  char *id_temp,*id_press;
Loading