Skip to content

Commit 3bdcc2b

Browse files
dyzhengFisherd99
authored andcommitted
Fix: symmetry prec mismatch between real and reciprocal space lattice (deepmodeling#5623)
1 parent ec128a6 commit 3bdcc2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/module_cell/module_symmetry/symmetry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ int Symmetry::standard_lat(
423423

424424
Symm_Other::right_hand_sense(a, b, c);
425425
ModuleBase::GlobalFunc::ZEROS(cel_const, 6);
426-
const double small = 1.0e-5;
426+
const double small = PARAM.inp.symmetry_prec;
427427

428428
//---------------------------
429429
// 1. alpha == beta == gamma

source/module_cell/module_symmetry/symmetry_basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ double Symmetry_Basic::check_diff(const double& x1, const double& x2)const
7373
double diff = x1 - x2;
7474
diff = fmod(diff + 100,1);
7575
//for reasons of safety
76-
if(fabs(diff - 1.0) < epsilon * 0.5)
76+
if(fabs(diff - 1.0) < epsilon)
7777
{
7878
diff = 0;
7979
}

0 commit comments

Comments
 (0)