Octopus
minimizer.F90 File Reference

Go to the source code of this file.

Modules

module  minimizer_oct_m
 

Data Types

interface  minimizer_oct_m::minimizer_function_i
 
interface  minimizer_oct_m::minimizer_with_grad_i
 
interface  minimizer_oct_m::info_i
 
interface  minimizer_oct_m::info_no_grad_i
 
interface  minimizer_oct_m::loct_1dminimize
 
interface  minimizer_oct_m::loct_1dminimize::loct_minimize
 
interface  minimizer_oct_m::loct_1dminimize::loct_minimize_direct
 
interface  nlo_set_min_objective
 

Functions/Subroutines

subroutine minimize_multidim (method, dim, x, step, line_tol, tolgrad, toldr, maxiter, f, write_iter_info, minimum, ierr)
 
subroutine minimize_sd (dim, x, step, maxiter, f, write_iter_info, minimum, ierr)
 
subroutine minimize_fire (dim, space_dim, x, step, tolgrad, maxiter, f, write_iter_info, en, ierr, mass, integrator)
 Implementation of the Fast Inertial Relaxation Engine (FIRE) More...
 

Variables

integer minimizer_oct_m::minmethod_steepest_descent = 1
 
integer minimizer_oct_m::minmethod_fr_cg = 2
 
integer minimizer_oct_m::minmethod_pr_cg = 3
 
integer minimizer_oct_m::minmethod_bfgs = 4
 
integer minimizer_oct_m::minmethod_bfgs2 = 5
 
integer minimizer_oct_m::minmethod_nmsimplex = 6
 
integer minimizer_oct_m::minmethod_sd_native = -1
 
integer minimizer_oct_m::minmethod_nlopt_bobyqa = 7
 
integer minimizer_oct_m::minmethod_fire = 8
 
integer minimizer_oct_m::minmethod_nlopt_lbfgs = 9
 

Function/Subroutine Documentation

◆ minimize_multidim()

subroutine minimize_multidim_nlopt::minimize_multidim ( integer, intent(in)  method,
integer, intent(in)  dim,
real(real64), dimension(:), intent(inout)  x,
real(real64), intent(in)  step,
real(real64), intent(in)  line_tol,
real(real64), intent(in)  tolgrad,
real(real64), intent(in)  toldr,
integer, intent(in)  maxiter,
procedure(minimizer_with_grad_i)  f,
procedure(info_i)  write_iter_info,
real(real64), intent(out)  minimum,
integer, intent(out)  ierr 
)
private

Definition at line 402 of file minimizer.F90.

◆ minimize_sd()

subroutine minimize_multidim_nlopt::minimize_sd ( integer, intent(in)  dim,
real(real64), dimension(:), intent(inout)  x,
real(real64), intent(in)  step,
integer, intent(in)  maxiter,
procedure(minimizer_with_grad_i)  f,
procedure(info_i)  write_iter_info,
real(real64), intent(out)  minimum,
integer, intent(out)  ierr 
)
private

Definition at line 435 of file minimizer.F90.

◆ minimize_fire()

subroutine minimize_multidim_nlopt::minimize_fire ( integer, intent(in)  dim,
integer, intent(in)  space_dim,
real(real64), dimension(:), intent(inout)  x,
real(real64), intent(in)  step,
real(real64), intent(in)  tolgrad,
integer, intent(in)  maxiter,
procedure(minimizer_with_grad_i)  f,
procedure(info_i)  write_iter_info,
real(real64), intent(out)  en,
integer, intent(out)  ierr,
real(real64), dimension(:), intent(in)  mass,
integer, intent(in)  integrator 
)
private

Implementation of the Fast Inertial Relaxation Engine (FIRE)

The algorithm is defined in Erik Bitzek, et al., Phys. Rev. Lett. 97, 170201 (2006).

As other minimizers, this is based on two external functions, f that computes the new positions and gradients, and write_iter_info that returns control to the calling code to write information for each iteration.

Following the original paper, any molecular dynamics integrator can be used, defined by integrator

Importantly, the code assumes the dim is a multiple of 3. This is used for internal dot products.

Parameters
[in]dimNumber of degrees of freedom. Assumed to be space_dim * N
[in]space_dimSpatial dimensions
[in,out]xDegrees of freedom to minimize
[in]stepTime-step of the algorithm
[in]tolgradTolerance for the gradient
[in]maxiterMaximum number of iterations
fGet the new gradients given a new x
write_iter_infoOutput for each iteration step
[in]massEffective masses for the relaxation
[in]integratorMolecular dynamics integrator for the velocity, see GOFireIntegrator

Definition at line 481 of file minimizer.F90.