Class FIRE

Implementation of the Fast-Inertial-Relaxation-Engine

The implementation has several options related to the original method.

Methods

FIRE:new ([dt_init=0.5][, dt_max=10*dt_init][, f_inc=1.1][, f_dec=0.5][, f_alpha=0.99][, alpha_init=0.1][, N_min=5][, correct="global"][, direction="global"][, mass=1], ...) Instantiating a new FIRE object.
FIRE:reset () Reset FIRE algorithm by resetting initial parameters (dt and alpha) All masses are also set to 1.
FIRE:set_velocity (V) Set the velocity for the FIRE algorithm
FIRE:set_mass (mass) Set the masses for all atoms.
FIRE:correct_dF (dF) Normalize the parameter displacement to a given max-change.
FIRE:optimize (F, G) Perform a FIRE step with input parameters F and gradient G
FIRE:MD (V, G) Internal function for performing an MD step This routine performs an Euler step with mid-point correction which takes into account the end-point gradient position as well.
FIRE:SIESTA (siesta) SIESTA function for performing a complete SIESTA FIRE optimization.
FIRE:info () Print information regarding the FIRE algorithm


Methods

FIRE:new ([dt_init=0.5][, dt_max=10*dt_init][, f_inc=1.1][, f_dec=0.5][, f_alpha=0.99][, alpha_init=0.1][, N_min=5][, correct="global"][, direction="global"][, mass=1], ...)
Instantiating a new FIRE object.

The parameters must be specified with a table of fields and values.

The FIRE optimizer implements several variations of the original FIRE algorithm.

Here we allow to differentiate on how to normalize the displacements:

  • correct (argument for FIRE:new)
    • "global" perform a global normalization of the coordinates (maintain displacement direction)
    • "local" perform a local normalization (for each direction of each atom) (displacement direction is not maintained)
  • direction (argument for FIRE:new)
    • "global" perform a global normalization of the velocities (maintain gradient direction)
    • "local" perform a local normalization of the velocity (for each atom) (gradient direction is not maintained)

This FIRE optimizer allows two variations of the scaling of the velocities and the resulting displacement.

Parameters:

  • dt_init number initial time-step (default 0.5)
  • dt_max number maximum time-step allowed (default 10*dt_init)
  • f_inc number factor used to increase time-step (default 1.1)
  • f_dec number factor used to decrease time-step (default 0.5)
  • f_alpha number factor used to decrease alpha-parameter (default 0.99)
  • alpha_init number initial alpha-parameter (default 0.1)
  • N_min int minimum number of iterations performed before time-step may be increased (default 5)
  • correct string how the new parameters are rescaled, "global" or "local" (default "global")
  • direction string how the velocity pparameter is scaled, "global" or "local" (default "global")
  • mass number or table control individually the masses of each atom (default 1)
  • ... any arguments Optimizer:new accepts

Usage:

    fire = FIRE{<field1 = value>, <field2 = value>}
    while not fire:optimized() do
       F = fire:optimize(F, G)
    end
FIRE:reset ()
Reset FIRE algorithm by resetting initial parameters (dt and alpha) All masses are also set to 1.
FIRE:set_velocity (V)
Set the velocity for the FIRE algorithm

Parameters:

  • V Array an Array which has the atomic velocities
FIRE:set_mass (mass)
Set the masses for all atoms.

Parameters:

  • mass Array may either be a single number (all atoms have same mass), or an Array which may contain different masses per atom.
FIRE:correct_dF (dF)
Normalize the parameter displacement to a given max-change. The FIRE algorithm has an option which determines whether a global normalization occurs (maintain gradient), or whether a local normalization takes place.

Parameters:

  • dF Array the parameter displacements that are to be normalized

Returns:

    the normalized dF according to the global or local correction
FIRE:optimize (F, G)
Perform a FIRE step with input parameters F and gradient G local minimum point.

Parameters:

  • F Array the parameters for the function
  • G Array the gradient for the function with parameters F

Returns:

    a new set of parameters which should converge towards a
FIRE:MD (V, G)
Internal function for performing an MD step This routine performs an Euler step with mid-point correction which takes into account the end-point gradient position as well.

If one desires to use another MD-stepping algorithm one may overload this function.

Parameters:

Returns:

    the step size of the parameters
FIRE:SIESTA (siesta)
SIESTA function for performing a complete SIESTA FIRE optimization.

This function will query these fdf-flags from SIESTA:

  • MD.MaxForceTol
  • MD.MaxCGDispl

and use those as the tolerance for convergence as well as the maximum displacement for each optimization step.

Everything else is controlled by the FIRE object.

Note that all internal operations in this function relies on units being in - Ang - eV - eV/Ang

Parameters:

  • siesta table the SIESTA global table.
FIRE:info ()
Print information regarding the FIRE algorithm
generated by LDoc 1.4.6 Last updated 2019-05-23 08:36:38