Make inputrec const everywhere, clarify simulation parameter updates
The inputrec is mostly used to represent the input received from the user. In a few cases, it is also used by other functionalities to change simulation parameters:
- Simulated annealing and simulated tempering might change the target temperature (do_md)
-
The COM motion removal frequency is adapted to other parameters in setup (do_md)→ !955 (merged) - Change calculation frequencies (do_rerun, do_mimic)
- Change rlist (do_tpi)
- Change nsteps (do_nm, do_steep)
This is dangerous, as some functionalities are copying inputrec values to local variables, or using it to compute local variables (e.g.: thermostats calculating their masses based on reference temperature), and might not be aware that changes happened that could require them to update their local copies / variables.
The inputrec should be constant at the simulator level. Simulation parameters which are supposed to be updated need to be implemented in a different way including a mechanism to inform other modules that a change has happened.
Edited by Pascal Merz