Code Monkey home page Code Monkey logo

pacman-charge's Introduction

PACMAN

A Partial Atomic Charge Predicter for Porous Materials based on Graph Convolutional Neural Network (PACMAN)

Requires Python 3.9PyPI version Zenodo MIT Gmail Linux Windows

Developed by: Guobin Zhao

Installation

pip

pip install PACMAN-charge

Git clone

git clone https://github.com/sxm13/PACMAN.git
cd PACMAN
pip install -r requirements.txt

How to Use PACMAN charge

Jupyter notebook (using pip)

from PACMANCharge import pmcharge
pmcharge.predict(cif_file="./test/Cu-BTC.cif",charge_type="DDEC6",digits=10,atom_type=True,neutral=True)

Terminal

python pmcharge.py folder-name[path] --charge_type[DDEC6/Bader/CM5/REPEAT] --digits[int] --atom_type[bool] --neutral[bool]

Example command: python pmcharge.py test_file/test-1/ --charge_type DDEC6 --digits 10

Help usage information: python pmcharge.py -h

  • folder-name: relative path to a folder with cif files without partial atomic charges
  • charge-type (default: DDEC6): DDEC6, Bader, CM5 or REPEAT
  • digits (default: 6): number of decimal places to print for partial atomic charges. ML models were trained on a 6-digit dataset
  • atom-type (default: True): Default is to keep the same partial atomic charge for the same atom types (based on the similarity of partial atomic charges up to 3 & 2 decimal places)
  • neutral (default: True): Default is to keep the net charge is zero. We use "mean" method to neuralize the system where the excess charges are equally distributed across all atoms

Website & Zenodo

  • Predict partial atomic charges using an online APP ๐Ÿ‘‰ link
  • Full code and dataset can be downloaded from ๐Ÿ‘‰ link
  • Note: All future releases will be uploaded on Github and pip only

Reference

If you use PACMAN charge, please consider citing this paper:

@article{,
    title={PACMAN: A Robust Partial Atomic Charge Predicter for Nanoporous Materials based on Crystal Graph Convolution Network},
    DOI={},
    journal={Journal of Chemical Theory and Computation},
    author={Zhao, Guobin and Chung, Yongchul},
    year={2024},
    pages={}
}
Database with DDEC Charges url size
QMOF link 16,779
CoRE MOF 2014 DDEC link 2,932
CoRE MOF 2014 DFT-optimized link 502
CURATED-COFs link 612
ARC-MOF link 279,118

Bugs and Issues

If you encounter any problem during using PACMAN, please email [email protected] or create "issues"

Repository Structures

Model Architecture

workflow

Directory Organization

