#include <pot_hxc_lrtd.h>
|
| | PotHxcLR (std::shared_ptr< const KernelXC > kernel, const ModulePW::PW_Basis &rho_basis, const UnitCell &ucell, const int nrxx, const int nspin, const SpinType &st) |
| | ~PotHxcLR () |
| virtual void | cal_v_eff (double **rho, const UnitCell &ucell, ModuleBase::matrix &v_eff, const std::vector< int > &ispin_op={ 0, 0 }) const override |
| const KernelXC & | xc_kernel_components () const |
| | PotLRBase (const ModulePW::PW_Basis &rho_basis, const int &nspin, const int &nrxx, const double &tpiba) |
| const ModulePW::PW_Basis & | get_rho_basis () const |
◆ Tfunc
Initial value: std::function<void(const double* const ,
const std::vector<int>& ispin_op) >
◆ SpinType
S1: the nspin=1 singlet LR kernel, 2*K^Hartree + 2*K^xc. The factor 2 on both terms is what makes it equal to S2_singlet. S1_gs: the nspin=1 counterpart of S2_gs, i.e. the ground-state Hxc kernel K^Hartree + K^xc = S1 / 2. This is what pot_hxc_gs needs at nspin=1. S2_singlet: 2*K^Hartree + K^xc_{upup} + K^xc_{updown} S2_triplet: K^xc_{upup} - K^xc_{updown} S2_updown: K^Hartree + (K^xc_{upup}, K^xc_{updown}, K^xc_{downup} or K^xc_{downdown}), according to ispin_op (for spin-polarized systems) S2_gs: the nspin=2 ground-state Hxc kernel K^Hartree + (K^xc_{upup} + K^xc_{updown})/2 = S2_singlet / 2. Used for pot_hxc_gs in LR gradients, where the convention is K_Hxc(singlet) = 2 * pot_hxc_gs. The 1/2 on the xc part is not a convention but the chain rule: the derivative is taken w.r.t. the total density matrix, and $\partial v_u/\partial\rho = (f_{uu}+f_{ud})/2$ because $\rho_u=\rho_d=\rho/2$. The Hartree part needs no halving. Do NOT use S1 here when nspin=2: KernelXC is built with the input nspin, so the kernel arrays carry 3 spin components per grid point while the S1 integrand indexes them as if there were 1.
| Enumerator |
|---|
| S1 | |
| S2_singlet | |
| S2_triplet | |
| S2_updown | |
| S2_gs | |
| S1_gs | |
◆ XCType
XCType here is to determin the method of integration from kernel to potential, not the way calculating the kernel.
| Enumerator |
|---|
| None | |
| LDA | |
| GGA | |
| HYB_GGA | |
◆ PotHxcLR()
Bind an already-evaluated, shared coefficient set; never evaluate XC here. nspin must match the kernel. Its own metadata selects the integration path, regardless of which functional was initialized most recently elsewhere.
◆ ~PotHxcLR()
| LR::PotHxcLR::~PotHxcLR |
( |
| ) |
|
|
inline |
◆ add_v_hartree()
Hartree potential of the transition density, built from scratch().rhog and accumulated into v_eff scaled by factor. Replaces H_Hartree_pw::v_hartree, which for the LR use case (a) re-did the forward FFT of $\rho^X$ that the GGA branch needs anyway, (b) accumulated a Hartree "energy" of the transition density and pushed it through Parallel_Reduce::reduce_pool on every call – a per-call collective whose result is never read, and which clobbers the global H_Hartree_pw::hartree_energy – and (c) returned a full matrix by value, to which v_eff += 2 * (...) then added a second temporary of the same size.
◆ build_spin_combos()
| void LR::PotHxcLR::build_spin_combos |
( |
const bool | gga | ) |
|
|
private |
◆ cal_v_eff()
| void LR::PotHxcLR::cal_v_eff |
( |
double ** | rho, |
|
|
const UnitCell & | ucell, |
|
|
ModuleBase::matrix & | v_eff, |
|
|
const std::vector< int > & | ispin_op = { 0,0 } ) const |
|
overridevirtual |
◆ scratch()
◆ set_integral_func()
| void LR::PotHxcLR::set_integral_func |
( |
const SpinType & | s, |
|
|
const XCType & | xc ) |
|
private |
◆ xc_kernel_components()
| const KernelXC & LR::PotHxcLR::xc_kernel_components |
( |
| ) |
const |
|
inline |
◆ kernel_to_potential_
◆ spin_type_
◆ v2rho2_comb_
| std::vector<double> LR::PotHxcLR::v2rho2_comb_ |
|
private |
◆ vsigma_comb_
| std::vector<double> LR::PotHxcLR::vsigma_comb_ |
|
private |
◆ xc_kernel_components_
| const std::shared_ptr<const KernelXC> LR::PotHxcLR::xc_kernel_components_ |
|
private |
different components of local and semi-local xc kernels: LDA: v2rho2 GGA: v2rho2, v2rhosigma, v2sigma2 meta-GGA: v2rho2, v2rhosigma, v2sigma2, v2rholap, v2rhotau, v2sigmalap, v2sigmatau, v2laptau, v2lap2, v2tau2 To allow different potential objects sharing the same kernel.
◆ xc_type_
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.cpp