* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
{
srenew(md->cACC, md->nalloc);
}
- if (opts->nFreeze
- && (opts->ngfrz > 1 || opts->nFreeze[0][XX] || opts->nFreeze[0][YY] || opts->nFreeze[0][ZZ]))
+ if (inputrecFrozenAtoms(ir))
{
srenew(md->cFREEZE, md->nalloc);
}
try
{
const bool useUpdateGroups = cr->dd ? ddUsesUpdateGroups(*cr->dd) : false;
+ const bool haveFrozenAtoms = inputrecFrozenAtoms(inputrec.get());
useGpuForUpdate = decideWhetherToUseGpuForUpdate(
useDomainDecomposition, useUpdateGroups, pmeRunMode, domdecOptions.numPmeRanks > 0,
useGpuForNonbonded, updateTarget, gpusWereDetected, *inputrec, mtop,
doEssentialDynamics, gmx_mtop_ftype_count(mtop, F_ORIRES) > 0,
- replExParams.exchangeInterval > 0, doRerun, devFlags, mdlog);
+ replExParams.exchangeInterval > 0, haveFrozenAtoms, doRerun, devFlags, mdlog);
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2010, The GROMACS development team.
* Copyright (c) 2012,2014,2015,2016,2017 by the GROMACS development team.
- * 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.
return (ir->pbcType == PbcType::XY && ir->nwall == 2);
}
+bool inputrecFrozenAtoms(const t_inputrec* ir)
+{
+ return ((ir->opts.nFreeze != nullptr)
+ && (ir->opts.ngfrz > 1 || ir->opts.nFreeze[0][XX] != 0 || ir->opts.nFreeze[0][YY] != 0
+ || ir->opts.nFreeze[0][ZZ] != 0));
+}
+
bool integratorHasConservedEnergyQuantity(const t_inputrec* ir)
{
if (!EI_MD(ir->eI))
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * 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 Return true if the simulation is 2D periodic with two walls. */
bool inputrecPbcXY2Walls(const t_inputrec* ir);
+//! \brief Return true if the simulation has frozen atoms (non-trivial freeze groups).
+bool inputrecFrozenAtoms(const t_inputrec* ir);
+
/*! \brief Returns true for MD integator with T and/or P-coupling that supports
* calculating a conserved energy quantity.
*
/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
"Acceleration is not supported by the modular simulator.");
isInputCompatible =
isInputCompatible
- && conditionalAssert(inputrec->opts.ngfrz == 1 && inputrec->opts.nFreeze[0][XX] == 0
- && inputrec->opts.nFreeze[0][YY] == 0
- && inputrec->opts.nFreeze[0][ZZ] == 0,
+ && conditionalAssert(!inputrecFrozenAtoms(inputrec),
"Freeze groups are not supported by the modular simulator.");
isInputCompatible =
isInputCompatible
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2015,2016,2017,2018,2019 by the GROMACS development team.
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 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.
const bool useEssentialDynamics,
const bool doOrientationRestraints,
const bool useReplicaExchange,
+ const bool haveFrozenAtoms,
const bool doRerun,
const DevelopmentFeatureFlags& devFlags,
const gmx::MDLogger& mdlog)
"The number of coupled constraints is higher than supported in the GPU LINCS "
"code.\n";
}
+ if (haveFrozenAtoms)
+ {
+ // There is a known bug with frozen atoms and GPU update, see Issue #3920.
+ errorMessage += "Frozen atoms not supported.\n";
+ }
if (!errorMessage.empty())
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
* \param[in] useEssentialDynamics If essential dynamics is active.
* \param[in] doOrientationRestraints If orientation restraints are enabled.
* \param[in] useReplicaExchange If this is a REMD simulation.
+ * \param[in] haveFrozenAtoms If this simulation has frozen atoms (see Issue #3920).
* \param[in] doRerun It this is a rerun.
* \param[in] devFlags GPU development / experimental feature flags.
* \param[in] mdlog MD logger.
bool useEssentialDynamics,
bool doOrientationRestraints,
bool useReplicaExchange,
+ bool haveFrozenAtoms,
bool doRerun,
const DevelopmentFeatureFlags& devFlags,
const gmx::MDLogger& mdlog);