.
โ”œโ”€โ”€ ..
โ”œโ”€โ”€ figs                                                # Figures used for introduction 
โ”‚   โ”œโ”€โ”€ toc.jpg                                         # Table of Contents
โ”‚   โ””โ”€โ”€ workflow.png                                    # Workflow of this project
โ”‚
โ”œโ”€โ”€ model                                               # Python files used for dataset prepartion & GCN training
โ”‚   โ”œโ”€โ”€ GCN_E.py                                        # Networks model for energy/bandgap training
โ”‚   โ”œโ”€โ”€ GCN_charge.py                                   # Networks model for atomic charge training
โ”‚   โ”œโ”€โ”€ cif2data.py                                     # Convert QMOF database to dataset
โ”‚   โ”œโ”€โ”€ data_E.py                                       # Convert cif to graph & target (energy/bandgap)
โ”‚   โ”œโ”€โ”€ data_charge.py                                  # Convert cif to graph & target (atomic charge)
โ”‚   โ””โ”€โ”€ utils.py                                        # Normalizer, sampling, AverageMeter, save_checkpoint
โ”‚
โ”œโ”€โ”€ model4pre                                           # Python files used for prediction
โ”‚   โ”œโ”€โ”€ GCN_E.py                                        # Networks model for energy/bandgap prediction
โ”‚   โ”œโ”€โ”€ GCN_charge.py                                   # Networks model for atomic charge prediction
โ”‚   โ”œโ”€โ”€ atom_init.json                                  # a JSON file that stores the initialization vector for each element
โ”‚   โ”œโ”€โ”€ cif2data.py                                     # Read/write cif file
โ”‚   โ”œโ”€โ”€ data.py                                         # Convert cif to graph & target (energy/bandgap)
โ”‚   โ”œโ”€โ”€ data_charge.py                                  # Convert cif to graph & target (atomic charge)
โ”‚   โ””โ”€โ”€ utils.py                                        # Normalizer, sampling, AverageMeter, save_checkpoint
โ”‚
โ”œโ”€โ”€ pth                                                 # Models of this project
โ”‚   โ”œโ”€โ”€ best_bader                                      # Bader
โ”‚   โ”‚   โ”œโ”€โ”€ bader  .pth                                 # Bader charge model
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-bader.pkl                        # Normalizer of bandgap
โ”‚   โ”œโ”€โ”€ best_bandgap                                    # Bandgap
โ”‚   โ”‚   โ”œโ”€โ”€ bandgap.pth                                 # Bandgap model
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-bandgap.pkl                      # Normalizer of bandgap
โ”‚   โ”œโ”€โ”€ best_cm5                                        # CM5
โ”‚   โ”‚   โ”œโ”€โ”€ bandgap.pth                                 # ///
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-bandgap.pkl                      # ///
โ”‚   โ”œโ”€โ”€ best_ddec                                       # ///
โ”‚   โ”‚   โ”œโ”€โ”€ ddec.pth                                    # ///
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-ddec.pkl                         # ///
โ”‚   โ”œโ”€โ”€ best_pbe                                        # ///
โ”‚   โ”‚   โ”œโ”€โ”€ pbe-atom.pth                                # ///
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-pbe.pkl                          # ///
โ”‚   โ”œโ”€โ”€ best_repeat                                     # ///
โ”‚   โ”‚   โ”œโ”€โ”€ repeat.pth                                  # ///
โ”‚   โ”‚   โ””โ”€โ”€ normalizer-repeat.pkl                       # ///
โ”‚   โ”œโ”€โ”€ chk_bader                                       # Bader
โ”‚   โ”‚   โ””โ”€โ”€ checkpoint.pth                              # Checkpoint of bader
โ”‚   โ”œโ”€โ”€ chk_bandgap                                     # Bandgap
โ”‚   โ”‚   โ””โ”€โ”€ checkpoint.pth                              # Checkpoint of bandgap
โ”‚   โ”œโ”€โ”€ chk_cm5                                         # CM5
โ”‚   โ”‚   โ””โ”€โ”€ checkpoint.pth                              # ///
โ”‚   โ”œโ”€โ”€ chk_ddec                                        # ///
โ”‚   โ”‚   โ””โ”€โ”€ checkpoint.pth                              # ///
โ”‚   โ”œโ”€โ”€ chk_pbe                                         # ///
โ”‚   โ”‚   โ””โ”€โ”€ checkpoint.pth                              # ///
โ”‚   โ””โ”€โ”€ chk_repeat                                      # ///
โ”‚       โ””โ”€โ”€ checkpoint.pth                              # ///
โ”‚
โ”œโ”€โ”€ pmcharge.py                                         # main python file for atomic charge assignment by command line
โ”œโ”€โ”€ LICENSE.txt                                         # MIT license
โ”œโ”€โ”€ README.md                                           # Usage/Source
โ”œโ”€โ”€ requirements.txt                                    # packages need to be installed
โ”œโ”€โ”€ train_E.py                                          # main python file for energy/bandgap training
โ””โ”€โ”€ train_charge.py                                     # main python file for atomic charge training

AUTHORS

Maintainer

Project Contributors

pacman-charge's People

Contributors

sxm13 avatar mtap-research avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.