@@ -10,6 +10,84 @@ void ReadInput::item_ofdft()
1010 {
1111 Input_Item item (" of_kinetic" );
1212 item.annotation = " kinetic energy functional, such as tf, vw, wt" ;
13+ item.check_value = [](const Input_Item& item, const Parameter& para) {
14+ #ifndef __MLKEDF
15+ if (para.input .of_kinetic == " ml" || para.input .of_kinetic == " mpn" || para.input .of_kinetic == " cpn5" )
16+ {
17+ ModuleBase::WARNING_QUIT (" ReadInput" , " ML KEDF is not supported." );
18+ }
19+ #endif
20+ if (para.input .of_kinetic != " tf" && para.input .of_kinetic != " vw" && para.input .of_kinetic != " wt"
21+ && para.input .of_kinetic != " lkt" && para.input .of_kinetic != " tf+"
22+ && para.input .of_kinetic != " ml" && para.input .of_kinetic != " mpn" && para.input .of_kinetic != " cpn5" )
23+ {
24+ ModuleBase::WARNING_QUIT (" ReadInput" , " of_kinetic must be tf, vw, tf+, wt, lkt, ml, mpn, or cpn5" );
25+ }
26+ };
27+ item.reset_value = [](const Input_Item& item, Parameter& para) {
28+ // Set the default parameters for MPN or CPN5 KEDF
29+ if (para.input .of_kinetic == " mpn" )
30+ {
31+ para.input .of_kinetic = " ml" ;
32+
33+ para.input .of_ml_feg = 3 ;
34+ para.input .of_ml_nkernel = 1 ;
35+ para.input .of_ml_kernel = {1 };
36+ para.input .of_ml_kernel_scaling = {1.0 };
37+ para.input .of_ml_yukawa_alpha = {1.0 };
38+ para.input .of_ml_gamma = false ;
39+ para.input .of_ml_p = false ;
40+ para.input .of_ml_q = false ;
41+ para.input .of_ml_tanhp = true ;
42+ para.input .of_ml_tanhq = false ;
43+ para.input .of_ml_chi_p = 0.2 ;
44+ para.input .of_ml_chi_q = 0.1 ;
45+ para.input .of_ml_gammanl = {0 };
46+ para.input .of_ml_pnl = {0 };
47+ para.input .of_ml_qnl = {0 };
48+ para.input .of_ml_xi = {0 };
49+ para.input .of_ml_tanhxi = {1 };
50+ para.input .of_ml_tanhxi_nl = {1 };
51+ para.input .of_ml_tanh_pnl = {0 };
52+ para.input .of_ml_tanh_qnl = {0 };
53+ para.input .of_ml_tanhp_nl = {1 };
54+ para.input .of_ml_tanhq_nl = {0 };
55+ para.input .of_ml_chi_xi = {1.0 };
56+ para.input .of_ml_chi_pnl = {0.2 };
57+ para.input .of_ml_chi_qnl = {0.1 };
58+ }
59+
60+ if (para.input .of_kinetic == " cpn5" )
61+ {
62+ para.input .of_kinetic = " ml" ;
63+
64+ para.input .of_ml_feg = 3 ;
65+ para.input .of_ml_nkernel = 5 ;
66+ para.input .of_ml_kernel = {1 , 1 , 1 , 1 , 1 };
67+ para.input .of_ml_kernel_scaling = {2.0 , 1.5 , 1.0 , 0.75 , 0.5 };
68+ para.input .of_ml_yukawa_alpha = {1.0 , 1.0 , 1.0 , 1.0 , 1.0 };
69+ para.input .of_ml_gamma = false ;
70+ para.input .of_ml_p = false ;
71+ para.input .of_ml_q = false ;
72+ para.input .of_ml_tanhp = true ;
73+ para.input .of_ml_tanhq = false ;
74+ para.input .of_ml_chi_p = 0.2 ;
75+ para.input .of_ml_chi_q = 0.1 ;
76+ para.input .of_ml_gammanl = {0 , 0 , 0 , 0 , 0 };
77+ para.input .of_ml_pnl = {0 , 0 , 0 , 0 , 0 };
78+ para.input .of_ml_qnl = {0 , 0 , 0 , 0 , 0 };
79+ para.input .of_ml_xi = {0 , 0 , 0 , 0 , 0 };
80+ para.input .of_ml_tanhxi = {1 , 1 , 1 , 1 , 1 };
81+ para.input .of_ml_tanhxi_nl = {1 , 1 , 1 , 1 , 1 };
82+ para.input .of_ml_tanh_pnl = {0 , 0 , 0 , 0 , 0 };
83+ para.input .of_ml_tanh_qnl = {0 , 0 , 0 , 0 , 0 };
84+ para.input .of_ml_tanhp_nl = {1 , 1 , 1 , 1 , 1 };
85+ para.input .of_ml_tanhq_nl = {0 , 0 , 0 , 0 , 0 };
86+ para.input .of_ml_chi_xi = {0.6 , 0.8 , 1.0 , 1.5 , 3.0 };
87+ para.input .of_ml_chi_pnl = {0.2 , 0.2 , 0.2 , 0.2 , 0.2 };
88+ para.input .of_ml_chi_qnl = {0.1 , 0.1 , 0.1 , 0.1 , 0.1 };
89+ }
90+ };
1391 read_sync_string (input.of_kinetic );
1492 this ->add_item (item);
1593 }
0 commit comments