for (const gmx_molblock_t& molblock : mtop.molblock)
{
const auto& updateGrouping =
- dd->comm->systemInfo.updateGroupingPerMoleculetype[molblock.type];
+ dd->comm->systemInfo.updateGroupingsPerMoleculeType[molblock.type];
for (int mol = 0; mol < molblock.nmol; mol++)
{
return atnr;
}
-gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingPerMoleculetype(const gmx_domdec_t& dd)
+gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingsPerMoleculeType(const gmx_domdec_t& dd)
{
GMX_RELEASE_ASSERT(dd.comm, "Need a valid dd.comm");
- return dd.comm->systemInfo.updateGroupingPerMoleculetype;
+ return dd.comm->systemInfo.updateGroupingsPerMoleculeType;
}
void dd_store_state(const gmx_domdec_t& dd, t_state* state)
return;
}
- systemInfo->updateGroupingPerMoleculetype = gmx::makeUpdateGroups(mtop);
- systemInfo->useUpdateGroups = (!systemInfo->updateGroupingPerMoleculetype.empty()
+ systemInfo->updateGroupingsPerMoleculeType = gmx::makeUpdateGroups(mtop);
+ systemInfo->useUpdateGroups = (!systemInfo->updateGroupingsPerMoleculeType.empty()
&& getenv("GMX_NO_UPDATEGROUPS") == nullptr);
if (systemInfo->useUpdateGroups)
for (const auto& molblock : mtop.molblock)
{
numUpdateGroups += molblock.nmol
- * systemInfo->updateGroupingPerMoleculetype[molblock.type].numBlocks();
+ * systemInfo->updateGroupingsPerMoleculeType[molblock.type].numBlocks();
}
systemInfo->maxUpdateGroupRadius = computeMaxUpdateGroupRadius(
- mtop, systemInfo->updateGroupingPerMoleculetype, maxReferenceTemperature(inputrec));
+ mtop, systemInfo->updateGroupingsPerMoleculeType, maxReferenceTemperature(inputrec));
/* To use update groups, the large domain-to-domain cutoff distance
* should be compatible with the box size.
.appendTextFormatted(
"The combination of rlist and box size prohibits the use of update "
"groups\n");
- systemInfo->updateGroupingPerMoleculetype.clear();
+ systemInfo->updateGroupingsPerMoleculeType.clear();
}
}
}
/* Returns whether molecules are always whole, i.e. not broken by PBC */
static bool moleculesAreAlwaysWhole(const gmx_mtop_t& mtop,
const bool useUpdateGroups,
- gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingPerMoleculetype)
+ gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType)
{
if (useUpdateGroups)
{
- GMX_RELEASE_ASSERT(updateGroupingPerMoleculetype.size() == mtop.moltype.size(),
+ GMX_RELEASE_ASSERT(updateGroupingsPerMoleculeType.size() == mtop.moltype.size(),
"Need one grouping per moltype");
for (size_t mol = 0; mol < mtop.moltype.size(); mol++)
{
- if (updateGroupingPerMoleculetype[mol].numBlocks() > 1)
+ if (updateGroupingsPerMoleculeType[mol].numBlocks() > 1)
{
return false;
}
}
systemInfo.moleculesAreAlwaysWhole = moleculesAreAlwaysWhole(
- mtop, systemInfo.useUpdateGroups, systemInfo.updateGroupingPerMoleculetype);
+ mtop, systemInfo.useUpdateGroups, systemInfo.updateGroupingsPerMoleculeType);
systemInfo.haveInterDomainBondeds =
(!systemInfo.moleculesAreAlwaysWhole || mtop.bIntermolecularInteractions);
systemInfo.haveInterDomainMultiBodyBondeds =
*/
constexpr real c_chanceThatAtomMovesBeyondDomain = 1e-12;
const real limitForAtomDisplacement = minCellSizeForAtomDisplacement(
- mtop, ir, systemInfo.updateGroupingPerMoleculetype, c_chanceThatAtomMovesBeyondDomain);
+ mtop, ir, systemInfo.updateGroupingsPerMoleculeType, c_chanceThatAtomMovesBeyondDomain);
GMX_LOG(mdlog.info).appendTextFormatted("Minimum cell size due to atom displacement: %.3f nm", limitForAtomDisplacement);
systemInfo.cellsizeLimit = std::max(systemInfo.cellsizeLimit, limitForAtomDisplacement);
*/
const int homeAtomCountEstimate = mtop.natoms / numPPRanks;
comm->updateGroupsCog = std::make_unique<gmx::UpdateGroupsCog>(
- mtop, systemInfo.updateGroupingPerMoleculetype, maxReferenceTemperature(ir), homeAtomCountEstimate);
+ mtop, systemInfo.updateGroupingsPerMoleculeType, maxReferenceTemperature(ir), homeAtomCountEstimate);
}
/* Set the DD setup given by ddGridSetup */
}
const bool haveInterDomainVsites =
- (countInterUpdategroupVsites(mtop, comm->systemInfo.updateGroupingPerMoleculetype) != 0);
+ (countInterUpdategroupVsites(mtop, comm->systemInfo.updateGroupingsPerMoleculeType) != 0);
if (comm->systemInfo.haveInterDomainBondeds || haveInterDomainVsites
|| comm->systemInfo.haveSplitConstraints || comm->systemInfo.haveSplitSettles)
int ddglatnr(const gmx_domdec_t* dd, int i);
/*! \brief Returns a list of update group partitioning for each molecule type or empty when update groups are not used */
-gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingPerMoleculetype(const gmx_domdec_t& dd);
+gmx::ArrayRef<const gmx::RangePartitioning> getUpdateGroupingsPerMoleculeType(const gmx_domdec_t& dd);
/*! \brief Store the global cg indices of the home cgs in state,
*
//! True when update groups are used
bool useUpdateGroups = false;
//! Update atom grouping for each molecule type
- std::vector<gmx::RangePartitioning> updateGroupingPerMoleculetype;
+ std::vector<gmx::RangePartitioning> updateGroupingsPerMoleculeType;
//! The maximum radius over all update groups
real maxUpdateGroupRadius;
{
UpdateGroupsCog::UpdateGroupsCog(const gmx_mtop_t& mtop,
- gmx::ArrayRef<const gmx::RangePartitioning> updateGroupsPerMoleculetype,
+ gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType,
real temperature,
int numHomeAtoms) :
globalToLocalMap_(numHomeAtoms),
int firstUpdateGroupInMolecule = 0;
for (const auto& molblock : mtop.molblock)
{
- const auto& updateGroups = updateGroupsPerMoleculetype[molblock.type];
+ const auto& updateGroups = updateGroupingsPerMoleculeType[molblock.type];
indicesPerMoleculeblock_.push_back({ firstUpdateGroupInMolecule, updateGroups.numBlocks(), {} });
auto& groupIndex = indicesPerMoleculeblock_.back().groupIndex_;
firstUpdateGroupInMolecule += molblock.nmol * updateGroups.numBlocks();
}
- maxUpdateGroupRadius_ = computeMaxUpdateGroupRadius(mtop, updateGroupsPerMoleculetype, temperature);
+ maxUpdateGroupRadius_ = computeMaxUpdateGroupRadius(mtop, updateGroupingsPerMoleculeType, temperature);
}
void UpdateGroupsCog::addCogs(gmx::ArrayRef<const int> globalAtomIndices,
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,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.
* \note \p numHomeAtoms only affects the performance up till the first
* call to clear().
*
- * \param[in] mtop The global topology
- * \param[in] updateGroupsPerMoleculetype List of update groups for each molecule type in \p mtop
- * \param[in] temperature The maximum reference temperature, pass -1 when unknown or not applicable
- * \param[in] numHomeAtoms Estimate of the number of home atoms per DD cell
+ * \param[in] mtop The global topology
+ * \param[in] updateGroupingsPerMoleculeType List of update groups for each molecule type in \p mtop
+ * \param[in] temperature The maximum reference temperature, pass -1 when unknown or not applicable
+ * \param[in] numHomeAtoms Estimate of the number of home atoms per DD cell
*/
UpdateGroupsCog(const gmx_mtop_t& mtop,
- gmx::ArrayRef<const gmx::RangePartitioning> updateGroupsPerMoleculetype,
+ gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType,
real temperature,
int numHomeAtoms);
}
int countInterUpdategroupVsites(const gmx_mtop_t& mtop,
- gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingPerMoleculetype)
+ gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType)
{
int n_intercg_vsite = 0;
for (const gmx_molblock_t& molb : mtop.molblock)
const gmx_moltype_t& molt = mtop.moltype[molb.type];
std::vector<int> atomToGroup;
- if (!updateGroupingPerMoleculetype.empty())
+ if (!updateGroupingsPerMoleculeType.empty())
{
- atomToGroup = makeAtomToGroupMapping(updateGroupingPerMoleculetype[molb.type]);
+ atomToGroup = makeAtomToGroupMapping(updateGroupingsPerMoleculeType[molb.type]);
}
for (int ftype = c_ftypeVsiteStart; ftype < c_ftypeVsiteEnd; ftype++)
{
//! Returns the number of inter update-group vsites
static int getNumInterUpdategroupVsites(const gmx_mtop_t& mtop, const gmx_domdec_t* domdec)
{
- gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingPerMoleculetype;
+ gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType;
if (domdec)
{
- updateGroupingPerMoleculetype = getUpdateGroupingPerMoleculetype(*domdec);
+ updateGroupingsPerMoleculeType = getUpdateGroupingsPerMoleculeType(*domdec);
}
- return countInterUpdategroupVsites(mtop, updateGroupingPerMoleculetype);
+ return countInterUpdategroupVsites(mtop, updateGroupingsPerMoleculeType);
}
VirtualSitesHandler::Impl::Impl(const gmx_mtop_t& mtop, gmx_domdec_t* domdec, const PbcType pbcType) :
/*! \brief Return the number of virtual sites that cross update groups
*
* \param[in] mtop The global topology
- * \param[in] updateGroupingPerMoleculetype Update grouping per molecule type, pass empty when not using update groups
+ * \param[in] updateGroupingsPerMoleculeType Update grouping per molecule type, pass empty when not using update groups
*/
int countInterUpdategroupVsites(const gmx_mtop_t& mtop,
- ArrayRef<const RangePartitioning> updateGroupingPerMoleculetype);
+ ArrayRef<const RangePartitioning> updateGroupingsPerMoleculeType);
/*! \brief Create the virtual site handler
*