Skip to content

Commit 9ce0542

Browse files
authored
Modify the call to Parallel_Orbital and remove unnecessary code in ctrl_output_td (#6674)
1 parent fa1d1fd commit 9ce0542

File tree

2 files changed

+14
-69
lines changed

2 files changed

+14
-69
lines changed

source/source_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -447,20 +447,20 @@ void ESolver_KS_LCAO_TDDFT<TR, Device>::after_scf(UnitCell& ucell, const int ist
447447
// Output energy for sub-loop (electronic step)
448448
std::cout << " Potential (Ry): " << std::setprecision(15) << this->pelec->f_en.etot << std::endl;
449449

450-
ModuleIO::ctrl_output_td<TR>(
451-
ucell,
452-
this->chr.rho_save,
453-
this->chr.rhopw,
454-
istep,
455-
this->psi,
456-
this->pelec,
457-
this->kv,
458-
this->two_center_bundle_.overlap_orb.get(),
459-
dynamic_cast<const elecstate::ElecStateLCAO<std::complex<double>>*>(this->pelec)->get_DM()->get_paraV_pointer(),
460-
this->orb_,
461-
this->velocity_mat,
462-
this->RA,
463-
this->td_p);
450+
// Output dipole, current, etc.
451+
ModuleIO::ctrl_output_td<TR>(ucell,
452+
this->chr.rho_save,
453+
this->chr.rhopw,
454+
istep,
455+
this->psi,
456+
this->pelec,
457+
this->kv,
458+
this->two_center_bundle_.overlap_orb.get(),
459+
&this->pv,
460+
this->orb_,
461+
this->velocity_mat,
462+
this->RA,
463+
this->td_p);
464464

465465
ModuleBase::timer::tick(this->classname, "after_scf");
466466
}

source/source_io/ctrl_output_td.cpp

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,61 +25,6 @@ void ctrl_output_td(const UnitCell& ucell,
2525
{
2626
ModuleBase::TITLE("ModuleIO", "ctrl_output_td");
2727

28-
// Original code commented out, might need reference later
29-
30-
// // (1) Write dipole information
31-
// for (int is = 0; is < PARAM.inp.nspin; is++)
32-
// {
33-
// if (PARAM.inp.out_dipole == 1)
34-
// {
35-
// std::stringstream ss_dipole;
36-
// ss_dipole << PARAM.globalv.global_out_dir << "dipole_s" << is + 1 << ".txt";
37-
// ModuleIO::write_dipole(ucell, this->chr.rho_save[is], this->chr.rhopw, is, istep, ss_dipole.str());
38-
// }
39-
// }
40-
41-
// // (2) Write current information
42-
// elecstate::DensityMatrix<std::complex<double>, double>* tmp_DM
43-
// = dynamic_cast<elecstate::ElecStateLCAO<std::complex<double>>*>(this->pelec)->get_DM();
44-
// if (TD_info::out_current)
45-
// {
46-
// if (TD_info::out_current_k)
47-
// {
48-
// ModuleIO::write_current_eachk(ucell,
49-
// istep,
50-
// this->psi,
51-
// this->pelec,
52-
// this->kv,
53-
// this->two_center_bundle_.overlap_orb.get(),
54-
// tmp_DM->get_paraV_pointer(),
55-
// this->orb_,
56-
// this->velocity_mat,
57-
// this->RA);
58-
// }
59-
// else
60-
// {
61-
// ModuleIO::write_current(ucell,
62-
// istep,
63-
// this->psi,
64-
// this->pelec,
65-
// this->kv,
66-
// this->two_center_bundle_.overlap_orb.get(),
67-
// tmp_DM->get_paraV_pointer(),
68-
// this->orb_,
69-
// this->velocity_mat,
70-
// this->RA);
71-
// }
72-
// }
73-
74-
// // (3) Output file for restart
75-
// if (PARAM.inp.out_freq_ion > 0) // default value of out_freq_ion is 0
76-
// {
77-
// if (istep % PARAM.inp.out_freq_ion == 0)
78-
// {
79-
// td_p->out_restart_info(istep, elecstate::H_TDDFT_pw::At, elecstate::H_TDDFT_pw::At_laststep);
80-
// }
81-
// }
82-
8328
#ifdef __LCAO
8429
// (1) Write dipole information
8530
for (int is = 0; is < PARAM.inp.nspin; ++is)

0 commit comments

Comments
 (0)