Octopus
wannier90lib_interface_oct_m Module Reference

Interface module to Wannier 90 library. More...

Detailed Description

Interface module to Wannier 90 library.

The whole module is conditionally included in the cmake source if Wannier90 is present, hence the lack of preprocessor dressing.

Functions/Subroutines

subroutine, public wannier90lib_init_w90main (namespace, ions, kpoints, st, inp_options, w90main, stdout, stderr, ierr)
 Initialize wannier90 library data. More...
 
subroutine wannier90lib_set_atom_data (w90main, ions)
 Set atom data in wannier90 library. More...
 
subroutine wannier90lib_set_projections (w90main, inp_options)
 Parse projections. More...
 
subroutine wannier90lib_warn_inputs (inp_options)
 Check for options in .win file. More...
 
subroutine, public wannier90lib_create_wannier90_amn (w90main, inp_options, exclude_list, band_index, space, mesh, latt, st, kpoints, projection)
 Calculate wannier90 Projection Matrix. More...
 
subroutine, public wannier90lib_create_wannier90_mmn (w90main, exclude_list, band_index, mesh, st, ions, overlap)
 Kohn-Sham State Overlap Matrix. More...
 

Function/Subroutine Documentation

◆ wannier90lib_init_w90main()

subroutine, public wannier90lib_interface_oct_m::wannier90lib_init_w90main ( type(namespace_t), intent(in)  namespace,
type(ions_t), intent(in)  ions,
type(kpoints_t), intent(in)  kpoints,
type(states_elec_t), intent(in)  st,
type(wannier_opts_t), intent(in)  inp_options,
type(lib_common_type), intent(inout)  w90main,
integer, intent(inout)  stdout,
integer, intent(inout)  stderr,
integer, intent(inout)  ierr 
)

Initialize wannier90 library data.

This includes parsing input options and setting correct parallelization scheme (only kpoints). For more details see wannier90 library documentation here.

Definition at line 157 of file wannier90lib_interface.F90.

◆ wannier90lib_set_atom_data()

subroutine wannier90lib_interface_oct_m::wannier90lib_set_atom_data ( type(lib_common_type), intent(inout)  w90main,
type(ions_t), intent(in)  ions 
)
private

Set atom data in wannier90 library.

Wannier90 needs atomic information (positions and species) to properly parse the projections block from the .win file. This subroutine extracts this data from the octopus ions structure and passes it to the wannier90 library.

Definition at line 218 of file wannier90lib_interface.F90.

◆ wannier90lib_set_projections()

subroutine wannier90lib_interface_oct_m::wannier90lib_set_projections ( type(lib_common_type), intent(inout)  w90main,
type(wannier_opts_t), intent(in)  inp_options 
)
private

Parse projections.

This subroutine reads the projections specified in the .win file and set them in wannier90 library.

Definition at line 259 of file wannier90lib_interface.F90.

◆ wannier90lib_warn_inputs()

subroutine wannier90lib_interface_oct_m::wannier90lib_warn_inputs ( type(wannier_opts_t), intent(in)  inp_options)
private

Check for options in .win file.

Some options are not set from .win file but directly from octopus by calling the library. If these options are present in .win file, issue warning to user.

Definition at line 305 of file wannier90lib_interface.F90.

◆ wannier90lib_create_wannier90_amn()

subroutine, public wannier90lib_interface_oct_m::wannier90lib_create_wannier90_amn ( type(lib_common_type), intent(in)  w90main,
type(wannier_opts_t), intent(in)  inp_options,
logical, dimension(:), intent(in)  exclude_list,
integer, dimension(:), intent(in)  band_index,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(lattice_vectors_t), intent(in)  latt,
type(states_elec_t), intent(in)  st,
type(kpoints_t), intent(in)  kpoints,
complex(real64), dimension(:, :, :), intent(out), contiguous  projection 
)

Calculate wannier90 Projection Matrix.

This is a wrapper around wannier_calc::wannier_calc_create_amn .

Definition at line 361 of file wannier90lib_interface.F90.

◆ wannier90lib_create_wannier90_mmn()

subroutine, public wannier90lib_interface_oct_m::wannier90lib_create_wannier90_mmn ( type(lib_common_type), intent(in)  w90main,
logical, dimension(:), intent(in)  exclude_list,
integer, dimension(:), intent(in)  band_index,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in), target  st,
type(ions_t), intent(in)  ions,
complex(real64), dimension(:, :, :, :), intent(out), contiguous  overlap 
)

Kohn-Sham State Overlap Matrix.

This is a wrapper around wannier_calc::wannier_calc_create_mmn .

Definition at line 415 of file wannier90lib_interface.F90.