xnn.gnn.models.tensornet_foundation.read_matgl_directory#

xnn.gnn.models.tensornet_foundation.read_matgl_directory(path, model_class)[source]#

The parts of a MatGL potential directory whose model is model_class.

Parameters:
  • path (str or pathlib.Path) – The directory of model.json and state.pt (or either file in it).

  • model_class (str) – The MatGL class of the wrapped model ("TensorNet", "QET").

Returns:

The directory, the potential’s arguments, the model’s init_args and the state dict.

Return type:

tuple

Raises:

NotImplementedError – When the directory holds another model.