Octopus
xc_photons_oct_m Module Reference

This module implements the "photon-free" electron-photon exchange-correlation functional. More...

Detailed Description

Data Types

type  xc_photons_t
 This class described the 'photon-exchange' electron-photon xc functionals, based on QEDFT. More...
 

Functions/Subroutines

subroutine xc_photons_init (xc_photons, namespace, xc_photon, space, gr, st)
 initialize the photon-exchange functional More...
 
subroutine xc_photons_end (this)
 
subroutine xc_photons_v_ks (xc_photons, namespace, total_density, density, gr, space, psolver, ep, st)
 evaluate the KS potential and energy for the given functional More...
 
subroutine photon_free_vpx_lda (namespace, xc_photons, total_density, gr, space, psolver)
 compute the electron-photon exchange potential within the LDA More...
 
subroutine photon_free_vpx_wfc (namespace, xc_photons, total_density, gr, space, st)
 compute the electron-photon exchange potential based on wave functions More...
 
subroutine xc_photons_add_mean_field (xc_photons, gr, space, kpoints, st, time, dt)
 accumulate the results of time integral the paramagnetic current. More...
 
logical pure function xc_photons_wants_to_renormalize_mass (xc_photons)
 indicate whether the photon-exchange requires a renormalized electron mass More...
 
real(real64) pure function xc_photons_get_renormalized_emass (xc_photons)
 return the renormalized electron mass for the electron-photon exhange More...
 
subroutine xc_photons_mf_dump (xc_photons, restart, ierr)
 write restart information More...
 
subroutine xc_photons_mf_load (xc_photons, restart, space, ierr)
 load restart information More...
 

Variables

integer, parameter, private xc_photons_none = 0
 
integer, parameter, private xc_photons_lda = 1
 
integer, parameter, private xc_photons_wfs = 2
 

Function/Subroutine Documentation

◆ xc_photons_init()

subroutine xc_photons_oct_m::xc_photons_init ( class(xc_photons_t), intent(out)  xc_photons,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  xc_photon,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st 
)
private

initialize the photon-exchange functional

Definition at line 199 of file xc_photons.F90.

◆ xc_photons_end()

subroutine xc_photons_oct_m::xc_photons_end ( class(xc_photons_t), intent(inout)  this)
private

Definition at line 359 of file xc_photons.F90.

◆ xc_photons_v_ks()

subroutine xc_photons_oct_m::xc_photons_v_ks ( class(xc_photons_t), intent(inout)  xc_photons,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:), intent(in), pointer, contiguous  total_density,
real(real64), dimension(:, :), intent(in), allocatable  density,
class(grid_t), intent(in)  gr,
type(space_t), intent(in)  space,
type(poisson_t), intent(in)  psolver,
type(epot_t), intent(in)  ep,
type(states_elec_t), intent(inout)  st 
)
private

evaluate the KS potential and energy for the given functional

This routine is a wrapper to the specific routines

Definition at line 383 of file xc_photons.F90.

◆ photon_free_vpx_lda()

subroutine xc_photons_oct_m::photon_free_vpx_lda ( type(namespace_t), intent(in)  namespace,
type(xc_photons_t), intent(inout)  xc_photons,
real(real64), dimension(:), intent(in), pointer, contiguous  total_density,
class(grid_t), intent(in)  gr,
type(space_t), intent(in)  space,
type(poisson_t), intent(in)  psolver 
)
private

compute the electron-photon exchange potential within the LDA

This is based on the expression

\[ \nabla^{2} v_{{\rm{pxLDA}}}(\mathbf{r}) = -\sum_{\alpha=1}^{M_{p}} \frac{2 \pi^{2}\tilde{\lambda}_{\alpha}^{2}}{\tilde{\omega}_{\alpha}^{2}} \left[ (\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\nabla)^{2}\left(\frac{\rho(\mathbf{r})}{2V_{d}}\right)^{\frac{2}{d}} \right] \]

The calculation if the energy is determined by the variable PhotonXCEnergyMethod:

  • virial:

    \[ E_{\rm{px}}^{\rm{virial}} = \frac{1}{2}\int d\mathbf{r}\ \mathbf{r}\cdot[-\rho(\mathbf{r})\nabla v_{\rm{px}}(\mathbf{r})] \]

  • expectation_value:

    \[ E_{\rm{px}}[\rho] = -\sum_{\alpha=1}^{M_{p}} \frac{\tilde{\lambda}_{\alpha}^{2}}{2\tilde{\omega}_{\alpha}^{2}} \langle (\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\hat{\mathbf{J}}_{\rm{p}})\Phi[\rho] | (\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\hat{\mathbf{J}}_{\rm{p}})\Phi[\rho] \rangle \]

  • LDA:

    \[ E_{\rm pxLDA}[\rho]= \frac{-2\pi^{2}}{(d+2)({2V_{d}})^{\frac{2}{d}}} \sum_{\alpha=1}^{M_{p}} \frac{\tilde{\lambda}_{\alpha}^{2}}{\tilde{\omega}_{\alpha}^{2}} \int d\mathbf{r}\ \rho^{\frac{2+d}{d}}(\mathbf{r}) \]

