BonDNet is a graph neural network model for the prediction of bond dissociation energies (BDEs). It can be applied to both homolytic and heterolytic bond dissociations for molecules of any charge. This model is described in the paper: BonDNet: a graph neural network for the prediction of bond dissociation energies for charged molecules, Chemical Science, 2021.
Currently, we support installation from source:
-
create a conda environment
conda create --name bondnet conda activate bondnet conda install python
-
install dependencies
conda install "pytorch>=1.10.0" -c pytorch conda install "dgl>=0.5.0" -c dglteam conda install "pymatgen>=2022.01.08" "rdkit>=2020.03.5" "openbabel>=3.1.1" -c conda-forge
-
install this repo
git clone https://github.com/mjwen/bondnet.git pip install -e bondnet
The predicted BDE will be in the units of eV
.
For a quick prediction of the BDEs for a single molecule, try the live demo at:
Alternatively, a command line interface (CLI) bondnet
is provided for batch predictions.
-
A single molecule given by a
SMILES
orInChI
string, e.g.:bondnet single "C1COC(=O)O1"
-
Multiple molecules listed in a file. Supported molecule format includes
sdf
,pdb
,smiles
andinchi
, e.g.:bondnet multiple molecules.sdf -o results.sdf
-
Explicitly specifying the bond dissociation reactions. In this mode, a
moleclue
file listing all the molecules and areaction
file listing all the bond dissociation reactions are needed. Supported molecule format includesgraph
,sdf
,pdb
,smiles
, andinchi
. e.g.bondnet reaction -t graph molecule_graphs.json reactions.csv bondnet reaction -t sdf molecules.sdf reactions.csv
- More detailed instructions, example input files, and description of the file formats, can be found here.
- To get help, do
bondnet -h
. Help of subcommand can be obtained by, e.g.bondnet single -h
A new implementation of BondNet can be found here, which trains ~4 times faster. But the below instructions should still work.
The train_bde.ipynb Jupyter notebook shows how to train BonDNet on a BDE dataset of both neutral and charged molecules. Try it at:
The train_bde.ipynb Jupyter notebook trains a model on CPU. If you want to train on GPUs (a single GPU or distributed), take a look at train_bde_distributed.py. A model can be trained by
python train_bde_distributed.py molecules.sdf molecule_attributes.yaml reactions.yaml
More detailed instructions, example input files, and description of the file formats, can be found here.