adaptyv
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
$ npx -y skills add k-dense-ai/claude-scientific-skills --skill medchem --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/medchemContext preview
The summary Claude sees to decide when to auto-load this skill.
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
name: medchem description: Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering. license: Apache-2.0 license allowed-tools: Read Write Edit Bash compatibility: Requires Python 3.9+ and datamol (installed with medchem). Optional Lilly demerit filter requires separate `lilly-medchem-rules` conda package. metadata: version: "1.2" skill-author: K-Dense Inc.
Medchem is a Python library from [datamol-io](https://github.com/datamol-io/medchem) for molecular filtering and prioritization in drug discovery. Apply literature-derived drug-likeness rules, named alert catalogs, complexity thresholds, chemical-group detection, and a custom query language to triage compound libraries at scale. Filters are context-specific guidelines — combine with domain expertise and target knowledge.
**Version note:** Examples target **medchem 2.0.5** (PyPI stable, Nov 2024). Requires **Python ≥3.9**. Depends on **datamol** and **RDKit** (installed automatically). `RuleFilters` and structural filter classes return **pandas DataFrames**. Lilly demerits require optional native binaries (`mamba install lilly-medchem-rules`).
This skill should be used when:
uv pip install medchem datamol
Optional — Eli Lilly demerit filter (requires conda-forge native binaries):
mamba install -c conda-forge lilly-medchem-rules
Apply established drug-likeness rules via `medchem.rules`.
**List available rules:**
import medchem as mc mc.rules.RuleFilters.list_available_rules_names() # ['rule_of_five', 'rule_of_five_beyond', 'rule_of_four', 'rule_of_three', ...]
**Single rule on one molecule:**
import datamol as dm import medchem as mc smiles = "CC(=O)OC1=CC=CC=C1C(=O)O" # aspirin mc.rules.basic_rules.rule_of_five(smiles) # True mc.rules.basic_rules.rule_of_cns(smiles) # True mc.rules.basic_rules.rule_of_veber(smiles) # True
**Multiple rules with `RuleFilters` (returns a DataFrame):**
import datamol as dm
import medchem as mc
mols = [dm.to_mol(s) for s in smiles_list]
rfilter = mc.rules.RuleFilters(
rule_list=["rule_of_five", "rule_of_oprea", "rule_of_cns", "rule_of_leadlike_soft"]
)
df = rfilter(mols=mols, n_jobs=-1, progress=True, keep_props=False)
# Columns: mol, pass_all, pass_any, rule_of_five, rule_of_oprea, ...
passing = df[df["pass_all"]]Use `keep_props=True` to include computed descriptors (`mw`, `clogp`, `tpsa`, etc.) in the result.
Detect problematic patterns with `medchem.structural`. Both classes return **DataFrames** with `pass_filter`, `status`, and `reasons` columns.
**Common alerts (ChEMBL-derived rule sets):**
import medchem as mc alert_filter = mc.structural.CommonAlertsFilters() df = alert_filter(mols=mol_list, n_jobs=-1, progress=True) # df columns: mol, pass_filter, status, reasons clean = df[df["pass_filter"]]
**NIBR filters (Novartis screening-deck curation):**
nibr_filter = mc.structural.NIBRFilters() df = nibr_filter(mols=mol_list, n_jobs=-1, progress=True) # df columns: mol, pass_filter, status, severity, reasons, n_covalent_motif, special_mol
Compounds with `severity >= 10` are excluded by default (see NIBR paper).
Use `medchem.catalogs.NamedCatalogs` for RDKit `FilterCatalog` instances, or the functional API:
import medchem as mc
# List available named catalogs
mc.catalogs.list_named_catalogs()
# ['tox', 'pains', 'pains_a', 'brenk', 'nibr', 'zinc', ...]
# Functional API — True means molecule passes (no alert match)
passes = mc.functional.alert_filter(mols=mol_list, alerts=["pains"], n_jobs=-1)
# Or via catalog objects
passes = mc.functional.catalog_filter(
mols=mol_list,
catalogs=[mc.catalogs.NamedCatalogs.pains()],
n_jobs=-1,
)`medchem.functional` provides one-call wrappers that return boolean masks (True = passes):
import medchem as mc mc.functional.rules_filter(mols=mol_list, rules=["rule_of_five", "rule_of_cns"], n_jobs=-1) mc.functional.nibr_filter(mols=mol_list, max_severity=10, n_jobs=-1) mc.functional.alert_filter(mols=mol_list, alerts=["pains", "brenk"], n_jobs=-1) mc.functional.complexity_filter(mols=mol_list, complexity_metric="bertz", limit="99", n_jobs=-1)
Other helpers: `catalog_filter`, `chemical_group_filter`, `lilly_demerit_filter` (requires optional binaries), `macrocycle_filter`, `bredt_filter`, `protecting_groups_filter`, and more.
Detect functional groups and curated pattern collections via `medchem.groups`:
import medchem as mc # Browse available group collections mc.groups.list_default_chemical_groups() # ['privileged_scaffolds', 'common_warhead_covalent_inhibitors', 'rings_in_drugs', ...] group = mc.groups.ChemicalGroup(groups=["privileged_scaffolds"]) group.has_match(mol) # bool group.get_matches(mol) # dict of group → atom indices group.filter(mols) # molecules matching the group # Returns molecules that do NOT match the group mc.functional.chemical_group_filter(mols=mol_list, chemical_group=group, n_jobs=-1)
Custom groups can be loaded from a file via `groups_db` (CSV with `s
🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP…
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data…
Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree…
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk…