Skip to content

NewtonNet

Optional dependency

NewtonNetCalculator requires the newtonnet extra plus torch-scatter and torch-cluster built for the same PyTorch version. See Extras Needing an Additional Install Step for the verified install sequence.

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

NewtonNetCalculator

NewtonNetCalculator(
    model: str | Literal["ani1", "ani1x", "t1x"] = "t1x",
    properties: list | None = None,
    device: Literal["cpu", "cuda"] = "cpu",
    precision: Literal[
        "float64", "float32", "float16"
    ] = "float32",
    **kwargs: Any,
)

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

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

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

References
  • NewtonNet: https://doi.org/10.1039/D2DD00008C

Initializes the NewtonNetCalculator with the specified model and calculation settings.

Parameters:

Name Type Description Default
model str | Literal['ani1', 'ani1x', 't1x']

Path to the NewtonNet model or a predefined model name. Defaults to "t1x"

't1x'
properties list | None

List of properties to calculate, such as "energy", "forces", etc. Defaults to None, which will calculate all available properties.

None
device Literal['cpu', 'cuda']

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

'cpu'
precision Literal['float64', 'float32', 'float16']

Floating-point precision of the calculations. Defaults to "float32".

'float32'
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}

calculator

calculator() -> Calculator

Lazily builds the ASE Calculator object for the NewtonNet potential, using the settings from initialization.

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the NewtonNet potential.