Octopus
geom_opt_oct_m Module Reference

Data Types

type  geom_opt_t
 

Functions/Subroutines

subroutine, public geom_opt_run (system, from_scratch)
 
subroutine geom_opt_run_legacy (sys, fromscratch)
 
subroutine calc_point (size, coords, objective, getgrad, df)
 Note: you might think it would be better to change the arguments with '(size)' below to '(:)'. However, if you do that, then you will (portably) get a segmentation fault. More...
 
subroutine calc_point_ng (size, coords, objective)
 Same as calc_point, but without the gradients. No intents here is unfortunately required because the same dummy function will be passed also to newuoa routines in opt_control, and there the interface has no intents. UPDATE: Because the newuoa routine have disappeared, probably this can be changed. More...
 
subroutine write_iter_info (geom_iter, size, energy, maxdx, maxdf, coords)
 Output the information after each iteration of the geometry optimization. More...
 
subroutine to_coords (gopt, coords)
 Transfer the data from the data structures to the work array (coords) More...
 
subroutine to_grad (gopt, grad)
 Transfer data from the forces to the work array for the gradients (grad) More...
 
subroutine from_coords (gopt, coords)
 Transfer the data from the work array (coords) to the actual data structures. More...
 
subroutine write_iter_info_ng (geom_iter, size, energy, maxdx, coords)
 Same as write_iter_info, but without the gradients. More...
 

Variables

type(geom_opt_t), save g_opt
 
integer, parameter minwhat_energy = 1
 
integer, parameter minwhat_forces = 2
 
integer, parameter go_ions = 1
 
integer, parameter go_cell = 2
 
integer, parameter go_volume = 4
 

Function/Subroutine Documentation

◆ geom_opt_run()

subroutine, public geom_opt_oct_m::geom_opt_run ( class(*), intent(inout)  system,
logical, intent(inout)  from_scratch 
)

Definition at line 206 of file geom_opt.F90.

◆ geom_opt_run_legacy()

subroutine geom_opt_oct_m::geom_opt_run_legacy ( type(electrons_t), intent(inout), target  sys,
logical, intent(inout)  fromscratch 
)
private

Definition at line 224 of file geom_opt.F90.

◆ calc_point()

subroutine geom_opt_oct_m::calc_point ( integer, intent(in)  size,
real(real64), dimension(size), intent(in)  coords,
real(real64), intent(inout)  objective,
integer, intent(in)  getgrad,
real(real64), dimension(size), intent(inout)  df 
)
private

Note: you might think it would be better to change the arguments with '(size)' below to '(:)'. However, if you do that, then you will (portably) get a segmentation fault.

Definition at line 834 of file geom_opt.F90.

◆ calc_point_ng()

subroutine geom_opt_oct_m::calc_point_ng ( integer  size,
real(real64), dimension(size)  coords,
real(real64)  objective 
)
private

Same as calc_point, but without the gradients. No intents here is unfortunately required because the same dummy function will be passed also to newuoa routines in opt_control, and there the interface has no intents. UPDATE: Because the newuoa routine have disappeared, probably this can be changed.

Parameters
sizeintent(in)
coordsintent(in)
objectiveintent(inout)

Definition at line 976 of file geom_opt.F90.

◆ write_iter_info()

subroutine geom_opt_oct_m::write_iter_info ( integer, intent(in)  geom_iter,
integer, intent(in)  size,
real(real64), intent(in)  energy,
real(real64), intent(in)  maxdx,
real(real64), intent(in)  maxdf,
real(real64), dimension(size), intent(in)  coords 
)
private

Output the information after each iteration of the geometry optimization.

Parameters
[in]sizemust equal dim * natoms

Definition at line 1001 of file geom_opt.F90.

◆ to_coords()

subroutine geom_opt_oct_m::to_coords ( type(geom_opt_t), intent(in)  gopt,
real(real64), dimension(:), intent(out)  coords 
)
private

Transfer the data from the data structures to the work array (coords)

Definition at line 1112 of file geom_opt.F90.

◆ to_grad()

subroutine geom_opt_oct_m::to_grad ( type(geom_opt_t), intent(in)  gopt,
real(real64), dimension(:), intent(out)  grad 
)
private

Transfer data from the forces to the work array for the gradients (grad)

Definition at line 1163 of file geom_opt.F90.

◆ from_coords()

subroutine geom_opt_oct_m::from_coords ( type(geom_opt_t), intent(inout)  gopt,
real(real64), dimension(:), intent(in)  coords 
)
private

Transfer the data from the work array (coords) to the actual data structures.

Definition at line 1220 of file geom_opt.F90.

◆ write_iter_info_ng()

subroutine geom_opt_oct_m::write_iter_info_ng ( integer, intent(in)  geom_iter,
integer, intent(in)  size,
real(real64), intent(in)  energy,
real(real64), intent(in)  maxdx,
real(real64), dimension(size), intent(in)  coords 
)
private

Same as write_iter_info, but without the gradients.

Parameters
[in]sizemust equal dim * natoms

Definition at line 1314 of file geom_opt.F90.

Variable Documentation

◆ g_opt

type(geom_opt_t), save geom_opt_oct_m::g_opt
private

Definition at line 192 of file geom_opt.F90.

◆ minwhat_energy

integer, parameter geom_opt_oct_m::minwhat_energy = 1
private

Definition at line 194 of file geom_opt.F90.

◆ minwhat_forces

integer, parameter geom_opt_oct_m::minwhat_forces = 2
private

Definition at line 194 of file geom_opt.F90.

◆ go_ions

integer, parameter geom_opt_oct_m::go_ions = 1
private

Definition at line 198 of file geom_opt.F90.

◆ go_cell

integer, parameter geom_opt_oct_m::go_cell = 2
private

Definition at line 198 of file geom_opt.F90.

◆ go_volume

integer, parameter geom_opt_oct_m::go_volume = 4
private

Definition at line 198 of file geom_opt.F90.