agentleFS
pradyumnasagarpradyumnasagar/open-research-skills/skills/chemoinformatics/pharmacophore-modeling/SKILL.md

pharmacophore-modeling

Skill8 starsChanged 5 months agoMITView on GitHub

Builds and applies 3D pharmacophore models using RDKit Pharm3D, the apo2ph4 receptor-based workflow, Pharmer / Pharmit (search), and PharmacoForge (diffusion-based generation), covering ligand-based pharmacophore (from active set alignment) and receptor-based pharmacophore (from binding pocket geometry). Explicit handling of feature types, geometric tolerances, partial matching, and pharmacophore-based virtual screening. Use when identifying scaffold-hopping candidates, building shape-and-feature search queries, or transferring SAR across chemotypes.

  • Sends data out

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before using code patterns, verify installed versions match.

    line 20
  2. Distinctive:

    If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API …

    line 23
  3. Distinctive:

    No fabricated citations: Every cited work must resolve to a verifiable

    line 29
  4. Distinctive:

    No claim without provenance: Every quantitative or factual claim

    line 30
  5. Distinctive:

    No silent failure: Every script invocation, API call, or tool use must declare its exit status and what to do on non-zero.

    line 31
  6. Very specific:

    Do not load this skill if the question is in a sibling skill's domain (see ## Cross-references), if the user explicitly asks for a …

    line 42
  7. Distinctive:

    When a co-crystal ligand is available, derive pharmacophore directly from the ligand binding pose: each ligand feature in contact with a …

    line 130
  8. Distinctive:

    Fix: Use receptor-based pharmacophore if crystal available.

    line 178

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- metadata: category: chemoinformatics oversight: low version: 1.0.0 author: Pradyumna Jayaram tags: [chemoinformatics, research] difficulty: intermediate -->

Version Compatibility

Reference examples tested with: RDKit 2024.09+, pharmer / pharmit (web service), PharmIT 1.1+, plip 2.4+ (interaction analysis).

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show rdkit then help(rdkit.Chem.Pharm3D) to check signatures

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Pharmacophore Modeling

Hard rules

  1. No fabricated citations. Every cited work must resolve to a verifiable
  2. No claim without provenance. Every quantitative or factual claim
  3. No silent failure. Every script invocation, API call, or tool use must declare its exit status and what to do on non-zero. A skill that silently swallows errors is a violation.

When to use

Load this skill when the user asks a question that matches its declared trigger conditions (see the frontmatter description for the most common ones). Do not load it for questions outside its scope — defer to the appropriate ORS skill instead.

When NOT to use

Do not load this skill if the question is in a sibling skill's domain (see ## Cross-references), if the user explicitly asks for a different tool, or if the task is outside the skill's declared category.

Pharmacophore Feature Types

FeatureRDKit codeDefinitionGeometric tolerance
H-bond donorD-OH, -NH1.0-1.5 Å
H-bond acceptorAsp2 O / N (lone pair)1.0-1.5 Å
HydrophobeHsp3 C / aromatic ring centroid1.5-2.0 Å
Aromatic ringRAromatic ring centroid + normal1.0-1.5 Å
Positive ionizableP-NH3+, -NR3+1.0-1.5 Å
Negative ionizableN-COO-, -SO3-1.0-1.5 Å
HalogenXCl, Br, I (halogen bond donor)1.0-1.5 Å
Metal coordinationMsp/sp2 N/O near metal0.5-1.0 Å

Tolerances are pharmacophore-feature distance windows in the search. Tighter tolerances = fewer hits but more specific.

Method Taxonomy

MethodOriginUse caseFails when
Ligand-based (LBP)Catalyst, MOE, RDKit Pharm3DMultiple actives, no crystal<3 actives; flexible actives
Receptor-based (RBP)apo2ph4, LigandScoutCo-crystal availableApo structure (use AlphaFold3 or Boltz)
Common pharmacophorePharm3D EmbedPharmacophoreConsensus from active setDiverse actives confound alignment
Diffusion-based (PharmacoForge)Flynn et al 2025De novo generation with pharmacophore priorPretrained model required
Active learning pharmacophoreCatalyst variantIterative refinementCustom; not standard

