medchem
Skill by davila7
Medchem is a Python library that applies drug-likeness rules, PAINS filters, structural alerts and complexity metrics to compound libraries. It is for medicinal chemists triaging and prioritizing compounds in drug discovery.
Install medchem
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/medchem ~/.claude/skills/medchemRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/medchem ~/.gemini/antigravity-cli/skills/medchemAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Medchem is a Python library for molecular filtering and prioritization in drug discovery workflows. It applies drug-likeness rules such as Lipinski, Veber, Oprea and CNS rules, PAINS filters, and structural alerts from common alerts, NIBR and Lilly demerit sets. It also detects chemical groups, checks named catalogs, and calculates complexity metrics such as Bertz, Whitlock and Barone. Batch filtering can run in parallel across CPU cores.
Filters can be combined with RuleFilters, a functional API, property constraints such as molecular weight, LogP, TPSA and rotatable bonds, and a query language for criteria like rule_of_five AND NOT common_alerts. The source describes rules as context-specific guidelines to combine with domain expertise. It suits medicinal chemists and drug discovery teams who need to triage and prioritize large compound libraries.
Written from the project's SKILL.md and checked against it.
What it can do
- Medicinal chemistry rulesApplies Lipinski, Oprea, CNS, leadlike, Veber, Reos, Golden triangle and other drug-likeness rules.
- Structural alert filtersChecks common alerts, NIBR filters and Lilly demerits, where molecules above 100 demerits are rejected.
- PAINS filtersFlags PAINS patterns as part of the medicinal chemistry rule set.
- Functional APIProvides quick helpers such as nibr_filter and common_alerts_filter for lists of molecules.
- Chemical group detectionFinds hinge binders, phosphate binders, Michael acceptors, reactive groups and custom SMARTS patterns.
- Named catalogsGives access to curated functional groups, protecting groups, common reagents and standard fragments.
- Molecular complexityCalculates Bertz, Whitlock and Barone complexity and filters by a complexity threshold.
- Property constraintsFilters molecules by molecular weight, LogP, TPSA and rotatable bond count ranges.
- Query languageCombines rules, alerts and complexity with AND, NOT and comparison operators.
What you need
- Python
- uv or pip to install the medchem package
Try asking
- Filter this compound list by Lipinski and Veber rules
- Flag compounds with PAINS or structural alerts in my library
- Calculate Bertz complexity for these SMILES and keep those under 400
Good to know
- Rules and filters are context-specific and should be used as guidelines with domain expertise.
- Marketed drugs often fail standard filters, so results are not absolute.
- Prodrugs may intentionally violate standard medicinal chemistry rules.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cli-tool/components/skills/scientific/medchem/SKILL.md, cli-tool/components/skills/scientific/medchem/scripts/filter_molecules.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
references/api_guide.md12 KB -
references/rules_catalog.md12 KB -
scripts/filter_molecules.py15 KB
Alternatives to medchem
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
medchem: common questions
Which drug-likeness rules does medchem support?
The source lists Rule of Five (Lipinski), Rule of Oprea, Rule of CNS, Rule of leadlike (soft and strict), Rule of three, Rule of Reos, Rule of drug, Rule of Veber, Golden triangle and PAINS filters.
What is the Lilly demerit filter?
It is Eli Lilly's demerit-based system with 275 rules, where molecules are rejected at more than 100 demerits. Each result includes a demerit score and whether it passes.
Can medchem run on large compound libraries?
Yes. The source says batch filters accept an n_jobs setting for parallel processing, and recommends it for datasets over 1000 molecules.
How do I install medchem?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is medchem free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is medchem safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to medchem?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
