File tree Expand file tree Collapse file tree 9 files changed +20
-8
lines changed Expand file tree Collapse file tree 9 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ void Input::Default(void)
265265 dos_edelta_ev = 0.01 ;// (ev)
266266 dos_scale = 0.01 ;
267267 b_coef = 0.07 ;
268+ out_element_info = false ;
268269// ----------------------------------------------------------
269270// LCAO
270271// ----------------------------------------------------------
@@ -1091,6 +1092,10 @@ bool Input::Read(const std::string &fn)
10911092 else if (strcmp (" out_alllog" , word) == 0 )
10921093 {
10931094 read_value (ifs, out_alllog);
1095+ }
1096+ else if (strcmp (" out_element_info" , word) == 0 )
1097+ {
1098+ read_value (ifs, out_element_info);
10941099 }
10951100 else if (strcmp (" dos_emin_ev" , word) == 0 )
10961101 {
@@ -2234,6 +2239,7 @@ void Input::Bcast()
22342239 Parallel_Common::bcast_int ( out_r_matrix ); // jingan add 2019-8-14
22352240 Parallel_Common::bcast_bool ( out_lowf );
22362241 Parallel_Common::bcast_bool ( out_alllog );
2242+ Parallel_Common::bcast_bool ( out_element_info );
22372243
22382244 Parallel_Common::bcast_double ( dos_emin_ev );
22392245 Parallel_Common::bcast_double ( dos_emax_ev );
Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ class Input
229229 int out_r_matrix; // jingan add 2019-8-14, output r(R) matrix.
230230 bool out_lowf; // output the wave functions in local basis.
231231 bool out_alllog; // output all logs.
232+ bool out_element_info; // output infomation of all element
232233
233234 double dos_emin_ev;
234235 double dos_emax_ev;
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ void Input_Conv::Convert(void)
8383 GlobalV::PRESS1 = INPUT.press1 ;
8484 GlobalV::PRESS2 = INPUT.press2 ;
8585 GlobalV::PRESS3 = INPUT.press3 ;
86+ GlobalV::out_element_info = INPUT.out_element_info ;
8687#ifdef __LCAO
8788 Force_Stress_LCAO::force_invalid_threshold_ev = INPUT.force_thr_ev2 ;
8889#endif
Original file line number Diff line number Diff line change @@ -185,4 +185,6 @@ bool out_descriptor = false; //caoyu add 2021-10-16 for DeePKS
185185bool deepks_scf = false ; // caoyu add 2021-10-16 for DeePKS
186186
187187int vnl_method = 1 ; // set defauld vnl method as old, added by zhengdy 2021-10-11
188+
189+ bool out_element_info = false ; // added by zhengdy 2021-11-26
188190}
Original file line number Diff line number Diff line change @@ -203,5 +203,7 @@ extern bool deepks_scf; //caoyu add 2021-10-16 for DeePKS
203203// method for dealing with non-local potential in Hamiltonian matrix, 0 for old, 1 for new
204204extern int vnl_method;
205205
206+ // whether or not output information for each element
207+ extern bool out_element_info;
206208}
207209#endif
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ void InfoNonlocal::Set_NonLocal(
7979 dk,
8080 dr_uniform); // delta k mesh in reciprocal space
8181
82- tmpBeta_lm[p1].plot (GlobalV::MY_RANK);
82+ if (GlobalV::out_element_info) tmpBeta_lm[p1].plot (GlobalV::MY_RANK);
8383
8484 delete[] beta_r;
8585
@@ -189,7 +189,7 @@ void InfoNonlocal::Set_NonLocal(
189189 dk,
190190 dr_uniform); // delta k mesh in reciprocal space
191191
192- tmpBeta_lm[p1].plot (GlobalV::MY_RANK);
192+ if (GlobalV::out_element_info) tmpBeta_lm[p1].plot (GlobalV::MY_RANK);
193193
194194 delete[] beta_r;
195195 }
@@ -443,7 +443,7 @@ void InfoNonlocal::Read_NonLocal(
443443 dk,
444444 dr_uniform); // delta k mesh in reciprocal space
445445
446- tmpBeta_lm[p1].plot (my_rank);
446+ if (GlobalV::out_element_info) tmpBeta_lm[p1].plot (my_rank);
447447
448448 delete[] radial_ps;
449449 delete[] rab_ps;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ void UnitCell_pseudo::setup_cell(
9999 ok2 = this ->read_atom_positions (ifa, log, GlobalV::ofs_warning);
100100#endif
101101
102- if (ok2)
102+ if (ok2&&GlobalV::out_element_info )
103103 {
104104 for (int i=0 ;i<this ->ntype ;i++)
105105 {
@@ -197,7 +197,7 @@ void UnitCell_pseudo::setup_cell(
197197
198198 this ->read_cell_pseudopots (s_pseudopot_dir, log);
199199
200- if (GlobalV::MY_RANK == 0 )
200+ if (GlobalV::MY_RANK == 0 && GlobalV::out_element_info )
201201 {
202202 for (int it=0 ; it<this ->ntype ; it++)
203203 {
@@ -380,7 +380,7 @@ void UnitCell_pseudo::setup_cell_classic(
380380#else
381381 ok2 = this ->read_atom_positions (ifa, ofs_running, ofs_warning);
382382#endif
383- if (ok2)
383+ if (ok2&&GlobalV::out_element_info )
384384 {
385385 for (int i=0 ;i<this ->ntype ;i++)
386386 {
Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ void LCAO_Orbitals::read_orb_file(
556556 this ->kmesh ,
557557 this ->dk ,
558558 this ->dr_uniform ,
559- true ,
559+ GlobalV::out_element_info ,
560560 true ,
561561 force_flag); // delta k mesh in reciprocal space
562562
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ void pseudopot_cell_vl::vloc_of_g(
205205void pseudopot_cell_vl::print_vloc (void )const
206206{
207207 if (GlobalV::MY_RANK!=0 ) return ; // mohan fix bug 2011-10-13
208- bool check_vl = true ;
208+ bool check_vl = GlobalV::out_element_info ;
209209 if (check_vl)
210210 {
211211 for (int it=0 ; it<GlobalC::ucell.ntype ; it++)
You can’t perform that action at this time.
0 commit comments