@@ -18,6 +18,37 @@ std::vector<int> XC_Functional::func_id(1);
1818int XC_Functional::func_type = 0 ;
1919bool XC_Functional::use_libxc = true ;
2020double XC_Functional::hybrid_alpha = 0.25 ;
21+ double static XC_Functional::default_dft_threshold=1.0e-10 ;
22+
23+ void XC_Functional::set_dft_ingred_thrs (const double d_thr=default_dft_threshold,
24+ const double z_thr=default_dft_threshold,
25+ const double g_thr=default_dft_threshold,
26+ const double t_thr=default_dft_threshold)
27+ { dens_threshold = d_thr;
28+ zeta_threshold = z_thr;
29+ grho_threshold = g_thr;
30+ tau_threshold = t_thr;
31+ }
32+
33+ double XC_Functional::get_dens_threshold ()
34+ {
35+ return dens_threshold;
36+ }
37+
38+ double XC_Functional::get_grho_threshold ()
39+ {
40+ return grho_threshold;
41+ }
42+
43+ double XC_Functional::get_zeta_threshold ()
44+ {
45+ return zeta_threshold;
46+ }
47+
48+ double XC_Functional::get_tau_threshold ()
49+ {
50+ return tau_threshold;
51+ }
2152
2253void XC_Functional::set_hybrid_alpha (const double alpha_in)
2354{
@@ -29,6 +60,11 @@ double XC_Functional::get_hybrid_alpha()
2960 return hybrid_alpha;
3061}
3162
63+ void XC_Functional::set_hybrid_alpha (const double alpha_in)
64+ {
65+ hybrid_alpha = alpha_in;
66+ }
67+
3268int XC_Functional::get_func_type ()
3369{
3470 return func_type;
@@ -39,6 +75,7 @@ void XC_Functional::set_xc_first_loop(const UnitCell& ucell)
3975the first scf iteration only calculate the functional without exact
4076exchange. but in "nscf" calculation, there is no need of "two-level"
4177method. */
78+ XC_Functional::set_dft_ingred_thrs ();
4279 if (ucell.atoms [0 ].ncpp .xc_func == " HF"
4380 || ucell.atoms [0 ].ncpp .xc_func == " PBE0"
4481 || ucell.atoms [0 ].ncpp .xc_func == " HSE" ) {
0 commit comments