A playground for applying graph convolutional networks to molecules, with a focus on learning continuous “atom-type” embeddings and from these classical molecule force field parameters.

Getting started

OpenFF recommends using Conda virtual environments for all scientific Python work. NAGL can be installed into a new Conda environment named nagl with the openff-nagl package:

mamba create -n nagl -c conda-forge openff-nagl
conda activate nagl

For more information on installing NAGL, see Installation.

NAGL can then be imported from the openff.nagl module:

import openff.nagl

Or executed from the command line:

openff-nagl --help

Inference with NAGL

NAGL GNN models are used via the openff.nagl.GNNModel class. A checkpoint file produced by NAGL can be loaded with the GNNModel.load() method:

from openff.nagl import GNNModel

model = GNNModel.load("")

Then, the properties the model is trained to predict can be computed with the GNNModel.compute_property() method, which takes an OpenFF Molecule object:

from openff.toolkit import Molecule

ethanol = Molecule.from_smiles("CCO")



A toolkit for the generation of neural network models for predicting molecule properties.