Skip to content

Commit b67dc4a

Browse files
committed
Fix: adjust loop boundary in ESolver_LJ to include all adjacent atoms (#6477)
1 parent 5b37f29 commit b67dc4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/source_esolver/esolver_lj.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void ESolver_LJ::runner(UnitCell& ucell, const int istep)
5656
{
5757
tau1 = atom1->tau[ia];
5858
grid_neigh.Find_atom(ucell, tau1, it, ia);
59-
for (int ad = 0; ad < grid_neigh.getAdjacentNum(); ++ad)
59+
for (int ad = 0; ad < grid_neigh.getAdjacentNum() + 1; ++ad)
6060
{
6161
tau2 = grid_neigh.getAdjacentTau(ad);
6262
int it2 = grid_neigh.getType(ad);

0 commit comments

Comments
 (0)