scientific-skills/Evidence Insights/zinc-database/SKILL.md
Access the ZINC (230M+ purchasable compounds) database when you need to look up compounds by ZINC ID/SMILES, run similarity/analog searches, or download 3D ready-to-dock structures for virtual screening and drug discovery.
npx skillsauth add aipoch/medical-research-skills zinc-databaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need to:
curl (tested with 7.70+)>=3.9pandas>=2.0.0 (parsing tabular API output)requests>=2.31.0 (if replacing curl with native HTTP)rdkit>=2023.09.1 (structure validation, fingerprints, downstream cheminformatics)The following example is a complete runnable script that:
#!/usr/bin/env python3
import subprocess
from io import StringIO
import re
import pandas as pd
BASE = "https://cartblanche22.docking.org"
def curl_get(url: str) -> str:
r = subprocess.run(["curl", "-sS", url], capture_output=True, text=True)
r.check_returncode()
return r.stdout
def query_by_zinc_id(zinc_id: str, output_fields="zinc_id,smiles,catalogs,tranche") -> pd.DataFrame:
# Common pattern used by CartBlanche22: <endpoint>.txt:<field>=<value>&output_fields=...
url = f"{BASE}/substances.txt:zinc_id={zinc_id}&output_fields={output_fields}"
txt = curl_get(url)
return pd.read_csv(StringIO(txt), sep="\t")
def search_by_smiles(smiles: str, dist: int = 0, adist: int = 0,
output_fields="zinc_id,smiles,tranche") -> pd.DataFrame:
url = (
f"{BASE}/smiles.txt:smiles={smiles}"
f"&dist={dist}&adist={adist}&output_fields={output_fields}"
)
txt = curl_get(url)
return pd.read_csv(StringIO(txt), sep="\t")
def random_compounds(count: int = 100, subset: str | None = None,
output_fields="zinc_id,smiles,tranche") -> pd.DataFrame:
url = f"{BASE}/substance/random.txt:count={count}&output_fields={output_fields}"
if subset:
url += f"&subset={subset}"
txt = curl_get(url)
return pd.read_csv(StringIO(txt), sep="\t")
def parse_tranche(tranche: str):
"""
Tranche format: H##P###M###-phase
H## = H-bond donors
P### = LogP * 10
M### = molecular weight (Da)
phase = reactivity classification
Example: H05P035M400-0
"""
m = re.match(r"H(\d+)P(\d+)M(\d+)-(\d+)", str(tranche))
if not m:
return None
return {
"h_donors": int(m.group(1)),
"logP": int(m.group(2)) / 10.0,
"mw": int(m.group(3)),
"phase": int(m.group(4)),
}
def main():
# 1) Lookup by ZINC ID
df_id = query_by_zinc_id("ZINC000000000001")
print("By ZINC ID:")
print(df_id.head(), "\n")
# 2) SMILES exact / similarity search (example: benzene)
df_smiles = search_by_smiles("c1ccccc1", dist=3, output_fields="zinc_id,smiles,tranche")
print("SMILES similarity search (dist=3):")
print(df_smiles.head(), "\n")
# 3) Random sampling (lead-like)
df_rand = random_compounds(count=50, subset="lead-like", output_fields="zinc_id,smiles,tranche")
df_rand["tranche_props"] = df_rand["tranche"].apply(parse_tranche)
print("Random lead-like sample with parsed tranche:")
print(df_rand.head(), "\n")
# 4) Simple tranche-based filtering example
# Keep compounds with MW <= 350 and logP <= 3.5 when tranche parsing is available
props = df_rand["tranche_props"].dropna().apply(pd.Series)
filtered = df_rand.loc[props.index].copy()
filtered = filtered.join(props)
filtered = filtered[(filtered["mw"] <= 350) & (filtered["logP"] <= 3.5)]
print(f"Filtered (mw<=350, logP<=3.5): {len(filtered)} rows")
print(filtered[["zinc_id", "smiles", "tranche", "mw", "logP"]].head())
if __name__ == "__main__":
main()
https://cartblanche22.docking.org/CartBlanche22 commonly exposes endpoints in the form:
.../substances.txt:zinc_id=<ID1,ID2,...>&output_fields=....../smiles.txt:smiles=<SMILES>&dist=<n>&adist=<n>&output_fields=....../catitems.txt:catitem_id=<SUPPLIER_CODE>.../substance/random.txt:count=<N>&subset=<subset>&output_fields=...Returned data is typically tab-separated text; request only needed columns via output_fields to reduce payload.
dist, adist)dist: similarity/analog expansion control (often used as a threshold-like knob; smaller values yield closer analogs).adist: alternative distance parameter for broader expansion.dist=0, adist=0).dist=1..3 for close analogs; higher values for broader exploration).Commonly useful fields (availability depends on endpoint/data):
zinc_id: ZINC identifiersmiles: SMILES representationsub_id: internal substance identifiersupplier_code: vendor catalog numbercatalogs: supplier/catalog listtranche: encoded property bin (H donors, LogP, MW, phase)Example:
curl "https://cartblanche22.docking.org/substances.txt:zinc_id=ZINC000000000001&output_fields=zinc_id,smiles,catalogs,tranche"
ZINC tranches encode coarse physicochemical properties:
H##P###M###-phase
H##: H-bond donorsP###: LogP × 10M###: molecular weight (Da)phase: reactivity classificationUse tranche parsing to implement fast, server-side-friendly filtering workflows (e.g., lead-like/drug-like constraints) before downloading 3D structures.
For docking workflows, use the ZINC22 files library:
Files are organized by tranche and provided in formats such as MOL2, SDF, and DB2.GZ (for DOCK). For large batch downloads, prefer tranche-based retrieval and parallel download tools (e.g., wget, aria2c) while respecting server load.
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.