mlund / faunus

A Framework for Metropolis Monte Carlo Simulation of Molecular Systems
https://faunus.readthedocs.io
MIT License
66 stars 33 forks source link

Make atomic displacement parameters optional #451

Closed mlund closed 2 months ago

mlund commented 2 months ago

This adds default dp and dprot to the atomic translation move. This is done by letting the corresponding atomic values be optional (double -> std::optional<double>). Previously, all atomic displacements were by default zero. With this change they are instead not defined. If the move encounters a particle with undefined dp/dprot it will use user-defined default values, which by default are set to zero. Therefore the default behavior is the same as before, but the user can now define default values without having to update numerous particle definitions.