Octopus
lda_u_oct_m Module Reference

Data Types

module  lda_u_t
 Class to describe DFT+U parameters. More...
 

Functions/Subroutines

subroutine, public lda_u_init (this, namespace, space, level, gr, ions, st, mc, kpoints, has_phase)
 
subroutine lda_u_init_coulomb_integrals (this, namespace, space, gr, st, psolver, has_phase)
 
subroutine, public lda_u_end (this)
 
subroutine, public lda_u_update_basis (this, space, gr, ions, st, psolver, namespace, kpoints, has_phase)
 
subroutine, public lda_u_update_occ_matrices (this, namespace, mesh, st, hm_base, phase, energy)
 
subroutine, public lda_u_build_phase_correction (this, space, std, boundaries, namespace, kpoints, vec_pot, vec_pot_var)
 Build the phase correction to the global phase for all orbitals. More...
 
subroutine, public compute_acbno_u_kanamori (this, st, kanamori)
 
subroutine, public lda_u_freeze_occ (this)
 
subroutine, public lda_u_freeze_u (this)
 
subroutine, public lda_u_set_effectiveu (this, Ueff)
 
subroutine, public lda_u_get_effectiveu (this, Ueff)
 
subroutine, public lda_u_set_effectivev (this, Veff)
 
subroutine, public lda_u_get_effectivev (this, Veff)
 
subroutine, public lda_u_write_info (this, iunit, namespace)
 
subroutine lda_u_loadbasis (this, namespace, space, st, mesh, mc, ierr)
 
subroutine build_symmetrization_map (this, ions, gr, st)
 Builds a mapping between the orbital sets based on symmetries. More...
 
subroutine orbitals_get_symm_weight (os, space, latt, gr, symm, weight)
 Computes the weight of each rotated orbitals in the basis of the same localized subspace. More...
 
subroutine compute_complex_coulomb_integrals (this, gr, st, psolver, namespace, space)
 
subroutine compute_acbno_u_noncollinear (this, ios, namespace)
 This routine computes the effective U in the non-collinear case. More...
 
subroutine compute_acbno_v_noncollinear (this, ios)
 This routine computes the effective V in the noncollinear case. More...
 
subroutine, public dlda_u_apply (this, d, mesh, psib, hpsib)
 
subroutine dupdate_occ_matrices (this, namespace, mesh, st, lda_u_energy, phase)
 This routine computes the values of the occupation matrices. More...
 
subroutine dsymmetrize_occ_matrices (this, occ)
 Symmetrize the occupation matrices. More...
 
subroutine, public dcompute_dftu_energy (this, energy, st)
 This routine computes the value of the double counting term in the DFT+U energy. More...
 
subroutine, public dlda_u_update_potential (this, st)
 This routine computes the potential that, once multiplied by the projector Pmm' and summed over m and m' for all the atoms gives the full Hubbard potential. More...
 
subroutine dcompute_acbno_u (this, ios, namespace)
 This routine computes the effective U following the expression given in Agapito et al., Phys. Rev. X 5, 011006 (2015) More...
 
subroutine dcompute_acbno_u_restricted (this)
 This routine computes the effective Uin the spin-unpolarised case. More...
 
subroutine dcompute_acbno_v (this, ios)
 This routine computes the effective V in the spin-polarized case. More...
 
subroutine dcompute_acbno_v_restricted (this)
 This routine computes the effective V in the spin-unpolarised case. More...
 
subroutine dcompute_acbno_u_kanamori (this, kanamori)
 This routine computes the Kanamori U, Up, and J. More...
 
subroutine dcompute_acbno_u_kanamori_restricted (this, kanamori)
 This routine computes the Kanamori U, Up, and J. More...
 
subroutine dcompute_coulomb_integrals (this, namespace, space, gr, psolver)
 
subroutine, public dlda_u_commute_r_single (this, mesh, space, d, namespace, ist, ik, psi, gpsi, has_phase)
 
subroutine, public dlda_u_commute_r (this, mesh, space, d, namespace, psib, gpsib)
 This routine computes [r,V_lda+u] . More...
 
subroutine, public dlda_u_force (this, namespace, space, mesh, st, iq, psib, grad_psib, force, phase)
 
subroutine, public dlda_u_rvu (this, mesh, space, d, namespace, psib, gpsib)
 This routine computes \((r-R_J)V_{\rm DFT+U}|\psi_{n,\mathbf{k}}\rangle\). More...
 
