diff --git a/doc/src/Commands_compute.rst b/doc/src/Commands_compute.rst index 38c4f204c8..682a75f201 100644 --- a/doc/src/Commands_compute.rst +++ b/doc/src/Commands_compute.rst @@ -96,7 +96,6 @@ KOKKOS, o = OPENMP, t = OPT. * :doc:`nbond/atom ` * :doc:`omega/chunk ` * :doc:`orientorder/atom (k) ` - * :doc:`pace/extrapolation ` * :doc:`pair ` * :doc:`pair/local ` * :doc:`pe ` diff --git a/doc/src/compute.rst b/doc/src/compute.rst index cb5e319736..7d1e423e93 100644 --- a/doc/src/compute.rst +++ b/doc/src/compute.rst @@ -240,7 +240,6 @@ The individual style names on the :doc:`Commands compute ` pag * :doc:`nbond/atom ` - calculates number of bonds per atom * :doc:`omega/chunk ` - angular velocity for each chunk * :doc:`orientorder/atom ` - Steinhardt bond orientational order parameters Ql -* :doc:`pace/extrapolation ` - calculate extrapolation grade for pair style pace/extrapolation * :doc:`pair ` - values computed by a pair style * :doc:`pair/local ` - distance/energy/force of each pairwise interaction * :doc:`pe ` - potential energy diff --git a/doc/src/compute_pace_extrapolation.rst b/doc/src/compute_pace_extrapolation.rst deleted file mode 100644 index b983f983e9..0000000000 --- a/doc/src/compute_pace_extrapolation.rst +++ /dev/null @@ -1,69 +0,0 @@ -.. index:: compute pace/extrapolation - -compute pace/extrapolation command -================================== - -Syntax -"""""" - -.. parsed-literal:: - - compute ID all pace/extrapolation - -* ID is documented in :doc:`compute ` command -* pace/extrapolation = style name of this compute command - -Examples -"""""""" - -.. code-block:: LAMMPS - - compute pace_gamma all pace/extrapolation - -Description -""""""""""" - -Define a computation that calculates both per-atom and per-structure extrapolation grades for PACE interatomic potential. -Pair style :doc:`pair_style pace/extrapolation ` must be instantiated before. -Extrapolation grades are computed by `pair_style pace/extrapolation` every *gamma_freq* steps (see :doc:`pair_style pace/extrapolation `), -but `compute pace/extrapolation` will invoke extra calculations with this pair style if necessary. -For better performance, it is recommended to use the same values of *gamma_freq* and -the frequency of compute style callers, i.e. `dump` or `thermo`. - -.. code-block:: LAMMPS - - compute pace_gamma all pace/extrapolation - - # per-structure extrapolation grade c_pace_gamma - thermo_style custom step etotal temp press c_pace_gamma - - # per-atom extrapolation grade c_pace_gamma - dump 1 all custom 100 my.dump id type mass x y z c_pace_gamma - - -Output info -""""""""""" - -This compute calculates both per-atom vector and per-structure scalar, -which can be accessed by any command that uses per-atom and/or per-structure values from a compute as input. -See the :doc:`Howto output ` page for an overview of -LAMMPS output options. - -All values are unitless. - -Restrictions -"""""""""""" - - Pair style :doc:`pair_style pace/extrapolation ` must be instantiated before. - - group-ID always corresponds to the group atoms used by `pair_style pace/extrapolation` and by default is `all`. - -Related commands -"""""""""""""""" - -:doc:`pair_style pace/extrapolation `, :doc:`dump custom `, :doc:`thermo custom ` - -Default -""""""" - -`compute pace_gamma all pace/extrapolation` diff --git a/doc/src/dump_pace_extrapolation.rst b/doc/src/dump_pace_extrapolation.rst deleted file mode 100644 index 0b14222c42..0000000000 --- a/doc/src/dump_pace_extrapolation.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. index:: dump pace/extrapolation - -dump pace/extrapolation command -================================ - -Syntax -"""""" - -.. parsed-literal:: - - dump ID group-ID pace/extrapolation N file args - - -* ID = user-assigned name for the dump -* group-ID = ID of the group of atoms to be dumped -* N = dump every this many timesteps (use 1 to potentially dump on every step, see below) -* file = name of file to write dump info to -* args = list of arguments (see :doc:`dump custom `) - -Examples -"""""""" - -.. code-block:: LAMMPS - - dump pace all pace/extrapolation 1 extrapolation.dat id type mass x y z c_pace_gamma - dump pace all pace/extrapolation 1 extrapolation.lammpsbin id type mass x y z c_pace_gamma - -Description -""""""""""" - -Dump a snapshot of atom coordinates if extrapolation grade, computed by -:doc:`compute pace/extrapolation `, exceeds *gamma_lower_bound* threshold, -provided in :doc:`pair_style pace/extrapolation `. - -.. note:: - - To be able to use this dump, you need to setup :doc:`pair_style pace/extrapolation ` - and :doc:`compute pace/extrapolation ` beforehand - ----------- - -Related commands -"""""""""""""""" - -:doc:`pair_style pace/extrapolation `, :doc:`compute pace/extrapolation ` diff --git a/doc/src/pair_pace.rst b/doc/src/pair_pace.rst index c2d33240db..91851d54f3 100644 --- a/doc/src/pair_pace.rst +++ b/doc/src/pair_pace.rst @@ -28,14 +28,7 @@ Syntax .. code-block:: LAMMPS - pair_style pace/extrapolation gamma_lower_bound gamma_upper_bound gamma_freq - -* one or more arguments may be appended - - .. parsed-literal:: - *gamma_lower_bound* = minimal value of extrapolation grade considered as moderate extrapolation - *gamma_upper_bound* = maximal value of extrapolation grade considered as moderate extrapolation - *gamma_freq* value = frequency of computing extrapolation grade (in steps) + pair_style pace/extrapolation Examples """""""" @@ -46,7 +39,7 @@ Examples pair_style pace product chunksize 2048 pair_coeff * * Cu-PBE-core-rep.ace Cu - pair_style pace/extrapolation 1.5 10 20 + pair_style pace/extrapolation pair_coeff * * Cu.yaml Cu.asi Cu Description @@ -106,37 +99,32 @@ In order to compute extrapolation grade one needs to provide: #. Active Set Inverted (ASI) file for corresponding potential (`.asi` format) Calculation of extrapolation grades requires matrix-vector multiplication for each atom -and can be slower than the usual `pair_style pace recursive`, -therefore it make sense *not* to do it on every step. -Extrapolation grade calculation frequency is controlled by *gamma_freq* parameter. -On all other steps `pair_style pace recursive` is used. - -The maximal value of *gamma* for all atoms in a structure determines the extrapolation grade for structure. -Both per-atom and per-structure extrapolation grades are accessible via `compute pace/extrapolation`: +and is slower than the usual `pair_style pace recursive`, therefore it is *not* computed by default. +Extrapolation grade calculation is involved by `fix pair`, which requests to compute `gamma`, as shown in example below: .. code-block:: LAMMPS - compute pace_gamma all pace/extrapolation + pair_style pace/extrapolation + pair_coeff * * Cu.yaml Cu.asi Cu - # show maximal extrapolation grade per-structure - thermo_style custom step etotal temp press c_pace_gamma + fix pace_gamma all pair 10 pace/extrapolation gamma 1 - # dump structure with per-atom extrapolation grades - dump 1 all custom 100 my.dump id type mass x y z c_pace_gamma - -If maximal extrapolation grade per-structure exceeds *gamma_lower_bound* but less than *gamma_upper_bound*, -the structure is considered as extrapolative and can be stored with `dump pace/extrapolation`: - -.. code-block:: LAMMPS - - compute pace_gamma all pace/extrapolation - dump pace all pace/extrapolation 1 extrapolation.dat id type mass x y z c_pace_gamma - -Please note, that even if you provide dump frequency equal to one, dump will write structure -only if extrapolation grades are computed on current timestep *and* maximal extrapolation grade exceeds *gamma_lower_bound*. -If extrapolation grade exceeds *gamma_upper_bound*, simulation will be aborted. + compute max_pace_gamma all reduce max f_pace_gamma + variable dump_skip equal "c_max_pace_gamma < 5" + dump pace_dump all custom 20 extrapolative_structures.dump id x y z f_pace_gamma + dump_modify pace_dump skip v_dump_skip + + variable max_pace_gamma equal c_max_pace_gamma + fix extreme_extrapolation all halt 10 v_max_pace_gamma > 25 + +Here extrapolation grade gamma is computed every 10 steps and is stored in `f_pace_gamma` per-atom variable. +The largest value of extrapolation grade among all atoms in a structure is reduced to `c_max_pace_gamma` variable. +Only if this value exceeds extrapolation threshold 5, then the structure will be dumped into `extrapolative_structures.dump` +file, but not more often than every 20 steps. + +On all other steps `pair_style pace recursive` will be used. ---------- @@ -179,16 +167,12 @@ Related commands """""""""""""""" :doc:`pair_style snap `, -:doc:`compute pace/extrapolation `, -:doc:`dump pace/extrapolation `, +:doc:`fix pair ` Default """"""" recursive, chunksize = 4096, -gamma_lower_bound = 1.5, -gamma_upper_bound = 10, -gamma_freq = 1 .. _Drautz20191: