Octopus
xc_oep_oct_m Module Reference

Data Types

type  xc_oep_t
 

Functions/Subroutines

subroutine, public xc_oep_init (oep, namespace, gr, st, mc, space, oep_type)
 
subroutine, public xc_oep_end (oep)
 
subroutine, public xc_oep_write_info (oep, iunit, namespace)
 
subroutine, public xc_oep_spinfactor (oep, nspin)
 A couple of auxiliary functions for oep. More...
 
subroutine, public xc_oep_analyzeeigen (oep, st, is)
 
subroutine xc_kli_pauli_solve (mesh, st, oep)
 Explicit solution of the KLI equation for Pauli spinors. More...
 
subroutine get_rotation_matrix (dens, alpha, betar, betai)
 
subroutine rotate_to_local (mat, alpha, betar, betai, alpha2, beta2, rot_mat)
 
subroutine rotate_to_global (mat, alpha, betar, betai, alpha2, beta2, rot_mat)
 
subroutine oep_sic_pauli (xcs, gr, psolver, namespace, space, rcell_volume, st, kpoints, oep, ex, ec)
 This routine calculates the SIC functional for the spinor case. More...
 
subroutine dxc_kli_solve (space, mesh, st, oep, rcell_volume)
 This routine solves the KLI approximation to the OEP equation. More...
 
subroutine doep_sic (xcs, gr, psolver, namespace, space, rcell_volume, st, kpoints, is, oep, ex, ec)
 This routine calculates the SIC exchange functional. More...
 
subroutine, public dxc_oep_calc (oep, namespace, xcs, gr, hm, st, space, rcell_volume, ex, ec, vxc)
 This file handles the evaluation of the OEP potential, in the KLI or full OEP as described in S. Kuemmel and J. Perdew, PRL 90, 043004 (2003) More...
 
subroutine dxc_oep_solve (namespace, mesh, hm, st, is, vxc, oep)
 This routine follows closely the one of PRB 68, 035103 (2003) Below we refer to the equation number of this paper. More...
 
subroutine, public dxc_oep_mix (oep, mesh, ss, rho, is)
 A routine that takes care of mixing the potential. More...
 
subroutine zxc_kli_solve (space, mesh, st, oep, rcell_volume)
 This routine solves the KLI approximation to the OEP equation. More...
 
subroutine zoep_sic (xcs, gr, psolver, namespace, space, rcell_volume, st, kpoints, is, oep, ex, ec)
 This routine calculates the SIC exchange functional. More...
 
subroutine, public zxc_oep_calc (oep, namespace, xcs, gr, hm, st, space, rcell_volume, ex, ec, vxc)
 This file handles the evaluation of the OEP potential, in the KLI or full OEP as described in S. Kuemmel and J. Perdew, PRL 90, 043004 (2003) More...
 
subroutine zxc_oep_solve (namespace, mesh, hm, st, is, vxc, oep)
 This routine follows closely the one of PRB 68, 035103 (2003) Below we refer to the equation number of this paper. More...
 
subroutine, public zxc_oep_mix (oep, mesh, ss, rho, is)
 A routine that takes care of mixing the potential. More...
 

Variables

integer, parameter, public oep_level_none = 1
 the OEP levels More...
 
integer, parameter, public oep_level_kli = 3
 
integer, parameter, public oep_level_full = 5
 
integer, parameter, public oep_mixing_scheme_const = 1
 Mixing schemes. More...
 
integer, parameter, public oep_mixing_scheme_bb = 2
 
integer, parameter, public oep_mixing_scheme_dens = 3
 
integer, parameter, public oep_type_exx = 1
 The different types of OEP that we can work with. More...
 
integer, parameter, public oep_type_mgga = 2
 
integer, parameter, public oep_type_sic = 3
 
integer, parameter, public oep_type_photons = 4
 

Function/Subroutine Documentation

◆ xc_oep_init()

subroutine, public xc_oep_oct_m::xc_oep_init ( type(xc_oep_t), intent(inout)  oep,
type(namespace_t), intent(in)  namespace,
type(grid_t), intent(inout)  gr,
type(states_elec_t), intent(in)  st,
type(multicomm_t), intent(in)  mc,
class(space_t), intent(in)  space,
integer, intent(in)  oep_type 
)

Definition at line 216 of file xc_oep.F90.

◆ xc_oep_end()

subroutine, public xc_oep_oct_m::xc_oep_end ( class(xc_oep_t), intent(inout)  oep)

Definition at line 355 of file xc_oep.F90.

◆ xc_oep_write_info()

subroutine, public xc_oep_oct_m::xc_oep_write_info ( type(xc_oep_t), intent(in)  oep,
integer, intent(in), optional  iunit,
type(namespace_t), intent(in), optional  namespace 
)

Definition at line 377 of file xc_oep.F90.

◆ xc_oep_spinfactor()

subroutine, public xc_oep_oct_m::xc_oep_spinfactor ( class(xc_oep_t), intent(inout)  oep,
integer, intent(in)  nspin 
)

A couple of auxiliary functions for oep.

Definition at line 395 of file xc_oep.F90.

◆ xc_oep_analyzeeigen()

subroutine, public xc_oep_oct_m::xc_oep_analyzeeigen ( class(xc_oep_t), intent(inout)  oep,
type(states_elec_t), intent(in)  st,
integer, intent(in)  is 
)
Parameters
[in]isspin/k-point index

Definition at line 417 of file xc_oep.F90.

◆ xc_kli_pauli_solve()

subroutine xc_oep_oct_m::xc_kli_pauli_solve ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(xc_oep_t), intent(inout)  oep 
)
private

Explicit solution of the KLI equation for Pauli spinors.

More precisely, this implements the explicit solution of Eq. F12 of Tancogne-Dejean et al., PRB 107, 165111 (2023).

Definition at line 494 of file xc_oep.F90.

◆ get_rotation_matrix()

subroutine xc_oep_oct_m::get_rotation_matrix ( real(real64), dimension(:), intent(in)  dens,
real(real64), intent(out)  alpha,
real(real64), intent(out)  betar,
real(real64), intent(out)  betai 
)
private

Definition at line 793 of file xc_oep.F90.

◆ rotate_to_local()

subroutine xc_oep_oct_m::rotate_to_local ( real(real64), dimension(:), intent(in)  mat,
real(real64), intent(in)  alpha,
real(real64), intent(in)  betar,
real(real64), intent(in)  betai,
real(real64), intent(in)  alpha2,
real(real64), intent(in)  beta2,
real(real64), dimension(:), intent(out)  rot_mat 
)
private

Definition at line 830 of file xc_oep.F90.

◆ rotate_to_global()

subroutine xc_oep_oct_m::rotate_to_global ( real(real64), dimension(:), intent(in)  mat,
real(real64), intent(in)  alpha,
real(real64), intent(in)  betar,
real(real64), intent(in)  betai,
real(real64), intent(in)  alpha2,
real(real64), intent(in)  beta2,
real(real64), dimension(:), intent(out)  rot_mat 
)
private

Definition at line 848 of file xc_oep.F90.

◆ oep_sic_pauli()

subroutine xc_oep_oct_m::oep_sic_pauli ( type(xc_t), intent(inout)  xcs,
type(grid_t), intent(in)  gr,
type(poisson_t), intent(in)  psolver,
type(namespace_t), intent(in)  namespace,
type(space_t), intent(in)  space,
real(real64), intent(in)  rcell_volume,
type(states_elec_t), intent(inout)  st,
type(kpoints_t), intent(in)  kpoints,
type(xc_oep_t), intent(inout)  oep,
real(real64), intent(inout)  ex,
real(real64), intent(inout)  ec 
)
private

This routine calculates the SIC functional for the spinor case.

Definition at line 885 of file xc_oep.F90.

◆ dxc_kli_solve()

subroutine xc_oep_oct_m::dxc_kli_solve ( class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(xc_oep_t), intent(inout)  oep,
real(real64), intent(in)  rcell_volume 
)
private

This routine solves the KLI approximation to the OEP equation.

This implements the direct solution of the KLI equation.

Definition at line 1062 of file xc_oep.F90.

◆ doep_sic()

subroutine xc_oep_oct_m::doep_sic ( type(xc_t), intent(inout)  xcs,
type(grid_t), intent(in)  gr,
type(poisson_t), intent(in)  psolver,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
real(real64), intent(in)  rcell_volume,
type(states_elec_t), intent(inout)  st,
type(kpoints_t), intent(in)  kpoints,
integer, intent(in)  is,
type(xc_oep_t), intent(inout)  oep,
real(real64), intent(inout)  ex,
real(real64), intent(inout)  ec 
)
private

This routine calculates the SIC exchange functional.

Definition at line 1317 of file xc_oep.F90.

◆ dxc_oep_calc()

subroutine, public xc_oep_oct_m::dxc_oep_calc ( type(xc_oep_t), intent(inout)  oep,
type(namespace_t), intent(in)  namespace,
type(xc_t), intent(inout)  xcs,
type(grid_t), intent(in)  gr,
type(hamiltonian_elec_t), intent(inout)  hm,
type(states_elec_t), intent(inout), target  st,
class(space_t), intent(in)  space,
real(real64), intent(in)  rcell_volume,
real(real64), intent(inout)  ex,
real(real64), intent(inout)  ec,
real(real64), dimension(:,:), intent(inout), optional, contiguous  vxc 
)

This file handles the evaluation of the OEP potential, in the KLI or full OEP as described in S. Kuemmel and J. Perdew, PRL 90, 043004 (2003)

This file has to be outside the module xc, for it requires the Hpsi. This is why it needs the xc_functional module. I prefer to put it here since the rest of the Hamiltonian module does not know about the gory details of how xc is defined and calculated.

Parameters
[in,out]vxcvxc(meshnp, stdnspin)

Definition at line 1435 of file xc_oep.F90.

◆ dxc_oep_solve()

subroutine xc_oep_oct_m::dxc_oep_solve ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(hamiltonian_elec_t), intent(inout)  hm,
type(states_elec_t), intent(in)  st,
integer, intent(in)  is,
real(real64), dimension(:), intent(inout)  vxc,
type(xc_oep_t), intent(inout)  oep 
)
private

This routine follows closely the one of PRB 68, 035103 (2003) Below we refer to the equation number of this paper.

Parameters
[in,out]vxc(meshnp, given for the spin is)

Definition at line 1625 of file xc_oep.F90.

◆ dxc_oep_mix()

subroutine, public xc_oep_oct_m::dxc_oep_mix ( class(xc_oep_t), intent(inout)  oep,
type(mesh_t), intent(in)  mesh,
real(real64), dimension(:), intent(in), contiguous  ss,
real(real64), dimension(:), intent(in)  rho,
integer, intent(in)  is 
)

A routine that takes care of mixing the potential.

Definition at line 1765 of file xc_oep.F90.

◆ zxc_kli_solve()

subroutine xc_oep_oct_m::zxc_kli_solve ( class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(xc_oep_t), intent(inout)  oep,
real(real64), intent(in)  rcell_volume 
)
private

This routine solves the KLI approximation to the OEP equation.

This implements the direct solution of the KLI equation.

Definition at line 1899 of file xc_oep.F90.

◆ zoep_sic()

subroutine xc_oep_oct_m::zoep_sic ( type(xc_t), intent(inout)  xcs,
type(grid_t), intent(in)  gr,
type(poisson_t), intent(in)  psolver,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
real(real64), intent(in)  rcell_volume,
type(states_elec_t), intent(inout)  st,
type(kpoints_t), intent(in)  kpoints,
integer, intent(in)  is,
type(xc_oep_t), intent(inout)  oep,
real(real64), intent(inout)  ex,
real(real64), intent(inout)  ec 
)
private

