Skip to content

Commit 2a8400b

Browse files
authored
Merge pull request #1161 from lyb9812/TDDFT
fix : error in tddft codes
2 parents c76fb9f + 43f8751 commit 2a8400b

File tree

5 files changed

+29
-16
lines changed

5 files changed

+29
-16
lines changed

source/module_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,8 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter)
385385
GlobalC::pot.set_vrs_tddft(istep);
386386
}
387387

388-
///*
389388
// store wfc
390-
if (this->conv_elec & istep >= 1)
389+
if (istep >= 1 && this->conv_elec )
391390
{
392391
if (this->psi_laststep == nullptr)
393392
#ifdef __MPI
@@ -404,10 +403,11 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter)
404403
psi_laststep[0].get_pointer()[index] = tmp[index];
405404
if (istep > 1)
406405
this->cal_edm_tddft();
407-
} //*/
406+
}
408407

409-
if (this->conv_elec){
410-
GlobalV::ofs_running
408+
if (this->conv_elec)
409+
{
410+
GlobalV::ofs_running
411411
<< "------------------------------------------------------------------------------------------------"
412412
<< endl;
413413
GlobalV::ofs_running << "Eii : ";
@@ -421,7 +421,8 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter)
421421
GlobalV::ofs_running << endl;
422422
GlobalV::ofs_running
423423
<< "------------------------------------------------------------------------------------------------"
424-
<< endl;}
424+
<< endl;
425+
}
425426
}
426427

427428
void ESolver_KS_LCAO_TDDFT::afterscf()
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
etotref -608.8299122750818
2-
etotperatomref -304.4149561375
3-
totaltimeref +9.854
1+
etotref -608.8311405467066
2+
etotperatomref -304.4155702734
3+
totalforceref 16.350690
4+
totalstressref 30.173476
5+
totaltimeref
6+
+9.3149
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
etotref -608.8299122750868
2-
etotperatomref -304.4149561375
3-
totaltimeref +9.8552
1+
etotref -608.8311405467081
2+
etotperatomref -304.4155702734
3+
totalforceref 16.350690
4+
totalstressref 30.179960
5+
totaltimeref
6+
+9.25
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
etotref -12.91747244061547
1+
etotref -12.91747244061541
22
etotperatomref -6.4587362203
3-
totaltimeref +5.702
3+
totalforceref 44.953238
4+
totalstressref 79.612084
5+
totaltimeref
6+
+5.5515
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
etotref -1338.693432449624
1+
etotref -1338.69343244963
22
etotperatomref -446.2311441499
3-
totaltimeref +17.43
3+
totalforceref 13.319759
4+
totalstressref 54.934057
5+
totaltimeref
6+
+17.349

0 commit comments

Comments
 (0)