Description
The Crystal Graph Convolutional Neural Networks (CGCNN) software package implements a sophisticated AI model capable of predicting material properties based on arbitrary crystal structures. This tool is invaluable for researchers and developers in materials science seeking to understand and forecast the characteristics of new materials.
CGCNN operates by processing crystal structures as graphs, where atoms are nodes and bonds are edges. Convolutional neural networks are then applied to these graphs to learn representations that correlate with material properties. The package offers two primary functionalities: training a CGCNN model with a user-defined dataset and predicting material properties for new crystals using a pre-trained CGCNN model.
To train a custom model, users must first define a dataset comprising CIF files for crystal structures and a corresponding CSV file (id_prop.csv) linking crystal IDs to their target properties. An initialization vector file (atom_init.json) is also required. The training process can be initiated using the `main.py` script, allowing for customization of training, validation, and test data splits. The output includes saved model checkpoints and test results.
For prediction tasks, users need a pre-trained CGCNN model file (e.g., `pre-trained.pth.tar`) and a dataset of crystal structures for which properties are to be predicted. The `predict.py` script takes these inputs and generates a `test_results.csv` file containing the predicted properties for each crystal. This functionality is crucial for rapid screening of potential materials and accelerating the discovery process.
The CGCNN framework is built upon PyTorch and requires several prerequisites, including scikit-learn and pymatgen. Installation is streamlined through conda environments. The project is open-source, released under the MIT License, and is a testament to advancements in applying deep learning to materials science challenges.
CGCNN Highlights
Predicts material properties from crystal structures
Trains custom CGCNN models with user datasets
Utilizes pre-trained CGCNN models for property prediction
Processes crystal structures as graphs
Supports both regression and classification tasks
Outputs trained model checkpoints
Generates test results with predicted properties
Requires PyTorch, scikit-learn, and pymatgen
Compatible with PyTorch v1.0.0+
Getting Started with CGCNN
Set up environment: Install PyTorch, scikit-learn, and pymatgen via conda.
Define dataset: Prepare CIF files for crystal structures and an id_prop.csv file.
Train model: Run `python main.py <root_dir>` to train a custom CGCNN model.
Predict properties: Use `python predict.py <model_path> <root_dir>` with a pre-trained model.
Activate environment: Use `source activate cgcnn` before running scripts.
Deactivate environment: Use `source deactivate` after finishing.
CGCNN's Use Cases
- Material Property Prediction
- Crystal Structure Analysis
- Materials Discovery
- Computational Materials Science
- Predictive Modeling
- Data-Driven Materials Design







