Commit 41666be7 authored by Richard Berger's avatar Richard Berger
Browse files

Update RST docs and remove txt files

parent 489b7eb2
Loading
Loading
Loading
Loading
+33 −5
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ Syntax
  
  .. parsed-literal::
  
     keyword = *dmax* or *line* or *norm* or *alpha_damp* or *discrete_factor*
     keyword = *dmax* or *line* or *norm* or *alpha_damp* or *discrete_factor* or *integrator* or *tmax*
       *dmax* value = max
         max = maximum distance for line search to move (distance units)
       *line* value = *backtrack* or *quadratic* or *forcezero* or *spin_cubic* or *spin_none*
@@ -28,6 +28,10 @@ Syntax
         damping = fictitious Gilbert damping for spin minimization (adim)
       *discrete_factor* value = factor
         factor = discretization factor for adaptive spin timestep (adim)
       *integrator* value = *eulerimplicit* or *verlet*
         time integration scheme for fire2 minimization
       *tmax* value = factor
         factor = maximum adaptive timestep for fire2 minimization



@@ -38,6 +42,7 @@ Examples
.. parsed-literal::

   min_modify dmax 0.2
   min_modify integrator verlet tmax 4

Description
"""""""""""
@@ -127,6 +132,29 @@ The *spin\_none* is a default value for *line* keyword for both *spin/lbfgs*
and *spin/cg*\ . Convergence of *spin/lbfgs* can be more robust if
*spin\_cubic* line search is used.

The Newton *integrator* used for *fire2* minimization can be selected to be
either the symplectic Euler (\ *eulerimplicit*\ ) or velocity Verlet (\ *verlet*\ ).
*tmax* define the maximum value for the adaptive timestep
during a *fire2* minimization. It is multiplication factor applied
to the current :doc:`timestep <timestep>` (not in time unit). For example,
*tmax* = 4.0 in metal :doc:`units <units>` means that the maximum value
the timestep can reach during a minimization is 4fs (with the default
:doc:`timestep <timestep>` value). Note that parameters defaults has been
chosen to be reliable in most cases, but one should consider adjusting
:doc:`timestep <timestep>` and *tmax* to optimize the minimization for large
or complex systems.
Others parameters of the *fire2* minimization can be tuned (\ *tmin*\ , *delaystep*\ ,
*dtgrow*\ , *dtshrink*\ , *alpha0*\ , and *alphashrink*\ ). Please refer to the article
describing the *fire2* :doc:`min\_style <min_style>`.

An additional stopping criteria *vdfmax* is added in order to avoid unnecessary looping
when it is reasonable to think the system will not be relaxed further.
Note that in this case the system will NOT be relaxed. This could
happen when the system comes to be stuck in a local basin of the phase space.
*vdfmax* is the maximum number of consecutive iterations with P(t) < 0.
For debugging purposes, it is possible to switch off the inertia correction
(\ *halfstepback* = *no*\ ) and the initial delay (\ *initialdelay* = *no*\ ).

Restrictions
""""""""""""

@@ -149,7 +177,7 @@ For the *spin*\ , *spin/cg* and *spin/lbfgs* styles, the
option defaults are alpha\_damp = 1.0, discrete\_factor = 10.0,
line = spin\_none, and norm = euclidean.


.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html
For the *fire2* style, the option defaults are
integrator = eulerimplicit, tmax = 10.0, tmin = 0.02,
delaystep = 20, dtgrow = 1.1, dtshrink = 0.5, alpha0 = 0.25, alphashrink = 0.99,
vdfmax = 2000, halfstepback = yes and initialdelay = yes.
+12 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ Syntax

   min_style style

* style = *cg* or *hftn* or *sd* or *quickmin* or *fire* or *spin* or *spin/cg* or *spin/lbfgs*
* style = *cg* or *hftn* or *sd* or *quickmin* or *fire* or *fire2* or *spin* or *spin/cg* or *spin/lbfgs*

Examples
""""""""
@@ -67,6 +67,9 @@ the velocity non-parallel to the current force vector. The velocity
of each atom is initialized to 0.0 by this style, at the beginning of
a minimization.

Style *fire2* is an optimization of the style *fire*\ , including different
time integration schemes, described in :ref:`(Guenole) <Guenole>`.

Style *spin* is a damped spin dynamics with an adaptive
timestep.

@@ -81,7 +84,7 @@ combined to a limited-memory Broyden-Fletcher-Goldfarb-Shanno
See the :doc:`min/spin <min_spin>` doc page for more information
about the *spin*\ , *spin/cg* and *spin/lbfgs* styles.

Either the *quickmin* and *fire* styles are useful in the context of
Either the *quickmin*\ , *fire* and *fire2* styles are useful in the context of
nudged elastic band (NEB) calculations via the :doc:`neb <neb>` command.

Either the *spin*\ , *spin/cg* and *spin/lbfgs* styles are useful 
@@ -164,6 +167,13 @@ Jonsson, Mills, Jacobsen.
**(Bitzek)** Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett,
97, 170201 (2006).

.. _Guenole:



**(Guenole)** Guenole, Nöhring, Vaid, Houllé, Xie, Prakash, Bitzek,
Preprint, arXiv:190802038 (2019).


.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
+5 −8
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@ be more robust than previous line searches we've tried. The
backtracking method is described in Nocedal and Wright's Numerical
Optimization (Procedure 3.1 on p 41).

The :doc:`minimization styles <min_style>` *quickmin* and *fire* perform
damped dynamics using an Euler integration step.  Thus they require a
:doc:`timestep <timestep>` be defined.
The :doc:`minimization styles <min_style>` *quickmin*\ , *fire* and
*fire2* perform damped dynamics using an Euler integration step.
Thus they require a :doc:`timestep <timestep>` be defined.

.. note::

@@ -336,9 +336,6 @@ Related commands
:doc:`min\_modify <min_modify>`, :doc:`min\_style <min_style>`,
:doc:`run\_style <run_style>`

**Default:** none
**Default:**


.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html
none

doc/txt/min_modify.txt

deleted100644 → 0
+0 −168
Original line number Diff line number Diff line
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

min_modify command :h3

[Syntax:]

min_modify keyword values ... :pre

one or more keyword/value pairs may be listed :ulb,l
keyword = {dmax} or {line} or {norm} or {alpha_damp} or {discrete_factor} or {integrator} or {tmax}
  {dmax} value = max
    max = maximum distance for line search to move (distance units)
  {line} value = {backtrack} or {quadratic} or {forcezero} or {spin_cubic} or {spin_none}
    backtrack,quadratic,forcezero,spin_cubic,spin_none = style of linesearch to use 
  {norm} value = {two} or {max}
    two = Euclidean two-norm (length of 3N vector)
    inf = max force component across all 3-vectors
    max = max force norm across all 3-vectors
  {alpha_damp} value = damping
    damping = fictitious Gilbert damping for spin minimization (adim)
  {discrete_factor} value = factor
    factor = discretization factor for adaptive spin timestep (adim)
  {integrator} value = {eulerimplicit} or {verlet}
    time integration scheme for fire2 minimization
  {tmax} value = factor
    factor = maximum adaptive timestep for fire2 minimization :pre
:ule

[Examples:]

min_modify dmax 0.2
min_modify integrator verlet tmax 4 :pre

[Description:]

This command sets parameters that affect the energy minimization
algorithms selected by the "min_style"_min_style.html command.  The
various settings may affect the convergence rate and overall number of
force evaluations required by a minimization, so users can experiment
with these parameters to tune their minimizations.

The {cg} and {sd} minimization styles have an outer iteration and an
inner iteration which is steps along a one-dimensional line search in
a particular search direction.  The {dmax} parameter is how far any
atom can move in a single line search in any dimension (x, y, or z).
For the {quickmin} and {fire} minimization styles, the {dmax} setting
is how far any atom can move in a single iteration (timestep).  Thus a
value of 0.1 in real "units"_units.html means no atom will move
further than 0.1 Angstroms in a single outer iteration.  This prevents
highly overlapped atoms from being moved long distances (e.g. through
another atom) due to large forces.

The choice of line search algorithm for the {cg} and {sd} minimization
styles can be selected via the {line} keyword.
The default {quadratic} line search algorithm starts out using
the robust backtracking method described below. However, once
the system gets close to a local
minimum and the linesearch steps get small, so that the energy
is approximately quadratic in the step length, it uses the
estimated location of zero gradient as the linesearch step,
provided the energy change is downhill.
This becomes more efficient than backtracking
for highly-converged relaxations. The {forcezero}
line search algorithm is similar to {quadratic}.
It may be more efficient than {quadratic} on some systems.

The backtracking search is robust and should always find a local energy
minimum.  However, it will "converge" when it can no longer reduce the
energy of the system.  Individual atom forces may still be larger than
desired at this point, because the energy change is measured as the
difference of two large values (energy before and energy after) and
that difference may be smaller than machine epsilon even if atoms
could move in the gradient direction to reduce forces further.

The choice of a norm can be modified for the min styles {cg}, {sd}, 
{quickmin}, {fire}, {spin}, {spin/cg} and {spin/lbfgs} using 
the {norm} keyword.
The default {two} norm computes the 2-norm (Euclidean length) of the
global force vector:

:c,image(Eqs/norm_two.jpg) 

The {max} norm computes the length of the 3-vector force 
for each atom  (2-norm), and takes the maximum value of those across 
all atoms

:c,image(Eqs/norm_max.jpg) 

The {inf} norm takes the maximum component across the forces of
all atoms in the system: 

:c,image(Eqs/norm_inf.jpg) 

For the min styles {spin}, {spin/cg} and {spin/lbfgs}, the force
norm is replaced by the spin-torque norm.

Keywords {alpha_damp} and {discrete_factor} only make sense when
a "min_spin"_min_spin.html command is declared.
Keyword {alpha_damp} defines an analog of a magnetic Gilbert
damping. It defines a relaxation rate toward an equilibrium for
a given magnetic system.
Keyword {discrete_factor} defines a discretization factor for the
adaptive timestep used in the {spin} minimization.
See "min_spin"_min_spin.html for more information about those
quantities. 

The choice of a line search algorithm for the {spin/cg} and
{spin/lbfgs} styles can be specified via the {line} keyword.
The {spin_cubic} and  {spin_none} only make sense when one of those 
two minimization styles is declared.
The {spin_cubic} performs the line search based on a cubic interpolation
of the energy along the search direction. The {spin_none} keyword
deactivates the line search procedure.
The {spin_none} is a default value for {line} keyword for both {spin/lbfgs}
and {spin/cg}. Convergence of {spin/lbfgs} can be more robust if
{spin_cubic} line search is used.

The Newton {integrator} used for {fire2} minimization can be selected to be
either the symplectic Euler ({eulerimplicit}) or velocity Verlet ({verlet}).
{tmax} define the maximum value for the adaptive timestep 
during a {fire2} minimization. It is multiplication factor applied 
to the current "timestep"_timestep.html (not in time unit). For example, 
{tmax} = 4.0 in metal "units"_units.html means that the maximum value
the timestep can reach during a minimization is 4fs (with the default
"timestep"_timestep.html value). Note that parameters defaults has been 
chosen to be reliable in most cases, but one should consider adjusting 
"timestep"_timestep.html and {tmax} to optimize the minimization for large 
or complex systems.
Others parameters of the {fire2} minimization can be tuned ({tmin}, {delaystep},
{dtgrow}, {dtshrink}, {alpha0}, and {alphashrink}). Please refer to the article
describing the {fire2} "min_style"_min_style.html.

An additional stopping criteria {vdfmax} is added in order to avoid unnecessary looping
when it is reasonable to think the system will not be relaxed further.
Note that in this case the system will NOT be relaxed. This could
happen when the system comes to be stuck in a local basin of the phase space. 
{vdfmax} is the maximum number of consecutive iterations with P(t) < 0. 
For debugging purposes, it is possible to switch off the inertia correction 
({halfstepback} = {no}) and the initial delay ({initialdelay} = {no}).

[Restrictions:] 

For magnetic GNEB calculations, only {spin_none} value for {line} keyword can be used
when styles {spin/cg} and {spin/lbfgs} are employed.
See "neb/spin"_neb_spin.html for more explanation.

[Related commands:]

"min_style"_min_style.html, "minimize"_minimize.html

[Default:]

The option defaults are dmax = 0.1, line = quadratic and norm = two.

For the {spin}, {spin/cg} and {spin/lbfgs} styles, the
option defaults are alpha_damp = 1.0, discrete_factor = 10.0,
line = spin_none, and norm = euclidean.

For the {fire2} style, the option defaults are 
integrator = eulerimplicit, tmax = 10.0, tmin = 0.02,
delaystep = 20, dtgrow = 1.1, dtshrink = 0.5, alpha0 = 0.25, alphashrink = 0.99,
vdfmax = 2000, halfstepback = yes and initialdelay = yes.
 No newline at end of file

doc/txt/min_style.txt

deleted100644 → 0
+0 −146
Original line number Diff line number Diff line
"LAMMPS WWW Page"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line

min_style command :h3

[Syntax:]

min_style style :pre

style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {fire2} or {spin} or {spin/cg} or {spin/lbfgs} :ul

[Examples:]

min_style cg
min_style spin
min_style fire :pre

[Description:]

Choose a minimization algorithm to use when a "minimize"_minimize.html
command is performed.

Style {cg} is the Polak-Ribiere version of the conjugate gradient (CG)
algorithm.  At each iteration the force gradient is combined with the
previous iteration information to compute a new search direction
perpendicular (conjugate) to the previous search direction.  The PR
variant affects how the direction is chosen and how the CG method is
restarted when it ceases to make progress.  The PR variant is thought
to be the most effective CG choice for most problems.

Style {hftn} is a Hessian-free truncated Newton algorithm.  At each
iteration a quadratic model of the energy potential is solved by a
conjugate gradient inner iteration.  The Hessian (second derivatives)
of the energy is not formed directly, but approximated in each
conjugate search direction by a finite difference directional
derivative.  When close to an energy minimum, the algorithm behaves
like a Newton method and exhibits a quadratic convergence rate to high
accuracy.  In most cases the behavior of {hftn} is similar to {cg},
but it offers an alternative if {cg} seems to perform poorly.  This
style is not affected by the "min_modify"_min_modify.html command.

Style {sd} is a steepest descent algorithm.  At each iteration, the
search direction is set to the downhill direction corresponding to the
force vector (negative gradient of energy).  Typically, steepest
descent will not converge as quickly as CG, but may be more robust in
some situations.

Style {quickmin} is a damped dynamics method described in
"(Sheppard)"_#Sheppard, where the damping parameter is related to the
projection of the velocity vector along the current force vector for
each atom.  The velocity of each atom is initialized to 0.0 by this
style, at the beginning of a minimization.

Style {fire} is a damped dynamics method described in
"(Bitzek)"_#Bitzek, which is similar to {quickmin} but adds a variable
timestep and alters the projection operation to maintain components of
the velocity non-parallel to the current force vector.  The velocity
of each atom is initialized to 0.0 by this style, at the beginning of
a minimization.

Style {fire2} is an optimization of the style {fire}, including different
time integration schemes, described in "(Guenole)"_#Guenole.

Style {spin} is a damped spin dynamics with an adaptive
timestep.

Style {spin/cg} uses an orthogonal spin optimization (OSO)
combined to a conjugate gradient (CG) approach to minimize spin
configurations. 

Style {spin/lbfgs} uses an orthogonal spin optimization (OSO)
combined to a limited-memory Broyden-Fletcher-Goldfarb-Shanno
(LBFGS) approach to minimize spin configurations. 

See the "min/spin"_min_spin.html doc page for more information
about the {spin}, {spin/cg} and {spin/lbfgs} styles.

Either the {quickmin}, {fire} and {fire2} styles are useful in the context of
nudged elastic band (NEB) calculations via the "neb"_neb.html command.

Either the {spin}, {spin/cg} and {spin/lbfgs} styles are useful 
in the context of magnetic geodesic nudged elastic band (GNEB) calculations 
via the "neb/spin"_neb_spin.html command.

NOTE: The damped dynamic minimizers use whatever timestep you have
defined via the "timestep"_timestep.html command.  Often they will
converge more quickly if you use a timestep about 10x larger than you
would normally use for dynamics simulations.

NOTE: The {quickmin}, {fire}, {hftn}, and {cg/kk} styles do not yet
support the use of the "fix box/relax"_fix_box_relax.html command or
minimizations involving the electron radius in "eFF"_pair_eff.html
models.

:line

Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed on the "Speed packages"_Speed_packages.html doc
page.  The accelerated styles take the same arguments and should
produce the same results, except for round-off and precision issues.

These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively.  They are only enabled if
LAMMPS was built with those packages.  See the "Build
package"_Build_package.html doc page for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Run_options.html when you invoke LAMMPS, or you can use the
"suffix"_suffix.html command in your input script.

See the "Speed packages"_Speed_packages.html doc page for more
instructions on how to use the accelerated styles effectively.

:line

[Restrictions:] none

[Related commands:]

"min_modify"_min_modify.html, "minimize"_minimize.html, "neb"_neb.html

[Default:]

min_style cg :pre

:line

:link(Sheppard)
[(Sheppard)] Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106
(2008).  See ref 1 in this paper for original reference to Qmin in
Jonsson, Mills, Jacobsen.

:link(Bitzek)
[(Bitzek)] Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett,
97, 170201 (2006).

:link(Guenole)
[(Guenole)] Guenole, Nöhring, Vaid, Houllé, Xie, Prakash, Bitzek,
Preprint, arXiv:190802038 (2019).
Loading