Octopus
exchange_operator_oct_m Module Reference

Data Types

type  ace_t
 
type  exchange_operator_t
 

Functions/Subroutines

subroutine, public exchange_operator_init (this, namespace, space, st, der, mc, stencil, kpoints, omega, alpha, beta)
 
subroutine, public exchange_operator_reinit (this, omega, alpha, beta, st)
 
subroutine, public exchange_operator_end (this)
 
subroutine, public exchange_operator_rdmft_occ_apply (this, mesh, hpsib)
 
subroutine, public dexchange_operator_single (this, namespace, space, mesh, st_d, kpoints, phase, ist, ik, psi, hpsi, rdmft, force_noace)
 
subroutine, public dexchange_operator_apply (this, namespace, space, mesh, st_d, kpoints, phase, psib, hpsib, rdmft, force_noace)
 
subroutine dexchange_operator_apply_standard (this, namespace, space, mesh, st_d, kpoints, phase, psib, hpsib, rdmft)
 
subroutine dexchange_operator_apply_ace (this, mesh, st_d, psib, hpsib)
 
subroutine, public dexchange_operator_compute_potentials (this, namespace, space, gr, st, xst, kpoints, F_out)
 
real(real64) function, public dexchange_operator_compute_ex (mesh, st, xst)
 Compute the exact exchange energy. More...
 
subroutine, public dexchange_operator_ace (this, namespace, mesh, st, xst, phase)
 
subroutine, public dexchange_operator_commute_r (this, namespace, mesh, st_d, ik, psi, gpsi)
 
subroutine, public dexchange_operator_hartree_apply (this, namespace, mesh, st_d, kpoints, exx_coef, psib, hpsib)
 
subroutine, public zexchange_operator_single (this, namespace, space, mesh, st_d, kpoints, phase, ist, ik, psi, hpsi, rdmft, force_noace)
 
subroutine, public zexchange_operator_apply (this, namespace, space, mesh, st_d, kpoints, phase, psib, hpsib, rdmft, force_noace)
 
subroutine zexchange_operator_apply_standard (this, namespace, space, mesh, st_d, kpoints, phase, psib, hpsib, rdmft)
 
subroutine zexchange_operator_apply_ace (this, mesh, st_d, psib, hpsib)
 
subroutine, public zexchange_operator_compute_potentials (this, namespace, space, gr, st, xst, kpoints, F_out)
 
real(real64) function, public zexchange_operator_compute_ex (mesh, st, xst)
 Compute the exact exchange energy. More...
 
subroutine, public zexchange_operator_ace (this, namespace, mesh, st, xst, phase)
 
subroutine, public zexchange_operator_commute_r (this, namespace, mesh, st_d, ik, psi, gpsi)
 
subroutine, public zexchange_operator_hartree_apply (this, namespace, mesh, st_d, kpoints, exx_coef, psib, hpsib)
 

Variables