Decision Tree by Scenario

ScenarioMethodTools
Co-crystal structure availableReceptor-basedapo2ph4 + Pharmer/Pharmit
Multiple active compounds, no crystalLigand-based common pharmacophoreRDKit Pharm3D EmbedPharmacophore
Single active compoundSingle-conformer pharmacophoreRDKit Pharm3D from bioactive conformer
Scaffold hopping prospectiveReceptor-based + shape filterapo2ph4 + ROCS
Cross-target SAR transferCommon pharmacophore across targetsManual + LigandScout
De novo design with pharmacophorePharmacoForgeDiffusion-based generation
Library pre-filteringPharmacophore screenPharmit search

Ligand-Based Pharmacophore (RDKit Pharm3D)

Goal: Extract a common pharmacophore from a set of bioactive compounds.

Approach: Embed actives, extract per-molecule features, then build a target pharmacophore with distance bounds capturing cross-active variability.

from rdkit import Chem
from rdkit.Chem import AllChem, ChemicalFeatures
from rdkit.Chem.Pharm3D import Pharmacophore
from rdkit.RDPaths import RDDataDir
import os

fdef_file = os.path.join(RDDataDir, 'BaseFeatures.fdef')
factory = ChemicalFeatures.BuildFeatureFactory(fdef_file)

active_smiles = ['CC(C)c1ccc(C(=O)NCc2ccccn2)cc1',
                 'CCC(C)c1ccc(C(=O)NCc2ccccn2)cc1']
active_mols = [Chem.AddHs(Chem.MolFromSmiles(s)) for s in active_smiles]
for m in active_mols:
    AllChem.EmbedMolecule(m, AllChem.ETKDGv3())
    AllChem.MMFFOptimizeMolecule(m)

feature_lists = [factory.GetFeaturesForMol(m) for m in active_mols]

# Example 2-feature pharmacophore (Aromatic + Donor) with a 3.5-5.0 A band
feature_types = ['Aromatic', 'Donor']
pharmacophore = Pharmacophore.Pharmacophore(feature_types)
pharmacophore.setLowerBound(0, 1, 3.5)
pharmacophore.setUpperBound(0, 1, 5.0)

BaseFeatures.fdef (RDKit-shipped) defines feature SMARTS. For drug-like pharmacophores, this is the standard starting point.

Receptor-Based Pharmacophore (apo2ph4 workflow)

Goal: Derive a pharmacophore from a protein binding-pocket structure without requiring a bound ligand.

Approach: Identify hot-spots (donor / acceptor / hydrophobe regions) from protein geometry; assemble into a pharmacophore. apo2ph4 (Heider et al 2023) describes this pipeline.

# Conceptual apo2ph4-style workflow; verify the exact CLI against the published release.
apo2ph4 -pdb receptor.pdb \
        -site_residues 'A:100,A:101,A:104,A:108' \
        -output pharmacophore.ph4

When a co-crystal ligand is available, derive pharmacophore directly from the ligand binding pose: each ligand feature in contact with a complementary protein residue is part of the pharmacophore.

from plip.basic import config

PLIP (Protein-Ligand Interaction Profiler) extracts per-residue interactions; use to build the pharmacophore manually from contacts (H-bond, hydrophobic, salt bridge, π-stacking).

Pharmer / Pharmit (Web Service)

For library screening with a .ph4 pharmacophore:

  • Pharmer (Koes 2012): open-source pharmacophore search; efficient indexing
  • Pharmit (Sunseri 2016): web-based frontend, integrates Pharmer with vendor catalogs (Enamine, Mcule, ZINC)
# Pharmit provides a REST API for batch search
curl -X POST https://pharmit.csb.pitt.edu/api/search \
     -H 'Content-Type: application/json' \"
     -d '{"pharmacophore": "...", "library": "enamine-real", "max_hits": 1000}'

For open-source Pharmer, install via conda; programmatic interface in Python.

