void calc_mu(int start,
int homenr,
gmx::ArrayRef<const gmx::RVec> x,
- const real q[],
- const real qB[],
- int nChargePerturbed,
+ gmx::ArrayRef<const real> q,
+ gmx::ArrayRef<const real> qB,
+ bool havePerturbedCharges,
dvec mu,
dvec mu_B)
{
mu[m] *= gmx::c_enm2Debye;
}
- if (nChargePerturbed)
+ if (havePerturbedCharges)
{
mu_x = mu_y = mu_z = 0.0;
#pragma omp parallel for reduction(+: mu_x, mu_y, mu_z) schedule(static) \
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2010,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
void calc_mu(int start,
int homenr,
gmx::ArrayRef<const gmx::RVec> x,
- const real q[],
- const real qB[],
- int nChargePerturbed,
+ gmx::ArrayRef<const real> q,
+ gmx::ArrayRef<const real> qB,
+ bool havePerturbedCharges,
dvec mu,
dvec mu_B);
calc_mu(start,
mdatoms->homenr,
xRef,
- mdatoms->chargeA,
- mdatoms->chargeB,
- mdatoms->nChargePerturbed,
+ gmx::arrayRefFromArray(mdatoms->chargeA, mdatoms->nr),
+ gmx::arrayRefFromArray(mdatoms->chargeB, mdatoms->nr),
+ mdatoms->nChargePerturbed != 0,
dipoleData.muStaging[0],
dipoleData.muStaging[1]);