Octopus
wannier_calc_oct_m Module Reference

Wannier90 related calculations. More...

Detailed Description

Wannier90 related calculations.

Data Types

type  wannier_calc_proj_t
 Mocks the projection type from wannier90. More...
 

Functions/Subroutines

subroutine, public wannier_calc_load_restart (namespace, mc, space, st, gr, kpoints, restart_states)
 Load Octopus restart data from disk. More...
 
subroutine, public wannier_calc_create_amn (wan_opts, exclude_list, band_index, space, mesh, latt, st, kpoints, spin_channel, num_proj, proj_input, projection)
 Calculation of Wannier90 Projection Matrix. More...
 
subroutine, public wannier_calc_create_mmn (exclude_list, band_index, mesh, st, ions, spin_channel, nnlist, nncell, overlap)
 Kohn-Sham State Overlap Matrix. More...
 
subroutine, public wannier_calc_read_centers (wan_opts, centers)
 Read wannier centers. More...
 
subroutine, public wannier_calc_read_u_matrices (wan_opts, kpoints, u_matrix, u_dis_matrix)
 Read wannier transformation matrix. More...
 
subroutine, public wannier_calc_write_centers (dir, prefix, centers, ions)
 Write wannier centers to file. More...
 
subroutine, public wannier_calc_write_u_matrices (dir, prefix, kpoints, u_matrix, u_dis_matrix)
 Write U and U_dis matrices to file. More...
 

Function/Subroutine Documentation

◆ wannier_calc_load_restart()

subroutine, public wannier_calc_oct_m::wannier_calc_load_restart ( type(namespace_t), intent(in)  namespace,
type(multicomm_t), intent(in)  mc,
class(space_t), intent(inout)  space,
type(states_elec_t), intent(inout)  st,
class(mesh_t), intent(inout)  gr,
type(kpoints_t), intent(inout)  kpoints,
integer, intent(in), optional  restart_states 
)

Load Octopus restart data from disk.

Note
Based on wannier90_output in wannier90_interface.F09
Parameters
[in]restart_statesRESTART_GS or RESTART_TD

Definition at line 170 of file wannier_calc.F90.

◆ wannier_calc_create_amn()

subroutine, public wannier_calc_oct_m::wannier_calc_create_amn ( type(wannier_opts_t), intent(in)  wan_opts,
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,
integer, intent(in)  spin_channel,
integer, intent(in)  num_proj,
type(wannier_calc_proj_t), dimension(:), intent(in)  proj_input,
complex(real64), dimension(:, :, :), intent(out), contiguous  projection 
)

Calculation of Wannier90 Projection Matrix.

The projection matrix is what is stored in the .amn in the traditional workflow. It contains the projections of the Kohn_Sham states with the chosen initial guess for the wannierization.

Definition at line 221 of file wannier_calc.F90.

◆ wannier_calc_create_mmn()

subroutine, public wannier_calc_oct_m::wannier_calc_create_mmn ( 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,
integer, intent(in)  spin_channel,
integer, dimension(:,:), intent(in)  nnlist,
integer, dimension(:,:,:), intent(in)  nncell,
complex(real64), dimension(:, :, :, :), intent(out), contiguous  overlap 
)

Kohn-Sham State Overlap Matrix.

This is what is stored in the .mmn in the traditional workflow.

Note
Copy-pasted from wannier90_interface.F90, then modified to store full overlap in memory, rather than write out to file
Todo:
  • Implement properly for BATCH_PACKED

Definition at line 378 of file wannier_calc.F90.

◆ wannier_calc_read_centers()

subroutine, public wannier_calc_oct_m::wannier_calc_read_centers ( type(wannier_opts_t), intent(in)  wan_opts,
real(real64), dimension(:, :), intent(inout)  centers 
)

Read wannier centers.

Reads wannier centers from the _centres.xyz file produced in a prior wannierization.

Definition at line 577 of file wannier_calc.F90.

◆ wannier_calc_read_u_matrices()

subroutine, public wannier_calc_oct_m::wannier_calc_read_u_matrices ( type(wannier_opts_t), intent(in)  wan_opts,
type(kpoints_t), intent(in)  kpoints,
complex(real64), dimension(:, :, :), intent(inout)  u_matrix,
complex(real64), dimension(:, :, :), intent(inout)  u_dis_matrix 
)

Read wannier transformation matrix.

Reads wannier transformation matrices U and U:dis from the _u.mat and _u_dis.mat files produced in a prior wannierization.

Definition at line 615 of file wannier_calc.F90.

◆ wannier_calc_write_centers()

subroutine, public wannier_calc_oct_m::wannier_calc_write_centers ( character(len=*), intent(in)  dir,
character(len=*), intent(in)  prefix,
real(real64), dimension(:, :), intent(in)  centers,
class(ions_t), intent(in)  ions 
)

Write wannier centers to file.

Uses same format as wannier90.

Definition at line 690 of file wannier_calc.F90.

◆ wannier_calc_write_u_matrices()

subroutine, public wannier_calc_oct_m::wannier_calc_write_u_matrices ( character(len=*), intent(in)  dir,
character(len=*), intent(in)  prefix,
type(kpoints_t), intent(in)  kpoints,
complex(real64), dimension(:, :, :), intent(in)  u_matrix,
complex(real64), dimension(:, :, :), intent(in)  u_dis_matrix 
)

Write U and U_dis matrices to file.

Note
This routine was adapted from wannier90-3.1.0.

Definition at line 735 of file wannier_calc.F90.