Skip to content

Commit a35a7ae

Browse files
committed
add situation of reading charge file for tdofdft
1 parent ea55c5c commit a35a7ae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/source_esolver/esolver_of_tddft.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ void ESolver_OF_TDDFT::runner(UnitCell& ucell, const int istep)
9191
}
9292
}
9393
}
94+
else if ((istep<1) && PARAM.inp.init_chg == "file")
95+
{
96+
#ifdef _OPENMP
97+
#pragma omp parallel for collapse(2)
98+
#endif
99+
for (int is = 0; is < PARAM.inp.nspin; ++is)
100+
{
101+
for (int ir = 0; ir < this->pw_rho->nrxx; ++ir)
102+
{
103+
phi_td[is*this->pw_rho->nrxx+ir]=pphi_[is][ir];
104+
}
105+
}
106+
conv_esolver=true;
107+
}
94108
else
95109
{
96110
this->evolve_ofdft->propagate_psi(this->pelec, this->chr, ucell, this->phi_td, this->pw_rho);

0 commit comments

Comments
 (0)