{"data":{"slug":"github-aipoch-medical-research-skills-scientific-skills-evidence-insight-medchem-84fc5f548f64","title":"MedChem Screening for Compound Prioritization","summary":"Apply drug-likeness rules, PAINS alerts, and complexity metrics to triage compound libraries for drug-like candidates. The process generates a CSV file with screening results, including pass\/fail decisions based on rule compliance, structural alerts, and complexity thresholds.","url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-evidence-insight-medchem-84fc5f548f64","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-aipoch-medical-research-skills-scientific-skills-evidence-insight-medchem-84fc5f548f64","markdown_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-evidence-insight-medchem-84fc5f548f64.md","download_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-evidence-insight-medchem-84fc5f548f64\/download","category":{"slug":"data-research","name":"Data & Research"},"editor_note":"Ensure `medchem`, `datamol`, and `pandas` are installed before running the screening. Prepare a list of SMILES strings as input, and define property constraints (e.g., molecular weight, logP) and complexity thresholds before executing the screening workflow.","instructions":"---\nname: medchem\ndescription: 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.\nlicense: MIT\nauthor: AIPOCH\n---\n> **Source**: [https:\/\/github.com\/aipoch\/medical-research-skills](https:\/\/github.com\/aipoch\/medical-research-skills)\n\n## When to Use\n\n- Screening large compound libraries to quickly triage for drug-like candidates (e.g., Lipinski\/Veber + alerts).\n- Flagging problematic chemotypes (e.g., PAINS, reactive\/toxicophores, curated structural alerts) before follow-up assays.\n- Prioritizing lead-optimization candidates with stricter criteria (lead-like rules, demerit systems, complexity caps).\n- Enforcing property constraints (MW\/logP\/TPSA\/rotatable bonds) for target-specific design windows (e.g., CNS).\n- Identifying molecules containing specific functional groups\/scaffolds (e.g., Michael acceptors, hinge binders) for SAR or risk assessment.\n\n## Key Features\n\n- **Drug-likeness and medchem rule sets**: Lipinski (Ro5), Veber, Oprea, CNS, lead-like (soft\/strict), Rule of Three, REOS, Golden Triangle, etc.\n- **PAINS and structural alert filtering**: curated alert catalogs and pattern-based screening.\n- **Curated industrial filter sets**: e.g., NIBR filters; **Lilly demerit** scoring with pass\/fail thresholds.\n- **Functional-group detection** via SMARTS-based group matchers (hinge binders, phosphate binders, Michael acceptors, reactive groups, custom patterns).\n- **Named catalogs** of curated structures (functional groups, protecting groups, reagents, fragments) for matching and annotation.\n- **Molecular complexity metrics** (e.g., Bertz\/Whitlock\/Barone-style) and threshold-based complexity filters.\n- **Constraint-based filtering** for property windows (MW\/logP\/TPSA\/RB, etc.).\n- **Query language** to combine heterogeneous criteria (rules + alerts + numeric thresholds) into a single expression.\n\n## Dependencies\n\n- `medchem` (latest)\n- `datamol` (latest)\n- `pandas` (latest, for tabular workflows)\n\n## Example Usage\n\n```python\n# End-to-end, runnable example:\n# 1) load SMILES\n# 2) apply Ro5 + Veber\n# 3) apply common structural alerts\n# 4) compute complexity and filter\n# 5) export a CSV with decisions\n\nimport pandas as pd\nimport datamol as dm\nimport medchem as mc\n\nsmiles_list = [\n    \"CC(=O)OC1=CC=CC=C1C(=O)O\",  # aspirin\n    \"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\",  # caffeine\n    \"c1ccccc1\",  # benzene\n]\n\ndf = pd.DataFrame({\"smiles\": smiles_list})\nmols = [dm.to_mol(smi) for smi in df[\"smiles\"]]\n\n# 1) Drug-likeness rules\nrule_filter = mc.rules.RuleFilters(rule_list=[\"rule_of_five\", \"rule_of_veber\"])\nrule_res = rule_filter(mols=mols, n_jobs=-1, progress=False)\ndf[\"passes_rules\"] = rule_res[\"pass\"]\n\n# 2) Structural alerts\nalerts = mc.structural.CommonAlertsFilters()\nalert_res = alerts(mols=mols, n_jobs=-1, progress=False)\ndf[\"has_alerts\"] = alert_res[\"has_alerts\"]\n\n# 3) Complexity (example threshold)\ncomplex_filter = mc.complexity.ComplexityFilter(max_complexity=500)\ncomplex_res = complex_filter(mols=mols, n_jobs=-1, progress=False)\ndf[\"passes_complexity\"] = complex_res[\"pass\"]\n\n# 4) Final decision\ndf[\"keep\"] = df[\"passes_rules\"] & (~df[\"has_alerts\"]) & df[\"passes_complexity\"]\n\n# 5) Save results\ndf.to_csv(\"medchem_screening_results.csv\", index=False)\nprint(df)\n```\n\n## Implementation Details\n\n- **Rule evaluation (`medchem.rules`)**\n  - Rules are implemented as callable checks over SMILES or RDKit-like molecule objects (commonly via `datamol`).\n  - `RuleFilters(rule_list=[...])` applies multiple rules and returns a structured result (typically including an overall `pass` plus per-rule details).\n  - Typical use: start broad (Ro5\/Veber), then tighten (CNS\/lead-like) as project constraints become clearer.\n\n- **Structural alerts (`medchem.structural`)**\n  - Alert systems are primarily **SMARTS\/pattern-based** matchers curated from literature\/industrial practice.\n  - `CommonAlertsFilters`, `NIBRFilters`, and `LillyDemeritsFilters` provide different philosophies:\n    - **Common alerts**: general-purpose red flags.\n    - **NIBR**: curated industrial filter set.\n    - **Lilly demerits**: assigns penalties per matched rule; a common convention is **reject if total demerits > 100**.\n\n- **Complexity (`medchem.complexity`)**\n  - Complexity scores approximate synthetic difficulty \/ structural intricacy using established heuristics (e.g., Bertz\/Whitlock\/Barone-style metrics).\n  - `ComplexityFilter(max_complexity=...)` converts a numeric score into a pass\/fail gate for library triage.\n\n- **Constraints (`medchem.constraints`)**\n  - Property windows (MW\/logP\/TPSA\/rotatable bonds, etc.) are applied as **hard filters**.\n  - Use constraints to encode target-specific design hypotheses (e.g., CNS-like space) rather than universal \u201cgood\/bad\u201d judgments.\n\n- **Groups and catalogs (`medchem.groups`, `medchem.catalogs`)**\n  - Group detection is SMARTS-driven and returns boolean matches and\/or match details (substructure hits).\n  - Named catalogs provide curated sets for consistent annotation and matching across projects.\n\n- **Parallelization**\n  - Most batch APIs accept `n_jobs`; set `n_jobs=-1` to use all available CPU cores for large libraries.","use_cases":["Screening large compound libraries for drug-like candidates using Lipinski\/Veber rules.","Flagging problematic chemotypes with PAINS alerts and structural alerts before assays.","Prioritizing lead-optimization candidates with complexity metrics and property constraints."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/aipoch\/medical-research-skills\/blob\/686e09dfdb45d9fa1a08664f06bb93769b3c9d91\/scientific-skills\/Evidence%20Insight\/medchem\/SKILL.md","source_commit":"686e09dfdb45d9fa1a08664f06bb93769b3c9d91","license":"MIT","version":null,"listing_approved_at":"2026-11-26","created_at":"2026-11-24T13:06:45.000000Z","updated_at":"2026-11-26T09:24:51.000000Z","seo_title":"MedChem Screening for Compound Prioritization","seo_description":"Use MedChem to apply drug-likeness rules, PAINS alerts, and complexity metrics for compound library triage and drug candidate prioritization.","seo_keywords":["drug-likeness screening","PAINS alerts filtering","compound library triage","complexity metrics for drug design","structural alerts detection"]}}