Logo Bio Shape Similarity

Bio Shape Similarity

Tổ chức
PKU-YuanGroup
bio-shape-similarity

Performs 3D shape-based similarity searching using ROCS (OpenEye), USRCAT (ultra-fast), Open3DAlign (RDKit), ESPSim (electrostatic), and ShaEP with explicit handling of Tanimoto-Combo (shape + color), shape vs ECFP4 complementarity, conformer-ensemble searching, alignment optimization, and scaffold hopping. Use when searching for shape-mimicking compounds with different scaffolds, identifying bioisosteric replacements, prospective scaffold hopping, or expanding hit series beyond 2D similarity.

Tổng quan

Nhà phát hànhPKU-YuanGroup
Kho mãOpenAI4S
Tên kỹ năngbio-shape-similarity
Sao
622
Bản fork
72
Tệp đi kèm
2
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được PKU-YuanGroup công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Bio Shape Similarity trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chemoinformatics-shape-similarity
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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-shape-similarity .claude/skills/bio-shape-similarity
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Bio Shape Similarity trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Bio Shape Similarity ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Bio Shape Similarity với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Version Compatibility

Reference examples tested with: RDKit 2024.09+ (Open3DAlign and USRCAT); official ShaEP syntax checked against ShaEP 1.4.2; ROCS/FastROCS/ROCS X are commercial OpenEye products.

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.

Shape Similarity

Search for compounds with similar 3D shape (and optionally chemical features) to a query molecule. Shape-based screening complements 2D fingerprint search: it can find scaffold-hopped compounds that ECFP4 misses (different scaffolds with similar shape). ROCS (OpenEye) is the industry-standard commercial tool; Open3DAlign (RDKit), USRCAT (Schreyer & Blundell 2012), and ShaEP are open-source alternatives. Modern best practice combines shape with color (chemical-feature similarity) via Tanimoto-Combo: matches share both shape and pharmacophore feature distribution.

For 2D fingerprint similarity, see chemoinformatics/similarity-searching. For pharmacophore search (discrete feature constraints), see chemoinformatics/pharmacophore-modeling. For 3D conformer generation, see chemoinformatics/conformer-generation.

Shape Method Taxonomy

ToolSpeedApproachOpen-sourceFails when
ROCS / FastROCS (OpenEye)Hardware/database/conformer-dependent; vendor reports millions of conformers/s for FastROCSGaussian shape + colorNoLicense and prepared database
ROCS XTrillion-scale reaction/synthon space on OrionFastROCS plus Bayesian-bandit samplingNoCommercial cloud workflow
USRCATVery fast alignment-free descriptor comparisonMoment-based + atom typesYesCoarse approximation
Open3DAlign (RDKit)MediumMMFF atom-type/charge-weighted alignmentYesRequires compatible typed 3D structures
ShaEPBenchmark on actual conformers/hardwareField-based (shape + ESP)Free binary; inspect licenseRequires valid 3D structures and charges for ESP
ESPSimBenchmark on actual workloadElectrostatic + shapeYesLimited public benchmarks
Phase-Shape (Schrödinger)commercialShape + pharmacophoreNoCommercial
USR (original)Very fast alignment-free comparisonMoment-based onlyYesNo atom-type information

Decision: Select a shape method by matched retrieval/enrichment performance, conformer preparation, throughput, licensing, and score semantics. USRCAT is useful as a fast prefilter; Open3DAlign provides an open alignment method; ROCS/FastROCS provide commercial shape/color workflows.

Decision Tree by Scenario

ScenarioMethodNotes
Large prepared libraryUSRCAT pre-filter + Open3DAlign rescoreChoose rescore budget from measured retrieval saturation
Production VS for scaffold hopROCS + color (commercial)Industry standard
Scaffold hopping prospectiveOpen3DAlign with conformer ensembleShape + flexibility
Bioisostere replacementROCS color with neutral scoringPharmacophore-equivalent matches
Patent space carve-outShape constraint + 2D dissimilarityCombine shape + dissimilar scaffold
Library diversity assessmentUSRCAT k-nearest neighborFast
Crystal-bound conformer templateOpen3DAlign starting from co-crystal poseBioactive shape
Cross-target screeningShape + pharmacophore featureCombined screen