This routine calculates the SIC exchange functional.

Definition at line 2154 of file xc_oep.F90.

◆ zxc_oep_calc()

subroutine, public xc_oep_oct_m::zxc_oep_calc ( type(xc_oep_t), intent(inout)  oep,
type(namespace_t), intent(in)  namespace,
type(xc_t), intent(inout)  xcs,
type(grid_t), intent(in)  gr,
type(hamiltonian_elec_t), intent(inout)  hm,
type(states_elec_t), intent(inout), target  st,
class(space_t), intent(in)  space,
real(real64), intent(in)  rcell_volume,
real(real64), intent(inout)  ex,
real(real64), intent(inout)  ec,
real(real64), dimension(:,:), intent(inout), optional, contiguous  vxc 
)

This file handles the evaluation of the OEP potential, in the KLI or full OEP as described in S. Kuemmel and J. Perdew, PRL 90, 043004 (2003)

This file has to be outside the module xc, for it requires the Hpsi. This is why it needs the xc_functional module. I prefer to put it here since the rest of the Hamiltonian module does not know about the gory details of how xc is defined and calculated.

Parameters
[in,out]vxcvxc(meshnp, stdnspin)

Definition at line 2272 of file xc_oep.F90.

◆ zxc_oep_solve()

subroutine xc_oep_oct_m::zxc_oep_solve ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(hamiltonian_elec_t), intent(inout)  hm,
type(states_elec_t), intent(in)  st,
integer, intent(in)  is,
real(real64), dimension(:), intent(inout)  vxc,
type(xc_oep_t), intent(inout)  oep 
)
private

This routine follows closely the one of PRB 68, 035103 (2003) Below we refer to the equation number of this paper.

Parameters
[in,out]vxc(meshnp, given for the spin is)

Definition at line 2462 of file xc_oep.F90.

◆ zxc_oep_mix()

subroutine, public xc_oep_oct_m::zxc_oep_mix ( class(xc_oep_t), intent(inout)  oep,
type(mesh_t), intent(in)  mesh,
real(real64), dimension(:), intent(in), contiguous  ss,
real(real64), dimension(:), intent(in)  rho,
integer, intent(in)  is 
)

A routine that takes care of mixing the potential.

Definition at line 2602 of file xc_oep.F90.

Variable Documentation

◆ oep_level_none

integer, parameter, public xc_oep_oct_m::oep_level_none = 1

the OEP levels

Definition at line 172 of file xc_oep.F90.

◆ oep_level_kli

integer, parameter, public xc_oep_oct_m::oep_level_kli = 3

Definition at line 172 of file xc_oep.F90.

◆ oep_level_full

integer, parameter, public xc_oep_oct_m::oep_level_full = 5

Definition at line 172 of file xc_oep.F90.

◆ oep_mixing_scheme_const

integer, parameter, public xc_oep_oct_m::oep_mixing_scheme_const = 1

Mixing schemes.

Definition at line 178 of file xc_oep.F90.

◆ oep_mixing_scheme_bb

integer, parameter, public xc_oep_oct_m::oep_mixing_scheme_bb = 2

Definition at line 178 of file xc_oep.F90.

◆ oep_mixing_scheme_dens

integer, parameter, public xc_oep_oct_m::oep_mixing_scheme_dens = 3

Definition at line 178 of file xc_oep.F90.

◆ oep_type_exx

integer, parameter, public xc_oep_oct_m::oep_type_exx = 1

The different types of OEP that we can work with.

Definition at line 184 of file xc_oep.F90.

◆ oep_type_mgga

integer, parameter, public xc_oep_oct_m::oep_type_mgga = 2

Definition at line 184 of file xc_oep.F90.

◆ oep_type_sic

integer, parameter, public xc_oep_oct_m::oep_type_sic = 3

Definition at line 184 of file xc_oep.F90.

◆ oep_type_photons

integer, parameter, public xc_oep_oct_m::oep_type_photons = 4

Definition at line 184 of file xc_oep.F90.