Gromacs
2024.3
|
#include <gromacs/domdec/localtopologychecker.h>
Has responsibility for checking that the local topology distributed across domains describes a total number of bonded interactions that matches the system topology.
This uses the ObservablesReducer framework to check that the count of bonded interactions in the local topology made for each domain sums to the expected value. Because this check is not urgent, the communication that it requires is done at the next opportunity, rather than requiring extra communication. If the check fails, a fatal error stops execution. In principle, if there was a bug, GROMACS might crash in the meantime because of the wrong forces. However as a bug is unlikely we optimize by avoiding creating extra overhead from communication.
Public Member Functions | |
LocalTopologyChecker (const MDLogger &mdlog, const t_commrec *cr, const gmx_mtop_t &mtop, DDBondedChecking ddBondedChecking, const gmx_localtop_t &localTopology, const t_state &localState, bool useUpdateGroups, ObservablesReducerBuilder *observablesReducerBuilder) | |
Constructor. More... | |
~LocalTopologyChecker () | |
Destructor. | |
LocalTopologyChecker (LocalTopologyChecker &&other) noexcept | |
Move constructor. | |
LocalTopologyChecker & | operator= (LocalTopologyChecker &&other) noexcept |
Move assignment. | |
void | scheduleCheckOfLocalTopology (int numBondedInteractionsToReduce) |
Set that the local topology should be checked via observables reduction whenever that reduction is required by another module. In case of a single domain a direct assertion is performed instead. | |
gmx::LocalTopologyChecker::LocalTopologyChecker | ( | const MDLogger & | mdlog, |
const t_commrec * | cr, | ||
const gmx_mtop_t & | mtop, | ||
DDBondedChecking | ddBondedChecking, | ||
const gmx_localtop_t & | localTopology, | ||
const t_state & | localState, | ||
bool | useUpdateGroups, | ||
ObservablesReducerBuilder * | observablesReducerBuilder | ||
) |
Constructor.
[in] | mdlog | Logger |
[in] | cr | Communication object |
[in] | mtop | Global system topology |
[in] | ddBondedChecking | Tells for which bonded interactions presence should be checked |
[in] | localTopology | The local topology |
[in] | localState | The local state |
[in] | useUpdateGroups | Whether update groups are in use |
[in] | observablesReducerBuilder | Handle to builder for ObservablesReducer |