xnn.gnn.models.tensornet_foundation.convert_directory#

xnn.gnn.models.tensornet_foundation.convert_directory(path, dtype=None)[source]#

Convert a MatGL TensorNet directory into xnn’s TensorNet.

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

  • dtype (torch.dtype, optional) – The dtype the model is built in, by default the checkpoint’s. Building in float64 keeps MatGL’s float64 element references exact.

Returns:

The TensorNet and the Config that rebuilds it.

Return type:

tuple

Raises:

NotImplementedError – For an architecture outside the converted ones (a radial basis other than the Gaussians or the smooth Bessel functions, the SO(3) group, an intensive target, state features, a repulsion term, a constant energy offset per structure).