Back to main
Free guide · Open-source ML

Build an ML Model That Can Smell

OpenPOM is an open-source model that predicts what a molecule smells like from its structure. It replicates Google Research's Principal Odor Map paper, published in Science (2023).

How it works

  1. 01

    Molecule → graph

    A molecule is treated as a graph, with atoms as nodes and bonds as edges.

  2. 02

    Graph → fingerprint

    A message passing neural network (MPNN) learns a fingerprint of the molecule.

  3. 03

    Fingerprint → smell

    It predicts odor labels like fruity, woody or minty, with probabilities.

Setup guide

Requires Python 3.10. The first two commands use conda to create an environment with it. Run each command on its own, in order.

1. Create the environment

  • conda create -n open_pom python=3.10
  • conda activate open_pom

2. Install the libraries

  • pip install --pre deepchem
  • pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124
  • pip install dgl -f https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html
  • pip install openpom

No GPU? Edit the device_name setting in predict_odors.py (it's 'cuda' by default) to 'cpu' to load the models on your CPU.

Try it

  • git clone https://github.com/BioMachineLearning/openpom.git && cd openpom
  • python predict_odors.py

Enter a SMILES string like CCO (ethanol) to see its predicted smells as a bar chart.

OpenPOM by Aryan Amit Barsainyan, Ritesh Kumar, Pinaki Saha and Michael Schmuker. Original research by Lee et al., Science 2023.

cursor