Skip to content

SevenNet

Optional dependency

SevenNetCalculator requires the sevennet extra.

uv add "materialsframework[sevennet]"
pip install "materialsframework[sevennet]"

SevenNetCalculator

SevenNetCalculator(
    model: str = "7net-omni",
    modal: str = "mpa",
    file_type: Literal[
        "checkpoint", "torchscript"
    ] = "checkpoint",
    device: Literal["cuda", "cpu", "mps", "auto"] = "auto",
    **kwargs: Any,
)

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

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

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

References
  • SevenNet: https://doi.org/10.1021/acs.jctc.4c00190
  • SevenNet-MF: https://doi.org/10.1021/jacs.4c14455

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

Parameters:

Name Type Description Default
model str

The name or the path of the SevenNet model to use. Defaults to '7net-mf-ompa'.

'7net-omni'
modal Literal['mpa', 'omat24']

The fidelity of the model to use. Defaults to 'mpa'.

'mpa'
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".

'auto'
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}
Example

sevennet_calculator = SevenNetCalculator(model="SevenNet-0", device="cuda")

Note

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

calculator

calculator() -> Calculator

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

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the SevenNet potential.