pyMBE-dev / pyMBE

pyMBE provides tools to facilitate building up molecules with complex architectures in the Molecular Dynamics software ESPResSo. For an up-to-date API documention please check our website:
https://pymbe-dev.github.io/pyMBE/pyMBE.html
GNU General Public License v3.0
5 stars 7 forks source link

Make the seed a global variable #50

Closed davidbbeyer closed 2 months ago

davidbbeyer commented 2 months ago

Solves #44, #43

@pm-blanco I have made the SEED a mandatory attribute of the pmb class, which is now used to set up the various reaction methods. Furthermore, I have added an attribute rng that is initialized using the provided SEED and used in generate_random_points_in_a_sphere. This way it is avoided that the rng, which was before initialized within generate_random_points_in_a_sphere, is each time re-initialized with the same seed.

All samples, tests, etc. have been updated accordingly.

Moreover, I have also fixed the bug discovered by @kosovan regarding non-cubic simulation boxes (#43)

pm-blanco commented 2 months ago

thanks @davidbbeyer for taking care of this, we should make a couple of CI tests for this:

davidbbeyer commented 2 months ago

@pm-blanco I have implemented your suggestions: