@@ -82,13 +82,27 @@ std::pair<int,std::vector<int>> XC_Functional_Libxc::set_xc_type_libxc(std::stri
82
82
token = xc_func_in.substr (0 , pos);
83
83
int id = xc_functional_get_number (token.c_str ());
84
84
std::cout << " func,id" << token << " " << id << std::endl;
85
- if (id == -1 ) { ModuleBase::WARNING_QUIT (" XC_Functional::set_xc_type_libxc" ," functional name not recognized!" ); }
85
+ if (id == -1 )
86
+ {
87
+ std::string message = " Unrecognized exchange-correlation functional '" + xc_func_in +" '.\n "
88
+ " Possible source: Pseudopotential file or dft_functional parameter.\n "
89
+ " Please explicitly set dft_functional in INPUT,\n "
90
+ " or verify the functional name is supported." ;
91
+ ModuleBase::WARNING_QUIT (" XC_Functional::set_xc_type_libxc" ,message);
92
+ }
86
93
func_id.push_back (id);
87
94
xc_func_in.erase (0 , pos + delimiter.length ());
88
95
}
89
96
int id = xc_functional_get_number (xc_func_in.c_str ());
90
97
std::cout << " func,id" << xc_func_in << " " << id << std::endl;
91
- if (id == -1 ) { ModuleBase::WARNING_QUIT (" XC_Functional::set_xc_type_libxc" ," functional name not recognized!" ); }
98
+ if (id == -1 )
99
+ {
100
+ std::string message = " Unrecognized exchange-correlation functional '" + xc_func_in +" '.\n "
101
+ " Possible source: Pseudopotential file or dft_functional parameter.\n "
102
+ " Please explicitly set dft_functional in INPUT,\n "
103
+ " or verify the functional name is supported." ;
104
+ ModuleBase::WARNING_QUIT (" XC_Functional::set_xc_type_libxc" ,message);
105
+ }
92
106
func_id.push_back (id);
93
107
94
108
return std::make_pair (func_type, func_id);
0 commit comments