jaxrts.saving.JaXRTSDecoder.__init__

JaXRTSDecoder.__init__(ureg, additional_mappings: dict[str, Model | HNCPotential] | None = None, *args, **kwargs)[source]

Initialize the JSON decoder.

Paramters

ureg

The UnitRegistry that is used for decoding. Has to the same instance which was used when setting up the objects that should be decoded.

additional_mappings: dict[str: Model | HNCPotential], optional

Dict containing mappings so that custom models can be decoded, too. See the test in tests/test_saving.py to see this in practice.