Matchms pairwise cosine

From XuShuwenn/RedAct · View interactive version

Matchms pairwise cosine is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Load spectra from an MSP file and find the most similar pair using matchms CosineGreedy with robust score extraction and exact output formatting.

How to use this skill

Skill file

Pairwise Spectral Similarity with matchms (CosineGreedy)

This skill computes pairwise similarity between mass spectra loaded from an MSP file using the matchms CosineGreedy algorithm and reports the most similar pair. It includes robust handling of different return types for similarity results and guidance for formatting the output consistently.

When to Use

Use this skill when you need to:

Core Workflow

  1. Load spectra
  1. Prepare names
  1. Compute pairwise similarities
  1. Track the best match
  1. Format and write output

Verification

Before finalizing, verify:

Common Pitfalls

Optional Script Usage

A ready-to-use helper script is provided.

Example usage:

Configuration notes:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.