Skip to content

MatterSim

Optional dependency

MatterSimCalculator requires the mattersim extra.

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

MatterSimCalculator

MatterSimCalculator(
    model: str = "mattersim-v1.0.0-5m",
    args_dict: dict | None = None,
    compute_stress: bool = True,
    stress_weight: float = 1.0,
    device: Literal["cuda", "cpu"] = "cpu",
    **kwargs: Any,
)

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

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

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

References
  • MatterSim: https://doi.org/10.48550/arXiv.2405.04967

Initializes the MatterSimCalculator with the specified model and calculation settings.

Parameters:

Name Type Description Default
model str

The name of the MatterSim model to use. Defaults to 'mattersim-v1.0.0-5m'.

'mattersim-v1.0.0-5m'
args_dict dict

A dictionary of additional arguments to pass to the MatterSim calculator. Defaults to None.

None
compute_stress bool

Whether to compute the stress tensor. Defaults to True.

True
stress_weight float

Conversion factor from GPa to eV/ang^3. If set to 1.0, stress is calculated in GPa. Defaults to 1.0.

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

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

'cpu'
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}

Examples:

>>> mattersim_calculator = MatterSimCalculator(model="mattersim-v1.0.0-5m", device="cuda")
Note

The remaining parameters for the MatterSim potential are set to their default values.

calculator

calculator() -> Calculator

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

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the MatterSim potential.