Skip to content

Commit fd3d355

Browse files
authored
fix a bug in rhog_symmetry (#2039)
* fix: modify atom-sort algorithm and coresponding unit test * fix a bug in rhog_symmetry * modify result.ref
1 parent 16a941f commit fd3d355

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/module_cell/module_symmetry/symmetry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ void Symmetry::rhog_symmetry(std::complex<double> *rhogtot,
14091409
// for each pricell in supercell:
14101410
for(int ipt=0;ipt<this->ncell;++ipt)
14111411
{
1412-
arg = ( tmp_gdirect_double * (gtrans[isym]+ptrans[ipt]) ) * ModuleBase::TWO_PI;
1412+
arg = ( tmp_gdirect_double * (gtrans[invmap[isym]]+ptrans[ipt]) ) * ModuleBase::TWO_PI;
14131413
cos_arg += cos(arg);
14141414
sin_arg += sin(arg);
14151415
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
etotref -211.6198578530745920
2-
etotperatomref -105.8099289265
3-
totalforceref 6.583242
1+
etotref -211.6198578559943826
2+
etotperatomref -105.8099289280
3+
totalforceref 6.583530
44
totaltimeref 0.33222

0 commit comments

Comments
 (0)