Octopus
xc_noncollinear_oct_m Module Reference

Functions/Subroutines

subroutine, public xc_get_nc_vxc (gr, xcs, st, kpoints, space, namespace, rho, vxc, ex, ec, vtau, ex_density, ec_density)
 This routines is similar to xc_get_vxc but for noncollinear functionals, which are not implemented in libxc. More...
 
subroutine xc_nc_update_internal_quantities (gr, xcs, st, kpoints, space, namespace, rho, quantities)
 Given a functional, we are updating/transfering/computing the needed internal quantities that are later needed to perform an actual call to xc_compute_vxc. More...
 
subroutine xc_compute_vxc_nc (gr, xcs, st, namespace, quantities, vxc, ex, ec, vtau, ex_density, ec_density)
 This routines is similar to xc_update_internal_quantities but for noncollinear functionals, which are not implemented in libxc. More...
 
subroutine nc_mgga_exc_vxc (functl, namespace, n_block, l_dens, l_sigma, l_ldens, l_tau, l_dedd, l_vsigma, l_deddldens, l_dedtau, l_zk)
 Interface between the generic call to get the energy and potential and the calls to each specific functionals. More...
 
subroutine nc_br_vxc_exc (l_dens, l_sigma, l_ldens, l_tau, gamma, explicit, l_dedd, l_vsigma, l_dedldens, l_dedtau, l_zk)
 Computes the local curvature of the exchange-hole and get the corresponding values of x and b. More...
 
real(real64) function nc_br_get_x (ldens, lcurv)
 Computes the coefficient x from the local density and the local curvature of the exchange hole, see Eq. B7 in PRB 107, 165111 (2023) More...
 
real(real64) function nc_br_get_x_explicit (ldens, lcurv)
 Computes the coefficient x from the local density and the local curvature of the exchange hole, see Eq. B7 in PRB 107, 165111 (2023) More...
 
real(real64) function nc_br_rtsafe (rhs, tol)
 This is inspired by the safe Newton-Raphson method from numerical recipies This function returns the value of x that fulfill the equation \(x exp(-2/3*x)/(x-2) = rhs\). More...
 
subroutine nc_cs_vxc_exc (l_dens, l_sigma, l_ldens, l_tau, l_dedd, l_vsigma, l_dedldens, l_dedtau, l_zk)
 Implements the correlation energy functional defined in Tancogne-Dejean et al., PRB 107, 165111 (2023) More...
 
subroutine copy_global_to_local (global, local, n_block, nspin, ip)
 
subroutine copy_local_to_global (local, global, n_block, spin_channels, ip)
 
subroutine xc_release_internal_quantities (quantities)
 

Function/Subroutine Documentation

◆ xc_get_nc_vxc()

subroutine, public xc_noncollinear_oct_m::xc_get_nc_vxc ( type(grid_t), intent(in)  gr,
type(xc_t), intent(inout), target  xcs,
type(states_elec_t), intent(in)  st,
type(kpoints_t), intent(in)  kpoints,
type(space_t), intent(in)  space,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:, :), intent(in)  rho,
real(real64), dimension(:,:), intent(inout), contiguous  vxc,
real(real64), intent(inout), optional  ex,
real(real64), intent(inout), optional  ec,
real(real64), dimension(:,:), intent(inout), optional  vtau,
real(real64), dimension(:), intent(out), optional, target  ex_density,
real(real64), dimension(:), intent(out), optional, target  ec_density 
)

This routines is similar to xc_get_vxc but for noncollinear functionals, which are not implemented in libxc.

Parameters
[in,out]xcsDetails about the xc functional used
[in]stState of the system (wavefunction,eigenvalues...)
[in]rhoElectronic density
[in,out]vxcXC potential
[in,out]exExchange energy.
[in,out]ecCorrelation energy.
[in,out]vtauDerivative wrt (two times kinetic energy density)
[out]ex_densityThe exchange energy density
[out]ec_densityThe correlation energy density

Definition at line 166 of file xc_noncollinear.F90.

◆ xc_nc_update_internal_quantities()

subroutine xc_noncollinear_oct_m::xc_nc_update_internal_quantities ( type(grid_t), intent(in)  gr,
type(xc_t), intent(inout), target  xcs,
type(states_elec_t), intent(in)  st,
type(kpoints_t), intent(in)  kpoints,
type(space_t), intent(in)  space,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:,:), intent(in), target  rho,
type(internal_quantities_t), intent(inout)  quantities 
)
private

Given a functional, we are updating/transfering/computing the needed internal quantities that are later needed to perform an actual call to xc_compute_vxc.

Parameters
[in]grDiscretization and the derivative operators and details
[in,out]xcsDetails about the xc functional used
[in]stState of the system (wavefunction,eigenvalues...)
[in,out]quantitiesInternal quantities

Definition at line 198 of file xc_noncollinear.F90.

◆ xc_compute_vxc_nc()

subroutine xc_noncollinear_oct_m::xc_compute_vxc_nc ( type(grid_t), intent(in)  gr,
type(xc_t), intent(inout), target  xcs,
type(states_elec_t), intent(in)  st,
type(namespace_t), intent(in)  namespace,
type(internal_quantities_t), intent(inout)  quantities,
real(real64), dimension(:,:), intent(inout), contiguous  vxc,
real(real64), intent(inout), optional  ex,
real(real64), intent(inout), optional  ec,
real(real64), dimension(:,:), intent(inout), optional, contiguous  vtau,
real(real64), dimension(:), intent(out), optional, target  ex_density,
real(real64), dimension(:), intent(out), optional, target  ec_density 
)
private

