|
Gromacs
2026.2
|
#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 MpiComm &mpiComm, const gmx_domdec_t &dd, const gmx_mtop_t &mtop, DDBondedChecking ddBondedChecking, bool useUpdateGroups, ObservablesReducerBuilder *observablesReducerBuilder) | |
| Constructor. More... | |
| ~LocalTopologyChecker () | |
| Destructor. | |
| LocalTopologyChecker (LocalTopologyChecker &&other) noexcept | |
| Move constructor. | |
| LocalTopologyChecker & | operator= (LocalTopologyChecker &&other) noexcept |
| Move assignment. | |
| void | scheduleCheckOfLocalTopology (const gmx_localtop_t &localTopology, int numBondedInteractionsToReduce, const t_state *localState) |
| 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. More... | |
| gmx::LocalTopologyChecker::LocalTopologyChecker | ( | const MDLogger & | mdlog, |
| const MpiComm & | mpiComm, | ||
| const gmx_domdec_t & | dd, | ||
| const gmx_mtop_t & | mtop, | ||
| DDBondedChecking | ddBondedChecking, | ||
| bool | useUpdateGroups, | ||
| ObservablesReducerBuilder * | observablesReducerBuilder | ||
| ) |
Constructor.
| [in] | mdlog | Logger |
| [in] | mpiComm | Communication object for my group |
| [in] | dd | Domain decomposition object |
| [in] | mtop | Global system topology |
| [in] | ddBondedChecking | Tells for which bonded interactions presence should be checked |
| [in] | useUpdateGroups | Whether update groups are in use |
| [in] | observablesReducerBuilder | Handle to builder for ObservablesReducer |
| void gmx::LocalTopologyChecker::scheduleCheckOfLocalTopology | ( | const gmx_localtop_t & | localTopology, |
| int | numBondedInteractionsToReduce, | ||
| const t_state * | localState | ||
| ) |
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.
| [in] | localTopology | The local topology |
| [in] | numBondedInteractionsToReduce | The number of interactions in localTopology |
| [in] | localState | The local state, for printing distances, can be nullptr |
1.8.5