Tanimoto-Combo Scoring (ROCS Standard)

TanimotoCombo = Tanimoto_shape + Tanimoto_color

  • Tanimoto_shape: volume overlap normalized
  • Tanimoto_color: pharmacophore feature overlap

Each component is normalized from 0 to 1, so TanimotoCombo ranges from 0 to 2. It is a sum, not an average. Select follow-up thresholds from a relevant benchmark or enrichment study; a single cutoff is not portable across query preparation, color-force-field settings, and library composition.

USRCAT (Ultra-Fast Shape Recognition + Atom Types)

USRCAT (Schreyer & Blundell 2012) extends Ultrafast Shape Recognition (USR) with atom-type information. Each molecule is represented as a 60-dimensional moment vector (12 moments × 5 atom types).

Goal: Encode a molecule into the 60-D USRCAT moment vector and score similarity against another molecule for alignment-free shape search.

Approach: Parse the SMILES, add hydrogens, generate one 3D conformer with ETKDGv3, compute RDKit USRCAT descriptors, and compare descriptor vectors with RDKit's USR score.

python
from rdkit.Chem import rdMolDescriptors

mol = Chem.MolFromSmiles('CCO')
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol, AllChem.ETKDGv3())

descriptors = rdMolDescriptors.GetUSRCAT(mol)
# Returns numpy array of 60 floats: 12 USR moments x 5 atom types
# (all atoms, hydrophobic, aromatic, acceptor, donor)

similarity = rdMolDescriptors.GetUSRScore(desc1, desc2)

Speed: Descriptor calculation is linear in atoms and comparison is fixed-length, without pairwise alignment. Benchmark end-to-end throughput on the prepared conformer library before choosing a scale cutoff.

Limit: USRCAT is a coarse approximation. Predictive for analog identification; less precise for scaffold hopping.

Open3DAlign (RDKit)

Open3DAlign uses MMFF atom types and partial charges to find an atom-based 3D alignment:

Goal: Align a target molecule onto a query in 3D and score volume overlap with Open3DAlign.

Approach: Build 3D structures for query and target, run GetO3A, and call Align() to transform the probe in place. Score() is the unnormalized O3A objective, not a shape Tanimoto or ROCS TanimotoCombo. If a normalized shape similarity is required, compute 1 - rdShapeHelpers.ShapeTanimotoDist(...) after alignment.

python
from rdkit.Chem import rdMolAlign, rdShapeHelpers

query = Chem.MolFromSmiles('CCC(=O)Nc1ccccc1')
query = Chem.AddHs(query)
AllChem.EmbedMolecule(query, AllChem.ETKDGv3())

target = Chem.MolFromSmiles('CCC(=O)Nc1ccc(F)cc1')
target = Chem.AddHs(target)
AllChem.EmbedMolecule(target, AllChem.ETKDGv3())

O3A = rdMolAlign.GetO3A(target, query)
rmsd = O3A.Align()  # aligns target to query in place
o3a_score = O3A.Score()
shape_tanimoto = 1.0 - rdShapeHelpers.ShapeTanimotoDist(target, query)

GetO3A finds an alignment between conformers; Align() applies it and returns RMSD. Keep o3a_score and normalized shape_tanimoto distinct in outputs.

Open3DAlign vs ROCS: Open3DAlign is open-source and competitive on small benchmarks; slower than ROCS at scale.

Conformer-Ensemble Shape Searching

For each library molecule, generate ensemble of conformers; pick best-shape conformer:

Goal: Run shape-similarity search over a conformer ensemble per library molecule so bound-conformer-like shapes are recovered.

