Metadata-Version: 2.4
Name: gamenet-uq
Version: 0.1.1
Summary: Graph Neural Network with uncertainty quantification for adsorption energy prediction
Author-email: Santiago Morandi <santiagomorandi@yahoo.it>
Maintainer-email: Santiago Morandi <santiagomorandi@yahoo.it>
License: MIT License
        
        Copyright (c) 2024 LopezGroup-ICIQ
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/LopezGroup-ICIQ/gamenet_uq
Project-URL: Bugtracker, https://github.com/LopezGroup-ICIQ/gamenet_uq/issues
Keywords: heterogeneous catalysis,adsorption energy,kinetics,machine learning,transition metals
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: scikit-learn>=1.3.0
Requires-Dist: torch>=2.0.0
Requires-Dist: torch_geometric>=2.7.0
Requires-Dist: ase>=3.22.0
Requires-Dist: rdkit>=2023.3.3
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: seaborn>=0.13.0
Requires-Dist: networkx>=3.1
Requires-Dist: tqdm>=4.65.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: codecov; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Dynamic: license-file

[![DOI](https://img.shields.io/badge/DOI-10.26434%2Fchemrxiv--2024--bfv3d-blue)](https://doi.org/10.26434/chemrxiv-2024-bfv3d)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
[![Python package](https://github.com/LopezGroup-ICIQ/gamenet_uq/actions/workflows/tests.yml/badge.svg)](https://github.com/LopezGroup-ICIQ/gamenet_uq/actions/workflows/tests.yml)

# GAME-Net-UQ

<div style="display: flex; justify-content: center; align-items: center;">
    <p align="center">
     <img src="./GNN_github.png" width="90%" height="90%" />
    </p>
</div>

This repository contains the Python code used to train and evaluate GAME-Net-UQ, a graph neural network with uncertainty quantification (UQ) for predicting the DFT energy of relaxed species and transition states adsorbed on metal surfaces. 

## Install

```bash
pip install gamenet-uq
```

The main dependencies of the repo can be found in [pyproject.toml](./pyproject.toml)

## DFT dataset

The DFT dataset `fg.db` (217 MB) used to train the GNN will be soon uploaded to Zenodo as ASE database including the DFT VASP relaxed geometries, simulation settings, and other metadata. 

## Graph dataset generation from ASE databases

The graph dataset (92 MB) can be automatically generated from the ASE database with the script [gen_dataset.py](./scripts/gen_dataset.py). The same script can be used to generate your custom dataset from external ASE databases.  

## Model training and finetuning

To train the model, run the script [train_mve.py](./scripts/train_mve.py). The [input template ](./scripts/input.toml) file provides an explanation for each entry required in the training configuration file.

```bash
python train_mve.py -i input.toml -o output_dirname
```

## Pretrained model

The final pretrained model can be employed with CARE ([link](https://github.com/LopezGroup-ICIQ/care)). 

## License

The code is released under the [MIT](./LICENSE) license.

## Reference

- **A Foundational Model for Reaction Networks on Metal Surfaces**  
  Authors: S. Morandi, O. Loveday, T. Renningholtz, S. Pablo-García, R. A. Vargas Hernáńdez, R. R. Seemakurthi, P. Sanz Berman, R. García-Muelas, A. Aspuru-Guzik, and N. López  
  DOI: [10.26434/chemrxiv-2024-bfv3d](https://doi.org/10.26434/chemrxiv-2024-bfv3d)