subroutine, public dlda_u_set_occupations (this, occ)
 
subroutine, public dlda_u_get_occupations (this, occ)
 
subroutine dlda_u_allocate (this, st)
 
subroutine ddft_u_get_weight_projectors (this, os, ios, spin_component, psib, phi_dot_psi, weight)
 Given the dot products \(<phi mp | psi >\), this computes the weight of the DFT+U projectors. More...
 
subroutine, public zlda_u_apply (this, d, mesh, psib, hpsib)
 
subroutine zupdate_occ_matrices (this, namespace, mesh, st, lda_u_energy, phase)
 This routine computes the values of the occupation matrices. More...
 
subroutine zsymmetrize_occ_matrices (this, occ)
 Symmetrize the occupation matrices. More...
 
subroutine, public zcompute_dftu_energy (this, energy, st)
 This routine computes the value of the double counting term in the DFT+U energy. More...
 
subroutine, public zlda_u_update_potential (this, st)
 This routine computes the potential that, once multiplied by the projector Pmm' and summed over m and m' for all the atoms gives the full Hubbard potential. More...
 
subroutine zcompute_acbno_u (this, ios, namespace)
 This routine computes the effective U following the expression given in Agapito et al., Phys. Rev. X 5, 011006 (2015) More...
 
subroutine zcompute_acbno_u_restricted (this)
 This routine computes the effective Uin the spin-unpolarised case. More...
 
subroutine zcompute_acbno_v (this, ios)
 This routine computes the effective V in the spin-polarized case. More...
 
subroutine zcompute_acbno_v_restricted (this)
 This routine computes the effective V in the spin-unpolarised case. More...
 
subroutine zcompute_acbno_u_kanamori (this, kanamori)
 This routine computes the Kanamori U, Up, and J. More...
 
subroutine zcompute_acbno_u_kanamori_restricted (this, kanamori)
 This routine computes the Kanamori U, Up, and J. More...
 
subroutine zcompute_coulomb_integrals (this, namespace, space, gr, psolver)
 
subroutine, public zlda_u_commute_r_single (this, mesh, space, d, namespace, ist, ik, psi, gpsi, has_phase)
 
subroutine, public zlda_u_commute_r (this, mesh, space, d, namespace, psib, gpsib)
 This routine computes [r,V_lda+u] . More...
 
subroutine, public zlda_u_force (this, namespace, space, mesh, st, iq, psib, grad_psib, force, phase)
 
subroutine, public zlda_u_rvu (this, mesh, space, d, namespace, psib, gpsib)
 This routine computes \((r-R_J)V_{\rm DFT+U}|\psi_{n,\mathbf{k}}\rangle\). More...
 
subroutine, public zlda_u_set_occupations (this, occ)
 
subroutine, public zlda_u_get_occupations (this, occ)
 
subroutine zlda_u_allocate (this, st)
 
subroutine zdft_u_get_weight_projectors (this, os, ios, spin_component, psib, phi_dot_psi, weight)
 Given the dot products \(<phi mp | psi >\), this computes the weight of the DFT+U projectors. More...
 

Variables

integer, parameter, public dft_u_none = 0
 
integer, parameter, public dft_u_empirical = 1
 
integer, parameter, public dft_u_acbn0 = 2
 
integer, parameter, public dft_u_fll = 0
 
integer, parameter, public dft_u_amf = 1
 
integer, parameter, public dft_u_mix = 2
 

Function/Subroutine Documentation

◆ lda_u_init()

subroutine, public lda_u_oct_m::lda_u_init ( type(lda_u_t), intent(inout), target  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
integer, intent(in)  level,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in), target  ions,
type(states_elec_t), intent(in)  st,
type(multicomm_t), intent(in)  mc,
type(kpoints_t), intent(in)  kpoints,
logical, intent(in)  has_phase 
)

Definition at line 279 of file lda_u.F90.

◆ lda_u_init_coulomb_integrals()

subroutine lda_u_oct_m::lda_u_init_coulomb_integrals ( type(lda_u_t), intent(inout), target  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(poisson_t), intent(in)  psolver,
logical, intent(in)  has_phase 
)
private

Definition at line 590 of file lda_u.F90.

◆ lda_u_end()

subroutine, public lda_u_oct_m::lda_u_end ( type(lda_u_t), intent(inout)  this)

