Commit 9c9f6933 authored by Julien Guénolé's avatar Julien Guénolé
Browse files

final cleanup? min_modify options, quick documentation

parent 7d1a76f6
Loading
Loading
Loading
Loading
+19 −3
Changes for doc/src/min_modify.txt: 19 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -13,11 +13,19 @@ min_modify command :h3
min_modify keyword values ... :pre

one or more keyword/value pairs may be listed :ulb,l
keyword = {dmax} or {line}
keyword = {dmax} or {line} or {delaystep} or {dt_grow} or {dt_shrink}
          or {alpha0} or {alpha_shrink} or {tmax} or {tmin}
  {dmax} value = max
    max = maximum distance for line search to move (distance units)
  {line} value = {backtrack} or {quadratic} or {forcezero}
    backtrack,quadratic,forcezero = style of linesearch to use :pre
    backtrack,quadratic,forcezero = style of linesearch to use
  {delaystep} value = {int} for adaptglok
  {dt_grow} value = {float}  for adaptglok
  {dt_shrink} value = {float}  for adaptglok
  {alpha0} value = {float}  for adaptglok
  {alpha_shrink} value = {float}  for adaptglok
  {tmax} value = {float}  for adaptglok
  {tmin} value = {float}  for adaptglok :pre
:ule

[Examples:]
@@ -65,6 +73,12 @@ 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 style {adaptglok} has several parameters that can be tuned in order
to optimize the relaxation: {delaystep}, {dt_grow}, {dt_shrink}, 
{alpha0}, {alpha_shrink}, {tmax} and {tmin}. The default values have 
been chosen to be reliable in most cases, but one could be willing 
to adapt them for particular cases. 

[Restrictions:] none

[Related commands:]
@@ -73,4 +87,6 @@ could move in the gradient direction to reduce forces further.

[Default:]

The option defaults are dmax = 0.1 and line = quadratic.
The option defaults are dmax = 0.1,  line = quadratic, delaystep = 20, 
dt_grow = 1.1, dt_shrink = 0.5, alpha0 = 0.25, alpha_shrink = 0.99, 
tmax = 2.0 and tmin = 0.02.
+7 −1
Changes for doc/src/min_style.txt: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ min_style command :h3

min_style style :pre

style = {cg} or {hftn} or {sd} or {quickmin} or {fire} :ul
style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {adaptglok} :ul

[Examples:]

@@ -61,6 +61,12 @@ 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 {adaptglok} is a re-implementation of the style {fire} to better 
fit the published and unpublished optimizations of the method described
in "(Bitzek)"_#Bitzek. It includes a temporization of the variable
timestep, a backstep when uphill and a Velocity-Verlet integration
scheme.

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

+3 −2
Changes for doc/src/minimize.txt: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -63,8 +63,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 "minimization styles"_min_style.html {quickmin} and {fire} perform
damped dynamics using an Euler integration step.  Thus they require a
The "minimization styles"_min_style.html {quickmin}, {fire} and 
{adaptglok} perform damped dynamics using an Euler integration step 
(Velocity-Verlet for {adaptglok}). Thus they require a 
"timestep"_timestep.html be defined.

NOTE: The damped dynamic minimizers use whatever timestep you have
+7 −7
Changes for src/min.cpp: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -651,31 +651,31 @@ void Min::modify_params(int narg, char **arg)
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      dmax = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_delaystep") == 0) {
    } else if (strcmp(arg[iarg],"delaystep") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      delaystep = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_dt_grow") == 0) {
    } else if (strcmp(arg[iarg],"dt_grow") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      dt_grow = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_dt_shrink") == 0) {
    } else if (strcmp(arg[iarg],"dt_shrink") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      dt_shrink = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_alpha0") == 0) {
    } else if (strcmp(arg[iarg],"alpha0") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      alpha0 = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_alpha_shrink") == 0) {
    } else if (strcmp(arg[iarg],"alpha_shrink") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      alpha_shrink = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_tmax") == 0) {
    } else if (strcmp(arg[iarg],"tmax") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      tmax = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"fire_tmin") == 0) {
    } else if (strcmp(arg[iarg],"tmin") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      tmin = force->numeric(FLERR,arg[iarg+1]);
      iarg += 2;