Skip to content

Commit 47975c1

Browse files
committed
Fix: adjust neighbor search loop condition in AngularMomentumCalculator
1 parent 5b37f29 commit 47975c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/source_io/cal_pLpR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void ModuleIO::AngularMomentumCalculator::kernel(
198198
{
199199
ri = atyp_i.tau[ia];
200200
neighbor_searcher_->Find_atom(ucell, ri, it, ia);
201-
for (int ia_adj = 0; ia_adj < neighbor_searcher_->getAdjacentNum(); ia_adj++)
201+
for (int ia_adj = 0; ia_adj < neighbor_searcher_->getAdjacentNum() + 1; ia_adj++)
202202
{
203203
rj = neighbor_searcher_->getAdjacentTau(ia_adj);
204204
int jt = neighbor_searcher_->getType(ia_adj);

0 commit comments

Comments
 (0)