Diffusion-Based Pharmacophore Generation (PharmacoForge)

PharmacoForge (Flynn et al 2025) generates molecules conditioned on a pharmacophore using a diffusion model. Use when de novo design is needed and a pharmacophore constraint is desired.

# PharmacoForge pseudo-API; verify against the published release.
# from pharmaco_forge import generate
# mols = generate(
#     pharmacophore='ph4_file',
#     n_molecules=1000,
#     scaffold_hint='aryl_sulfonamide',
# )

Per-Tool Failure Modes

Ligand-based pharmacophore -- too few actives

Trigger: Active set < 5 compounds with diverse chemotypes.

Mechanism: Common pharmacophore requires shared features; small active sets don't converge.

Symptom: All-atom pharmacophore is too permissive; thousands of hits with random features.

Fix: Use receptor-based pharmacophore if crystal available; or pick 1 bioactive conformer as single template.

apo2ph4 -- ambiguous pocket definition

Trigger: Binding site contains multiple sub-pockets; user-specified residues span all.

Mechanism: Hot-spot detection over generalizes.

Symptom: Pharmacophore has too many features; nothing matches in real library.

Fix: Manually curate sub-pocket; pass focused residue list (3-6 residues in active site).

Pharmer / Pharmit -- too few hits

Trigger: Pharmacophore strict; library small.

Mechanism: Geometric tolerance + feature count filter compounds aggressively.

Symptom: < 10 hits returned for large library.

Fix: Increase tolerance by 0.5-1.0 Å; remove 1 least-essential feature; verify pharmacophore geometry.

Pharmacophore match but binder is inactive

Trigger: Compound matches pharmacophore but IC50 > 10 µM.

Mechanism: Pharmacophore captures necessary features but not sufficient (strain, dynamics, off-target).

Symptom: False positive in screen.

Fix: Combine pharmacophore with shape (ROCS color) and physchem filters.

Common Errors

SymptomCauseFix
EmbedPharmacophore returns no matchDistance bounds too tightWiden by 1 Å
Feature SMARTS not recognizedCustom fdef file requiredVerify against BaseFeatures.fdef
Stereochemistry not in pharmacophoreDefault RDKit features ignore stereoUse PLIP for stereo-aware contact analysis
PLIP can't find interactionsWrong residue numberingCheck PDB numbering vs UniProt offset
Pharmer hangs on large libraryIn-memory index for big librariesUse Pharmer with --disk-index flag

References

  • Heider et al., J. Chem. Inf. Model. 63:147-158 -- apo2ph4 receptor-based pharmacophore.
  • Flynn et al., Front. Bioinform. -- PharmacoForge diffusion-based generation.
  • Koes et al., J. Chem. Inf. Model. 52:1159 -- Pharmer.
  • Sunseri et al., J. Mol. Graph. Model. -- Pharmit web service.
  • Wermuth et al. -- IUPAC pharmacophore definition.

Related Skills

  • chemoinformatics/scaffold-analysis - 2D scaffold analysis
  • chemoinformatics/shape-similarity - 3D shape
  • chemoinformatics/similarity-searching - 2D similarity
  • chemoinformatics/virtual-screening - Docking as alternative
  • chemoinformatics/conformer-generation - 3D conformers for active alignment
  • chemoinformatics/generative-design - Generative models with pharmacophore conditioning

Cross-references

Other skills in this category:

  • admet-prediction
  • conformer-generation
  • covalent-design
  • docking-rescoring
  • free-energy-calculations
  • generative-design
  • molecular-descriptors
  • molecular-io
  • molecular-standardization
  • pose-validation
  • protac-degraders
  • qsar-modeling
  • retrosynthesis
  • scaffold-analysis
  • shape-similarity
  • similarity-searching
  • substructure-search
  • virtual-screening

Changelog

  • 1.1.0 (migration) — Bulk-migrated to v0.4.0 schema: canonical metadata block, base Hard rules, Cross-references. Body content unchanged; author should review and fill in any domain-specific extensions to the Hard rules.
  • 1.0.0 — Initial release.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.