Definition at line 652 of file lda_u.F90.

◆ lda_u_update_basis()

subroutine, public lda_u_oct_m::lda_u_update_basis ( type(lda_u_t), intent(inout), target  this,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in), target  ions,
type(states_elec_t), intent(in)  st,
type(poisson_t), intent(in)  psolver,
type(namespace_t), intent(in)  namespace,
type(kpoints_t), intent(in)  kpoints,
logical, intent(in)  has_phase 
)

Definition at line 694 of file lda_u.F90.

◆ lda_u_update_occ_matrices()

subroutine, public lda_u_oct_m::lda_u_update_occ_matrices ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout)  st,
type(hamiltonian_elec_base_t), intent(in)  hm_base,
type(phase_t), intent(in)  phase,
type(energy_t), intent(inout)  energy 
)

Definition at line 795 of file lda_u.F90.

◆ lda_u_build_phase_correction()

subroutine, public lda_u_oct_m::lda_u_build_phase_correction ( type(lda_u_t), intent(inout)  this,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  std,
type(boundaries_t), intent(in)  boundaries,
type(namespace_t), intent(in)  namespace,
type(kpoints_t), intent(in)  kpoints,
real(real64), dimension(:), intent(in), optional, allocatable  vec_pot,
real(real64), dimension(:, :), intent(in), optional, allocatable  vec_pot_var 
)

Build the phase correction to the global phase for all orbitals.

Parameters
[in]vec_pot(spacedim)
[in]vec_pot_var(1:spacedim, 1:ns)

Definition at line 822 of file lda_u.F90.

◆ compute_acbno_u_kanamori()

subroutine, public lda_u_oct_m::compute_acbno_u_kanamori ( type(lda_u_t), intent(in)  this,
type(states_elec_t), intent(in)  st,
real(real64), dimension(:,:), intent(out)  kanamori 
)

Definition at line 864 of file lda_u.F90.

◆ lda_u_freeze_occ()

subroutine, public lda_u_oct_m::lda_u_freeze_occ ( type(lda_u_t), intent(inout)  this)

Definition at line 887 of file lda_u.F90.

◆ lda_u_freeze_u()

subroutine, public lda_u_oct_m::lda_u_freeze_u ( type(lda_u_t), intent(inout)  this)

Definition at line 894 of file lda_u.F90.

◆ lda_u_set_effectiveu()

subroutine, public lda_u_oct_m::lda_u_set_effectiveu ( type(lda_u_t), intent(inout)  this,
real(real64), dimension(:), intent(in)  Ueff 
)
Parameters
[in]ueff(thisnorbsets)

Definition at line 901 of file lda_u.F90.

◆ lda_u_get_effectiveu()

subroutine, public lda_u_oct_m::lda_u_get_effectiveu ( type(lda_u_t), intent(in)  this,
real(real64), dimension(:), intent(inout)  Ueff 
)
Parameters
[in,out]ueff(thisnorbsets)

Definition at line 917 of file lda_u.F90.

◆ lda_u_set_effectivev()

subroutine, public lda_u_oct_m::lda_u_set_effectivev ( type(lda_u_t), intent(inout)  this,
real(real64), dimension(:), intent(in)  Veff 
)

Definition at line 933 of file lda_u.F90.

◆ lda_u_get_effectivev()

subroutine, public lda_u_oct_m::lda_u_get_effectivev ( type(lda_u_t), intent(in)  this,
real(real64), dimension(:), intent(inout)  Veff 
)

Definition at line 951 of file lda_u.F90.

◆ lda_u_write_info()

subroutine, public lda_u_oct_m::lda_u_write_info ( type(lda_u_t), intent(in)  this,
integer, intent(in), optional  iunit,
type(namespace_t), intent(in), optional  namespace 
)

Definition at line 969 of file lda_u.F90.

◆ lda_u_loadbasis()

subroutine lda_u_oct_m::lda_u_loadbasis ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(multicomm_t), intent(in)  mc,
integer, intent(out)  ierr 
)
private

Definition at line 1002 of file lda_u.F90.

◆ build_symmetrization_map()

subroutine lda_u_oct_m::build_symmetrization_map ( type(lda_u_t), intent(inout)  this,
type(ions_t), intent(in)  ions,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st 
)
private

Builds a mapping between the orbital sets based on symmetries.

Definition at line 1254 of file lda_u.F90.

