Selectively activate MdModules during simulation instead of instantiating all of them
Change the interface to MdModules that allows the MdModules to subscribe to callbacks only after they know if they are active or not so that we avoid the
within the modules that may be to easily overlooked.
Split MdModuleNotifications into topics
Use different notifers to distinguish MdModule callbacks to
- simulation setup
Add function calls to MdModules to sign up for notifications
Allow MdModules to sign up to notifications after they know their own
options. This makes it possible that modules only get called back when
they need to and not by default and skips the if(active) logic in
functions that are called back in favour of not subscribing to the
notifications to begin with.
#1 Updated by Christian Blau 3 months ago
Selective activation of the modules is easier when MdModules don't have to be constructed with the notifications early on, but can be handed the notification handles later.
Currently all notifications are subscribed to during module construction, but some notifications will only be needed during pre-processing at grompp-time, while others are only needed during md run setup, thus
- split notifications into pre-processing notifications, notifications during simulations, and checkpointing notifications
- hand over notification handle for pre-processing callbacks and simulation callbacks seperately instead of all of them at construction time
- callback notifications only if modules are active