Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
One-line summary: Query ChEMBL REST API to retrieve, filter, and analyze bioactivity data (IC50, Ki, pChEMBL) for structure-activity relationship (SAR) studies.
When to Use This Skill
When compiling IC50/Ki datasets for a specific protein target
When benchmarking virtual screening models with experimental data
When building QSAR models from ChEMBL bioactivity data
When analyzing structure-activity relationships across a chemical series
When identifying activity cliffs (similar structure, different potency)
When standardizing assay data via pChEMBL normalized values
Trigger keywords: ChEMBL, bioactivity, IC50, Ki, pChEMBL, SAR, QSAR, drug target, assay data, compound activity
Background & Key Concepts
ChEMBL Database
ChEMBL is a manually curated database of bioactive molecules with drug-like properties maintained by EMBL-EBI. It contains:
~2.4M compounds
~20M bioactivity measurements
~15,000 targets
Data extracted from primary literature
pChEMBL Normalization
Raw activities (IC50, Ki, EC50) span many orders of magnitude and use different units. pChEMBL provides a normalized value:
$$
\text{pChEMBL} = -\log_{10}(\text{activity in molar})
$$
Higher pChEMBL = more potent. Typically pChEMBL ≥ 6 (≤ 1 μM) is considered "active" for drug discovery.
Activity Cliffs
Activity cliffs are pairs of structurally similar compounds with large potency differences (typically ΔpChEMBL ≥ 2). They reveal key pharmacophoric features and are critical for SAR analysis.
from chembl_webresource_client.new_client import new_client
target_api = new_client.target
results = target_api.filter(target_synonym__icontains="EGFR").only(
["target_chembl_id", "pref_name"])[:3]
for r in results:
print(r[], r[])
Gaulton, A. et al. (2017). The ChEMBL database in 2017. Nucleic Acids Research.
Examples
Example 1: Build a QSAR Dataset for EGFR Inhibitors
# =============================================# End-to-end QSAR dataset from ChEMBL# Requirements: chembl-webresource-client, rdkit, pandas# =============================================from chembl_webresource_client.new_client import new_client
from rdkit import Chem
from rdkit.Chem import Descriptors, AllChem
import pandas as pd, numpy as np
activity_api = new_client.activity
records = list(activity_api.filter(
target_chembl_id="CHEMBL203",
standard_type="IC50",
pchembl_value__gte=5.0
).only(["molecule_chembl_id", "canonical_smiles", "pchembl_value"])[:1000])
df = pd.DataFrame(records).dropna()
df["pchembl_value"] = pd.to_numeric(df["pchembl_value"], errors="coerce")
df = df.dropna()
deffeaturize(smiles):
mol = Chem.MolFromSmiles(smiles)
if mol isNone:
returnNone
fp = AllChem.GetMorganFingerprintAsBitVect(mol, 2, 1024)
returnlist(fp)
fps = [featurize(s) for s in df["canonical_smiles"]]
valid = [fp isnotNonefor fp in fps]
df = df[valid].reset_index(drop=True)
X = np.array([fp for fp, v inzip(fps, valid) if v])
y = df["pchembl_value"].values
print(f"QSAR dataset: {len(df)} compounds, {X.shape[1]} features")
print(f"pChEMBL range: {y.min():.2f} – {y.max():.2f}")
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import cross_val_score
rf = RandomForestRegressor(n_estimators=100, random_state=42)
scores = cross_val_score(rf, X, y, cv=5, scoring="r2")
print(f"5-fold CV R² = {scores.mean():.3f} ± {scores.std():.3f}")
Interpreting these results: R² > 0.5 indicates a useful model. Use molecular fingerprints + gradient boosting or deep learning for improved predictive accuracy.
Last updated: 2026-03-17 | Maintainer: @xjtulycIssues: GitHub Issues