Medicinal chemistry filters for drug-likeness rules (Lipinski, Veber), PAINS, structural alerts, and complexity metrics.
Medchem is a Python library for molecular filtering and prioritization in drug discovery workflows. Apply hundreds of well-established and novel molecular filters, structural alerts, and medicinal chemistry rules to efficiently triage and prioritize compound libraries at scale. Rules and filters are context-specific—use as guidelines combined with domain expertise.
This skill should be used when:
Apply established drug-likeness rules to molecules using the medchem.rules module.
Available Rules:
Single Rule Application:
Multiple Rules with RuleFilters:
Result Format: Results are returned as dictionaries with pass/fail status and detailed information for each rule.
Detect potentially problematic structural patterns using the medchem.structural module.
Available Filters:
Common Alerts:
NIBR Filters:
Lilly Demerits:
The medchem.functional module provides convenient functions for common workflows.
Quick Filtering:
Identify specific chemical groups and functional groups using medchem.groups.
Available Groups:
Access curated collections of chemical structures through medchem.catalogs.
Available Catalogs:
Calculate complexity metrics that approximate synthetic accessibility using medchem.complexity.
Common Metrics:
Apply custom property-based constraints using medchem.constraints.
Example Constraints:
Use a specialized query language for complex filtering criteria.
Query Examples:
# Molecules passing Ro5 AND not having common alerts
"rule_of_five AND NOT common_alerts"
# CNS-like molecules with low complexity
"rule_of_cns AND complexity < 400"
# Leadlike molecules without Lilly demerits
"rule_of_leadlike AND lilly_demerits == 0"
Filter a large compound collection to identify drug-like candidates.
Apply stricter criteria during lead optimization.
Find molecules containing specific functional groups or scaffolds.
Context Matters: Don't blindly apply filters. Understand the biological target and chemical space.
Combine Multiple Filters: Use rules, structural alerts, and domain knowledge together for better decisions.
Use Parallelization: For large datasets (>1000 molecules), always use n_jobs=-1 for parallel processing.
Iterative Refinement: Start with broad filters (Ro5), then apply more specific criteria (CNS, leadlike) as needed.
Document Filtering Decisions: Track which molecules were filtered out and why for reproducibility.
Validate Results: Remember that marketed drugs often fail standard filters—use these as guidelines, not absolute rules.
Consider Prodrugs: Molecules designed as prodrugs may intentionally violate standard medicinal chemistry rules.