{"library":"nequip-allegro","title":"Allegro Equivariant Deep Learning Interatomic Potentials","description":"Allegro is an open-source Python library for building highly scalable and accurate equivariant deep learning interatomic potentials, often used in materials science and molecular dynamics. It is currently at version 0.8.2 and sees active development with frequent minor releases and occasional breaking changes in major versions.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install nequip-allegro","pip install nequip-allegro[cu-equiv]"],"cli":{"name":"allegro","version":""}},"imports":["from allegro.model import AllegroModel","from allegro.train import EMALightningModule"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom allegro.model import AllegroModel\n\n# Minimal configuration for an Allegro model\n# In a real-world scenario, this would often be loaded from a YAML config file.\nconfig = {\n    \"r_max\": 3.0,\n    \"l_max\": 1,\n    \"parity_l_max\": 1,\n    \"chemical_species\": [\"H\", \"O\"], # Define the species the model will handle\n    \"output_keys\": {\"energy\": \"total_energy\"},\n    \"avg_num_neighbors\": 10.0,\n    \"num_hidden_layers\": 1,\n    \"layer_l_maxs\": [1, 1],\n    \"feature_irreps_hidden\": \"16x0e + 16x1o\",\n    \"nonlinearity_type\": \"gate\",\n    \"cutoff_type\": \"wigner_d\",\n    \"radial_basis\": \"gaussian\",\n    \"radial_basis_kwargs\": {\"max_radial\": 10, \"num_basis\": 8},\n    \"num_basis_f\": 8,\n    \"embedding_units\": 16,\n    \"num_layers\": 1\n}\n\n# Create an instance of the Allegro model\n# This initializes the model structure, but it is not yet trained.\nmodel = AllegroModel(config)\n\nprint(\"AllegroModel created successfully.\")\nprint(f\"Model output irreps: {model.num_irreps_out}\")\n\n# Example of forward pass (requires a nequip.data.Graph object)\n# For a full example, refer to nequip and allegro documentation\n# on creating datasets and training graphs.","lang":"python","description":"This quickstart demonstrates how to programmatically define and instantiate a basic `AllegroModel` instance. It sets up a minimal configuration dictionary and passes it to the `AllegroModel` constructor. Note that this only builds the model architecture; training or inference requires additional steps using the NequIP framework, including data loading and graph creation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}