◆ orbitals_get_symm_weight()

subroutine lda_u_oct_m::orbitals_get_symm_weight ( type(orbitalset_t), intent(in)  os,
type(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
type(grid_t), intent(in)  gr,
type(symmetries_t), intent(in)  symm,
real(real64), dimension(:,:,:), intent(inout)  weight 
)
private

Computes the weight of each rotated orbitals in the basis of the same localized subspace.

Definition at line 1307 of file lda_u.F90.

◆ compute_complex_coulomb_integrals()

subroutine lda_u_oct_m::compute_complex_coulomb_integrals ( type(lda_u_t), intent(inout)  this,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(poisson_t), intent(in)  psolver,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space 
)
private

Definition at line 1390 of file lda_u.F90.

◆ compute_acbno_u_noncollinear()

subroutine lda_u_oct_m::compute_acbno_u_noncollinear ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios,
type(namespace_t), intent(in)  namespace 
)
private

This routine computes the effective U in the non-collinear case.

Definition at line 1515 of file lda_u.F90.

◆ compute_acbno_v_noncollinear()

subroutine lda_u_oct_m::compute_acbno_v_noncollinear ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios 
)
private

This routine computes the effective V in the noncollinear case.

See Eq. A6 in Tancogne-Dejean et al., PRB 102, 155117 (2020)

Definition at line 1633 of file lda_u.F90.

◆ dlda_u_apply()

subroutine, public lda_u_oct_m::dlda_u_apply ( type(lda_u_t), intent(in)  this,
type(states_elec_dim_t), intent(in)  d,
class(mesh_t), intent(in)  mesh,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  hpsib 
)

Definition at line 1761 of file lda_u.F90.

◆ dupdate_occ_matrices()

subroutine lda_u_oct_m::dupdate_occ_matrices ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
real(real64), intent(inout)  lda_u_energy,
type(phase_t), intent(in), optional  phase 
)
private

This routine computes the values of the occupation matrices.

Definition at line 1833 of file lda_u.F90.

◆ dsymmetrize_occ_matrices()

subroutine lda_u_oct_m::dsymmetrize_occ_matrices ( type(lda_u_t), intent(inout)  this,
real(real64), dimension(:,:,:,:), intent(inout)  occ 
)
private

Symmetrize the occupation matrices.

At the moment this is only done for the case of real spherical harmonics using the fact that a rotated spherical harmonic \(Y_m^l\) can be expressed in the basis of the spherical harmonics of the l.

The other cases (complex spherical harmonics, basis from state) are not symmetrized at the moment. The intersite generalized occupation matrices are also not treated at the moment

Definition at line 2182 of file lda_u.F90.

◆ dcompute_dftu_energy()

subroutine, public lda_u_oct_m::dcompute_dftu_energy ( type(lda_u_t), intent(inout)  this,
real(real64), intent(inout)  energy,
type(states_elec_t), intent(in)  st 
)

This routine computes the value of the double counting term in the DFT+U energy.

Definition at line 2234 of file lda_u.F90.

◆ dlda_u_update_potential()

subroutine, public lda_u_oct_m::dlda_u_update_potential ( type(lda_u_t), intent(inout)  this,
type(states_elec_t), intent(in)  st 
)

This routine computes the potential that, once multiplied by the projector Pmm' and summed over m and m' for all the atoms gives the full Hubbard potential.

Definition at line 2308 of file lda_u.F90.

◆ dcompute_acbno_u()

subroutine lda_u_oct_m::dcompute_acbno_u ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios,
type(namespace_t), intent(in)  namespace 
)
private

This routine computes the effective U following the expression given in Agapito et al., Phys. Rev. X 5, 011006 (2015)

Definition at line 2366 of file lda_u.F90.

◆ dcompute_acbno_u_restricted()

subroutine lda_u_oct_m::dcompute_acbno_u_restricted ( type(lda_u_t), intent(inout)  this)
private

This routine computes the effective Uin the spin-unpolarised case.

Definition at line 2511 of file lda_u.F90.

◆ dcompute_acbno_v()

subroutine lda_u_oct_m::dcompute_acbno_v ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios 
)
private

This routine computes the effective V in the spin-polarized case.

Definition at line 2583 of file lda_u.F90.

◆ dcompute_acbno_v_restricted()

subroutine lda_u_oct_m::dcompute_acbno_v_restricted ( type(lda_u_t), intent(inout)  this)
private

