Skip to main content

ChemLogic is a neurosymbolic framework that integrates relational logic syntax with various graph neural network (GNN) architectures to model chemical knowledge. It encodes functional groups and molecular subgraph patterns into a differentiable, explainable architecture, enabling the construction of interpretable and modular GNN-based models for chemical reasoning.

Project description

ChemLogic

ChemLogic is a neurosymbolic framework that integrates relational logic syntax with graph neural networks (GNNs) to model chemical knowledge. It is designed for interpretable molecular property prediction, combining symbolic reasoning with differentiable learning. ChemLogic was entirely built on the PyNeuraLogic framework.

🧬 Introduction

ChemLogic enables binary classification for molecular property prediction tasks on chemistry datasets, such as mutagenicity and toxicity prediction. It supports explainable AI by encoding functional groups and molecular subgraph patterns into logical rules, which are then integrated into GNN architectures. The weights of these rules provide interpretable insights into the model's reasoning process.

✨ Features

  • Supports well-known GNN architectures from the literature.
  • Encodes chemical knowledge using relational logic syntax.
  • Integrates functional groups and molecular subgraph patterns into a learnable knowledge base.
  • Enables explainable and interpretable predictions.
  • Designed for binary classification tasks with future support for regression and more.

📦 Installation

ChemLogic will be available via PyPI. Once published, you can install it using:

pip install chemlogic

📂 Project structure

The project consists off of 3 main modules:

  • datasets - contain the datasets encoded in relational manner. Includes data from TUD and TDC datasets, as well as a converter from custom SMILES datasets.
  • models - contains the GNN architectures.
  • knowledge_base - contains the functional groups and subgraph patters.

🚀 Usage

Basic example of training a GNN on the MUTAG dataset can be found in notebooks/run_example.

🧩 Dependencies

ChemLogic requires Python 3.11 and Java >=1.8. For visualization graphviz is required.

All dependencies are listed in pyproject.toml.

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines on how to get started.

📄 License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chemlogic-0.1.0.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chemlogic-0.1.0-py3-none-any.whl (6.6 MB view details)

Uploaded Python 3

File details

Details for the file chemlogic-0.1.0.tar.gz.

File metadata

  • Download URL: chemlogic-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.2 CPython/3.10.16 Windows/10

File hashes

Hashes for chemlogic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3dc3e05116bbc3a6acc6e9bf6a8e010c0b753c977c5bd21294fd15fe1e536c51
MD5 748490aa3c7ca805ed4fb6d1c9a8c8c2
BLAKE2b-256 340097dc62792f06950f9fcbca0eec55b8a923fc63b7d456755a783c3e439e2a

See more details on using hashes here.

File details

Details for the file chemlogic-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chemlogic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.2 CPython/3.10.16 Windows/10

File hashes

Hashes for chemlogic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9961c4b1a16e33367b5b6738e489bb46e419932be783fdc27fd3810832df275a
MD5 f5e1bef1408a2a7632ce5fd8a2a8d4d2
BLAKE2b-256 c96838b6708677bc00afd557af7dc7b3a07f54b31f1acb9921e438103bedd464

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page