* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,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.
t_complex *tab_xy, *tab_qxyz;
};
-void init_ewald_tab(struct gmx_ewald_tab_t** et, const t_inputrec* ir, FILE* fp)
+void init_ewald_tab(struct gmx_ewald_tab_t** et, const t_inputrec& ir, FILE* fp)
{
snew(*et, 1);
if (fp)
fprintf(fp, "Will do ordinary reciprocal space Ewald sum.\n");
}
- (*et)->nx = ir->nkx + 1;
- (*et)->ny = ir->nky + 1;
- (*et)->nz = ir->nkz + 1;
+ (*et)->nx = ir.nkx + 1;
+ (*et)->ny = ir.nky + 1;
+ (*et)->nz = ir.nkz + 1;
(*et)->kmax = std::max((*et)->nx, std::max((*et)->ny, (*et)->nz));
(*et)->eir = nullptr;
(*et)->tab_xy = nullptr;
}
}
-real do_ewald(const t_inputrec* ir,
+real do_ewald(const t_inputrec& ir,
const rvec x[],
rvec f[],
const real chargeA[],
/* Scale box with Ewald wall factor */
matrix scaledBox;
- EwaldBoxZScaler boxScaler(*ir);
+ EwaldBoxZScaler boxScaler(ir);
boxScaler.scaleBox(box, scaledBox);
rvec boxDiag;
}
/* 1/(Vol*e0) */
- real scaleRecip = 4.0 * M_PI / (boxDiag[XX] * boxDiag[YY] * boxDiag[ZZ]) * ONE_4PI_EPS0 / ir->epsilon_r;
+ real scaleRecip = 4.0 * M_PI / (boxDiag[XX] * boxDiag[YY] * boxDiag[ZZ]) * ONE_4PI_EPS0 / ir.epsilon_r;
if (!et->eir) /* allocate if we need to */
{
snew(et->tab_qxyz, natoms);
}
- bFreeEnergy = (ir->efep != efepNO);
+ bFreeEnergy = (ir.efep != efepNO);
clear_mat(lrvir);