This routine computes the effective V in the spin-unpolarised case.

Definition at line 2650 of file lda_u.F90.

◆ dcompute_acbno_u_kanamori()

subroutine lda_u_oct_m::dcompute_acbno_u_kanamori ( type(lda_u_t), intent(in)  this,
real(real64), dimension(:,:), intent(out)  kanamori 
)
private

This routine computes the Kanamori U, Up, and J.

Definition at line 2695 of file lda_u.F90.

◆ dcompute_acbno_u_kanamori_restricted()

subroutine lda_u_oct_m::dcompute_acbno_u_kanamori_restricted ( type(lda_u_t), intent(in)  this,
real(real64), dimension(3), intent(out)  kanamori 
)
private

This routine computes the Kanamori U, Up, and J.

Definition at line 2794 of file lda_u.F90.

◆ dcompute_coulomb_integrals()

subroutine lda_u_oct_m::dcompute_coulomb_integrals ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(poisson_t), intent(in)  psolver 
)
private

Definition at line 2869 of file lda_u.F90.

◆ dlda_u_commute_r_single()

subroutine, public lda_u_oct_m::dlda_u_commute_r_single ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  ist,
integer, intent(in)  ik,
real(real64), dimension(:,:), intent(inout), target, contiguous  psi,
real(real64), dimension(:,:,:), intent(inout), target, contiguous  gpsi,
logical, intent(in)  has_phase 
)
Parameters
[in,out]gpsi(1:grnp, 1:grderdim, 1:stddim)

Definition at line 2987 of file lda_u.F90.

◆ dlda_u_commute_r()

subroutine, public lda_u_oct_m::dlda_u_commute_r ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout)  gpsib 
)

This routine computes [r,V_lda+u] .

Definition at line 3038 of file lda_u.F90.

◆ dlda_u_force()

subroutine, public lda_u_oct_m::dlda_u_force ( type(lda_u_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
integer, intent(in)  iq,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), dimension(:), intent(in)  grad_psib,
real(real64), dimension(:, :), intent(inout)  force,
logical, intent(in)  phase 
)

Definition at line 3195 of file lda_u.F90.

◆ dlda_u_rvu()

subroutine, public lda_u_oct_m::dlda_u_rvu ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout)  gpsib 
)

This routine computes \((r-R_J)V_{\rm DFT+U}|\psi_{n,\mathbf{k}}\rangle\).

Note
The notation is weird and needs to be understood as the fact that the factor \((r_R_J)\) is in fact included in the Bloch sum of the left part of the projector over the orbitals.

Definition at line 3334 of file lda_u.F90.

◆ dlda_u_set_occupations()

subroutine, public lda_u_oct_m::dlda_u_set_occupations ( type(lda_u_t), intent(inout)  this,
real(real64), dimension(:), intent(in)  occ 
)

Definition at line 3444 of file lda_u.F90.

◆ dlda_u_get_occupations()

subroutine, public lda_u_oct_m::dlda_u_get_occupations ( type(lda_u_t), intent(in)  this,
real(real64), dimension(:), intent(inout)  occ 
)

Definition at line 3501 of file lda_u.F90.

◆ dlda_u_allocate()

subroutine lda_u_oct_m::dlda_u_allocate ( type(lda_u_t), intent(inout)  this,
type(states_elec_t), intent(in)  st 
)
private

Definition at line 3558 of file lda_u.F90.

◆ ddft_u_get_weight_projectors()

subroutine lda_u_oct_m::ddft_u_get_weight_projectors ( type(lda_u_t), intent(in)  this,
type(orbitalset_t), intent(in)  os,
integer, intent(in)  ios,
integer, intent(in)  spin_component,
type(wfs_elec_t), intent(in)  psib,
real(real64), dimension(:,:,:,:), intent(in)  phi_dot_psi,
real(real64), dimension(:,:), intent(inout)  weight 
)
private

Given the dot products \(<phi mp | psi >\), this computes the weight of the DFT+U projectors.

For DFT+U+V (intersite interaction), the weight also include the intersite part, such that the resulting weight is applied only once to the localized orbitals.

For the spinor case, the weight is defined per spin component, so the last dimension of weight is of size nst_linear

Parameters
[in]phi_dot_psiDot products \(<phi mp | psi >\) (nspin, norb, nst, norbset)
[in,out]weightResulting weight (norb, nst_linear)

