1#ifndef ABACUS_SOURCE_LCAO_MODULE_LR_POTENTIALS_POT_HXC_LRTD_H
2#define ABACUS_SOURCE_LCAO_MODULE_LR_POTENTIALS_POT_HXC_LRTD_H
6#include <unordered_map>
35 PotHxcLR(std::shared_ptr<const KernelXC> kernel,
40 const std::vector<int>& ispin_op = { 0,0 })
const override;
60 using Tfunc = std::function<void(
const double*
const ,
62 const std::vector<int>& ispin_op) >;
78 std::vector<ModuleBase::Vector3<double>>
drho;
79 std::vector<ModuleBase::Vector3<double>>
gdot;
80 std::vector<double>
vxc;
81 std::vector<std::complex<double>>
rhog;
82 std::vector<std::complex<double>>
vg;
83 void alloc(
const int nrxx,
const int npw,
const int nmaxgr,
const bool gga);
Calculate the exchange-correlation (XC) kernel ($f_{xc}=\delta^2E_xc/\delta\rho^2$) and store its com...
Definition xc_kernel.h:84
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)
Definition pot_hxc_lrtd.cpp:13
void set_integral_func(const SpinType &s, const XCType &xc)
Definition pot_hxc_lrtd.cpp:197
virtual void cal_v_eff(double **rho, const UnitCell &ucell, ModuleBase::matrix &v_eff, const std::vector< int > &ispin_op={ 0, 0 }) const override
Definition pot_hxc_lrtd.cpp:143
~PotHxcLR()
Definition pot_hxc_lrtd.h:38
std::vector< double > v2rho2_comb_
Definition pot_hxc_lrtd.h:103
SpinType
Definition pot_hxc_lrtd.h:29
@ S1
Definition pot_hxc_lrtd.h:29
@ S2_gs
Definition pot_hxc_lrtd.h:29
@ S1_gs
Definition pot_hxc_lrtd.h:29
@ S2_singlet
Definition pot_hxc_lrtd.h:29
@ S2_triplet
Definition pot_hxc_lrtd.h:29
@ S2_updown
Definition pot_hxc_lrtd.h:29
const SpinType spin_type_
Definition pot_hxc_lrtd.h:54
static Scratch & scratch()
Definition pot_hxc_lrtd.cpp:33
const std::shared_ptr< const KernelXC > xc_kernel_components_
Definition pot_hxc_lrtd.h:53
const KernelXC & xc_kernel_components() const
Definition pot_hxc_lrtd.h:42
void add_v_hartree(const UnitCell &ucell, ModuleBase::matrix &v_eff, const double factor) const
Definition pot_hxc_lrtd.cpp:117
XCType
XCType here is to determin the method of integration from kernel to potential, not the way calculatin...
Definition pot_hxc_lrtd.h:31
@ HYB_GGA
Definition pot_hxc_lrtd.h:31
@ None
Definition pot_hxc_lrtd.h:31
@ LDA
Definition pot_hxc_lrtd.h:31
@ GGA
Definition pot_hxc_lrtd.h:31
XCType xc_type_
Definition pot_hxc_lrtd.h:55
void build_spin_combos(const bool gga)
Definition pot_hxc_lrtd.cpp:70
std::map< SpinType, Tfunc > kernel_to_potential_
Definition pot_hxc_lrtd.h:64
std::function< void(const double *const, ModuleBase::matrix &, const std::vector< int > &ispin_op) > Tfunc
Definition pot_hxc_lrtd.h:60
std::vector< double > vsigma_comb_
GGA only.
Definition pot_hxc_lrtd.h:104
PotLRBase(const ModulePW::PW_Basis &rho_basis, const int &nspin, const int &nrxx, const double &tpiba)
Definition pot_lr_base.h:20
const int & nrxx
Definition pot_lr_base.h:27
const int & nspin
Definition pot_lr_base.h:28
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition esolver_lr_lcao_tddft.h:28
Definition pot_hxc_lrtd.h:77
std::vector< ModuleBase::Vector3< double > > gdot
integrand of the divergence
Definition pot_hxc_lrtd.h:79
std::vector< double > vxc
accumulated $v^{xc}$
Definition pot_hxc_lrtd.h:80
void alloc(const int nrxx, const int npw, const int nmaxgr, const bool gga)
Definition pot_hxc_lrtd.cpp:39
std::vector< std::complex< double > > rhog
$\rho^X(G)$, npw
Definition pot_hxc_lrtd.h:81
std::vector< std::complex< double > > vg
G-space scratch, nmaxgr.
Definition pot_hxc_lrtd.h:82
std::vector< ModuleBase::Vector3< double > > drho
$\nabla\rho^X$
Definition pot_hxc_lrtd.h:78