Logo van Bio Molecular Descriptors

Bio Molecular Descriptors

Organisatie
PKU-YuanGroup
bio-molecular-descriptors

Calculates molecular fingerprints (ECFP/Morgan, FCFP, MACCS, RDKit, AtomPair, TopologicalTorsion, Avalon, MAP4, MHFP6) and physicochemical descriptors (Lipinski, QED, TPSA, Crippen LogP, 3D shape) with explicit choice tables, bit vs count semantics, and partial-charge model selection. Use when featurizing molecules for similarity, QSAR, virtual screening, or ML, or selecting the correct fingerprint for a chemotype-aware task.

Overzicht

UitgeverPKU-YuanGroup
RepositoryOpenAI4S
Skillnaambio-molecular-descriptors
Sterren
622
Forks
72
Meegeleverde bestanden
2
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 2

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door PKU-YuanGroup op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Bio Molecular Descriptors in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chemoinformatics-molecular-descriptors
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PKU-YuanGroup/OpenAI4S.git /tmp/OpenAI4S
mkdir -p .claude/skills
cp -r /tmp/OpenAI4S/skills/bioskills/bio-chemoinformatics-molecular-descriptors .claude/skills/bio-molecular-descriptors
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Bio Molecular Descriptors in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Bio Molecular Descriptors automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Bio Molecular Descriptors niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Version Compatibility

Reference examples tested with: RDKit 2024.09+, numpy 1.26+, pandas 2.2+, map4 1.1+ (MAP4), mhfp 1.9+. Use mapchiral separately when the stereochemistry-aware MAP4C fingerprint is intended.

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

  • Python: pip show <package> then help(module.function) 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.

Molecular Descriptors

Featurize molecules for similarity search, QSAR, virtual screening, or ML. Fingerprint performance is dataset- and objective-dependent: ECFP4 is a strong drug-like baseline, atom-pair and topological-torsion fingerprints expose longer-range topology, MAP4/MHFP6 target broader chemical-space searches, and 3D conformer-based descriptors are needed when shape and stereochemistry matter.

For canonicalization before featurization, see chemoinformatics/molecular-standardization. For 3D-only descriptors, see chemoinformatics/conformer-generation.

Fingerprint Taxonomy

FingerprintTypeRadius/PathBitsUse caseFails when
Morgan (ECFP)Circularr=2 (ECFP4), r=3 (ECFP6)2048 typicalDrug-like similarity, ML defaultLoses long-range topology; bit collisions at low nBits
FCFPFunctional Morganr=2 default2048Pharmacophore-aware similaritySame caveats as ECFP; less specific
MACCSSubstructure key166 fixed bits167Quick fingerprint, drug-likenessToo sparse for large diverse libraries
RDKit FPPath/subgraph-basedpaths and branched subgraphs up to 7 bonds by default2048RDKit-native ECFP alternativeDrug-like only; not optimal for scaffold hopping
AtomPairPair + topological distanceAll atom pairs2048Long-range topological similaritySlower than ECFP; harder to interpret
TopologicalTorsion4-atom torsionAll TT2048Path-pattern similarityLike AP, slower than ECFP
AvalonSubstructure + atom pairsMixed512/1024Fast similarityLess standard; older
MAP4 (MinHashed atom-pair)MinHash atom-pairr=1,21024/2048Biological + metabolite diversitymap4 library required; slower hash
MHFP6 (MinHash)MinHash ECFP-liker=3 (diam 6)2048Large-library nearest-neighbor with a compatible MinHash/LSH indexDifferent distance semantics from folded-bit Tanimoto
Pharm2D2D pharmacophorefeature pairs/tripletssparsePharmacophore searchSparse, slower

Decision: For drug-like similarity ranking, start with ECFP4 2048 bit because it is fast and well characterized. MHFP6 outperformed ECFP4 for analog recovery in the benchmark reported by Probst and Reymond (2018), making it a candidate for large, diverse libraries. For scaffold hopping, benchmark ECFP4, AtomPair, TopologicalTorsion, and pharmacophore fingerprints on target-relevant actives and decoys; published comparisons do not support a universal AtomPair advantage (Gardiner et al. 2011; Riniker & Landrum 2013).

Bit vs Count Vectors

