don't update per-atom pair data if not available

This commit is contained in:
Axel Kohlmeyer
2020-09-15 10:12:07 -04:00
parent 238730b13d
commit 2794108837

View File

@ -485,7 +485,7 @@ void ThrOMP::e_tally_thr(Pair * const pair, const int i, const int j,
}
}
}
if (pair->eflag_atom) {
if (pair->eflag_atom && thr->eatom_pair) {
const double epairhalf = 0.5 * (evdwl + ecoul);
if (newton_pair || i < nlocal) thr->eatom_pair[i] += epairhalf;
if (newton_pair || j < nlocal) thr->eatom_pair[j] += epairhalf;