/* Initialize the PME-only side of the PME <-> PP communication */
void gmx_pme_send_parameters(t_commrec *cr,
+ const interaction_const_t *ic,
gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj,
real *chargeA, real *chargeB,
real *sqrt_c6A, real *sqrt_c6B,
if (!(cr->duty & DUTY_PME))
{
/* Send the charges and/or c6/sigmas to our PME only node */
- gmx_pme_send_parameters(cr, mdatoms->nChargePerturbed, mdatoms->nTypePerturbed,
+ gmx_pme_send_parameters(cr,
+ fr->ic,
+ mdatoms->nChargePerturbed, mdatoms->nTypePerturbed,
mdatoms->chargeA, mdatoms->chargeB,
mdatoms->sqrt_c6A, mdatoms->sqrt_c6B,
mdatoms->sigmaA, mdatoms->sigmaB,
if (debug)
{
- fprintf(debug, "PP rank %d sending to PME rank %d: %d%s%s\n",
+ fprintf(debug, "PP rank %d sending to PME rank %d: %d%s%s%s%s\n",
cr->sim_nodeid, dd->pme_nodeid, n,
flags & PP_PME_CHARGE ? " charges" : "",
+ flags & PP_PME_SQRTC6 ? " sqrtC6" : "",
+ flags & PP_PME_SIGMA ? " sigma" : "",
flags & PP_PME_COORD ? " coordinates" : "");
}
}
void gmx_pme_send_parameters(t_commrec *cr,
+ const interaction_const_t *ic,
gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj,
real *chargeA, real *chargeB,
real *sqrt_c6A, real *sqrt_c6B,
{
int flags;
- /* We always send the charges, even with only LJ- and no Coulomb-PME */
- flags = PP_PME_CHARGE;
- if (sqrt_c6A != NULL)
+ flags = 0;
+ if (EEL_PME(ic->eeltype))
{
- flags |= PP_PME_SQRTC6;
+ flags |= PP_PME_CHARGE;
}
- if (sigmaA != NULL)
+ if (EVDW_PME(ic->vdwtype))
{
- flags |= PP_PME_SIGMA;
+ flags |= (PP_PME_SQRTC6 | PP_PME_SIGMA);
}
if (bFreeEnergy_q || bFreeEnergy_lj)
{
nat += pme_pp->nat[sender];
if (debug)
{
- fprintf(debug, "Received from PP rank %d: %d "
- "charges\n",
- pme_pp->node[sender], pme_pp->nat[sender]);
+ fprintf(debug, "Received from PP rank %d: %d %s\n",
+ pme_pp->node[sender], pme_pp->nat[sender],
+ (q == eCommType_ChargeA ||
+ q == eCommType_ChargeB) ? "charges" : "params");
}
}
}