io

Serialization module for the expertsystem.

The io module provides tools to export or import objects from the particle, reaction and amplitude modules to and from disk, so that they can be used by external packages, or just to store (cache) the state of the system.

asdict(instance: object)dict[source]
convert_to_dot(instance: object)str[source]

Convert a object to a DOT language str.

Only works for objects that can be represented as a graph, particularly a StateTransitionGraph or a list of StateTransitionGraph instances.

fromdict(definition: dict)object[source]
load(filename: str)object[source]
load_pdg()expertsystem.particle.ParticleCollection[source]

Create a ParticleCollection with all entries from the PDG.

PDG info is imported from the scikit-hep/particle package.

validate(instance: dict)None[source]
write(instance: object, filename: str)None[source]