Skip to main content

Comprehensive Chemical Analysis Package for Drug Discovery

Project description

Optimus Chem - Comprehensive Chemical Analysis Package

Optimus Logo
Python 3.7+ RDKit MIT License

Optimus Chem is a comprehensive Python package for molecular property calculations and ADMET (Absorption, Distribution, Metabolism, Excretion, Toxicity) rules analysis. It provides accurate calculations matching Discovery Studio standards for drug discovery applications.

Features

Molecular Property Calculations

  • Accurate RDKit-based calculations matching Discovery Studio standards
  • Molecular weight, LogP, LogD, pKa predictions
  • Hydrogen bond donors/acceptors
  • Topological Polar Surface Area (TPSA)
  • Rotatable bonds and ring analysis
  • Molar refractivity and more

Complete ADMET Rules Analysis

Implementation of all 14 major drug screening rules:

  1. Lipinski (Ro5) - Oral bioavailability
  2. Veber - Permeability and solubility
  3. Ghose - Drug-likeness
  4. Egan - Oral absorption
  5. Muegge - Broad drug-likeness
  6. Rule of 3 - Fragment-based design
  7. CNS MPO - CNS exposure potential
  8. bRo5 - Non-classical scaffolds
  9. PAINS - False positive alerts
  10. Pfizer 3/75 - Promiscuity/toxicity alert
  11. GSK 4/400 - ADMET risk reduction
  12. Lead-likeness - Lead compound transition
  13. Brenk filters - Unstable/toxic groups
  14. REOS - Rapid compound filtering

🔧 Easy-to-Use API

from optimus import ChemicalAnalyzer

analyzer = ChemicalAnalyzer()
results = analyzer.analyze_smiles("CCO")  # Ethanol
print(results.lipinski_violations)  # 0
print(results.drug_likeness_score)  # 0.85

Installation

pip install optimus-chem

From Source

https://github.com/pritampanda15/Optimus_Chemical_Analyzer
cd Optimus_Chemical_Analyzer
pip install -e .

Quick Start

Basic Analysis

from optimus import ChemicalAnalyzer

# Initialize analyzer
analyzer = ChemicalAnalyzer()

# Analyze a compound
results = analyzer.analyze_smiles("CC(=O)OC1=CC=CC=C1C(=O)O")  # Aspirin

# Access results
print(f"Molecular Weight: {results.molecular_weight:.2f}")
print(f"LogP: {results.logp:.2f}")
print(f"Lipinski Violations: {results.lipinski_violations}")
print(f"Drug-likeness Score: {results.drug_likeness_score:.2f}")

Batch Analysis

smiles_list = [
    "CCO",  # Ethanol
    "CC(=O)OC1=CC=CC=C1C(=O)O",  # Aspirin
    "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"  # Caffeine
]

results = analyzer.analyze_batch(smiles_list)
df = results.to_dataframe()
print(df[['SMILES', 'MW', 'LogP', 'Lipinski_Violations']])

Command Line Interface

Available Commands

optimus --help

Options:

  • --version Show the version and exit.
  • --help Show this message and exit.

Commands:

  • analyze Analyze a single SMILES string.
  • batch Analyze multiple compounds from a file.
  • report Generate HTML report from analysis results.
  • validate Validate a SMILES string.

Command Usage Examples

# Get help for specific commands
optimus analyze --help
optimus batch --help
optimus report --help
optimus validate --help

# Analyze single compound
optimus analyze "CCO"

# Analyze from file
optimus batch compounds.smi --output results.csv

# Generate report
optimus report compounds.smi --format html

# Validate SMILES
optimus validate "CCO"

API Reference

ChemicalAnalyzer Class

Methods

  • analyze_smiles(smiles: str) -> AnalysisResult
  • analyze_batch(smiles_list: List[str]) -> BatchResult
  • analyze_mol(mol: Mol) -> AnalysisResult
  • analyze_sdf(sdf_file: str) -> BatchResult

