ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
dfpt_xc_analytic.h
Go to the documentation of this file.
1#ifndef DFPT_XC_ANALYTIC_H
2#define DFPT_XC_ANALYTIC_H
3
4#ifdef __LIBXC
5
6#include "dfpt_rho.h"
7
10
11#include <vector>
12
13namespace ModuleDFPT
14{
15
38class XC_First_Order_Analytic : public XC_First_Order
39{
40 public:
41 XC_First_Order_Analytic(
42 const std::vector<int> &func_id,
43 const int func_type,
44 const std::vector<double> &rho0_r,
45 ModulePW::PW_Basis *pw_rho);
46
53 XC_First_Order_Analytic(
54 const std::vector<int> &func_id,
55 const int func_type,
56 const std::vector<double> &rho0_r,
57 ModulePW::PW_Basis *pw_rho,
58 const std::vector<std::vector<double>> &ext_params_per_func,
59 const std::vector<double> &weights);
60
61 void set_context(const ModuleBase::Vector3<double> &q_cart) const override;
62
63 void apply(
64 const std::vector<std::complex<double>> &drho_r, std::vector<std::complex<double>> &dvxc_r) const override;
65
66 private:
68 void init_gradient_(const std::vector<double> &rho0_r);
69
71 void init_kernel_fields_(const std::vector<double> &rho0_r);
72
73 int func_type_ = 1;
74 std::vector<int> func_id_;
75 std::vector<std::vector<double>> ext_params_;
76 std::vector<double> weights_;
77 ModulePW::PW_Basis *pw_rho_ = nullptr;
78
79 mutable ModuleBase::Vector3<double> q_cart_;
80 mutable bool q_set_ = false;
81
82 std::vector<std::vector<double>> grho_;
83 std::vector<double> k_rr_;
84 std::vector<double> k_sr_;
85 std::vector<double> k_ss_;
86 std::vector<double> k_s_;
87};
88
89} // namespace ModuleDFPT
90
91#endif // __LIBXC
92#endif // DFPT_XC_ANALYTIC_H
First-order exchange-correlation kernel contract (C6).
Definition dfpt_rho.h:39
Definition esolver_dfpt_pw.h:16