#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-static void calc_com_pbc(int nrefat, const t_topology* top, rvec x[], t_pbc* pbc, const int index[], rvec xref, int ePBC)
+static void calc_com_pbc(int nrefat, const t_topology* top, rvec x[], t_pbc* pbc, const int index[], rvec xref, PbcType pbcType)
{
const real tol = 1e-4;
gmx_bool bChanged;
}
svmul(1 / mtot, xref, xref);
/* Now check if any atom is more than half the box from the COM */
- if (ePBC != epbcNONE)
+ if (pbcType != PbcType::No)
{
iter = 0;
do
}
snew(top, 1);
- // TODO: Only ePBC is used, not the full inputrec.
+ // TODO: Only pbcType is used, not the full inputrec.
t_inputrec irInstance;
t_inputrec* ir = &irInstance;
read_tpx_top(ftp2fn(efTPR, NFILE, fnm), ir, box, &natoms, nullptr, nullptr, top);
/* initialize reading trajectory: */
natoms = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box);
- rcut = 0.99 * std::sqrt(max_cutoff2(ir->ePBC, box));
+ rcut = 0.99 * std::sqrt(max_cutoff2(ir->pbcType, box));
if (rcut == 0)
{
rcut = 10 * rmax;
molindex = top->mols.index;
atom = top->atoms.atom;
- gpbc = gmx_rmpbc_init(&top->idef, ir->ePBC, natoms);
+ gpbc = gmx_rmpbc_init(&top->idef, ir->pbcType, natoms);
/* start analysis of trajectory */
do
/* make molecules whole again */
gmx_rmpbc(gpbc, natoms, box, x);
- set_pbc(&pbc, ir->ePBC, box);
+ set_pbc(&pbc, ir->pbcType, box);
if (bCom)
{
- calc_com_pbc(nrefat, top, x, &pbc, index[0], xref, ir->ePBC);
+ calc_com_pbc(nrefat, top, x, &pbc, index[0], xref, ir->pbcType);
}
for (m = 0; m < isize[1]; m++)