Properties Calculated

  • molecular_weight: Molecular weight (Da)
  • logp: Partition coefficient
  • logd: Distribution coefficient at pH 7.4
  • pka: Acid dissociation constant
  • hbd: Hydrogen bond donors
  • hba: Hydrogen bond acceptors
  • tpsa: Topological polar surface area
  • rotatable_bonds: Number of rotatable bonds
  • aromatic_rings: Number of aromatic rings
  • molar_refractivity: Molar refractivity

ADMET Rules

Each rule returns a RuleResult object with:

  • passed: Boolean indicating if rule is satisfied
  • violations: Number of violations
  • details: Detailed breakdown of criteria

HTML Report Generation

Optimus can generate comprehensive HTML reports with interactive visualizations and detailed analysis results:

from optimus import ChemicalAnalyzer

analyzer = ChemicalAnalyzer()

# Analyze multiple compounds
smiles_list = [
    "CCO",  # Ethanol
    "CC(=O)OC1=CC=CC=C1C(=O)O",  # Aspirin
    "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"  # Caffeine
]

# Generate HTML report
analyzer.generate_html_report(smiles_list, output_file="analysis_report.html")

Command Line HTML Report

# Generate HTML report from SMILES file
optimus report compounds.smi --format html --output report.html

The HTML report includes:

  • Summary Statistics: Total compounds, success rates, average properties
  • Rule Pass Rates: Pass/fail statistics for all 14 ADMET rules
  • Individual Results: Detailed breakdown for each compound with color-coded pass/fail indicators
  • Interactive Features: Sortable tables and responsive design

Sample HTML Output Features:

  • Pass/Fail Indicators: Green for pass, red for fail, gray for N/A
  • Summary Tables: Key metrics and rule compliance rates
  • Detailed Analysis: Molecular properties and ADMET rule results
  • Responsive Design: Works on desktop and mobile devices

Examples

Drug-likeness Assessment

from optimus import ChemicalAnalyzer
import pandas as pd

analyzer = ChemicalAnalyzer()

# FDA approved drugs
fda_drugs = [
    "CC(=O)OC1=CC=CC=C1C(=O)O",  # Aspirin
    "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O",  # Ibuprofen
    "CN1C=NC2=C1C(=O)N(C(=O)N2C)C",  # Caffeine
]

results = []
for smiles in fda_drugs:
    result = analyzer.analyze_smiles(smiles)
    results.append({
        'SMILES': smiles,
        'MW': result.molecular_weight,
        'LogP': result.logp,
        'Lipinski_Pass': result.lipinski.passed,
        'Drug_Score': result.drug_likeness_score
    })

df = pd.DataFrame(results)
print(df)

CNS Drug Analysis

# Analyze CNS penetration potential
result = analyzer.analyze_smiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")  # Caffeine

print(f"CNS MPO Score: {result.cns_mpo.score}")
print(f"BBB Permeability: {result.bbb_permeability}")
print(f"P-gp Substrate: {result.pgp_substrate}")

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use Optimus in your research, please cite:

Optimus Chem: Comprehensive Chemical Analysis Package for Drug Discovery
P.K.Panda.et al. (2025)

Support

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

optimus_chem-1.0.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

optimus_chem-1.0.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file optimus_chem-1.0.0.tar.gz.

File metadata

  • Download URL: optimus_chem-1.0.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for optimus_chem-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3e07ed67468db2fda78cc499242139390a6b3ace321b51bccf1343230a410f43
MD5 d0ac5a2c58aab11022f8464df07bb99e
BLAKE2b-256 6aee5ca9bc0686ed61ea78ca929d37ece90fab30173cc3a4704e07e33963adda

See more details on using hashes here.

File details

Details for the file optimus_chem-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: optimus_chem-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for optimus_chem-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd30285fbc31fb1580240d114b6034598b6771ada14e0d3d510294ed18a02a63
MD5 074a6306ba89c1246bcf72a552e55670
BLAKE2b-256 ce47de4d16c151b58f64ff61bf9a54450b786517afb47025d43beac9cee2d567

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