1. The boolean is passed for vsites instead of entire mdatoms structure.
2. Arguments are taken as const.
3. Whether or not the position/orientation restraints are enabled is now
taken from topology.
Change-Id: I9d299b5e46c39af07a17af1a639907d1dd11a9bc
updateTarget,
gpusWereDetected,
*inputrec,
- *mdAtoms,
+ mdAtoms->mdatoms()->haveVsites,
doEssentialDynamics,
- fcd->orires.nr != 0,
- fcd->disres.nsystems != 0,
+ gmx_mtop_ftype_count(mtop, F_ORIRES) > 0,
+ gmx_mtop_ftype_count(mtop, F_DISRES) > 0,
replExParams.exchangeInterval > 0);
const bool inputIsCompatibleWithModularSimulator = ModularSimulator::isInputCompatible(
#include "gromacs/hardware/hardwaretopology.h"
#include "gromacs/hardware/hw_info.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
return gpusWereDetected && usingOurCpuForPmeOrEwald;
}
-bool decideWhetherToUseGpuForUpdate(bool forceGpuUpdateDefaultOn,
- bool isDomainDecomposition,
- bool useGpuForPme,
- bool useGpuForNonbonded,
- bool useGpuForBufferOps,
- TaskTarget updateTarget,
- bool gpusWereDetected,
- const t_inputrec &inputrec,
- const MDAtoms &mdatoms,
- bool useEssentialDynamics,
- bool doOrientationRestraints,
- bool doDistanceRestraints,
- bool useReplicaExchange)
+bool decideWhetherToUseGpuForUpdate(const bool forceGpuUpdateDefaultOn,
+ const bool isDomainDecomposition,
+ const bool useGpuForPme,
+ const bool useGpuForNonbonded,
+ const bool useGpuForBufferOps,
+ const TaskTarget updateTarget,
+ const bool gpusWereDetected,
+ const t_inputrec &inputrec,
+ const bool haveVSites,
+ const bool useEssentialDynamics,
+ const bool doOrientationRestraints,
+ const bool doDistanceRestraints,
+ const bool useReplicaExchange)
{
if (updateTarget == TaskTarget::Cpu)
{
errorMessage += "Only Parrinello-Rahman pressure control is supported.\n";
}
- if (mdatoms.mdatoms()->haveVsites)
+ if (haveVSites)
{
errorMessage += "Virtual sites are not supported.\n";
}
* \param[in] updateTarget User choice for running simulation on GPU.
* \param[in] gpusWereDetected Whether compatible GPUs were detected on any node.
* \param[in] inputrec The user input.
- * \param[in] mdatoms Information about simulation atoms.
+ * \param[in] haveVSites If there are virtual sites in the system.
* \param[in] useEssentialDynamics If essential dynamics is active.
* \param[in] doOrientationRestraints If orientation restraints are enabled.
* \param[in] doDistanceRestraints If distance restraints are enabled.
* \throws std::bad_alloc If out of memory
* InconsistentInputError If the user requirements are inconsistent.
*/
-bool decideWhetherToUseGpuForUpdate(bool forceGpuUpdateDefaultOn,
- bool isDomainDecomposition,
- bool useGpuForPme,
- bool useGpuForNonbonded,
- bool useGpuForBufferOps,
- TaskTarget updateTarget,
- bool gpusWereDetected,
- const t_inputrec &inputrec,
- const MDAtoms &mdatoms,
- bool useEssentialDynamics,
- bool doOrientationRestraints,
- bool doDistanceRestraints,
- bool useReplicaExchange);
+bool decideWhetherToUseGpuForUpdate(bool forceGpuUpdateDefaultOn,
+ bool isDomainDecomposition,
+ bool useGpuForPme,
+ bool useGpuForNonbonded,
+ bool useGpuForBufferOps,
+ TaskTarget updateTarget,
+ bool gpusWereDetected,
+ const t_inputrec &inputrec,
+ bool haveVSites,
+ bool useEssentialDynamics,
+ bool doOrientationRestraints,
+ bool doDistanceRestraints,
+ bool useReplicaExchange);
} // namespace gmx