lerandc / construction_zone

Modules for generating nanoscale+ atomic scenes, primarily using pymatgen as generators with S/TEM image simulation in mind
GNU General Public License v3.0
11 stars 4 forks source link

Improve RNG support and generation reproduciblity #18

Closed lerandc closed 5 months ago

lerandc commented 5 months ago

Primarily, this pull requests updates the functions and classes which rely on random number generation to be able to reproduce their results with a unified interface.

These should be relatively minimal changes which help improve the reproducibility. There is still, however, a bit of gray area of undefined/unclear behavior when class methods, such as Generator.from_generator, are used to instantiate new copies of objects. Right now, the RNG referred to by the Generator property will be deep copied into the new Generator object. Whether or not this is semantically consistent behavior, or requires a warning, is still a bit unclear to me. I'll decide what that behavior should look/feel like globally and implement that (alongside warnings and documentation) in a future PR.