make sure that when unpacking the Nbr struct you convert the index back to the closest image relative to the center atom

This commit is contained in:
Axel Kohlmeyer 2020-06-08 09:30:08 -04:00
parent 2e9859bacf
commit ee5e479343
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@
#include "atom.h"
#include "citeme.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "force.h"
#include "math_const.h"
@ -530,8 +531,8 @@ void FixOrientECO::unpack_forward_comm(int n, int first, double *buf) {
nbr[i].delta[j][0] = buf[m++];
nbr[i].delta[j][1] = buf[m++];
nbr[i].delta[j][2] = buf[m++];
// convert from global to local id
nbr[i].id[j] = atom->map(ubuf(buf[m++]).i);
// convert from global to closest local id
nbr[i].id[j] = domain->closest_image(i,atom->map(ubuf(buf[m++]).i));
}
}
}