Definition at line 3593 of file lda_u.F90.

◆ zlda_u_apply()

subroutine, public lda_u_oct_m::zlda_u_apply ( type(lda_u_t), intent(in)  this,
type(states_elec_dim_t), intent(in)  d,
class(mesh_t), intent(in)  mesh,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  hpsib 
)

Definition at line 3748 of file lda_u.F90.

◆ zupdate_occ_matrices()

subroutine lda_u_oct_m::zupdate_occ_matrices ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
real(real64), intent(inout)  lda_u_energy,
type(phase_t), intent(in), optional  phase 
)
private

This routine computes the values of the occupation matrices.

Definition at line 3820 of file lda_u.F90.

◆ zsymmetrize_occ_matrices()

subroutine lda_u_oct_m::zsymmetrize_occ_matrices ( type(lda_u_t), intent(inout)  this,
complex(real64), dimension(:,:,:,:), intent(inout)  occ 
)
private

Symmetrize the occupation matrices.

At the moment this is only done for the case of real spherical harmonics using the fact that a rotated spherical harmonic \(Y_m^l\) can be expressed in the basis of the spherical harmonics of the l.

The other cases (complex spherical harmonics, basis from state) are not symmetrized at the moment. The intersite generalized occupation matrices are also not treated at the moment

Definition at line 4169 of file lda_u.F90.

◆ zcompute_dftu_energy()

subroutine, public lda_u_oct_m::zcompute_dftu_energy ( type(lda_u_t), intent(inout)  this,
real(real64), intent(inout)  energy,
type(states_elec_t), intent(in)  st 
)

This routine computes the value of the double counting term in the DFT+U energy.

Definition at line 4221 of file lda_u.F90.

◆ zlda_u_update_potential()

subroutine, public lda_u_oct_m::zlda_u_update_potential ( type(lda_u_t), intent(inout)  this,
type(states_elec_t), intent(in)  st 
)

This routine computes the potential that, once multiplied by the projector Pmm' and summed over m and m' for all the atoms gives the full Hubbard potential.

Definition at line 4295 of file lda_u.F90.

◆ zcompute_acbno_u()

subroutine lda_u_oct_m::zcompute_acbno_u ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios,
type(namespace_t), intent(in)  namespace 
)
private

This routine computes the effective U following the expression given in Agapito et al., Phys. Rev. X 5, 011006 (2015)

Definition at line 4353 of file lda_u.F90.

◆ zcompute_acbno_u_restricted()

subroutine lda_u_oct_m::zcompute_acbno_u_restricted ( type(lda_u_t), intent(inout)  this)
private

This routine computes the effective Uin the spin-unpolarised case.

Definition at line 4498 of file lda_u.F90.

◆ zcompute_acbno_v()

subroutine lda_u_oct_m::zcompute_acbno_v ( type(lda_u_t), intent(inout)  this,
integer, intent(in)  ios 
)
private

This routine computes the effective V in the spin-polarized case.

Definition at line 4570 of file lda_u.F90.

◆ zcompute_acbno_v_restricted()

subroutine lda_u_oct_m::zcompute_acbno_v_restricted ( type(lda_u_t), intent(inout)  this)
private

This routine computes the effective V in the spin-unpolarised case.

Definition at line 4637 of file lda_u.F90.

◆ zcompute_acbno_u_kanamori()

subroutine lda_u_oct_m::zcompute_acbno_u_kanamori ( type(lda_u_t), intent(in)  this,
real(real64), dimension(:,:), intent(out)  kanamori 
)
private

This routine computes the Kanamori U, Up, and J.

Definition at line 4682 of file lda_u.F90.

◆ zcompute_acbno_u_kanamori_restricted()

subroutine lda_u_oct_m::zcompute_acbno_u_kanamori_restricted ( type(lda_u_t), intent(in)  this,
real(real64), dimension(3), intent(out)  kanamori 
)
private

This routine computes the Kanamori U, Up, and J.

Definition at line 4781 of file lda_u.F90.

◆ zcompute_coulomb_integrals()

