Currently the Metadynamics method only supports static number of gaussians (code) as the length of the states are determined at the initialization. In cases where a metadynamics simulation has been restarted, no new gaussians will be recorded. Furthermore, such error will fail silently. Given that creating arrays with variable length is hard in Jax, I think there can be several ways to make it compatible:
- Asks user to give a larger
ngaussians when initializing the Metadynamics object. No more code is required in such cases, but the docstring needs to be edited to make it compatible to current design.
- When reloading the state from a previous result during the restart, add an additional function that edits the result. For the metadynamic case, this function should enlarge the size of the array by the number of
ngaussians that is provided by the user, and return it as the new state.
Currently the
Metadynamicsmethod only supports static number of gaussians (code) as the length of the states are determined at the initialization. In cases where a metadynamics simulation has been restarted, no new gaussians will be recorded. Furthermore, such error will fail silently. Given that creating arrays with variable length is hard in Jax, I think there can be several ways to make it compatible:ngaussianswhen initializing theMetadynamicsobject. No more code is required in such cases, but the docstring needs to be edited to make it compatible to current design.ngaussiansthat is provided by the user, and return it as the new state.