type(fourier_space_op_tcoulb
 Operator in Fourier space. More...
 
real(real64), parameter, private tol_exx_weight = 1.0e-3_real64
 Minimum weight below which EXX is not added. More...
 

Function/Subroutine Documentation

◆ exchange_operator_init()

subroutine, public exchange_operator_oct_m::exchange_operator_init ( type(exchange_operator_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(states_elec_t), intent(in)  st,
type(derivatives_t), intent(in)  der,
type(multicomm_t), intent(in)  mc,
type(stencil_t), intent(in)  stencil,
type(kpoints_t), intent(in)  kpoints,
real(real64), intent(in)  omega,
real(real64), intent(in)  alpha,
real(real64), intent(in)  beta 
)

Definition at line 206 of file exchange_operator.F90.

◆ exchange_operator_reinit()

subroutine, public exchange_operator_oct_m::exchange_operator_reinit ( type(exchange_operator_t), intent(inout)  this,
real(real64), intent(in)  omega,
real(real64), intent(in)  alpha,
real(real64), intent(in)  beta,
type(states_elec_t), intent(in), optional, target  st 
)

Definition at line 248 of file exchange_operator.F90.

◆ exchange_operator_end()

subroutine, public exchange_operator_oct_m::exchange_operator_end ( type(exchange_operator_t), intent(inout)  this)

Definition at line 266 of file exchange_operator.F90.

◆ exchange_operator_rdmft_occ_apply()

subroutine, public exchange_operator_oct_m::exchange_operator_rdmft_occ_apply ( type(exchange_operator_t), intent(in)  this,
type(mesh_t), intent(in)  mesh,
class(wfs_elec_t), intent(inout)  hpsib 
)

Definition at line 289 of file exchange_operator.F90.

◆ dexchange_operator_single()

subroutine, public exchange_operator_oct_m::dexchange_operator_single ( type(exchange_operator_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
integer, intent(in)  ist,
integer, intent(in)  ik,
real(real64), dimension(:, :), intent(inout), contiguous  psi,
real(real64), dimension(:, :), intent(inout), contiguous  hpsi,
logical, intent(in)  rdmft,
logical, intent(in), optional  force_noace 
)

Definition at line 372 of file exchange_operator.F90.

◆ dexchange_operator_apply()

subroutine, public exchange_operator_oct_m::dexchange_operator_apply ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib,
logical, intent(in)  rdmft,
logical, intent(in), optional  force_noace 
)

Definition at line 403 of file exchange_operator.F90.

◆ dexchange_operator_apply_standard()

subroutine exchange_operator_oct_m::dexchange_operator_apply_standard ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib,
logical, intent(in)  rdmft 
)
private

Definition at line 430 of file exchange_operator.F90.

◆ dexchange_operator_apply_ace()

subroutine exchange_operator_oct_m::dexchange_operator_apply_ace ( type(exchange_operator_t), intent(in)  this,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  hpsib 
)
private

Definition at line 592 of file exchange_operator.F90.

◆ dexchange_operator_compute_potentials()

subroutine, public exchange_operator_oct_m::dexchange_operator_compute_potentials ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout), target  st,
type(states_elec_t), intent(inout)  xst,
type(kpoints_t), intent(in)  kpoints,
real(real64), dimension(:,:,:,:,:), intent(out), optional  F_out 
)
Parameters
[in,out]xstAction of V_X on a set of KS states
[out]f_outFor RDMFT

Definition at line 665 of file exchange_operator.F90.

◆ dexchange_operator_compute_ex()

real(real64) function, public exchange_operator_oct_m::dexchange_operator_compute_ex ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(states_elec_t), intent(in)  xst 
)

Compute the exact exchange energy.

\[ E_X = \frac{1}{2} \sum_{i, \sigma \mathbf{k}} w_\mathbf{k} f_{i\sigma\mathbf{k}} \int \psi^\ast_{i \sigma \mathbf{k}}(\mathbf{r}) W_{i \sigma \mathbf{k}}(\mathbf{r}) d\mathbf{r} \]

where

\[ W_{i\sigma\mathbf{k}}(\mathbf{r}) = - \sum_{j,\mathbf{k}^\prime} f_{j\sigma\mathbf{k}^\prime}\,\omega_{\mathbf{k}^\prime} V_{ij}^{\mathbf{k},\mathbf{k}^\prime,\sigma}(\mathbf{r}) \psi_{j\sigma\mathbf{k}^\prime}(\mathbf{r}) \]

is the action of the exchange operator on a set of Kohn-Sham states.

Note
The implementation ASSUMES that the appropriate range separation weight, exx_weight, and the electron occupation constant, stsmearel_per_state, have been absorbed in xst. This is what is done in the routine
Parameters
[in]stA set of KS states
[in]xstV_X operating on a set of KS states
Returns
Exact exchange energy

Definition at line 1198 of file exchange_operator.F90.

◆ dexchange_operator_ace()

subroutine, public exchange_operator_oct_m::dexchange_operator_ace ( type(exchange_operator_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout)  st,
type(states_elec_t), intent(inout)  xst,
type(phase_t), intent(in), optional  phase 
)

Definition at line 1239 of file exchange_operator.F90.

◆ dexchange_operator_commute_r()

subroutine, public exchange_operator_oct_m::dexchange_operator_commute_r ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
integer, intent(in)  ik,
real(real64), dimension(:, :), intent(in), contiguous  psi,
real(real64), dimension(:, :, :), intent(inout), contiguous  gpsi 
)

Definition at line 1365 of file exchange_operator.F90.

◆ dexchange_operator_hartree_apply()

subroutine, public exchange_operator_oct_m::dexchange_operator_hartree_apply ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
real(real64), intent(in)  exx_coef,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib 
)

Definition at line 1426 of file exchange_operator.F90.

◆ zexchange_operator_single()