Approach: For each library molecule, add hydrogens, embed n_conf conformers with ETKDGv3, MMFF-optimize, score each conformer against the query with Open3DAlign, and keep the best score per molecule.

python
def shape_search_ensemble(query_mol, library_mols, n_conf=20):
    hits = []
    for target in library_mols:
        target = Chem.AddHs(target)
        ids = list(AllChem.EmbedMultipleConfs(target, numConfs=n_conf,
                                               params=AllChem.ETKDGv3()))
        if not ids:
            continue
        if not AllChem.MMFFHasAllMoleculeParams(target):
            continue
        optimization = AllChem.MMFFOptimizeMoleculeConfs(target)
        if any(status != 0 for status, _ in optimization):
            continue

        scores = []
        for c in range(target.GetNumConformers()):
            O3A = rdMolAlign.GetO3A(target, query_mol, prbCid=c)
            O3A.Align()
            scores.append(1.0 - rdShapeHelpers.ShapeTanimotoDist(
                target, query_mol, confId1=c,
            ))
        if scores:
            hits.append((target, max(scores)))
    return sorted(hits, key=lambda x: x[1], reverse=True)

Critical: Results depend on conformer coverage. Use an ensemble sized and validated for the library and query rather than assuming one conformer is representative.

ESP Similarity (Electrostatic)

ShaEP and ESPSim extend shape with electrostatic surface potential overlap. For ESP-relevant pharmacophores (binding pockets with strong electrostatics):

bash
shaep -q query.mol2 target.mol2 -s aligned_hits.sdf similarity.txt

ESP scoring catches electrostatic-equivalent bioisosteres that pure shape misses (carboxylate vs tetrazole same charge).

Shape vs ECFP4 Complementarity

Shape resultECFP4 resultInterpretation
HighHighClose analog candidate
HighLowScaffold-hop candidate
LowHighSimilar 2D chemotype in a different sampled shape
LowLowUnrelated by these representations

Calibrate “high” and “low” on a task-relevant reference set; do not treat the illustrative function defaults below as universal scientific cutoffs.

The shape >> ECFP4 quadrant is the scaffold-hopping gold:

Goal: Identify scaffold-hop candidates that are 3D-shape-similar but 2D-chemotype-dissimilar to the query.

Approach: Run the conformer-ensemble shape search, keep hits above a shape Tanimoto cutoff, then retain only those whose ECFP4 Tanimoto to the query is below an ECFP4 dissimilarity cutoff.

python
# These thresholds are repository starting defaults only; calibrate both on a
# task-relevant active/decoy or retrieval benchmark before making decisions.
def scaffold_hop_candidates(query_mol, library, shape_threshold=0.7,
                            ecfp_threshold=0.5):
    shape_hits = shape_search_ensemble(query_mol, library)
    candidates = []
    for target, shape_score in shape_hits:
        if shape_score >= shape_threshold:
            ecfp_sim = ecfp_tanimoto(query_mol, target)
            if ecfp_sim < ecfp_threshold:
                candidates.append((target, shape_score, ecfp_sim))
    return candidates

Per-Tool Failure Modes

USRCAT -- false positive on small molecules

Trigger: Library has many fragment-sized compounds.

Mechanism: USRCAT moments dominated by overall shape; small molecules look "similar" if shape resemble.

Symptom: Many fragment hits; not pharmacophore-relevant.

Fix: Calibrate size/property filters on the retrieval task and rescore selected hits with an alignment or feature-aware method.

Open3DAlign -- slow on large library

Trigger: Million-compound library, full alignment.

Mechanism: Open3DAlign is iterative; O(N) per molecule.

Symptom: Hours of compute.

Fix: Pre-filter with USRCAT and choose the rescore budget from measured throughput and retrieval saturation.

Shape only -- wrong stereochemistry match

Trigger: Mirror-image of correct binder.

