Evo Molecular Similarity logo

Evo Molecular Similarity

Community
Zhang-Henry
evo-molecular-similarity

Find top-k similar chemicals from a PDF molecule pool using Morgan fingerprints with Tanimoto similarity. Resolves chemical names to SMILES at runtime via PubChemPy, computes Morgan fingerprints with RDKit, and ranks by Tanimoto similarity with alphabetical tie-breaking.

Overview

PublisherZhang-Henry
RepositoryCoEvoSkills
Skill nameevo-molecular-similarity
Stars
83
Forks
9
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Zhang-Henry on GitHub. Read the source before you install it.

Installation

Install the Evo Molecular Similarity AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/find-topk-similiar-chemicals/evo-molecular-similarity
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhang-Henry/CoEvoSkills.git /tmp/CoEvoSkills
mkdir -p .claude/skills
cp -r /tmp/CoEvoSkills/artifacts/skills/find-topk-similiar-chemicals/evo-molecular-similarity .claude/skills/evo-molecular-similarity
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Evo Molecular Similarity in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Evo Molecular Similarity on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Evo Molecular Similarity is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Molecular Similarity Skill

Overview

Given a target chemical name and a PDF file listing chemical names (one per line), this skill identifies the top-k most structurally similar chemicals from the PDF pool.

Pipeline:

  1. Extract chemical names from the PDF using pdfplumber
  2. Resolve each name to SMILES via PubChemPy at runtime (no manual mapping)
  3. Compute Morgan fingerprints via RDKit
  4. Compute pairwise Tanimoto similarity between target and each pool molecule
  5. Return top-k names sorted by descending similarity, alphabetical tie-breaking

Runtime SMILES lookups are cached to a temp directory keyed by the PDF path hash, so repeated calls avoid redundant API requests. No pre-built mappings are embedded.

End-to-End Usage

python
import sys
sys.path.insert(0, '/app/environment/skills/evo-molecular-similarity/scripts')
from utils import topk_tanimoto_similarity_molecules

# Example: find top-k similar molecules from any PDF pool
result = topk_tanimoto_similarity_molecules(
    target_molecule_name="Benzene",       # any chemical name
    molecule_pool_filepath="pool.pdf",    # path to PDF with one name per line
    top_k=5
)
print(result)  # list of up to top_k chemical name strings

# Basic validation
assert isinstance(result, list)
assert len(result) <= 5
assert all(isinstance(n, str) for n in result)

Configuration

The fingerprint parameters are set by the task contract:

  • radius: 2
  • useChirality: True
  • nBits: 2048 (RDKit default for bit-vector Morgan)

These are passed as defaults in _compute_morgan_fingerprint() and can be overridden if a different task contract requires it.

Key Functions

topk_tanimoto_similarity_molecules(target_molecule_name, molecule_pool_filepath, top_k) -> list

End-to-end entry point. Accepts any target name, any PDF path, and any k. Returns a list of chemical names from the PDF pool.

Internal helpers

  • _extract_molecule_names_from_pdf(pdf_path) — PDF text extraction, one name per line
  • _resolve_name_to_smiles(name) — PubChem lookup with exponential-backoff retry
  • _build_smiles_lookup(names, cache_path) — Cached batch resolution with retry passes
  • _compute_morgan_fingerprint(smiles) — Morgan fingerprint bit-vector
  • _compute_tanimoto(fp1, fp2) — Tanimoto similarity

Rate Limiting

PubChem enforces request limits. The skill uses:

  • 0.6s delay every 3 requests during initial resolution
  • Exponential backoff (1.5s × 2^attempt) on 503 errors
  • Two automatic retry passes for any molecules that failed on first attempt

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Evo Molecular Similarity AI skill do?

Find top-k similar chemicals from a PDF molecule pool using Morgan fingerprints with Tanimoto similarity. Resolves chemical names to SMILES at runtime via PubChemPy, computes Morgan fingerprints with RDKit, and ranks by Tanimoto similarity with alphabetical tie-breaking.

Why use Evo Molecular Similarity on TypingMind?

Because you install it once and use it with any model. Evo Molecular Similarity is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Evo Molecular Similarity in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/find-topk-similiar-chemicals/evo-molecular-similarity. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Evo Molecular Similarity?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Evo Molecular Similarity?

As many as you like. As long as a model supports skills, you can use Evo Molecular Similarity with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Evo Molecular Similarity AI skill free?

Yes. It is published on GitHub by Zhang-Henry under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