subroutine, public exchange_operator_oct_m::zexchange_operator_single ( type(exchange_operator_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
integer, intent(in)  ist,
integer, intent(in)  ik,
complex(real64), dimension(:, :), intent(inout), contiguous  psi,
complex(real64), dimension(:, :), intent(inout), contiguous  hpsi,
logical, intent(in)  rdmft,
logical, intent(in), optional  force_noace 
)

Definition at line 1578 of file exchange_operator.F90.

◆ zexchange_operator_apply()

subroutine, public exchange_operator_oct_m::zexchange_operator_apply ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib,
logical, intent(in)  rdmft,
logical, intent(in), optional  force_noace 
)

Definition at line 1609 of file exchange_operator.F90.

◆ zexchange_operator_apply_standard()

subroutine exchange_operator_oct_m::zexchange_operator_apply_standard ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
type(phase_t), intent(in)  phase,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib,
logical, intent(in)  rdmft 
)
private

Definition at line 1636 of file exchange_operator.F90.

◆ zexchange_operator_apply_ace()

subroutine exchange_operator_oct_m::zexchange_operator_apply_ace ( type(exchange_operator_t), intent(in)  this,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  hpsib 
)
private

Definition at line 1798 of file exchange_operator.F90.

◆ zexchange_operator_compute_potentials()

subroutine, public exchange_operator_oct_m::zexchange_operator_compute_potentials ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout), target  st,
type(states_elec_t), intent(inout)  xst,
type(kpoints_t), intent(in)  kpoints,
complex(real64), dimension(:,:,:,:,:), intent(out), optional  F_out 
)
Parameters
[in,out]xstAction of V_X on a set of KS states
[out]f_outFor RDMFT

Definition at line 1871 of file exchange_operator.F90.

◆ zexchange_operator_compute_ex()

real(real64) function, public exchange_operator_oct_m::zexchange_operator_compute_ex ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(states_elec_t), intent(in)  xst 
)

Compute the exact exchange energy.

\[ E_X = \frac{1}{2} \sum_{i, \sigma \mathbf{k}} w_\mathbf{k} f_{i\sigma\mathbf{k}} \int \psi^\ast_{i \sigma \mathbf{k}}(\mathbf{r}) W_{i \sigma \mathbf{k}}(\mathbf{r}) d\mathbf{r} \]

where

\[ W_{i\sigma\mathbf{k}}(\mathbf{r}) = - \sum_{j,\mathbf{k}^\prime} f_{j\sigma\mathbf{k}^\prime}\,\omega_{\mathbf{k}^\prime} V_{ij}^{\mathbf{k},\mathbf{k}^\prime,\sigma}(\mathbf{r}) \psi_{j\sigma\mathbf{k}^\prime}(\mathbf{r}) \]

is the action of the exchange operator on a set of Kohn-Sham states.

Note
The implementation ASSUMES that the appropriate range separation weight, exx_weight, and the electron occupation constant, stsmearel_per_state, have been absorbed in xst. This is what is done in the routine
Parameters
[in]stA set of KS states
[in]xstV_X operating on a set of KS states
Returns
Exact exchange energy

Definition at line 2413 of file exchange_operator.F90.

◆ zexchange_operator_ace()

subroutine, public exchange_operator_oct_m::zexchange_operator_ace ( type(exchange_operator_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout)  st,
type(states_elec_t), intent(inout)  xst,
type(phase_t), intent(in), optional  phase 
)

Definition at line 2454 of file exchange_operator.F90.

◆ zexchange_operator_commute_r()

subroutine, public exchange_operator_oct_m::zexchange_operator_commute_r ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
integer, intent(in)  ik,
complex(real64), dimension(:, :), intent(in), contiguous  psi,
complex(real64), dimension(:, :, :), intent(inout), contiguous  gpsi 
)

Definition at line 2590 of file exchange_operator.F90.

◆ zexchange_operator_hartree_apply()

subroutine, public exchange_operator_oct_m::zexchange_operator_hartree_apply ( type(exchange_operator_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
type(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  st_d,
type(kpoints_t), intent(in)  kpoints,
real(real64), intent(in)  exx_coef,
class(wfs_elec_t), intent(inout)  psib,
class(wfs_elec_t), intent(inout)  hpsib 
)

Definition at line 2651 of file exchange_operator.F90.

Variable Documentation

◆ coulb

type(fourier_space_op_t) exchange_operator_oct_m::coulb
private

Operator in Fourier space.

Definition at line 198 of file exchange_operator.F90.

◆ tol_exx_weight

real(real64), parameter, private exchange_operator_oct_m::tol_exx_weight = 1.0e-3_real64
private

Minimum weight below which EXX is not added.

Definition at line 202 of file exchange_operator.F90.