Comprehensive Chemical Analysis Package for Drug Discovery
Project description
Optimus Chem - Comprehensive Chemical Analysis Package
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:
- Lipinski (Ro5) - Oral bioavailability
- Veber - Permeability and solubility
- Ghose - Drug-likeness
- Egan - Oral absorption
- Muegge - Broad drug-likeness
- Rule of 3 - Fragment-based design
- CNS MPO - CNS exposure potential
- bRo5 - Non-classical scaffolds
- PAINS - False positive alerts
- Pfizer 3/75 - Promiscuity/toxicity alert
- GSK 4/400 - ADMET risk reduction
- Lead-likeness - Lead compound transition
- Brenk filters - Unstable/toxic groups
- 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:
--versionShow the version and exit.--helpShow this message and exit.
Commands:
analyzeAnalyze a single SMILES string.batchAnalyze multiple compounds from a file.reportGenerate HTML report from analysis results.validateValidate 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) -> AnalysisResultanalyze_batch(smiles_list: List[str]) -> BatchResultanalyze_mol(mol: Mol) -> AnalysisResultanalyze_sdf(sdf_file: str) -> BatchResult
Properties Calculated
molecular_weight: Molecular weight (Da)logp: Partition coefficientlogd: Distribution coefficient at pH 7.4pka: Acid dissociation constanthbd: Hydrogen bond donorshba: Hydrogen bond acceptorstpsa: Topological polar surface arearotatable_bonds: Number of rotatable bondsaromatic_rings: Number of aromatic ringsmolar_refractivity: Molar refractivity
ADMET Rules
Each rule returns a RuleResult object with:
passed: Boolean indicating if rule is satisfiedviolations: Number of violationsdetails: 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
- 📧 Email: pritam@stanford.edu
- 🐛 Issues: GitHub Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e07ed67468db2fda78cc499242139390a6b3ace321b51bccf1343230a410f43
|
|
| MD5 |
d0ac5a2c58aab11022f8464df07bb99e
|
|
| BLAKE2b-256 |
6aee5ca9bc0686ed61ea78ca929d37ece90fab30173cc3a4704e07e33963adda
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd30285fbc31fb1580240d114b6034598b6771ada14e0d3d510294ed18a02a63
|
|
| MD5 |
074a6306ba89c1246bcf72a552e55670
|
|
| BLAKE2b-256 |
ce47de4d16c151b58f64ff61bf9a54450b786517afb47025d43beac9cee2d567
|