issue regarding parallel lammps

Thanks, Steve.

Just to make sure I’m going in right direction, are the following changes correct based on newly added r1:

/* ----------------------------------------------------------------------
maxsize of any atom’s restart data
------------------------------------------------------------------------- */

int FixPeriNeigh::maxsize_restart()
{
return 3*maxpartner + 4; //Due to to newly added r1
}

/* ----------------------------------------------------------------------
size of atom nlocal’s restart data
------------------------------------------------------------------------- */

int FixPeriNeigh::size_restart(int nlocal)
{
return 3*npartner[nlocal] + 4; //Due to to newly added r1
}

Also, (sorry for this trivial question); should I change “buf[m++] = 2npartner[i] + 4" to "buf[m++] = 3npartner[i] + 4” in the FixPeriNeigh::pack_restart(int i, double *buf)?

int FixPeriNeigh::pack_restart(int i, double buf)
{
int m = 0;
buf[m++] = 2
npartner[i] + 4;
buf[m++] = npartner[i];
for (int n = 0; n < npartner[i]; n++) {
buf[m++] = partner[i][n];
buf[m++] = r0[i][n];
buf[m++] = r1[i][n]; //NEW
}
buf[m++] = vinter[i];
buf[m++] = wvolume[i];
//std::cout << buf << std::endl;
return m;
}

As a matter of fact the there will be a new pair_peri style which will require the stored r1. So the newly added bond info should not change the current PDLAMMPS feature.

– Rezwan