FormUseLibrary impact
Bit (0/1)Tanimoto similarity, BulkTanimotoSimilarity, RDKit fingerprint foldingStandard for similarity
Count (integer)Some ML methods, RF on counts, neural fingerprintsLoses bit-level fast operations; richer signal
Sparse (dict)Direct chemical interpretation (which fragments at which atoms)Use for SHAP / atomic attribution
python
from rdkit import Chem
from rdkit.Chem import rdFingerprintGenerator

mol = Chem.MolFromSmiles('CCO')

morgan = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=2048)
ecfp4_bit = morgan.GetFingerprint(mol)
ecfp4_count = morgan.GetCountFingerprint(mol)
ecfp4_sparse = morgan.GetSparseCountFingerprint(mol)

Morgan / ECFP Radius Math

ECFP-X notation: X is the diameter in bonds. RDKit's radius parameter is half of X.

NotationRDKit radiusDiameterCaptures
ECFP000Atom identity only
ECFP212Atom + immediate neighbors
ECFP424Atom + 2-bond environment
ECFP636Atom + 3-bond environment

Trade-off: Larger radius captures more specific local environments but increases collisions at fixed nBits. ECFP4 2048 is a common baseline (Rogers & Hahn 2010; Wu et al. 2018). O'Boyle and Sayle (2016) showed that increasing folded-fingerprint length can improve virtual-screening performance, but they did not establish a universal 4096-bit setting or a 1-5% collision rate. Measure collision occupancy and model performance for the dataset; increase nBits or use an unhashed sparse representation when needed.

FCFP vs ECFP

FCFP (Functional-Class) uses RDKit's Morgan feature invariants (donor, acceptor, aromatic, halogen, basic, and acidic) instead of atom identity. Hydrophobe is a family in BaseFeatures.fdef, but it is not one of the default Morgan feature-invariant classes. FCFP trades atom-specificity for functional-equivalence.

python
ecfp_generator = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=2048)
feature_invariants = rdFingerprintGenerator.GetMorganFeatureAtomInvGen()
fcfp_generator = rdFingerprintGenerator.GetMorganGenerator(
    radius=2, fpSize=2048, atomInvariantsGenerator=feature_invariants)
ecfp4 = ecfp_generator.GetFingerprint(mol)
fcfp4 = fcfp_generator.GetFingerprint(mol)

When to use FCFP4: Scaffold-hopping campaigns, pharmacophore-driven similarity, cross-target activity prediction.

When to use ECFP4: Within-series QSAR, lead optimization, when chemotype identity matters.

3D Descriptors and Conformer Dependence

Conformer-dependent descriptors (asphericity, eccentricity, principal moments of inertia, RDF) require a generated 3D structure. A single conformer may be unrepresentative when the molecule is flexible; measure descriptor variation across a conformer ensemble when the downstream conclusion depends on 3D shape.

Goal: Compute 3D shape descriptors over a conformer ensemble rather than from a single (possibly unrepresentative) conformer.

Approach: Add explicit hydrogens, embed N conformers with ETKDGv3, MMFF-optimize them all, then evaluate the descriptor across each conformer for downstream averaging.

python
from rdkit.Chem import AllChem, Descriptors3D

mol = Chem.MolFromSmiles('CCCCO')
mol = Chem.AddHs(mol)

params = AllChem.ETKDGv3()
params.randomSeed = 42
conf_ids = AllChem.EmbedMultipleConfs(mol, numConfs=20, params=params)
if not conf_ids:
    raise RuntimeError('ETKDGv3 failed to generate any conformers')
if not AllChem.MMFFHasAllMoleculeParams(mol):
    raise ValueError('MMFF94 parameters are unavailable for this molecule')
optimization_results = AllChem.MMFFOptimizeMoleculeConfs(mol)
if any(status != 0 for status, _ in optimization_results):
    raise RuntimeError('MMFF94 optimization did not converge for every conformer')

asphericities = [Descriptors3D.Asphericity(mol, confId=c) for c in conf_ids]

Decision: For QSAR / ML, choose and document the conformer count using a convergence check on representative molecules. Report the aggregation rule, such as a simple mean or a Boltzmann-weighted average, and the energy model used for any weights.

Partial Charge Methods