This routines is similar to xc_update_internal_quantities but for noncollinear functionals, which are not implemented in libxc.

Parameters
[in,out]xcsDetails about the xc functional used
[in]stState of the system (wavefunction,eigenvalues...)
[in,out]quantitiesInternal quantities
[in,out]vxcXC potential
[in,out]exExchange energy.
[in,out]ecCorrelation energy.
[in,out]vtauDerivative wrt (two times kinetic energy density)
[out]ex_densityThe exchange energy density
[out]ec_densityThe correlation energy density

Definition at line 268 of file xc_noncollinear.F90.

◆ nc_mgga_exc_vxc()

subroutine xc_noncollinear_oct_m::nc_mgga_exc_vxc ( type(xc_functional_t), intent(in)  functl,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  n_block,
real(real64), dimension(:,:), intent(in)  l_dens,
real(real64), dimension(:,:), intent(in)  l_sigma,
real(real64), dimension(:,:), intent(in)  l_ldens,
real(real64), dimension(:,:), intent(in)  l_tau,
real(real64), dimension(:,:), intent(out)  l_dedd,
real(real64), dimension(:,:), intent(out)  l_vsigma,
real(real64), dimension(:,:), intent(out)  l_deddldens,
real(real64), dimension(:,:), intent(out)  l_dedtau,
real(real64), dimension(:), intent(out), optional  l_zk 
)
private

Interface between the generic call to get the energy and potential and the calls to each specific functionals.

Definition at line 738 of file xc_noncollinear.F90.

◆ nc_br_vxc_exc()

subroutine xc_noncollinear_oct_m::nc_br_vxc_exc ( real(real64), dimension(:), intent(in)  l_dens,
real(real64), dimension(:), intent(in)  l_sigma,
real(real64), dimension(:), intent(in)  l_ldens,
real(real64), dimension(:), intent(in)  l_tau,
real(real64), intent(in)  gamma,
logical, intent(in)  explicit,
real(real64), dimension(:), intent(out)  l_dedd,
real(real64), dimension(:), intent(out)  l_vsigma,
real(real64), dimension(:), intent(out)  l_dedldens,
real(real64), dimension(:), intent(out)  l_dedtau,
real(real64), intent(out), optional  l_zk 
)
private

Computes the local curvature of the exchange-hole and get the corresponding values of x and b.

This allows to compute the local Coulomb potential and the energy The exchange potential is finally constructed from the potential

Definition at line 836 of file xc_noncollinear.F90.

◆ nc_br_get_x()

real(real64) function xc_noncollinear_oct_m::nc_br_get_x ( real(real64), intent(in)  ldens,
real(real64), intent(in)  lcurv 
)
private

Computes the coefficient x from the local density and the local curvature of the exchange hole, see Eq. B7 in PRB 107, 165111 (2023)

Definition at line 978 of file xc_noncollinear.F90.

◆ nc_br_get_x_explicit()

real(real64) function xc_noncollinear_oct_m::nc_br_get_x_explicit ( real(real64), intent(in)  ldens,
real(real64), intent(in)  lcurv 
)
private

Computes the coefficient x from the local density and the local curvature of the exchange hole, see Eq. B7 in PRB 107, 165111 (2023)

Definition at line 997 of file xc_noncollinear.F90.

◆ nc_br_rtsafe()

real(real64) function xc_noncollinear_oct_m::nc_br_rtsafe ( real(real64), intent(in)  rhs,
real(real64), intent(in)  tol 
)
private

This is inspired by the safe Newton-Raphson method from numerical recipies This function returns the value of x that fulfill the equation \(x exp(-2/3*x)/(x-2) = rhs\).

Definition at line 1060 of file xc_noncollinear.F90.

◆ nc_cs_vxc_exc()

subroutine xc_noncollinear_oct_m::nc_cs_vxc_exc ( real(real64), dimension(:), intent(in)  l_dens,
real(real64), dimension(:), intent(in)  l_sigma,
real(real64), dimension(:), intent(in)  l_ldens,
real(real64), dimension(:), intent(in)  l_tau,
real(real64), dimension(:), intent(out)  l_dedd,
real(real64), dimension(:), intent(out)  l_vsigma,
real(real64), dimension(:), intent(out)  l_dedldens,
real(real64), dimension(:), intent(out)  l_dedtau,
real(real64), intent(out), optional  l_zk 
)
private

Implements the correlation energy functional defined in Tancogne-Dejean et al., PRB 107, 165111 (2023)

Definition at line 1126 of file xc_noncollinear.F90.

◆ copy_global_to_local()

subroutine xc_noncollinear_oct_m::copy_global_to_local ( real(real64), dimension(:,:), intent(in)  global,
real(real64), dimension(:,:), intent(out)  local,
integer, intent(in)  n_block,
integer, intent(in)  nspin,
integer, intent(in)  ip 
)
private

Definition at line 1231 of file xc_noncollinear.F90.

◆ copy_local_to_global()

subroutine xc_noncollinear_oct_m::copy_local_to_global ( real(real64), dimension(:,:), intent(in)  local,
real(real64), dimension(:,:), intent(inout)  global,
integer, intent(in)  n_block,
integer, intent(in)  spin_channels,
integer, intent(in)  ip 
)
private

Definition at line 1252 of file xc_noncollinear.F90.

◆ xc_release_internal_quantities()

subroutine xc_noncollinear_oct_m::xc_release_internal_quantities ( type(internal_quantities_t), intent(inout)  quantities)
private

Definition at line 1273 of file xc_noncollinear.F90.