forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1744 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
b1181dd900
commit
4009d36882
|
@ -160,7 +160,7 @@ the x-axis in the simulation box will be the [210] lattice
|
|||
direction. The 3 lattice directions you specify must be mutually
|
||||
orthogonal and obey the right-hand rule, i.e. (X cross Y) points in
|
||||
the Z direction. Note that this description is really only valid for
|
||||
orthogonal lattices. if you are using the more general lattice style
|
||||
orthogonal lattices. If you are using the more general lattice style
|
||||
<I>custom</I> with non-orthogonal a1,a2,a3 vectors, then think of the 3
|
||||
<I>orient</I> options as creating a 3x3 rotation matrix which is applied to
|
||||
a1,a2,a3 to rotate the original unit cell to a new orientation in the
|
||||
|
@ -185,7 +185,7 @@ lattices.
|
|||
<P>If the <I>spacing</I> option is not specified, the lattice spacings are
|
||||
computed by LAMMPS in the following way. A unit cell of the lattice
|
||||
is mapped into the simulation box (scaled, shifted, rotated), so that
|
||||
it now has (perhaps) a modified shape and orientation. The lattice
|
||||
it now has (perhaps) a modified size and orientation. The lattice
|
||||
spacing in X is defined as the difference between the min/max extent
|
||||
of the x coordinates of the 8 corner points of the modified unit cell.
|
||||
Similarly, the Y and Z lattice spacings are defined as the difference
|
||||
|
@ -237,7 +237,7 @@ then generate an error. No additional arguments need be used with
|
|||
<PRE>lattice none
|
||||
</PRE>
|
||||
<P>For other lattice styles, the option defaults are origin = 0.0 0.0
|
||||
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1.0
|
||||
0.0 0.0, a2 = 0.0 1.0 0.0, and a3 = 0.0 0.0 1.0.
|
||||
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1 0 0,
|
||||
a2 = 0 1 0, and a3 = 0 0 1.
|
||||
</P>
|
||||
</HTML>
|
||||
|
|
|
@ -152,7 +152,7 @@ the x-axis in the simulation box will be the \[210\] lattice
|
|||
direction. The 3 lattice directions you specify must be mutually
|
||||
orthogonal and obey the right-hand rule, i.e. (X cross Y) points in
|
||||
the Z direction. Note that this description is really only valid for
|
||||
orthogonal lattices. if you are using the more general lattice style
|
||||
orthogonal lattices. If you are using the more general lattice style
|
||||
{custom} with non-orthogonal a1,a2,a3 vectors, then think of the 3
|
||||
{orient} options as creating a 3x3 rotation matrix which is applied to
|
||||
a1,a2,a3 to rotate the original unit cell to a new orientation in the
|
||||
|
@ -177,7 +177,7 @@ lattices.
|
|||
If the {spacing} option is not specified, the lattice spacings are
|
||||
computed by LAMMPS in the following way. A unit cell of the lattice
|
||||
is mapped into the simulation box (scaled, shifted, rotated), so that
|
||||
it now has (perhaps) a modified shape and orientation. The lattice
|
||||
it now has (perhaps) a modified size and orientation. The lattice
|
||||
spacing in X is defined as the difference between the min/max extent
|
||||
of the x coordinates of the 8 corner points of the modified unit cell.
|
||||
Similarly, the Y and Z lattice spacings are defined as the difference
|
||||
|
@ -229,5 +229,5 @@ The {a1,a2,a3,basis} keywords can only be used with style {custom}.
|
|||
lattice none :pre
|
||||
|
||||
For other lattice styles, the option defaults are origin = 0.0 0.0
|
||||
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1.0
|
||||
0.0 0.0, a2 = 0.0 1.0 0.0, and a3 = 0.0 0.0 1.0.
|
||||
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1 0 0,
|
||||
a2 = 0 1 0, and a3 = 0 0 1.
|
||||
|
|
|
@ -17,48 +17,32 @@
|
|||
</PRE>
|
||||
<UL><LI>one or more keyword/value pairs may be listed
|
||||
|
||||
<PRE>keyword = <I>linestyle</I> or <I>dmin</I> or <I>dmax</I> or <I>lineiter</I>
|
||||
<I>linestyle</I> value = <I>secant</I> or <I>scan</I>
|
||||
<I>dmin</I> value = min
|
||||
min = minimum distance for line search to move (distance units)
|
||||
keyword = <I>dmax</I>
|
||||
<I>dmax</I> value = max
|
||||
max = maximum distance for line search to move (distance units)
|
||||
<I>lineiter</I> value = N
|
||||
N = max number of iterations in a line search
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>min_modify linestyle scan dmin 0.001 dmax 0.2
|
||||
min_modify lineiter 5
|
||||
<PRE>min_modify dmax 0.2
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>This command sets parameters that affect the minimization algorithms.
|
||||
The various settings may effect the convergence rate and overall
|
||||
number of force evaluations required by a minimization, so users can
|
||||
experiment with these parameters to tune their minimizations.
|
||||
<P>This command sets parameters that affect the energy minimization
|
||||
algorithms. The various settings may effect the convergence rate and
|
||||
overall number of force evaluations required by a minimization, so
|
||||
users can experiment with these parameters to tune their
|
||||
minimizations.
|
||||
</P>
|
||||
<P>The <I>linestyle</I> sets the algorithm used for 1d line searches at each
|
||||
outer iteration of the minimizer. The <I>secant</I> style uses two
|
||||
successive force/energy evaluations to create a parabola and pick its
|
||||
minimum as an estimate of the next iteration's 1d minimum. The <I>scan</I>
|
||||
style starts its 1d search at <I>dmin</I> and doubles the distance along
|
||||
the line at which the energy is computed until the minimum is passed.
|
||||
It continues only as far as <I>dmax</I>. Normally, the <I>secant</I> method
|
||||
should find more accurate 1d minimums in less iterations, but the
|
||||
<I>scan</I> method can be more robust.
|
||||
</P>
|
||||
<P>The <I>dmin</I> and <I>dmax</I> settings are both used by the <I>scan</I> line search
|
||||
as described above. For the <I>secant</I> line search, only the <I>dmin</I>
|
||||
value is used to pick an initial point to begin the secant
|
||||
approximation.
|
||||
</P>
|
||||
<P>The <I>lineiter</I> setting is used by the <I>secant</I> algorithm to limit its
|
||||
iterations. The smaller the setting, the more inaccurate the line
|
||||
search becomes. Nonlinear conjugate gradient is not thought to
|
||||
require high-accuracy line searches in order to converge efficiently.
|
||||
<P>The minimization algorithms have an outer iteration (conjugate
|
||||
gradient or steepest descent) and an inner iteration which is steps
|
||||
along a one-dimensional line search in a particular search direction.
|
||||
The <I>dmax</I> parameter is how far any atom can move in a single line
|
||||
search in any dimension (x, y, or z). Thus a value of 0.1 in real
|
||||
distance units means no atom will move further than 0.1 Angstroms in a
|
||||
single outer iteration. This is typically set to avoid the
|
||||
possibility than one atom will be moved through another due to strong
|
||||
overlapping forces.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
|
@ -68,7 +52,6 @@ require high-accuracy line searches in order to converge efficiently.
|
|||
</P>
|
||||
<P><B>Default:</B>
|
||||
</P>
|
||||
<P>The option defaults are linestyle = secant, dmin = 1.0e-5, dmax = 0.1,
|
||||
and lineiter = 10.
|
||||
<P>The option defaults are dmax = 0.1.
|
||||
</P>
|
||||
</HTML>
|
||||
|
|
|
@ -13,47 +13,32 @@ min_modify command :h3
|
|||
min_modify keyword values ... :pre
|
||||
|
||||
one or more keyword/value pairs may be listed :ulb,l
|
||||
keyword = {linestyle} or {dmin} or {dmax} or {lineiter}
|
||||
{linestyle} value = {secant} or {scan}
|
||||
{dmin} value = min
|
||||
min = minimum distance for line search to move (distance units)
|
||||
keyword = {dmax}
|
||||
{dmax} value = max
|
||||
max = maximum distance for line search to move (distance units)
|
||||
{lineiter} value = N
|
||||
N = max number of iterations in a line search :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
min_modify linestyle scan dmin 0.001 dmax 0.2
|
||||
min_modify lineiter 5 :pre
|
||||
min_modify dmax 0.2 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
This command sets parameters that affect the minimization algorithms.
|
||||
The various settings may effect the convergence rate and overall
|
||||
number of force evaluations required by a minimization, so users can
|
||||
experiment with these parameters to tune their minimizations.
|
||||
This command sets parameters that affect the energy minimization
|
||||
algorithms. The various settings may effect 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 {linestyle} sets the algorithm used for 1d line searches at each
|
||||
outer iteration of the minimizer. The {secant} style uses two
|
||||
successive force/energy evaluations to create a parabola and pick its
|
||||
minimum as an estimate of the next iteration's 1d minimum. The {scan}
|
||||
style starts its 1d search at {dmin} and doubles the distance along
|
||||
the line at which the energy is computed until the minimum is passed.
|
||||
It continues only as far as {dmax}. Normally, the {secant} method
|
||||
should find more accurate 1d minimums in less iterations, but the
|
||||
{scan} method can be more robust.
|
||||
|
||||
The {dmin} and {dmax} settings are both used by the {scan} line search
|
||||
as described above. For the {secant} line search, only the {dmin}
|
||||
value is used to pick an initial point to begin the secant
|
||||
approximation.
|
||||
|
||||
The {lineiter} setting is used by the {secant} algorithm to limit its
|
||||
iterations. The smaller the setting, the more inaccurate the line
|
||||
search becomes. Nonlinear conjugate gradient is not thought to
|
||||
require high-accuracy line searches in order to converge efficiently.
|
||||
The minimization algorithms have an outer iteration (conjugate
|
||||
gradient or steepest descent) 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). Thus a value of 0.1 in real
|
||||
distance units means no atom will move further than 0.1 Angstroms in a
|
||||
single outer iteration. This is typically set to avoid the
|
||||
possibility than one atom will be moved through another due to strong
|
||||
overlapping forces.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
|
@ -63,5 +48,4 @@ require high-accuracy line searches in order to converge efficiently.
|
|||
|
||||
[Default:]
|
||||
|
||||
The option defaults are linestyle = secant, dmin = 1.0e-5, dmax = 0.1,
|
||||
and lineiter = 10.
|
||||
The option defaults are dmax = 0.1.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</P>
|
||||
<PRE>min_style style
|
||||
</PRE>
|
||||
<UL><LI>style = <I>cg</I> or <I>cg/fr</I> or <I>sd</I>
|
||||
<UL><LI>style = <I>cg</I> or <I>sd</I>
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
|
@ -27,22 +27,19 @@ min_style sd
|
|||
<P>Choose a minimization algorithm to use when a <A HREF = "minimize.html">minimize</A>
|
||||
command is performed.
|
||||
</P>
|
||||
<P>Style <I>cg</I> is the Polak-Ribiere (PR) 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 previous search directions. The PR
|
||||
<P>Style <I>cg</I> 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.
|
||||
</P>
|
||||
<P>Style <I>cg/fr</I> is the Fletcher-Reeves version of the conjugate gradient
|
||||
algorithm.
|
||||
</P>
|
||||
<P>Style <I>sd</I> is a steepest descent algorithm. At each iteration, the
|
||||
downhill direction corresponding to the force vector (negative
|
||||
gradient of energy) is searched along by a 1d line search. Typically,
|
||||
steepest descent will not converge as quickly as CG, but may be more
|
||||
robust in some situations.
|
||||
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.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
|
|
|
@ -11,7 +11,7 @@ min_style command :h3
|
|||
|
||||
min_style style :pre
|
||||
|
||||
style = {cg} or {cg/fr} or {sd} :ul
|
||||
style = {cg} or {sd} :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
|
@ -23,22 +23,19 @@ min_style sd :pre
|
|||
Choose a minimization algorithm to use when a "minimize"_minimize.html
|
||||
command is performed.
|
||||
|
||||
Style {cg} is the Polak-Ribiere (PR) 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 previous search directions. The PR
|
||||
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.
|
||||
|
||||
Style {cg/fr} is the Fletcher-Reeves version of the conjugate gradient
|
||||
algorithm.
|
||||
|
||||
Style {sd} is a steepest descent algorithm. At each iteration, the
|
||||
downhill direction corresponding to the force vector (negative
|
||||
gradient of energy) is searched along by a 1d line search. Typically,
|
||||
steepest descent will not converge as quickly as CG, but may be more
|
||||
robust in some situations.
|
||||
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.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
|
|
|
@ -13,26 +13,30 @@
|
|||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>minimize tolerance maxiter maxeval
|
||||
<PRE>minimize etol ftol maxiter maxeval
|
||||
</PRE>
|
||||
<UL><LI>tolerance = stopping tolerance
|
||||
<UL><LI>etol = stopping tolerance for energy (unitless)
|
||||
<LI>ftol = stopping tolerance for force (force units)
|
||||
<LI>maxiter = max iterations of minimizer
|
||||
<LI>maxeval = max number of total force/energy evaluations
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>minimize 1.0e-4 100 1000
|
||||
<PRE>minimize 1.0e-4 1.0e-6 100 1000
|
||||
minimize 0.0 1.0e-8 1000 100000
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Perform an energy minimization of the system, by adjusting each atom's
|
||||
atomic coordinates. The algorithm used is set by the
|
||||
<A HREF = "min_style.html">min_style</A> command. Minimize commands can be
|
||||
atomic coordinates iteratively until convergence to a low-energy
|
||||
minimum is achieved. The algorithm used is set by the
|
||||
<A HREF = "min_style.html">min_style</A> command. Other options are set by the
|
||||
<A HREF = "min_modify.html">min_modify</A> command. Minimize commands can be
|
||||
interspersed with <A HREF = "run.html">run</A> commands to alternate between
|
||||
relaxation and dynamics. The minimizers are implemented in a robust
|
||||
fashion that should allow for systems with highly overlapped atoms
|
||||
(large energies and forces) to still be minimized by pushing the atoms
|
||||
off of each other.
|
||||
(large energies and forces) to be minimized by pushing the atoms off
|
||||
of each other.
|
||||
</P>
|
||||
<P>Alternate means of relaxing a system are to run dynamics with a small
|
||||
or <A HREF = "fix_nve_limit.html">limited timestep</A>. Or dynamics can be run
|
||||
|
@ -41,35 +45,113 @@ slowly drains all kinetic energy from the system. The <A HREF = "pair_soft.html
|
|||
soft</A> potential can be used to un-overlap atoms while
|
||||
running dynamics.
|
||||
</P>
|
||||
<P>Following the minimization a statistical summary is printed that
|
||||
includes the energy change and convergence criteria information.
|
||||
</P>
|
||||
<P>A minimization involves an outer iteration loop which sets the search
|
||||
direction along which coordinates are changed. An inner iteration is
|
||||
then performed using a line search algorithm. The line search
|
||||
typically evaluates forces and energies several times to set new
|
||||
coordinates. The minimization stops if any of several criteria are
|
||||
met:
|
||||
direction along which atom coordinates are changed. An inner
|
||||
iteration is then performed using a line search algorithm. The line
|
||||
search typically evaluates forces and energies several times to set
|
||||
new coordinates. Currently, a backtracking algorithm is used which
|
||||
may not be optimal in terms of the number of force evaulations
|
||||
performed, but appears to 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).
|
||||
</P>
|
||||
<UL><LI>the change in energy between outer iterations is less than the tolerance
|
||||
<LI>the number of outer iterations exceeds maxiter
|
||||
<LI>the number of force evaluations exceeds maxeval
|
||||
<LI>the 3N dimensional force vector goes (nearly) to zero
|
||||
<P>Note that these algorithms only find a local energy minimum from a
|
||||
given starting point (configuration of atoms). There is no guarantee
|
||||
of finding a global energy minimum.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>The minimization procedure stops if any of several criteria are met:
|
||||
</P>
|
||||
<UL><LI>the change in energy between outer iterations is less than <I>etol</I>
|
||||
<LI>the 2-norm (length) of the global force vector is less than the <I>ftol</I>
|
||||
<LI>the line search fails because the step distance backtracks to 0.0
|
||||
<LI>the number of outer iterations exceeds <I>maxiter</I>
|
||||
<LI>the number of total force evaluations exceeds <I>maxeval</I>
|
||||
</UL>
|
||||
<P>For the first criterion, the specified tolerance is unitless; it is
|
||||
met when the ratio of the energy delta to the energy magnitude is
|
||||
equal to the tolerance (e.g. one part in 10^4 in the example above).
|
||||
<P>For the first criterion, the specified energy tolerance <I>etol</I> is
|
||||
unitless; it is met when the energy change between successive
|
||||
iterations divided by the energy magnitude is less than or equal to
|
||||
the tolerance. For example, a setting of 1.0e-4 for <I>etol</I> means an
|
||||
energy tolerance of one part in 10^4.
|
||||
</P>
|
||||
<P>For the second criterion, the specified force tolerance <I>ftol</I> is in
|
||||
force units, since it is the length of the global force vector for all
|
||||
atoms, e.g. a vector of size 3N for N atoms. Since many of the
|
||||
components will be near zero after minimization, you can think of
|
||||
<I>ftol</I> as an upper bound on the final force on any component of any
|
||||
atom. For example, a setting of 1.0e-4 for <I>ftol</I> means no x, y, or z
|
||||
component of force on any atom will be larger than 1.0e-4 (in force
|
||||
units) after minimization.
|
||||
</P>
|
||||
<P>Either or both of the <I>etol</I> and <I>ftol</I> values can be set to 0.0, in
|
||||
which case some other criterion will terminate the minimization.
|
||||
</P>
|
||||
<P>During a minimization, the outer iteration count is treated as a
|
||||
timestep. Output is triggered by this timestep, e.g. thermodynamic
|
||||
output or dump and restart files.
|
||||
</P>
|
||||
<P>For optimal convergence, a <A HREF = "pair_style.html">pair style</A> that goes
|
||||
smoothly to 0.0 at the cutoff distance for both energy and force
|
||||
should typically be used though this is not required. Examples
|
||||
include <I>pair/lj/charmm/coul/charmm</I> and <I>pair/lj/charmm/coul/long</I>.
|
||||
If a <I>soft</I> potential is used the Astop value is used for the
|
||||
prefactor (no time dependence).
|
||||
<P>Following minimization, a statistical summary is printed that lists
|
||||
which convergence criterion caused the minimizer to stop, as well as
|
||||
information about the energy, force, final line search, and and
|
||||
iteration counts. An example is as follows:
|
||||
</P>
|
||||
<PRE>Minimization stats:
|
||||
Stopping criterion = max iterations
|
||||
Energy initial, next-to-last, final =
|
||||
-0.626828169302 -2.82642039062 -2.82643549739
|
||||
Force two-norm initial, final = 2052.1 91.9642
|
||||
Force max component initial, final = 346.048 9.78056
|
||||
Final line search alpha, max atom move = 2.23899e-06 2.18986e-05
|
||||
Iterations, force evaluations = 2000 12724
|
||||
</PRE>
|
||||
<P>The 3 energy values are for before and after the minimization and on
|
||||
the next-to-last iteration. This is what the <I>etol</I> parameter checks.
|
||||
</P>
|
||||
<P>The two-norm force values are the length of the global force vector
|
||||
before and after minimization. This is what the <I>ftol</I> parameter
|
||||
checks.
|
||||
</P>
|
||||
<P>The max-component force values are the absolute value of the largest
|
||||
component (x,y,z) in the global force vector.
|
||||
</P>
|
||||
<P>The alpha parameter for the line-search, when multiplied by the max
|
||||
force component (on the last iteration), gives the max distance any
|
||||
atom moved during the last iteration. Alpha will be 0.0 if the line
|
||||
search could not reduce the energy. Even if alpha is non-zero, if the
|
||||
"max atom move" distance is tiny compared to typical atom coordinates,
|
||||
then it is possible the last iteration effectively caused no atom
|
||||
movement and thus the evaluated energy did not change and the
|
||||
minimizer terminated. Said another way, even with non-zero forces,
|
||||
it's possible the effect of those forces is to move atoms a distance
|
||||
less than machine precision, so that the energy cannot be further
|
||||
reduced.
|
||||
</P>
|
||||
<P>The iterations and force evaluation values are what is checked by the
|
||||
<I>maxiter</I> and <I>maxeval</I> parameters.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>IMPORTANT NOTE: It is HIGHLY RECOMMENDED that you use a <A HREF = "pair_style.html">pair
|
||||
style</A> that goes to 0.0 at the cutoff distance when
|
||||
performing minimization (even if you later change it when running
|
||||
dynamics). If this is not done, the total energy of the system will
|
||||
have discontinuities when the relative distance between any pair of
|
||||
atoms changes from cutoff+epsilon to cutoff-epsilon and the minimizer
|
||||
may behave poorly.
|
||||
</P>
|
||||
<P>Note that a cutoff Lennard-Jones potential (and others) can be shifted
|
||||
so that its energy is 0.0 at the cutoff via the
|
||||
<A HREF = "pair_modify">pair_modify</A> command. See the doc pages for inidividual
|
||||
<A HREF = "pair_style.html">pair styles</A> for details. Note that Coulombic
|
||||
potentials always have a cutoff, unless versions with a long-range
|
||||
component are used (e.g. <A HREF = "pair_lj.html">pair_style lj/cut/coul/long</A>).
|
||||
The CHARMM potentials go to 0.0 at the cutoff (e.g. <A HREF = "pair_charmm.html</I>">pair_style
|
||||
lj/charmm/coul/charmm</A>, as do the GROMACS potentials
|
||||
(e.g. <A HREF = "pair_gromacs.html</I>">pair_style lj/gromacs</A>.
|
||||
</P>
|
||||
<P>If a soft potential (<A HREF = "pair_soft.html">pair_style soft</A>) is used the
|
||||
Astop value is used for the prefactor (no time dependence).
|
||||
</P>
|
||||
<P>Only some fixes (typically those that apply force constraints) are
|
||||
invoked during minimization. See the doc pages for individual
|
||||
|
@ -82,6 +164,8 @@ you MUST enable the <A HREF = "fix_modify.html">fix_modify</A> <I>energy</I> opt
|
|||
that fix. The doc pages for individual <A HREF = "fix.html">fix</A> commands
|
||||
specify if this should be done.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>Features that are not yet implemented are listed here, in case someone
|
||||
|
|
140
doc/minimize.txt
140
doc/minimize.txt
|
@ -10,26 +10,30 @@ minimize command :h3
|
|||
|
||||
[Syntax:]
|
||||
|
||||
minimize tolerance maxiter maxeval :pre
|
||||
minimize etol ftol maxiter maxeval :pre
|
||||
|
||||
tolerance = stopping tolerance
|
||||
etol = stopping tolerance for energy (unitless)
|
||||
ftol = stopping tolerance for force (force units)
|
||||
maxiter = max iterations of minimizer
|
||||
maxeval = max number of total force/energy evaluations :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
minimize 1.0e-4 100 1000 :pre
|
||||
minimize 1.0e-4 1.0e-6 100 1000
|
||||
minimize 0.0 1.0e-8 1000 100000 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Perform an energy minimization of the system, by adjusting each atom's
|
||||
atomic coordinates. The algorithm used is set by the
|
||||
"min_style"_min_style.html command. Minimize commands can be
|
||||
atomic coordinates iteratively until convergence to a low-energy
|
||||
minimum is achieved. The algorithm used is set by the
|
||||
"min_style"_min_style.html command. Other options are set by the
|
||||
"min_modify"_min_modify.html command. Minimize commands can be
|
||||
interspersed with "run"_run.html commands to alternate between
|
||||
relaxation and dynamics. The minimizers are implemented in a robust
|
||||
fashion that should allow for systems with highly overlapped atoms
|
||||
(large energies and forces) to still be minimized by pushing the atoms
|
||||
off of each other.
|
||||
(large energies and forces) to be minimized by pushing the atoms off
|
||||
of each other.
|
||||
|
||||
Alternate means of relaxing a system are to run dynamics with a small
|
||||
or "limited timestep"_fix_nve_limit.html. Or dynamics can be run
|
||||
|
@ -38,35 +42,113 @@ slowly drains all kinetic energy from the system. The "pair_style
|
|||
soft"_pair_soft.html potential can be used to un-overlap atoms while
|
||||
running dynamics.
|
||||
|
||||
Following the minimization a statistical summary is printed that
|
||||
includes the energy change and convergence criteria information.
|
||||
|
||||
A minimization involves an outer iteration loop which sets the search
|
||||
direction along which coordinates are changed. An inner iteration is
|
||||
then performed using a line search algorithm. The line search
|
||||
typically evaluates forces and energies several times to set new
|
||||
coordinates. The minimization stops if any of several criteria are
|
||||
met:
|
||||
direction along which atom coordinates are changed. An inner
|
||||
iteration is then performed using a line search algorithm. The line
|
||||
search typically evaluates forces and energies several times to set
|
||||
new coordinates. Currently, a backtracking algorithm is used which
|
||||
may not be optimal in terms of the number of force evaulations
|
||||
performed, but appears to 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 change in energy between outer iterations is less than the tolerance
|
||||
the number of outer iterations exceeds maxiter
|
||||
the number of force evaluations exceeds maxeval
|
||||
the 3N dimensional force vector goes (nearly) to zero :ul
|
||||
Note that these algorithms only find a local energy minimum from a
|
||||
given starting point (configuration of atoms). There is no guarantee
|
||||
of finding a global energy minimum.
|
||||
|
||||
For the first criterion, the specified tolerance is unitless; it is
|
||||
met when the ratio of the energy delta to the energy magnitude is
|
||||
equal to the tolerance (e.g. one part in 10^4 in the example above).
|
||||
:line
|
||||
|
||||
The minimization procedure stops if any of several criteria are met:
|
||||
|
||||
the change in energy between outer iterations is less than {etol}
|
||||
the 2-norm (length) of the global force vector is less than the {ftol}
|
||||
the line search fails because the step distance backtracks to 0.0
|
||||
the number of outer iterations exceeds {maxiter}
|
||||
the number of total force evaluations exceeds {maxeval} :ul
|
||||
|
||||
For the first criterion, the specified energy tolerance {etol} is
|
||||
unitless; it is met when the energy change between successive
|
||||
iterations divided by the energy magnitude is less than or equal to
|
||||
the tolerance. For example, a setting of 1.0e-4 for {etol} means an
|
||||
energy tolerance of one part in 10^4.
|
||||
|
||||
For the second criterion, the specified force tolerance {ftol} is in
|
||||
force units, since it is the length of the global force vector for all
|
||||
atoms, e.g. a vector of size 3N for N atoms. Since many of the
|
||||
components will be near zero after minimization, you can think of
|
||||
{ftol} as an upper bound on the final force on any component of any
|
||||
atom. For example, a setting of 1.0e-4 for {ftol} means no x, y, or z
|
||||
component of force on any atom will be larger than 1.0e-4 (in force
|
||||
units) after minimization.
|
||||
|
||||
Either or both of the {etol} and {ftol} values can be set to 0.0, in
|
||||
which case some other criterion will terminate the minimization.
|
||||
|
||||
During a minimization, the outer iteration count is treated as a
|
||||
timestep. Output is triggered by this timestep, e.g. thermodynamic
|
||||
output or dump and restart files.
|
||||
|
||||
For optimal convergence, a "pair style"_pair_style.html that goes
|
||||
smoothly to 0.0 at the cutoff distance for both energy and force
|
||||
should typically be used though this is not required. Examples
|
||||
include {pair/lj/charmm/coul/charmm} and {pair/lj/charmm/coul/long}.
|
||||
If a {soft} potential is used the Astop value is used for the
|
||||
prefactor (no time dependence).
|
||||
Following minimization, a statistical summary is printed that lists
|
||||
which convergence criterion caused the minimizer to stop, as well as
|
||||
information about the energy, force, final line search, and and
|
||||
iteration counts. An example is as follows:
|
||||
|
||||
Minimization stats:
|
||||
Stopping criterion = max iterations
|
||||
Energy initial, next-to-last, final =
|
||||
-0.626828169302 -2.82642039062 -2.82643549739
|
||||
Force two-norm initial, final = 2052.1 91.9642
|
||||
Force max component initial, final = 346.048 9.78056
|
||||
Final line search alpha, max atom move = 2.23899e-06 2.18986e-05
|
||||
Iterations, force evaluations = 2000 12724 :pre
|
||||
|
||||
The 3 energy values are for before and after the minimization and on
|
||||
the next-to-last iteration. This is what the {etol} parameter checks.
|
||||
|
||||
The two-norm force values are the length of the global force vector
|
||||
before and after minimization. This is what the {ftol} parameter
|
||||
checks.
|
||||
|
||||
The max-component force values are the absolute value of the largest
|
||||
component (x,y,z) in the global force vector.
|
||||
|
||||
The alpha parameter for the line-search, when multiplied by the max
|
||||
force component (on the last iteration), gives the max distance any
|
||||
atom moved during the last iteration. Alpha will be 0.0 if the line
|
||||
search could not reduce the energy. Even if alpha is non-zero, if the
|
||||
"max atom move" distance is tiny compared to typical atom coordinates,
|
||||
then it is possible the last iteration effectively caused no atom
|
||||
movement and thus the evaluated energy did not change and the
|
||||
minimizer terminated. Said another way, even with non-zero forces,
|
||||
it's possible the effect of those forces is to move atoms a distance
|
||||
less than machine precision, so that the energy cannot be further
|
||||
reduced.
|
||||
|
||||
The iterations and force evaluation values are what is checked by the
|
||||
{maxiter} and {maxeval} parameters.
|
||||
|
||||
:line
|
||||
|
||||
IMPORTANT NOTE: It is HIGHLY RECOMMENDED that you use a "pair
|
||||
style"_pair_style.html that goes to 0.0 at the cutoff distance when
|
||||
performing minimization (even if you later change it when running
|
||||
dynamics). If this is not done, the total energy of the system will
|
||||
have discontinuities when the relative distance between any pair of
|
||||
atoms changes from cutoff+epsilon to cutoff-epsilon and the minimizer
|
||||
may behave poorly.
|
||||
|
||||
Note that a cutoff Lennard-Jones potential (and others) can be shifted
|
||||
so that its energy is 0.0 at the cutoff via the
|
||||
"pair_modify"_pair_modify command. See the doc pages for inidividual
|
||||
"pair styles"_pair_style.html for details. Note that Coulombic
|
||||
potentials always have a cutoff, unless versions with a long-range
|
||||
component are used (e.g. "pair_style lj/cut/coul/long"_pair_lj.html).
|
||||
The CHARMM potentials go to 0.0 at the cutoff (e.g. "pair_style
|
||||
lj/charmm/coul/charmm"_pair_charmm.html}, as do the GROMACS potentials
|
||||
(e.g. "pair_style lj/gromacs"_pair_gromacs.html}.
|
||||
|
||||
If a soft potential ("pair_style soft"_pair_soft.html) is used the
|
||||
Astop value is used for the prefactor (no time dependence).
|
||||
|
||||
Only some fixes (typically those that apply force constraints) are
|
||||
invoked during minimization. See the doc pages for individual
|
||||
|
@ -79,6 +161,8 @@ you MUST enable the "fix_modify"_fix_modify.html {energy} option for
|
|||
that fix. The doc pages for individual "fix"_fix.html commands
|
||||
specify if this should be done.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
Features that are not yet implemented are listed here, in case someone
|
||||
|
|
Loading…
Reference in New Issue