/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,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.
/*! \brief Ensure box obeys the screw restrictions, fatal error if not */
void check_screw_box(const matrix box);
-/*! \brief Return the charge group information flags for charge group cg */
-static inline int ddcginfo(gmx::ArrayRef<const cginfo_mb_t> cginfo_mb, int cg)
+/*! \brief Return the atom information flags for atom a */
+static inline int ddGetAtomInfo(gmx::ArrayRef<const AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock,
+ int a)
{
size_t index = 0;
- while (cg >= cginfo_mb[index].cg_end)
+ while (a >= atomInfoForEachMoleculeBlock[index].indexOfLastAtomInMoleculeBlock)
{
index++;
}
- const cginfo_mb_t& cgimb = cginfo_mb[index];
+ const AtomInfoWithinMoleculeBlock& atomInfoOfMoleculeBlock = atomInfoForEachMoleculeBlock[index];
- return cgimb.cginfo[(cg - cgimb.cg_start) % cgimb.cg_mod];
+ return atomInfoOfMoleculeBlock.atomInfo[(a - atomInfoOfMoleculeBlock.indexOfFirstAtomInMoleculeBlock)
+ % atomInfoOfMoleculeBlock.atomInfo.size()];
};
/*! \brief Returns the number of MD steps for which load has been recorded */