subroutine lda_u_oct_m::zcompute_coulomb_integrals ( type(lda_u_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(poisson_t), intent(in)  psolver 
)
private

Definition at line 4856 of file lda_u.F90.

◆ zlda_u_commute_r_single()

subroutine, public lda_u_oct_m::zlda_u_commute_r_single ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  ist,
integer, intent(in)  ik,
complex(real64), dimension(:,:), intent(inout), target, contiguous  psi,
complex(real64), dimension(:,:,:), intent(inout), target, contiguous  gpsi,
logical, intent(in)  has_phase 
)
Parameters
[in,out]gpsi(1:grnp, 1:grderdim, 1:stddim)

Definition at line 4974 of file lda_u.F90.

◆ zlda_u_commute_r()

subroutine, public lda_u_oct_m::zlda_u_commute_r ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout)  gpsib 
)

This routine computes [r,V_lda+u] .

Definition at line 5025 of file lda_u.F90.

◆ zlda_u_force()

subroutine, public lda_u_oct_m::zlda_u_force ( type(lda_u_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
integer, intent(in)  iq,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), dimension(:), intent(in)  grad_psib,
real(real64), dimension(:, :), intent(inout)  force,
logical, intent(in)  phase 
)

Definition at line 5212 of file lda_u.F90.

◆ zlda_u_rvu()

subroutine, public lda_u_oct_m::zlda_u_rvu ( type(lda_u_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
class(space_t), intent(in)  space,
type(states_elec_dim_t), intent(in)  d,
type(namespace_t), intent(in)  namespace,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout)  gpsib 
)

This routine computes \((r-R_J)V_{\rm DFT+U}|\psi_{n,\mathbf{k}}\rangle\).

Note
The notation is weird and needs to be understood as the fact that the factor \((r_R_J)\) is in fact included in the Bloch sum of the left part of the projector over the orbitals.

Definition at line 5351 of file lda_u.F90.

◆ zlda_u_set_occupations()

subroutine, public lda_u_oct_m::zlda_u_set_occupations ( type(lda_u_t), intent(inout)  this,
complex(real64), dimension(:), intent(in)  occ 
)

Definition at line 5482 of file lda_u.F90.

◆ zlda_u_get_occupations()

subroutine, public lda_u_oct_m::zlda_u_get_occupations ( type(lda_u_t), intent(in)  this,
complex(real64), dimension(:), intent(inout)  occ 
)

Definition at line 5539 of file lda_u.F90.

◆ zlda_u_allocate()

subroutine lda_u_oct_m::zlda_u_allocate ( type(lda_u_t), intent(inout)  this,
type(states_elec_t), intent(in)  st 
)
private

Definition at line 5596 of file lda_u.F90.

◆ zdft_u_get_weight_projectors()

subroutine lda_u_oct_m::zdft_u_get_weight_projectors ( type(lda_u_t), intent(in)  this,
type(orbitalset_t), intent(in)  os,
integer, intent(in)  ios,
integer, intent(in)  spin_component,
type(wfs_elec_t), intent(in)  psib,
complex(real64), dimension(:,:,:,:), intent(in)  phi_dot_psi,
complex(real64), dimension(:,:), intent(inout)  weight 
)
private

Given the dot products \(<phi mp | psi >\), this computes the weight of the DFT+U projectors.

For DFT+U+V (intersite interaction), the weight also include the intersite part, such that the resulting weight is applied only once to the localized orbitals.

For the spinor case, the weight is defined per spin component, so the last dimension of weight is of size nst_linear

Parameters
[in]phi_dot_psiDot products \(<phi mp | psi >\) (nspin, norb, nst, norbset)
[in,out]weightResulting weight (norb, nst_linear)

Definition at line 5631 of file lda_u.F90.

Variable Documentation

◆ dft_u_none

integer, parameter, public lda_u_oct_m::dft_u_none = 0

Definition at line 200 of file lda_u.F90.

◆ dft_u_empirical

integer, parameter, public lda_u_oct_m::dft_u_empirical = 1

Definition at line 200 of file lda_u.F90.

◆ dft_u_acbn0

integer, parameter, public lda_u_oct_m::dft_u_acbn0 = 2

Definition at line 200 of file lda_u.F90.

◆ dft_u_fll

integer, parameter, public lda_u_oct_m::dft_u_fll = 0

Definition at line 205 of file lda_u.F90.

◆ dft_u_amf

integer, parameter, public lda_u_oct_m::dft_u_amf = 1

Definition at line 205 of file lda_u.F90.

◆ dft_u_mix

integer, parameter, public lda_u_oct_m::dft_u_mix = 2

Definition at line 205 of file lda_u.F90.