Skip to content
Development
Skill

/sar-analysis

Structure-activity relationship (SAR) analysis guide for drug discovery including molecular descriptor analysis, scaffold analysis, and activity cliff detection.

From plugin
sciagent-skills
384200 skills

Claude Code

$ npx -y skills add jaechang-hits/SciAgent-Skills --skill sar-analysis --agent claude-code

SKILL.md

sar-analysis.SKILL.md
name: sar-analysis
description: Structure-activity relationship (SAR) analysis guide for drug discovery including molecular descriptor analysis, scaffold analysis, and activity cliff detection.
license: open

SAR Analysis

---

Metadata

**Short Description**: Comprehensive guide for performing Structure-Activity Relationship (SAR) analysis using RDKit.

**Authors**: Ohagent Team

**Version**: 1.0

**Last Updated**: December 2025

**License**: CC BY 4.0

**Commercial Use**: ✅ Allowed

---

Overview

Structure-Activity Relationship (SAR) analysis is a core medicinal-chemistry workflow that relates systematic structural variations of a chemical series to changes in biological activity. The goal is to (1) identify a common scaffold (Maximum Common Substructure, MCS) shared by a series of analogues, (2) decompose each molecule into the scaffold plus its R-group substituents, (3) align all molecules so substituents at equivalent positions are visually comparable, and (4) connect substituent variation to potency to derive testable design hypotheses.

This guide formalizes a reproducible RDKit-based SAR workflow that produces an interactive HTML report (compound table with aligned core/R-groups and an activity heatmap) and a written SAR narrative that explicitly contrasts substituents at the same R-position. It is intended for use on activity tables containing SMILES, a compound identifier, and a numeric potency value (IC50, Ki, EC50, %inhibition, etc.).

Key Concepts

Maximum Common Substructure (MCS)

MCS is the largest connected substructure shared by all (or a configurable threshold of) molecules in a set. RDKit's `rdFMCS.FindMCS` searches for this scaffold under tunable atom/bond comparison rules. For SAR, MCS provides the anchor template against which every analogue is decomposed and aligned. A `threshold=0.8` allows MCS to be defined when only 80% of molecules contain the candidate substructure, which is more robust to outliers than `threshold=1.0`. `ringMatchesRingOnly=True` and `completeRingsOnly=True` prevent partial-ring fragments that look chemically meaningless.

R-Group Decomposition

R-group decomposition (`rdRGroupDecomposition.RGroupDecompose`) maps each molecule onto the MCS core and assigns the non-core fragments to enumerated R-positions (R1, R2, …). The output is a per-molecule dictionary `{Core, R1, R2, …}`. Constant R-positions (where every molecule carries the same fragment) are uninformative for SAR and should be pruned from the report so attention focuses on the variable positions that actually drive activity.

Substructure Alignment for Comparable 2D Depiction

For SAR visualization to be interpretable, the core and each R-group must be drawn in the same orientation as the parent molecule. The recommended pattern uses three fall-back strategies in order: (1) a direct `GetSubstructMatch`, (2) a re-match after `AdjustQueryProperties(makeDummiesQueries=True)` so R-group dummy atoms are treated as queries, and (3) a final attempt with `useChirality=False`. Once a match is found, atom coordinates are copied from the parent conformer onto the fragment. Without this, R-group cells are drawn in arbitrary canonical orientations and visual SAR is essentially impossible to read.

Activity Heatmap and Comparative Analysis

A logarithmic-scale color gradient (green = high potency / low IC50, red = low potency / high IC50) on the activity column lets a reader spot trends across the series at a glance. The accompanying narrative must justify every claim about a substituent's effect by *explicit pairwise contrast at the same R-position* — the unit of SAR evidence is "compound A (R1=X, IC50=…) vs compound B (R1=Y, IC50=…)", never an unsupported generalization.

Decision Framework

SAR analysis pipeline
└── Have SMILES + activity for >= 4 analogues?
    ├── No  -> Insufficient data; collect more analogues first
    └── Yes -> Run rdFMCS.FindMCS(threshold=0.8, ringMatchesRingOnly=True)
        ├── MCS too small (<5 atoms) -> Series is too diverse;
        │                               cluster first, then run SAR per cluster
        └── MCS reasonable -> RGroupDecompose
            └── For each fragment alignment to parent:
                ├── Strategy 1: GetSubstructMatch(direct)  -- works for canonical cases
                │   └── No match -> Strategy 2
                ├── Strategy 2: AdjustQueryProperties(makeDummiesQueries=True)
                │               -- handles dummy R-group atoms
                │   └── No match -> Strategy 3
                ├── Strategy 3: GetSubstructMatch(useChirality=False)
                │               -- handles stereochemistry mismatches
                │   └── No match -> Compute2DCoords as fallback (lose alignment)
                └── Drop constant R-positions, build HTML, draw with DrawMoleculeACS1996

| Situation | Recommended choice | Rationale | |-----------|--------------------|-----------| | Standard congeneric series with a clear scaffold | MCS `threshold=0.8`, `ringMatchesRingOnly=True`, `completeRingsOnly=True` | Tolerates a small minority of outliers while keeping rings intact | | Highly diverse set (e.g., HTS hit list) | Cluster (Tanimoto/Murcko) first, then SAR per cluster | A single MCS will be too small to be useful across diverse chemotypes | | Stereoisomers in the series | Try Strategy 1 first; fall back to Strategy 3 (`useChirality=False`) | Chirality differences should not break depiction alignment | | Analogues with R-group attachment dummies in queries | Strategy 2 with `AdjustQueryProperties(makeDummiesQueries=True)` | Dummy atoms are treated as queries so they match real heavy atoms | | One R-position constant across all analogues | Drop from report and from core depiction | Constant positions are uninformative and clutter the table | | Activity spans many orders of magnitude | Color heatmap on `log10(activity)` | Linear scale collapses the dynamic range visually | | Drawing

Read more
@jaechang-hits
Ships withsciagent-skills

Turn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.

Stars on GitHub

Momentum

stars in total
384
Star history of jaechang-hits/SciAgent-Skills on GitHub, a chart by star-history.com

Other skills on sciagent-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about sar-analysis.

Which coding agents can use sar-analysis?
sar-analysis installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.