Definition at line 472 of file xc_photons.F90.

◆ photon_free_vpx_wfc()

subroutine xc_photons_oct_m::photon_free_vpx_wfc ( type(namespace_t), intent(in)  namespace,
type(xc_photons_t), intent(inout)  xc_photons,
real(real64), dimension(:), intent(in), pointer, contiguous  total_density,
class(grid_t), intent(in)  gr,
type(space_t), intent(in)  space,
type(states_elec_t), intent(in)  st 
)
private

compute the electron-photon exchange potential based on wave functions

Note
This works only for one electron cases.

This is based on the expression

\[ v_{\rm{px}}(\mathbf{r}) = \sum_{\alpha=1}^{M_{p}}\frac{{\tilde{\lambda}}_{\alpha}^{2}}{2\tilde{\omega}_{\alpha}^{2}} \frac{(\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\nabla)^{2} \rho^{\frac{1}{2}}(\mathbf{r})}{\rho^{\frac{1}{2}}(\mathbf{r})} \]

The calculation if the energy is determined by the variable PhotonXCEnergyMethod:

  • virial:

    \[ E_{\rm{px}}^{\rm{virial}} = \frac{1}{2}\int d\mathbf{r}\ \mathbf{r}\cdot[-\rho(\mathbf{r})\nabla v_{\rm{px}}(\mathbf{r})] \]

  • expectation_value:

    \[ E_{\rm{px}}[\rho] = -\sum_{\alpha=1}^{M_{p}} \frac{\tilde{\lambda}_{\alpha}^{2}}{2\tilde{\omega}_{\alpha}^{2}} \langle (\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\hat{\mathbf{J}}_{\rm{p}})\Phi[\rho] | (\tilde{\mathbf{{\varepsilon}}}_{\alpha}\cdot\hat{\mathbf{J}}_{\rm{p}})\Phi[\rho] \rangle \]

Definition at line 755 of file xc_photons.F90.

◆ xc_photons_add_mean_field()

subroutine xc_photons_oct_m::xc_photons_add_mean_field ( class(xc_photons_t), intent(inout)  xc_photons,
class(grid_t), intent(in)  gr,
class(space_t), intent(in)  space,
type(kpoints_t), intent(in)  kpoints,
type(states_elec_t), intent(inout)  st,
real(real64), intent(in)  time,
real(real64), intent(in)  dt 
)
private

accumulate the results of time integral the paramagnetic current.

This is based on the formula

\[ \tilde{A}_{\rm{s},\alpha}(t) = -c\int_{-\infty}^{t} \frac{\tilde{\lambda}_{\alpha}^{2}}{\tilde{\omega}_{\alpha}} \sin\left[\tilde{\omega}_{\alpha}(t-t_1)\right] \tilde{\mathbf{{\varepsilon}}}_{\alpha} \cdot \mathbf{j}_{\rm{p}}(t_1) {dt_1} \]

Definition at line 896 of file xc_photons.F90.

◆ xc_photons_wants_to_renormalize_mass()

logical pure function xc_photons_oct_m::xc_photons_wants_to_renormalize_mass ( class(xc_photons_t), intent(in)  xc_photons)
private

indicate whether the photon-exchange requires a renormalized electron mass

Renormalizing the electron mass is required if using the free-space Lamb shift.

Definition at line 961 of file xc_photons.F90.

◆ xc_photons_get_renormalized_emass()

real(real64) pure function xc_photons_oct_m::xc_photons_get_renormalized_emass ( class(xc_photons_t), intent(in)  xc_photons)
private

return the renormalized electron mass for the electron-photon exhange

Definition at line 969 of file xc_photons.F90.

◆ xc_photons_mf_dump()

subroutine xc_photons_oct_m::xc_photons_mf_dump ( class(xc_photons_t), intent(in)  xc_photons,
type(restart_t), intent(in)  restart,
integer, intent(out)  ierr 
)
private

write restart information

Definition at line 978 of file xc_photons.F90.

◆ xc_photons_mf_load()

subroutine xc_photons_oct_m::xc_photons_mf_load ( class(xc_photons_t), intent(inout)  xc_photons,
type(restart_t), intent(in)  restart,
class(space_t), intent(in)  space,
integer, intent(out)  ierr 
)
private

load restart information

Definition at line 1018 of file xc_photons.F90.

Variable Documentation

◆ xc_photons_none

integer, parameter, private xc_photons_oct_m::xc_photons_none = 0
private

Definition at line 189 of file xc_photons.F90.

◆ xc_photons_lda

integer, parameter, private xc_photons_oct_m::xc_photons_lda = 1
private

Definition at line 189 of file xc_photons.F90.

◆ xc_photons_wfs

integer, parameter, private xc_photons_oct_m::xc_photons_wfs = 2
private

Definition at line 189 of file xc_photons.F90.