Mechanism: Shape-only scoring may insufficiently penalize stereochemical alternatives even though a rigid rotational overlay is not generally invariant to mirror reflection.

Symptom: Enantiomer of inactive scores as hit.

Fix: Validate hits by 3D pose; check stereochemistry.

ROCS color -- bioisostere missed

Trigger: -COOH replaced by -SO3H or tetrazole.

Mechanism: Default color types may not equate these bioisosteres.

Symptom: Known bioisostere doesn't score high.

Fix: Validate the color-force-field treatment for the bioisostere and compare shape, color, and pharmacophore evidence separately.

Conformer not bioactive

Trigger: Library compound generated conformer is not the bound conformation.

Mechanism: ETKDGv3 generates plausible conformers; bound conformer may be higher energy.

Symptom: Known active doesn't shape-match query.

Fix: Use larger conformer ensemble; weight by Boltzmann; or use CREST + GFN2-xTB for high-quality sampling.

Field-based methods slower

Trigger: ShaEP or ESPSim on production library.

Mechanism: Field-based methods compute Gaussian fields per molecule.

Symptom: Field calculation or alignment dominates runtime on the prepared library.

Fix: Use as second-stage rescore; not primary screen.

Reconciliation: Shape vs Pharmacophore

AspectShapePharmacophore
RepresentationVolume distributionDiscrete features in space
CapturesOverall bulkInteraction-relevant features
SpeedFast (USRCAT) to medium (Open3DAlign)Fast
SpecificityTask- and query-dependentTask- and feature-definition-dependent
False positive rateMeasure on a matched benchmarkMeasure on a matched benchmark
Best forScaffold hopping initialScaffold hopping refinement

Shape and pharmacophore searches make different approximations. Compare them alone and in sequence on a matched active/decoy or retrieval benchmark before assigning recall/precision roles.

Common Errors

SymptomCauseFix
Open3DAlign RMSD is near 0Near-exact O3A alignmentTreat as a successful alignment; evaluate the O3A and shape scores separately
USRCAT vector all zerosMol has no 3D coordsGenerate conformer first
Shape Tanimoto > 1Raw O3A or TanimotoCombo mislabeled as shape TanimotoShape Tanimoto is 0-1; O3A is unnormalized and ROCS TanimotoCombo is 0-2
ROCS very slowSequential processingUse parallel batching
Shape match but no docking poseWrong binding poseUse docking on top shape hits, not shape alone
Missing co-crystal templateApo or AlphaFold-only structureUse ligand-based pharmacophore + shape
ShaEP returns no hitsStrict toleranceLoosen overlap thresholds

References

Related Skills

  • chemoinformatics/molecular-io - Parse query and library
  • chemoinformatics/conformer-generation - Generate 3D conformer ensembles
  • chemoinformatics/similarity-searching - 2D similarity comparison
  • chemoinformatics/pharmacophore-modeling - Pharmacophore alternative
  • chemoinformatics/scaffold-analysis - 2D scaffold analysis
  • chemoinformatics/virtual-screening - Shape as pre-filter to docking

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Bio Shape Similarity làm được gì?

Performs 3D shape-based similarity searching using ROCS (OpenEye), USRCAT (ultra-fast), Open3DAlign (RDKit), ESPSim (electrostatic), and ShaEP with explicit handling of Tanimoto-Combo (shape + color), shape vs ECFP4 complementarity, conformer-ensemble searching, alignment optimization, and scaffold hopping. Use when searching for shape-mimicking compounds with different scaffolds, identifying bioisosteric replacements, prospective scaffold hopping, or expanding hit series beyond 2D similarity.

Vì sao nên dùng Bio Shape Similarity trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Bio Shape Similarity là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Bio Shape Similarity trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chemoinformatics-shape-similarity. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Bio Shape Similarity?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Bio Shape Similarity với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Bio Shape Similarity với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Bio Shape Similarity có miễn phí không?

Có. Kỹ năng này được PKU-YuanGroup phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