Medicinal chemistry screening filters for compound prioritization; use when you need to apply drug-likeness rules, PAINS/structural alerts, and complexity metrics to triage or optimize libraries.
Rules are implemented as callable checks over SMILES or RDKit-like molecule objects (commonly via datamol).
RuleFilters(rule_list=[...]) applies multiple rules and returns a structured result (typically including an overall pass plus per-rule details).
Typical use: start broad (Ro5/Veber), then tighten (CNS/lead-like) as project constraints become clearer.
Structural alerts (medchem.structural)
Alert systems are primarily SMARTS/pattern-based matchers curated from literature/industrial practice.
CommonAlertsFilters, NIBRFilters, and LillyDemeritsFilters provide different philosophies:
Common alerts: general-purpose red flags.
NIBR: curated industrial filter set.
Lilly demerits: assigns penalties per matched rule; a common convention is reject if total demerits > 100.
Complexity (medchem.complexity)
Complexity scores approximate synthetic difficulty / structural intricacy using established heuristics (e.g., Bertz/Whitlock/Barone-style metrics).
ComplexityFilter(max_complexity=...) converts a numeric score into a pass/fail gate for library triage.
Constraints (medchem.constraints)
Property windows (MW/logP/TPSA/rotatable bonds, etc.) are applied as hard filters.
Use constraints to encode target-specific design hypotheses (e.g., CNS-like space) rather than universal “good/bad” judgments.
Groups and catalogs (medchem.groups, medchem.catalogs)
Group detection is SMARTS-driven and returns boolean matches and/or match details (substructure hits).
Named catalogs provide curated sets for consistent annotation and matching across projects.
Parallelization
Most batch APIs accept n_jobs; set n_jobs=-1 to use all available CPU cores for large libraries.3a:["$","$L41",null,{"content":"$42","frontMatter":{"name":"medchem","description":"Medicinal chemistry screening filters for compound prioritization; use when you need to apply drug-likeness rules, PAINS/structural alerts, and complexity metrics to triage or optimize libraries.","license":"MIT","author":"aipoch","source":"aipoch","source_url":""}}]