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

SEED should be a global variable #44

Closed pm-blanco closed 2 months ago

pm-blanco commented 2 months ago

The seed for the RNG should be a mandatory argument of __init__ so that one provides it when creating an instance of pyMBE:

pmb = pyMBE_library(SEED=42)

and it is internally stored as an attribute of pmb

__init__(self, SEED, temperature=None, unit_length=None, unit_charge=None):
        self.SEED=SEED

then all methods of pyMBE should access to this value instead of having multiple SEEDs values. This implementation would make debugging of scripts using pyMBE much easier and would also also make our CI tests more consistent.

Thank you @kosovan for reporting this issue.

pm-blanco commented 2 months ago

@davidbbeyer maybe you can take a look at this?

davidbbeyer commented 2 months ago

@pm-blanco Yes, I was actually planning to make this my next contribution :)