Skip to content

Commit 37c03d1

Browse files
committed
Change dipole file name from SPIN*_DIPOLE to dipole_s*.txt
1 parent 04ba1d9 commit 37c03d1

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

source/source_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,16 @@ void ESolver_KS_LCAO_TDDFT<TR, Device>::after_scf(UnitCell& ucell, const int ist
437437

438438
ESolver_KS_LCAO<std::complex<double>, TR>::after_scf(ucell, istep, conv_esolver);
439439

440+
// Output energy for sub-loop (electronic step)
441+
std::cout << " Potential (Ry): " << std::setprecision(15) << this->pelec->f_en.etot << std::endl;
442+
440443
// (1) Write dipole information
441444
for (int is = 0; is < PARAM.inp.nspin; is++)
442445
{
443446
if (PARAM.inp.out_dipole == 1)
444447
{
445448
std::stringstream ss_dipole;
446-
ss_dipole << PARAM.globalv.global_out_dir << "SPIN" << is + 1 << "_DIPOLE";
449+
ss_dipole << PARAM.globalv.global_out_dir << "dipole_s" << is + 1 << ".txt";
447450
ModuleIO::write_dipole(ucell, this->chr.rho_save[is], this->chr.rhopw, is, istep, ss_dipole.str());
448451
}
449452
}
@@ -481,10 +484,7 @@ void ESolver_KS_LCAO_TDDFT<TR, Device>::after_scf(UnitCell& ucell, const int ist
481484
}
482485
}
483486

484-
// (3) Output energy for sub-loop (electronic step)
485-
std::cout << " Potential (Ry): " << std::setprecision(15) << this->pelec->f_en.etot << std::endl;
486-
487-
// (4) Output file for restart
487+
// (3) Output file for restart
488488
if (PARAM.inp.out_freq_ion > 0) // default value of out_freq_ion is 0
489489
{
490490
if (istep % PARAM.inp.out_freq_ion == 0)

tools/rt-tddft-tools/dipole.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ def plot_abs(self, fig: Figure, ax: axes.Axes, directions: list = [0, 1, 2], x_r
154154

155155

156156
if __name__ == "__main__":
157-
dipolefile = './SPIN1_DIPOLE'
157+
dipolefile = './dipole_s1.txt'
158158
dipole = Dipole(dipolefile, dt=0.0024)
159-
Efile=[[],[],["efield_0.dat"]]
159+
Efile=[[],[],["efield_0.txt"]]
160160
Abs = Absorption(dipolefile, Efile, dt=0.0024)
161161

162162
import matplotlib.pyplot as plt

tools/rt-tddft-tools/examples/Absorpation-N2/Abs_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from abacus_plot.dipole import Absorption
33
import matplotlib.pyplot as plt
44

5-
dipolefile = './SPIN1_DIPOLE'
5+
dipolefile = './dipole_s1.txt'
66
dipole = Dipole(dipolefile, dt=0.0024)
7-
Efile=[[],[],["efield_0.dat","efield_1.dat"]]
7+
Efile=[[],[],["efield_0.txt","efield_1.txt"]]
88
Abs = Absorption(dipolefile, Efile, dt=0.0024)
99

1010
fig1, ax1 = plt.subplots()

0 commit comments

Comments
 (0)