Skip to content

PosEGNN

Optional dependency

PosEGNNCalculator has no materialsframework extra or installable package on any public index. Clone the repository, add its module directory to PYTHONPATH, and install its undeclared runtime dependencies. See Non-Extra Calculators for details.

git clone --depth 1 https://github.com/IBM/materials.git
export PYTHONPATH="$PWD/materials/models/pos_egnn:$PYTHONPATH"
uv pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cpu
uv pip install torch_geometric torch_nl==0.3
uv pip install torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.9.1+cpu.html --reinstall
git clone --depth 1 https://github.com/IBM/materials.git
export PYTHONPATH="$PWD/materials/models/pos_egnn:$PYTHONPATH"
pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cpu
pip install torch_geometric torch_nl==0.3
pip install torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.9.1+cpu.html --force-reinstall

PosEGNNCalculator

PosEGNNCalculator(
    model: str,
    device: Literal["cuda", "cpu", "mps"] = "cpu",
    compute_stress: bool = True,
    **kwargs: Any,
)

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

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

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

References
  • POS-EGNN: https://github.com/ibm/materials

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

Parameters:

Name Type Description Default
model str

The name or the path of the PosEGNN model to use.

required
device Literal['cuda', 'cpu', 'mps']

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

'cpu'
compute_stress bool

Whether to compute stress. Defaults to True.

True
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}
Note

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

calculator

calculator() -> Calculator

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

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the PosEGNN potential.