void dd_clear_f_vsites(gmx_domdec_t *dd, rvec *f);
void dd_move_x_constraints(gmx_domdec_t *dd, matrix box,
- rvec *x0, rvec *x1);
-/* Move x0 and also x1 if x1!=NULL */
+ rvec *x0, rvec *x1, gmx_bool bX1IsCoord);
+/* Move x0 and also x1 if x1!=NULL. bX1IsCoord tells if to do PBC on x1 */
void dd_move_x_vsites(gmx_domdec_t *dd, matrix box, rvec *x);
/* Communicate the corrected non-local coordinates */
if (DOMAINDECOMP(cr))
{
- dd_move_x_constraints(cr->dd, box, xp, NULL);
+ dd_move_x_constraints(cr->dd, box, xp, NULL, FALSE);
}
else
{
*/
if (cr->dd)
{
- dd_move_x_constraints(cr->dd, box, x, xprime);
+ dd_move_x_constraints(cr->dd, box, x, xprime, econq == econqCoord);
}
else if (PARTDECOMP(cr))
{
}
static void dd_move_x_specat(gmx_domdec_t *dd, gmx_domdec_specat_comm_t *spac,
- matrix box, rvec *x0, rvec *x1)
+ matrix box,
+ rvec *x0,
+ rvec *x1, gmx_bool bX1IsCoord)
{
gmx_specatsend_t *spas;
rvec *x, *vbuf, *rbuf;
rvec shift = {0, 0, 0};
nvec = 1;
- if (x1)
+ if (x1 != NULL)
{
nvec++;
}
{
x = (v == 0 ? x0 : x1);
/* Copy the required coordinates to the send buffer */
- if (!bPBC)
+ if (!bPBC || (v == 1 && !bX1IsCoord))
{
/* Only copy */
for (i = 0; i < spas->nsend; i++)
}
}
-void dd_move_x_constraints(gmx_domdec_t *dd, matrix box, rvec *x0, rvec *x1)
+void dd_move_x_constraints(gmx_domdec_t *dd, matrix box,
+ rvec *x0, rvec *x1, gmx_bool bX1IsCoord)
{
if (dd->constraint_comm)
{
- dd_move_x_specat(dd, dd->constraint_comm, box, x0, x1);
+ dd_move_x_specat(dd, dd->constraint_comm, box, x0, x1, bX1IsCoord);
}
}
{
if (dd->vsite_comm)
{
- dd_move_x_specat(dd, dd->vsite_comm, box, x, NULL);
+ dd_move_x_specat(dd, dd->vsite_comm, box, x, NULL, FALSE);
}
}