A comprehensive Python toolbox for chemical data augmentation developed in partnership with CINE and FAPESP. AugChem provides state-of-the-art techniques for augmenting molecular data across multiple representations.
- SMILES: String-based molecular representation augmentation
- Molecular Graphs: Advanced graph-based augmentation using PyTorch Geometric
- Enumeration: Creates different representations of the same SMILES
- Masking: Masks a random token of the SMILES, switching it to "[M]", with a given probability.
- Deletion: Deletes a random token from the SMILES with a given probability.
- Swaping: Swaps a two random tokens from the SMILES.
- Fusion: A combination between Masking, Deletion and Swap, that chooses one of the three to use on the augmentation.
- Edge Dropping: Systematic removal of molecular bonds for structural variation
- Node Dropping: Atomic removal while preserving molecular validity
- Feature Masking: Node feature perturbation for robust representation learning
- Edge Perturbation: Dynamic bond addition and removal for chemical space exploration
pip install augchemOr install from source:
git clone https://github.com/gbonavina/AugChem.git
cd AugChem
pip install -e .torch >= 2.0.0torch-geometric >= 2.3.0rdkit >= 2023.3.1numpy >= 1.21.0pandas >= 1.3.0matplotlib >= 3.5.0
- Drug Discovery: Molecular property prediction with enhanced datasets
- Materials Science: Crystal structure and property augmentation
- Chemical Informatics: Robust molecular representation learning
- Graph Neural Networks: Training data enhancement for chemical GNNs
- Cheminformatics Research: Systematic molecular dataset expansion
Comprehensive documentation with tutorials and API reference: https://gbonavina.github.io/AugChem/
- Tutorial - Step-by-step guide
- Graph Methods - Augmentation techniques
- Graph Module - Module overview
- Loader - Data loading utilities
This toolbox addresses the gap in chemical data augmentation for machine learning applications in materials chemistry. The effectiveness of ML models depends on data quality, making these augmentation techniques essential for improving model accuracy.
If you use AugChem in your research, please cite:
@software{augchem2024,
title={AugChem: A Python Toolbox for Chemical Data Augmentation},
author={Gabriel Bonavina, Marcos Quiles},
year={2025},
url={https://github.com/gbonavina/AugChem}
}We welcome contributions!
git clone https://github.com/gbonavina/AugChem.git
cd AugChem
pip install -e ".[dev]"This project is licensed under the MIT License - see the LICENSE file for details.
- CINE - Center for Innovation on New Energies
- FAPESP - São Paulo Research Foundation
- PyTorch Geometric team for the excellent graph neural network library
- RDKit community for chemical informatics tools
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions