Skip to content

Commit

Permalink
Merge branch 'develop' into warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hongriTianqi authored Jan 10, 2024
2 parents 025ecde + 52622d5 commit ee2c432
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 15 deletions.
2 changes: 1 addition & 1 deletion source/module_elecstate/elecstate_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void ElecState::print_etot(const bool converged,
// std::cout << std::setiosflags(ios::showpos);
if (scientific)
{
std::cout << std::setiosflags(std::ios::scientific);
std::cout << std::scientific;
}

if (GlobalV::COLOUR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,9 @@ void LCAO_Deepks::cal_gdmx_k(const std::vector<std::vector<std::complex<double>>
key_tuple key_2(ibt2,dR2.x,dR2.y,dR2.z);
for (int iw1l = 0; iw1l < row_indexes.size(); ++iw1l)
{
std::vector<double> nlm1 = this->nlm_save_k[iat][key_1][row_indexes[iw1l]][0];
for (int iw2l = 0; iw2l < col_indexes.size(); ++iw2l)
{
std::vector<double> nlm1 = this->nlm_save_k[iat][key_1][row_indexes[iw1l]][0];
std::vector<std::vector<double>> nlm2 = this->nlm_save_k[iat][key_2][col_indexes[iw2l]];

assert(nlm1.size()==nlm2[0].size());
Expand Down
3 changes: 2 additions & 1 deletion tests/deepks/602_NO_deepks_d_H2O_scf_lda2pbe/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ mixing_type broyden
mixing_beta 0.4

#Parameters (6.File)
deepks_out_labels 0
deepks_out_labels 1
deepks_scf 1
deepks_model model_lda_pbe_18.ptg
cal_force 1
cal_stress 1
5 changes: 5 additions & 0 deletions tests/deepks/602_NO_deepks_d_H2O_scf_lda2pbe/get_dm_eig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('dm_eig.npy')
b=numpy.load('e_tot.npy')
c=numpy.load('e_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(b)+numpy.sum(c))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('grad_vepsl.npy')
b=numpy.load('s_tot.npy')
c=numpy.load('s_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(numpy.absolute(b))+numpy.sum(numpy.absolute(c)))
5 changes: 5 additions & 0 deletions tests/deepks/602_NO_deepks_d_H2O_scf_lda2pbe/get_grad_vx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('grad_vx.npy')
b=numpy.load('f_tot.npy')
c=numpy.load('f_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(numpy.absolute(b))+numpy.sum(numpy.absolute(c)))
11 changes: 7 additions & 4 deletions tests/deepks/602_NO_deepks_d_H2O_scf_lda2pbe/result.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
etotref -466.0342708510963
etotperatomref -155.3447569504
totalforceref 3.194930
totaltimeref 2.7808
etotref -466.0342709734276241
etotperatomref -155.3447569911
totalforceref 3.194893
totalstressref 1.190505
totaldes 2.319513
deepks_e_dm -57.521935318566165
totaltimeref 5.79
4 changes: 2 additions & 2 deletions tests/deepks/603_NO_deepks_SiO2_bandgap_multik/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ mixing_type broyden
mixing_beta 0.400000
smearing_method gaussian
smearing_sigma 0.020000
cal_force 0
cal_stress 0
cal_force 1
cal_stress 1
deepks_scf 1
deepks_out_labels 1
deepks_bandgap 1
Expand Down
5 changes: 5 additions & 0 deletions tests/deepks/603_NO_deepks_SiO2_bandgap_multik/get_dm_eig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('dm_eig.npy')
b=numpy.load('e_tot.npy')
c=numpy.load('e_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(b)+numpy.sum(c))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('grad_vepsl.npy')
b=numpy.load('s_tot.npy')
c=numpy.load('s_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(numpy.absolute(b))+numpy.sum(numpy.absolute(c)))
5 changes: 5 additions & 0 deletions tests/deepks/603_NO_deepks_SiO2_bandgap_multik/get_grad_vx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy
a=numpy.load('grad_vx.npy')
b=numpy.load('f_tot.npy')
c=numpy.load('f_base.npy')
print(numpy.sum(numpy.absolute(a))+numpy.sum(numpy.absolute(b))+numpy.sum(numpy.absolute(c)))
15 changes: 9 additions & 6 deletions tests/deepks/603_NO_deepks_SiO2_bandgap_multik/result.ref
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
etotref -1958.360872122988
etotperatomref -326.3934786872
totaldes 13.256026
odelta 0.02699443518667366
oprec 26.18202941954233
totaltimeref 29.947
etotref -1958.3608711386159484
etotperatomref -326.3934785231
totalforceref 33.057695
totalstressref 279.260109
totaldes 13.256025
deepks_e_dm -224.21161147759534
odelta 0.026994440153412902
oprec 26.182031170349624
totaltimeref 23.36

0 comments on commit ee2c432

Please sign in to comment.