1#ifndef XC_FUNCTIONAL_LIBXC_H
2#define XC_FUNCTIONAL_LIBXC_H
20namespace XC_Functional_Libxc
28 extern std::pair<int,std::vector<int>> set_xc_type_libxc(
const std::string& xc_func_in);
46 extern std::vector<xc_func_type> init_func(
const std::vector<int> &func_id,
47 const int xc_polarized);
49 extern void finish_func(std::vector<xc_func_type> &funcs);
56 extern std::tuple<double,double,ModuleBase::matrix> v_xc_libxc(
57 const std::vector<int> &func_id,
62 const std::map<int, double>* scaling_factor =
nullptr);
65 extern std::tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> v_xc_meta(
66 const std::vector<int> &func_id,
78 extern std::vector<double> convert_rho(
80 const std::size_t nrxx,
84 extern std::tuple<std::vector<double>, std::vector<double>> convert_rho_amag_nspin4(
86 const std::size_t nrxx,
90 extern std::vector<std::vector<ModuleBase::Vector3<double>>> cal_gdr(
92 const std::size_t nrxx,
93 const std::vector<double> &rho,
98 extern std::vector<double> convert_sigma(
102 extern std::vector<double> cal_sgn(
103 const double rho_threshold,
104 const double grho_threshold,
105 const xc_func_type &
func,
107 const std::size_t nrxx,
108 const std::vector<double> &rho,
109 const std::vector<double> &sigma);
112 extern double convert_etxc(
114 const std::size_t nrxx,
115 const std::vector<double> &sgn,
116 const std::vector<double> &rho,
117 std::vector<double> exc);
120 extern std::pair<double,ModuleBase::matrix> convert_vtxc_v(
121 const xc_func_type &
func,
123 const std::size_t nrxx,
124 const std::vector<double> &sgn,
125 const std::vector<double> &rho,
127 const std::vector<double> &vrho,
128 const std::vector<double> &vsigma,
133 extern std::vector<std::vector<double>> cal_dh(
135 const std::size_t nrxx,
136 const std::vector<double> &sgn,
138 const std::vector<double> &vsigma,
144 const std::size_t nrxx,
146 const std::vector<double> &amag,
154 extern void xc_spin_libxc(
155 const std::vector<int> &func_id,
156 const double &rhoup,
const double &rhodw,
157 double &exc,
double &vxcup,
double &vxcdw);
165 extern void gcxc_libxc(
166 const std::vector<int> &func_id,
167 const double &rho,
const double &grho,
168 double &sxc,
double &v1xc,
double &v2xc);
171 extern void gcxc_spin_libxc(
172 const std::vector<int> &func_id,
173 const double rhoup,
const double rhodw,
175 double &sxc,
double &v1xcup,
double &v1xcdw,
double &v2xcup,
double &v2xcdw,
double &v2xcud);
184 const std::vector<int> &func_id,
185 const double &rho,
const double &grho,
const double &atau,
double &sxc,
186 double &v1xc,
double &v2xc,
double &v3xc);
188 extern void tau_xc_spin(
189 const std::vector<int> &func_id,
190 double rhoup,
double rhodw,
192 double tauup,
double taudw,
193 double &sxc,
double &v1xcup,
double &v1xcdw,
double &v2xcup,
double &v2xcdw,
double &v2xcud,
194 double &v3xcup,
double &v3xcdw);
3 elements vector
Definition vector3.h:22
double func(const Vec3 &r, const std::vector< Vec3 > &R, const std::vector< double > &a, const std::vector< double > &n)
Definition test_partition.cpp:50