fix off-by-one errors

This commit is contained in:
Axel Kohlmeyer
2019-05-29 14:03:00 -04:00
parent 12fcf5f5ef
commit c0cfceb95c

View File

@ -114,7 +114,7 @@ void PairQUIP::compute(int eflag, int vflag)
atomic_numbers = new int[ntotal];
for (ii = 0; ii < ntotal; ii++)
atomic_numbers[ii] = map[type[ii]-1];
atomic_numbers[ii] = map[type[ii]];
quip_local_e = new double [ntotal];
quip_force = new double [ntotal*3];
@ -239,7 +239,7 @@ void PairQUIP::allocate()
setflag = memory->create(setflag,n+1,n+1,"pair:setflag");
cutsq = memory->create(cutsq,n+1,n+1,"pair:cutsq");
map = new int[n];
map = new int[n+1];
}
void PairQUIP::coeff(int narg, char **arg)