MethodSoftwareCostAccuracyUse for
Gasteiger-MarsiliRDKit, Open BabelFastEmpirical, roughCharge-aware preparation or models that explicitly require Gasteiger charges; Vina/Vinardo scoring itself does not require assigned atom charges
MMFF94RDKit0.1s/molForce-field consistentMMFF energy, conformer ranking
AM1-BCCantechamber (AmberTools)~10s/molSemi-empiricalMD setup, FEP, GAFF
RESPpsi4, Gaussianminutes/molRestrained fit to a quantum-mechanical ESP; protocol-specificForce-field workflows parameterized for that RESP protocol
OpenFF Rechargeopenff-rechargeWorkflow-dependentFramework for generating/retrieving QC ESP data and fitting library charges, BCCs, RESP charges, or virtual sitesDeveloping or evaluating charge models; it is not one charge-assignment method
python
from rdkit.Chem import AllChem

AllChem.ComputeGasteigerCharges(mol)
for atom in mol.GetAtoms():
    print(atom.GetIdx(), atom.GetPropsAsDict().get('_GasteigerCharge', None))

Critical: Charge method must match downstream. Gasteiger charges in an AMBER MD run violate the assumptions of the protein force field.

MAP4 and MHFP6 for Diverse Libraries

For libraries spanning drug-like molecules, natural products, peptides, and metabolites, compare ECFP4 with MAP4 or MHFP6 on task-relevant retrieval benchmarks. MAP4 and MHFP6 use MinHash with atom-pair or circular-substructure shingles, but no universal pairwise-similarity range establishes that ECFP4 is saturated for every mixed library.

python
from mhfp.encoder import MHFPEncoder

encoder = MHFPEncoder(2048)
mhfp6 = encoder.encode_mol(mol, radius=3)

MHFP6 distance is Jaccard on MinHash, not standard Tanimoto. Use MHFPEncoder.distance(fp1, fp2).

Physicochemical Descriptors

DescriptorSourceRangeDrug-like cutoff
MolWtRDKit Descriptors.MolWt~50-2000 Da<=500 (Lipinski)
MolLogP (Crippen)RDKit Descriptors.MolLogP-5 to 8<=5 (Lipinski)
HBDLipinski.NumHDonors0-10<=5 (Lipinski)
HBALipinski.NumHAcceptors0-15<=10 (Lipinski)
TPSADescriptors.TPSA (Ertl)0-200 A^2<=140 (Veber oral); <=90 (BBB+)
RotBondsLipinski.NumRotatableBonds0-15<=10 (Veber)
AromaticRingsLipinski.NumAromaticRings0-6<=3-4 (Ritchie-Macdonald aromatic ring count)
HeavyAtomsDescriptors.HeavyAtomCount<=50 (lead-like)
FractionCSP3Descriptors.FractionCSP30-1Descriptive; higher sp3 character was associated with clinical progression by Lovering et al. (2009), without a universal cutoff
QEDQED.qed0-1Higher is more similar to the reference property distributions; a project may use >=0.5 as a triage heuristic
SAscoresascorer.calculateScore (external)1-10Lower is easier by the model; project cutoffs such as <=4 or >6 require dataset calibration

Goal: Compute a standard physicochemical descriptor panel for drug-likeness filtering and QSAR features.

Approach: Combine RDKit Descriptors, Lipinski, and QED calls into a single dict so the caller gets MW, LogP, HBD/HBA, TPSA, rotatable bonds, aromatic rings, fraction sp3, and QED in one pass.

python
from rdkit.Chem import Descriptors, Lipinski, QED

def physchem(mol):
    return {
        'MolWt': Descriptors.MolWt(mol),
        'MolLogP': Descriptors.MolLogP(mol),
        'HBD': Lipinski.NumHDonors(mol),
        'HBA': Lipinski.NumHAcceptors(mol),
        'TPSA': Descriptors.TPSA(mol),
        'RotBonds': Lipinski.NumRotatableBonds(mol),
        'AromRings': Lipinski.NumAromaticRings(mol),
        'FractionCSP3': Descriptors.FractionCSP3(mol),
        'QED': QED.qed(mol),
    }

Drug-Likeness Rule Sets

