Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.87 KB

File metadata and controls

51 lines (36 loc) · 1.87 KB

MarkushGenerator

This is the repository for the synthetic data generation pipeline of Markush Structures. (adapted for MarkushGrapher-2)

Updates

Installation

  1. Create a virtual environment.
python3.10 -m venv markushgenerator-env
source markushgenerator-env/bin/activate
  1. Install MarkushGenerator.
PIP_USE_PEP517=0 pip install -e .
  1. Install Java 17.
sudo apt-get install openjdk-17-jdk
sudo update-alternatives --config 'java'
  1. Download the CDK library (version cdk-2.9.jar) from and move it to MarkushGenerator/lib/.
wget https://github.com/cdk/cdk/releases/download/cdk-2.9/cdk-2.9.jar -P ./lib/

Generation

The notebook MarkushGenerator/markushgenerator/draw.ipynb shows how to:

  1. Draw an image from a CXSMILES.

Description of the image

  1. Draw a textual definition associated with the CXSMILES.

Description of the image

Each generated sample contains:

  • CXSMILES — the chemical structure representation.
  • Optimized CXSMILES — a normalized form of the CXSMILES.
  • Markush structure image — the rendered chemical diagram.
  • OCR cells — position and content of text in the images. Some characters are currently omitted (explicit carbons, implicit hydrogens). Atoms with charges are formatted as "atom, charge, number of charges". Superscripts and subscripts are ignored.