This repository contains hands-on materials for working with the UMA (Unified Machine learning potential for Atomistic simulations) model, part of the "Practical Introduction to AI in Materials Discovery" and "Hands-on Practical Training: Meta’s Universal Models for Atoms (UMA) Models for Corrosion Management" workshops at The 19th Middle East Corrosion Conference and Exhibition (MECC 2025). The conference is held from November 11-13, 2025, at Dhahran Expo, Kingdom of Saudi Arabia.
Muhammad H. M. Ahmed
Department of Materials Science & Engineering
King Fahd University of Petroleum and Minerals (KFUPM)
Contact:
- Email: husseinphysicist@gmail.com | g202318650@kfupm.edu.sa
- Phone: +966 53 358 4744
- LinkedIn: Muhammad H. M. Ahmed
-
Clone this repository:
git clone https://github.com/MHphysicist/MECC2025-UMA-Handson.git cd MECC2025-UMA-HandsonAlternatively, you can download the ZIP file and extract it.
These materials focus on practical applications of UMA for materials discovery and catalysis simulations. Through hands-on exercises, you'll learn to:
- Set up and use pretrained AI models for materials prediction
- Optimize catalyst performance using machine learning
- Predict material properties and behaviors
- Screen potential materials for applications like CO₂ capture
The exercises are designed to provide immediate practical experience with AI-driven methodologies that you can apply to your own materials research and development projects.
Before starting the workshop, you'll need to:
- Install Conda (for managing Python environments)
- Create a Hugging Face account and get access to UMA
- Set up your environment with the required packages
- You can find a full walkthrough in this link
-
Download Miniconda3:
- Visit Miniconda download page
- Download the Windows 64-bit installer for Python 3.11
- Direct link: Miniconda3 Windows 64-bit
-
Install Miniconda3:
- Run the downloaded .exe file
- Select "Install for all users" (recommended)
- Use default installation path
- Check "Add Miniconda3 to my PATH environment variable"
- Check "Register Miniconda3 as my default Python"
-
Verify installation:
- Open a new Anaconda Prompt
- Run:
conda --version
-
Download Miniconda3:
- Open Terminal
- Download installer:
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh # For Apple Silicon # OR curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh # For Intel Mac
-
Install Miniconda3:
bash Miniconda3-latest-MacOSX-*.sh- Press ENTER to review license
- Type "yes" to accept
- Confirm installation location
- Type "yes" to initialize Miniconda3
-
Verify installation:
- Open a new terminal window
- Run:
conda --version
-
Download Miniconda3:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
-
Install Miniconda3:
bash Miniconda3-latest-Linux-x86_64.sh
- Press ENTER to review license
- Type "yes" to accept
- Confirm installation location
- Type "yes" to initialize Miniconda3
-
Verify installation:
- Open a new terminal
- Run:
conda --version
- Create a new conda environment with Python 3.11.9:
conda create -n mecc-uma python=3.11.9 -y- Activate the environment:
conda activate mecc-uma- Install dependencies:
pip install -r requirements.txt-
NGLView Setup: NGLView is pre-configured in JupyterLab 4 and should work out of the box. If you experience any visualization issues:
pip uninstall nglview -y pip install nglview==3.1.4
Then restart JupyterLab.
-
Verify installation:
# Should show Python 3.11.9
python --version
# Should show all required packages
conda list1. Visit [huggingface](https://huggingface.co/join)
2. Fill in your details:
- Username
- Email
- Password
3. Click "Create account"
4. Verify your email address
Note: If you already have an account, sign in at [huggingface login](https://huggingface.co/login)1. Visit [facebook/UMA model page](https://huggingface.co/facebook/UMA)
2. Click "Access Request" button
3. Fill in the request form:
- Select "Academic/Research" for use case
- Briefly describe your use: "MECC 2025 Workshop: Practical Introduction to AI in Materials Discovery"
- Accept the terms of use
4. Submit and wait for approval (approval time varies)1. Go to [Access Tokens page](https://huggingface.co/settings/tokens)
2. Click "New token"
3. Fill in token details:
- Name: "uma-workshop" (or any memorable name)
- Role: Select "read" scope (this is sufficient for the workshop)
4. Click "Generate token"
5. COPY YOUR TOKEN IMMEDIATELY - you won't be able to see it again!The Hugging Face CLI provides a secure and consistent way to manage your token across all platforms:
-
Open a terminal (make sure you're in the
mecc-umaconda environment):conda activate mecc-uma
-
Log in using the CLI:
huggingface-cli login
-
When prompted, paste your token and press Enter
This will securely store your token in:
- Windows:
%USERPROFILE%\.huggingface\token - macOS/Linux:
~/.huggingface/token
Check if you're logged in:
huggingface-cli whoamiYou should see your Hugging Face username displayed.
Important Security Notes:
- Never share your token or token file
- If token is compromised, revoke it immediately on Hugging Face website
- To logout and remove token:
huggingface-cli logout
-
Navigate to the test directory:
cd "0-Test_UMA"
-
Start Jupyter Lab:
jupyter lab
-
Open
Test_UMA_Setup.ipynband run all cells to verify:- Package imports work correctly
- UMA model loads successfully
- Simple H2 optimization runs without errors
If all cells run successfully, your environment is ready for the workshop!
.
├── requirements.txt # Full package dependencies
├── README.md # This file
├── 0-Test_UMA/ # Initial setup verification
│ └── Test_UMA_Setup.ipynb # Test notebook
└── 1-Catalysis_Hands_on/ # Main workshop materials
├── NH3_Decomposition_MECCE_Workshop.ipynb # Main tutorial notebook
├── utility.py # Helper functions
└── Isolated_Molecules/ # Reference molecule structures
├── H2/
├── NH2/
└── NH3/
-
Conda not recognized
- Close and reopen your terminal after installation
- For Windows: Verify "Add to PATH" was checked during installation
- For macOS/Linux: Run
source ~/.bashrcorsource ~/.zshrc - Verify with:
conda --version
-
Environment Issues
- Verify environment is active (should see
(mecc-uma)in prompt) - List environments:
conda env list - If activation fails: Run
conda initand restart terminal - To reactivate:
conda activate mecc-uma
- Verify environment is active (should see
-
Package Installation Issues
# First, ensure you're in the correct environment conda activate mecce-uma # If fairchem fails pip install --force-reinstall fairchem-core # For dependency issues conda clean --all pip install -r requirements.txt
-
NGLView Issues
# Verify installation and version conda list nglview # If visualization issues occur pip uninstall nglview -y pip install nglview==3.1.4 # Restart JupyterLab
-
Hugging Face Token Issues
# Verify login status huggingface-cli whoami # If not logged in or token expired: huggingface-cli login # To remove and reset token: huggingface-cli logout huggingface-cli login
-
CUDA/GPU Issues
- Workshop examples use CPU by default
- For GPU support:
- Install CUDA toolkit
- Install GPU version of PyTorch
- Update device in notebooks from "cpu" to "cuda"
For additional help, contact the workshop organizers or consult the FairChem documentation at fair-chem.github.io.
This workshop material is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). This means you are free to:
- Share and adapt the material for non-commercial purposes
- Must give appropriate credit and indicate if changes were made
Commercial use is not permitted. See the LICENSE file for details.
Note: The UMA model has its own license terms which you accept during the access request process.
If you use these workshop materials in your research, please cite:
The workshop materials:
@inproceedings{ahmed2025materials,
author = {Ahmed, Muhammad H. M.},
title = {UMA Hands-on Materials: Practical Introduction to AI in Materials Discovery},
booktitle = {The 19th Middle East Corrosion Conference and Exhibition},
series = {MECC},
year = {2025},
month = {November},
address = {Dhahran Expo, Dhahran, Saudi Arabia},
organization = {Materials Engineering Association and AMPP Dhahran Saudi Arabia Chapter},
url = {https://github.com/MHphysicist/MECCE2025-UMA-Handson}
}The UMA model:
@article{wang2023uma,
title={UMA: A Unified AI Model for Catalysis},
author={Wang, Yufeng and Guo, Shule and Felton, Katie and Kang, Jiangyan and Fung, Victor and others},
journal={arXiv preprint arXiv:2308.04608},
year={2023}
}- Dr. Abduljabar Q. Al-Sayoud, research advisor at KFUPM, for his academic supervision and valuable guidance
- Meta Research for developing and open-sourcing the UMA model
- King Fahd University of Petroleum and Minerals (KFUPM)
- The FairChem team for their excellent software infrastructure
- MECC Conference organizers and participants
- Direct Support:
- Muhammad H. M. Ahmed
- Email: husseinphysicist@gmail.com | g202318650@kfupm.edu.sa
- Phone: +966 53 358 4744
- LinkedIn: Muhammad H. M. Ahmed
- UMA Model: facebook/UMA on Hugging Face
- FairChem Documentation: fair-chem.github.io
- ASE Documentation: wiki.fysik.dtu.dk/ase
For common setup and runtime issues, please check the Common Issues and Solutions section above.