RuleConstraintsSource
Lipinski Ro5MW<=500, LogP<=5, HBD<=5, HBA<=10Lipinski 1997
VeberRotBonds<=10, TPSA<=140Veber 2002 (oral)
Ghose160<=MW<=480, -0.4<=LogP<=5.6, 40<=MR<=130, 20<=atoms<=70Ghose 1999
EganLogP<=5.88, TPSA<=131.6Egan 2000
Muegge200<=MW<=600, -2<=LogP<=5, TPSA<=150, rings<=7, C>4, heteroatoms>1, RotBonds<=15, HBD<=5, HBA<=10Muegge 2001
Lead-likeMW<=350, LogP<=3Teague 1999
Fragment Ro3MW<=300, LogP<=3, HBD<=3, HBA<=3, RotBonds<=3, TPSA<=60 A^2Congreve 2003
Pfizer CNS MPOSix desirability functions: ClogP, ClogD, MW, TPSA, HBD, and pKaWager 2010

Use case: Treat Ro5 and Veber criteria as risk indicators rather than universal hard cutoffs. Doak et al. (2014) analyze orally bioavailable drugs and candidates beyond the Rule of 5, but do not support the claim that approximately 30% of marketed oral drugs violate at least one rule. For CNS prioritization, implement the six-property Wager MPO desirability score rather than replacing it with three hard thresholds.

QED (Weighted Drug-Likeness)

QED (Bickerton 2012) is a single-number drug-likeness measure (0-1) combining 8 properties (MW, LogP, HBD, HBA, PSA, RotBonds, AromaticRings, structural alerts) via desirability functions.

Caveat: QED summarizes desirability functions derived from property distributions of marketed oral drugs; it is not a supervised predictor trained specifically on FDA-approved drugs. It can under-rank fragment-like or natural-product-like molecules, so do not use it as the sole filter for those libraries.

Common Errors

SymptomCauseFix
Fingerprint changes between runsRandom seed not set for canonicalizationRDKit Morgan is deterministic; check if input differs (stereo, charges)
MACCS bit count != 166RDKit MACCS returns 167 bits (bit 0 unused)Slice [1:] if comparing to literature 166-bit
Crippen LogP differs from XLogPDifferent modelUse Descriptors.MolLogP for Crippen; XLogP3 requires external lib
3D descriptor differs between callsDifferent conformerSet confId=0 explicitly; or average over ensemble
QED returns nanCharged species or non-standard atomStandardize (uncharge) before QED
Count-vector similarity differs from bit-vector similarityCount multiplicities change the generalized Tanimoto calculationRDKit supports Tanimoto on sparse count vectors; record the vector type and do not compare its threshold directly with a folded-bit threshold
MolWt off by ~1 from PubChemImplicit H counted differentlyUse Descriptors.ExactMolWt for monoisotopic; PubChem reports average

References

Related Skills

  • chemoinformatics/molecular-io - Parse molecules before featurization
  • chemoinformatics/molecular-standardization - Canonicalize before fingerprinting
  • chemoinformatics/conformer-generation - Generate 3D for conformer-dependent descriptors
  • chemoinformatics/similarity-searching - Use fingerprints for similarity ranking
  • chemoinformatics/qsar-modeling - ML using these descriptors as features
  • chemoinformatics/admet-prediction - Filter by drug-likeness criteria
  • machine-learning/biomarker-discovery - ML on molecular features

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Bio Molecular Descriptors?

Calculates molecular fingerprints (ECFP/Morgan, FCFP, MACCS, RDKit, AtomPair, TopologicalTorsion, Avalon, MAP4, MHFP6) and physicochemical descriptors (Lipinski, QED, TPSA, Crippen LogP, 3D shape) with explicit choice tables, bit vs count semantics, and partial-charge model selection. Use when featurizing molecules for similarity, QSAR, virtual screening, or ML, or selecting the correct fingerprint for a chemotype-aware task.

Waarom Bio Molecular Descriptors gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Bio Molecular Descriptors bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Bio Molecular Descriptors in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chemoinformatics-molecular-descriptors. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Bio Molecular Descriptors gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Bio Molecular Descriptors gebruiken?

Zoveel als je wilt. Je kunt Bio Molecular Descriptors gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Bio Molecular Descriptors gratis?

Ja. Deze skill is door PKU-YuanGroup op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