Skip to content

QASR based Hybrid (Neural + Symbolic) AI Drug Predictor System - Capstone AI Project for Flinders' COMP3742

Notifications You must be signed in to change notification settings

gammaploid/Moleculetron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Molecultron: TAAR1 Hybrid AI Drug Discovery System

Student: Hassan Almosa (Alia0024) Course: COMP3742 Artificial Intelligence Assessment: Artefact 2 - Hybrid AI System for Drug Discovery Video Demo: [https://youtu.be/MhPdEaUov6Q] Repository: [https://github.com/gammaploid/Moleculetron/] Date: 2025-11-29

Overview

Molecultron is a hybrid AI system combining machine learning (MLP neural network) with symbolic reasoning (Prolog knowledge base) for TAAR1 drug discovery candidate assessment.

System Architecture

[INFERENCE PIPELINE]
SMILES Input --> RDKit Feature Extraction --> Load MLP Model --> pIC50 Prediction
                      |                                              |
                      v                                              v
              Molecular Properties                      Activity Classification
              (MW, LogP, TPSA, HBD, etc.)                           |
                      |                                              |
                      v                                              |
              Prolog KB Query <--------------------------------------+
                      |
                      v
              Rule Evaluation:
              - Veber (oral bioavailability)
              - CNS MPO (brain penetration)
              - TAAR1 Pharmacophore (mechanism)
              - Pfizer 3/75 (safety)
                      |
                      v
              Final Recommendation + Explanations

Files

File Description
hybrid_inference.py Main hybrid system (MLP + Prolog integration)
train_models.py Training script for baseline ML models
taar1_kb.pl Prolog knowledge base
requirements.txt Python dependencies
test_hybrid_system.py Comprehensive test suite

Setup

Prerequisites

  • Python >= 3.9
  • SWI-Prolog (for pyswip)

Installation

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Verify RDKit
python -c "from rdkit import Chem; print('RDKit OK')"

# Verify PySwip (requires SWI-Prolog installed)
python -c "from pyswip import Prolog; print('PySwip OK')"

SWI-Prolog Installation

Usage

Basic Inference

from hybrid_inference import HybridInferenceSystem

# Initialize system
system = HybridInferenceSystem()

# Evaluate a compound
result = system.predict("NCCc1ccccc1")  # Phenethylamine

# Get recommendation
print(f"pIC50: {result.pchembl_predicted}")
print(f"Tier: {result.recommendation_tier}")
print(f"Explanation: {result.natural_language_explanation}")

Running Tests

python test_hybrid_system.py

Training Models

python train_models.py

Prolog Knowledge Base

The KB implements four literature-backed rule sets:

  1. Veber Rules (Veber 2002): Oral bioavailability
  2. CNS MPO (Wager 2010): Brain penetration score (0-5)
  3. TAAR1 Pharmacophore (Bunzow 2001): Basic nitrogen + aromatic ring
  4. Pfizer 3/75 (Hughes 2008): Safety filter

Model Performance

Model Test R2 Split Notes
XGBoost 0.292 Scaffold Best overall
SVR 0.227 Scaffold Best CV
MLP 0.643 Random Inflated by split

References

  • Bunzow et al. (2001). Mol. Pharmacol., 60(6), 1181-1188.
  • Wager et al. (2010). ACS Chem. Neurosci., 1(6), 435-449.
  • Veber et al. (2002). J. Med. Chem., 45(12), 2615-2623.
  • Hughes et al. (2008). Bioorg. Med. Chem. Lett., 18(17), 4872-4875.

About

QASR based Hybrid (Neural + Symbolic) AI Drug Predictor System - Capstone AI Project for Flinders' COMP3742

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published