Few-Shot Learning in Screening Septuple-Atomic-Layer Supported Single-Atom Catalysts for Hydrogen Production
This repository contains the implementation of the machine learning approach described in our paper "Few-shot learning for screening 2D Ga2CoS4- x supported single-atom catalysts for hydrogen production" for predicting Hydrogen Evolution Reaction (HER) activity. The model uses a combination of convolutional and dense neural networks to predict HER activity based on material properties.
If you use this code in your research, please cite our paper:
@article{khossossi2025few,
title={Few-shot learning for screening 2D Ga2CoS4- x supported single-atom catalysts for hydrogen production},
author={Khossossi, Nabil and Dey, Poulumi},
journal={Journal of Energy Chemistry},
volume={100},
pages={665--673},
year={2025},
publisher={Elsevier}
}- Python 3.8+
- PyTorch 1.8+
- NumPy 1.19+
- Matplotlib 3.3+
- SciPy 1.6+
- xlrd 2.0+
The model expects an Excel file with the following columns:
- Electronegativity
- d-orbital of metal
- Group number
- Radius (pm)
- First ionization energy
- HER activity (target variable)
- Clone the repository:
git clone https://github.com/NabKh/HER_SACs_JEC2024.git
cd HER_SACs_JEC2024- Install requirements:
pip install -r requirements.txt-
Prepare your data:
- Place your Excel file in
data/ - Ensure it follows the format described above
- Place your Excel file in
-
Run the training:
python src/main.py- Results will be saved in
results/run_YYYYMMDD_HHMMSS/:best_model.pkl: Trained model statetraining_losses.txt: Training and test lossestraining_errors.txt: Training and test errorstraining_history.png: Learning curves plottrain_predictions.txt: Training set predictionstest_predictions.txt: Test set predictionsnew_predictions.txt: Predictions for new elements
We welcome contributions and the use of the script in more large and different datasets! Please feel free to submit a Pull Request.
- Dr. Nabil Khossossi
- Email: [email protected]