Skip to content

HIENet

Optional dependency

HIENetCalculator requires the hienet extra plus torch-scatter built for the same PyTorch version. See Extras Needing an Additional Install Step for the verified install sequence.

uv add "materialsframework[hienet]"
uv pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cpu
uv pip install torch-scatter -f https://data.pyg.org/whl/torch-2.9.1+cpu.html --reinstall
pip install "materialsframework[hienet]"
pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cpu
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.9.1+cpu.html --force-reinstall

HIENetCalculator

HIENetCalculator(
    model: str,
    file_type: Literal[
        "checkpoint", "torchscript"
    ] = "checkpoint",
    device: Literal["cuda", "cpu", "mps", "auto"] = "cpu",
    **kwargs: Any,
)

Calculator for material property calculations and structure relaxation using the HIENet potential.

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

A list of properties that this calculator can compute, including "energy", "forces", and "stress".

References
  • HIENet: https://doi.org/10.48550/arXiv.2503.05771

Initialize a HIENetCalculator instance with a specified model and calculation settings.

Parameters:

Name Type Description Default
model str

The path of the HIENet model to use.

required
file_type Literal['checkpoint', 'torchscript']

The format of the model file. Defaults to 'checkpoint'.

'checkpoint'
device Literal['cuda', 'cpu', 'mps', 'auto']

The device to use for calculations. Defaults to "auto".

'cpu'
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}
Example

hienet_calculator = HIENetCalculator(model="checkpoint_600.pth", device="cuda")

Note

The remaining values for the arguments are set to the default values for the HIENet potential.

calculator

calculator() -> Calculator

Lazily builds and returns the ASE Calculator object for the HIENet potential.

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the HIENet potential.