io — Input and Output#

Input and output functions.

Some convenience functions to save and load CE and MC workflows in a “standard” way.

Can also at some point add input and output for other CE code packages to make it easier to translate work.

load_work(file_path)[source]#

Load a dictionary and instantiate the MSONable objects.

Parameters:

file_path (str) –

Returns: Dictionary with smol objects

dict

save_work(file_path, *msonables)[source]#

Save msonable classes used in a CE and/or MC workflow.

Save a set of unique MSONable objects used in a workflow for a cluster expansion and/or monte carlo run as a json dictionary.

Only one of each class type can be saved per file.

Parameters:
  • file_path (str) – file path

  • *msonables (monty.MSONable) – MSONable child classes.