Skip to main content

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

Metadata

Release files for optimus-chem 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimus-chem 1.0.0
File Size Uploaded Provenance Actions
optimus_chem-1.0.0.tar.gz 27.3 kB Without provenance Details for optimus_chem-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optimus-chem 1.0.0
File Interpreter ABI Platform Actions
optimus_chem-1.0.0-py3-none-any.whl Python 3 none any Details for optimus_chem-1.0.0-py3-none-any.whl

Total release size: 52.7 kB

Release files / optimus_chem-1.0.0.tar.gz

Download URL optimus_chem-1.0.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e07ed67468db2fda78cc499242139390a6b3ace321b51bccf1343230a410f43
BLAKE2b-256 checksum
How to use checksums
6aee5ca9bc0686ed61ea78ca929d37ece90fab30173cc3a4704e07e33963adda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / optimus_chem-1.0.0-py3-none-any.whl

Download URL optimus_chem-1.0.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd30285fbc31fb1580240d114b6034598b6771ada14e0d3d510294ed18a02a63
BLAKE2b-256 checksum
How to use checksums
ce47de4d16c151b58f64ff61bf9a54450b786517afb47025d43beac9cee2d567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Security for optimus-chem 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page