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 3 forks source link

Blueprints: mechanisms for representing and reproducing objects #19

Closed lerandc closed 2 months ago

lerandc commented 2 months ago

This PR adds a new top level module to Construction Zone: the Blueprints module.

The Blueprints module primarily consists of two main submodules: the Blueprints themselves, and a collections of Serializers. Together, these two submodules allow us to 1) generate a consistent, internal hierarchical tree representation of any CZ object and 2) read and write these tree representations directly to/from disk. This specifically lets us save arbitrary Generators, Volumes, and Scenes to disk in a reproducible format, allowing us to separate the creation of nanoscale objects from the actual generation of the atomic scene in computation.

Current supported formats are json, yaml, toml, and h5py--out of the box, json is supported with the use of Python's stdlib json module; other formats require (relatively light-weight) third-party dependencies.