MACE¶
Optional dependency
MACECalculator requires the mace extra.
MACECalculator
¶
MACECalculator(
model: str | Path = "medium-mpa-0",
head: str | None = None,
include_dipoles: bool = False,
device: Literal["cuda", "cpu", "mps"] = "cpu",
default_dtype: str = "",
model_type: Literal[
"MACE", "DipoleMACE", "EnergyDipoleMACE"
] = "MACE",
**kwargs: Any,
)
Calculator for material property calculations and structure relaxation using the MACE potential.
Attributes:
| Name | Type | Description |
|---|---|---|
AVAILABLE_PROPERTIES |
list[str]
|
A list of properties that this calculator can compute, including "energy", "free_energy", "forces", and "stress". |
References
- MACE: https://doi.org/10.48550/arXiv.2401.00096
Initializes the MACECalculator with the specified model and calculation settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str | Path
|
The MACE model to use. This can be the name of a predefined model (e.g., "medium-omat-0"), a path to a custom model file, or a URL. Defaults to "medium-mpa-0". |
'medium-mpa-0'
|
head
|
str | None
|
The head of the model file. Defaults to None. |
None
|
include_dipoles
|
bool
|
Determines whether dipole properties are included in the model. Defaults to False. |
False
|
device
|
Literal['cuda', 'cpu', 'mps']
|
The device to use for calculations. Defaults to "cpu". |
'cpu'
|
default_dtype
|
str
|
The default data type to be used for the model. Defaults to an empty string, meaning the default data type of the model will be used. |
''
|
model_type
|
Literal['MACE', 'DipoleMACE', 'EnergyDipoleMACE']
|
The type of MACE model to use. Defaults to "MACE". |
'MACE'
|
**kwargs
|
Any
|
Additional keyword arguments passed to the |
{}
|
Examples:
Note
The remaining parameters for the MACE potential are set to their default values.
calculator
¶
Lazily builds the ASE Calculator object for the MACE potential, using device, default_dtype, and model_type.
Returns:
| Name | Type | Description |
|---|---|---|
Calculator |
Calculator
|
The ASE Calculator object configured with the MACE potential. |