@@ -40,7 +40,7 @@ bool not_supported_xc_with_nonlocal_vdw(const std::string& xc_func_in)
4040
4141 if (xc_func.find (" VV10" ) != std::string::npos) { return true ; }
4242 /* known excluded: GGA_XC_VV10, HYB_GGA_XC_LC_VV10, MGGA_C_REVSCAN_VV10, MGGA_C_SCAN_VV10,
43- MGGA_C_SCANL_VV10, MGGA_XC_VCML_RVV10 */
43+ MGGA_C_SCANL_VV10, MGGA_XC_VCML_RVV10 */
4444
4545 const std::vector<std::string> not_supported = {" C09X" , " VCML" , " HYB_MGGA_XC_WB97M_V" , " MGGA_XC_B97M_V" };
4646 for (const std::string& str : not_supported)
@@ -54,8 +54,8 @@ bool not_supported_xc_with_nonlocal_vdw(const std::string& xc_func_in)
5454 {
5555 std::cout << " WARNING: range-seperated XC omega-B97 family with nonlocal correction term is used.\n "
5656 << " if you are not planning to use these functionals like wB97X-D3BJ that:\n "
57- << " XC_GGA_XC_WB97X_V with specified D3BJ DFT-D3 parameters, this is not what\n "
58- << " you want." << std::endl;
57+ << " XC_GGA_XC_WB97X_V with specified D3BJ DFT-D3 parameters, this is not what\n "
58+ << " you want." << std::endl;
5959 }
6060 return false ;
6161}
@@ -92,7 +92,8 @@ int xc_func_type_classifier(const std::string& xc_func,
9292std::pair<int ,std::vector<int >>
9393XC_Functional_Libxc::set_xc_type_libxc (const std::string& xc_func_in)
9494{
95- // check if the functional involves Laplacian of rho
95+ ModuleBase::TITLE (" XC_Functional" , " set_xc_type_libxc" );
96+ // check if the functional involves Laplacian of rho
9697 if (not_supported_xc_with_laplacian (xc_func_in))
9798 {
9899 ModuleBase::WARNING_QUIT (" XC_Functional::set_xc_type_libxc" ,
@@ -120,14 +121,14 @@ XC_Functional_Libxc::set_xc_type_libxc(const std::string& xc_func_in)
120121 }
121122
122123 // check if there is None (no, we dont check it)
123- int func_type = xcfunc_type_.front (); // all functionals are of the same type
124+ int func_type = xcfunc_type_.front (); // all functionals are of the same type
124125 // if (func_type == 0)
125126 // {
126127 // ModuleBase::WARNING_QUIT("XC_Functional::set_xc_type_libxc",
127128 // "Unrecognized functional type in '" + xc_func_in + "'.");
128129 // }
129130
130- // determine the functional id
131+ // determine the functional id
131132 std::vector<int > func_id (xcfunc_words_.size (), -1 );
132133 std::transform (xcfunc_words_.begin (), xcfunc_words_.end (), func_id.begin (),
133134 [](const std::string& func) { return xc_functional_get_number (func.c_str ()); });
@@ -144,7 +145,7 @@ XC_Functional_Libxc::set_xc_type_libxc(const std::string& xc_func_in)
144145 }
145146
146147 // return
147- return std::make_pair (func_type, func_id);
148+ return std::make_pair (func_type, func_id);
148149}
149150
150151const std::vector<double > in_built_xc_func_ext_params (const int id)
@@ -176,45 +177,45 @@ const std::vector<double> in_built_xc_func_ext_params(const int id)
176177 return {0.04918 , 0.132 , 0.2533 , 0.349 ,
177178 0.35 /2.29 , 2.0 /2.29 , GlobalC::exx_info.info_global .hse_omega };
178179 // Long-range corrected functionals:
179- case XC_HYB_GGA_XC_LC_PBEOP: // LC version of PBE
180+ case XC_HYB_GGA_XC_LC_PBEOP: // LC version of PBE
180181 {
181- // This is a range-separated hybrid functional with range-separation constant 0.330,
182- // and 0.0% short-range and 100.0% long-range exact exchange,
183- // using the error function kernel.
182+ // This is a range-separated hybrid functional with range-separation constant 0.330,
183+ // and 0.0% short-range and 100.0% long-range exact exchange,
184+ // using the error function kernel.
184185 return { GlobalC::exx_info.info_global .hse_omega }; // Range separation constant: 0.33
185186 }
186- case XC_HYB_GGA_XC_LC_WPBE: // Long-range corrected PBE (LC-wPBE) by Vydrov and Scuseria
187+ case XC_HYB_GGA_XC_LC_WPBE: // Long-range corrected PBE (LC-wPBE) by Vydrov and Scuseria
187188 {
188- // This is a range-separated hybrid functional with range-separation constant 0.400,
189- // and 0.0% short-range and 100.0% long-range exact exchange,
190- // using the error function kernel.
189+ // This is a range-separated hybrid functional with range-separation constant 0.400,
190+ // and 0.0% short-range and 100.0% long-range exact exchange,
191+ // using the error function kernel.
191192 return { std::stod (PARAM.inp .exx_fock_alpha [0 ]), // Fraction of Hartree-Fock exchange: 1.0
192193 std::stod (PARAM.inp .exx_erfc_alpha [0 ]), // Fraction of short-range exact exchange: -1.0
193194 GlobalC::exx_info.info_global .hse_omega }; // Range separation constant: 0.4
194195 }
195- case XC_HYB_GGA_XC_LRC_WPBE: // Long-range corrected PBE (LRC-wPBE) by by Rohrdanz, Martins and Herbert
196+ case XC_HYB_GGA_XC_LRC_WPBE: // Long-range corrected PBE (LRC-wPBE) by by Rohrdanz, Martins and Herbert
196197 {
197- // This is a range-separated hybrid functional with range-separation constant 0.300,
198- // and 0.0% short-range and 100.0% long-range exact exchange,
199- // using the error function kernel.
198+ // This is a range-separated hybrid functional with range-separation constant 0.300,
199+ // and 0.0% short-range and 100.0% long-range exact exchange,
200+ // using the error function kernel.
200201 return { std::stod (PARAM.inp .exx_fock_alpha [0 ]), // Fraction of Hartree-Fock exchange: 1.0
201202 std::stod (PARAM.inp .exx_erfc_alpha [0 ]), // Fraction of short-range exact exchange: -1.0
202203 GlobalC::exx_info.info_global .hse_omega }; // Range separation constant: 0.3
203204 }
204- case XC_HYB_GGA_XC_LRC_WPBEH: // Long-range corrected short-range hybrid PBE (LRC-wPBEh) by Rohrdanz, Martins and Herbert
205+ case XC_HYB_GGA_XC_LRC_WPBEH: // Long-range corrected short-range hybrid PBE (LRC-wPBEh) by Rohrdanz, Martins and Herbert
205206 {
206- // This is a range-separated hybrid functional with range-separation constant 0.200,
207- // and 20.0% short-range and 100.0% long-range exact exchange,
208- // using the error function kernel.
207+ // This is a range-separated hybrid functional with range-separation constant 0.200,
208+ // and 20.0% short-range and 100.0% long-range exact exchange,
209+ // using the error function kernel.
209210 return { std::stod (PARAM.inp .exx_fock_alpha [0 ]), // Fraction of Hartree-Fock exchange: 1.0
210211 std::stod (PARAM.inp .exx_erfc_alpha [0 ]), // Fraction of short-range exact exchange: -0.8
211212 GlobalC::exx_info.info_global .hse_omega }; // Range separation constant: 0.2
212213 }
213- case XC_HYB_GGA_XC_CAM_PBEH: // CAM hybrid screened exchange PBE version
214+ case XC_HYB_GGA_XC_CAM_PBEH: // CAM hybrid screened exchange PBE version
214215 {
215- // This is a range-separated hybrid functional with range-separation constant 0.700,
216- // and 100.0% short-range and 20.0% long-range exact exchange,
217- // using the error function kernel.
216+ // This is a range-separated hybrid functional with range-separation constant 0.700,
217+ // and 100.0% short-range and 20.0% long-range exact exchange,
218+ // using the error function kernel.
218219 return { std::stod (PARAM.inp .exx_fock_alpha [0 ]), // Fraction of Hartree-Fock exchange: 0.2
219220 std::stod (PARAM.inp .exx_erfc_alpha [0 ]), // Fraction of short-range exact exchange: 0.8
220221 GlobalC::exx_info.info_global .hse_omega }; // Range separation constant: 0.7
@@ -287,10 +288,10 @@ XC_Functional_Libxc::init_func(const std::vector<int> &func_id,
287288
288289void XC_Functional_Libxc::finish_func (std::vector<xc_func_type> &funcs)
289290{
290- for (xc_func_type func : funcs)
291+ for (xc_func_type func : funcs)
291292 {
292- xc_func_end (&func);
293- }
293+ xc_func_end (&func);
294+ }
294295}
295296
296297#endif
0 commit comments