Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

coot-correlations

БесплатноБез исполняемых скриптовНе проверен

Using Density-Fit Correlations in Coot

pemsleyот pemsley★ 174 звезды на GitHub17 установок в других каталогах

Об этом скилле

Improved MCP Function Documentation for Coot

Map to Model Correlation Functions

Overview

These functions are used to assess how well a molecular model fits into electron density maps. They are essential for model validation and identifying poorly-fitted regions.


map_to_model_correlation_stats_per_residue_range_py()

Purpose: Find residues with poor density fit by analyzing correlation statistics across the entire chain.

Use Case: "Which side chain is the worst fitting to density?" - Use this function to get comprehensive density fit statistics for all residues.

Function Signature:

PyObject *map_to_model_correlation_stats_per_residue_range_py(
    int imol,                                  # Model molecule number
    const std::string &chain_id,               # Chain identifier
    int imol_map,                              # Map molecule number  
    unsigned int n_residue_per_residue_range,  # Number of residues per range (typically 1)
    short int exclude_mainchain_NOC_flag       # Split into main-chain and side-chain (1=yes, 0=no)
)

Parameters:

  • imol: The model molecule index
  • chain_id: The chain identifier (e.g., "A", "B")
  • imol_map: The map molecule index to correlate against
  • n_residue_per_residue_range: Window size for averaging (use 1 for per-residue stats)
  • exclude_mainchain_NOC_flag: Whether to split the statistics into main-chain and side-chain:
    • 0: all grid points go into the first list (all-atom statistics); the second list is not used
    • 1: the grid points around the main-chain atoms (N, C, O, H, and also CA and the CD of proline - any atom within 1.8 Å of N, C, O or H) go into the first list and the grid points around the other atoms (CB onwards) go into the second list

The arguments are positional - keyword arguments are not accepted.

Returns: A list with two elements, each a list of [[chain, resno, ins_code], [n_points, correlation]] items, sorted by residue spec:

  • stats[0]: All-atom correlations when the flag is 0; main-chain correlations when the flag is 1
  • stats[1]: Side-chain correlations when the flag is 1. When the flag is 0 every entry has n_points = 0 and correlation nan - this is by design, not a bug.

Both lists are empty if imol or imol_map is not valid. Residues with no side-chain atoms (e.g. GLY) have n_points = 0 and correlation nan in the side-chain list, so filter on n_points > 0.

n_points counts atom/grid-point contributions: a grid point within 2.8 Å of several atoms is counted once for each of them, so it is not the number of distinct grid points.

Example Usage:

# Get per-residue main-chain and side-chain correlation stats for chain A
# args: imol, chain_id, imol_map, n_residue_per_residue_range, exclude_mainchain_NOC_flag
stats = map_to_model_correlation_stats_per_residue_range_py(0, "A", 1, 1, 1)

mainchain = stats[0]     # Main-chain correlations (because the flag is 1)
sidechain = stats[1]     # Side-chain correlations

# Find residues with poor main-chain correlation
for res in mainchain:
    resno = res[0][1]
    n_points = res[1][0]
    corr = res[1][1]
    if corr < 0.7:
        print(f"Poor fit: residue {resno}, correlation={corr:.3f}")

map_to_model_correlation_py()

Purpose: Calculate the overall correlation for specific residues and their neighbors.

Use Case: Evaluate the fit of a specific region after refinement.

Function Signature:

PyObject *map_to_model_correlation_py(
    int imol,
    PyObject *residue_specs,        # List of residue specs to evaluate
    PyObject *neighb_residue_specs, # Neighboring residues to exclude from grid
    unsigned short int atom_mask_mode,  # Which atoms to include (see below)
    int imol_map
)

Atom Mask Modes:

  • 0: All atoms
  • 1: Main-chain atoms if standard amino acid, else all atoms
  • 2: Side-chain atoms if standard amino acid, else all atoms
  • 3: Side-chain atoms excluding CB if standard amino acid, else all atoms
  • 4: Main-chain atoms if standard amino acid, else nothing
  • 5: Side-chain atoms if standard amino acid, else nothing
  • 10: Atom radius dependent on B-factor

Returns: Float - correlation coefficient between model and map

Example Usage:

# Evaluate side-chain fit for residues 40-44
residue_specs = [[chain_id, res_no, ins_code] for res_no in range(40, 45)]
correlation = map_to_model_correlation_py(
    imol=1,
    residue_specs=residue_specs,
    neighb_residue_specs=[],  # No neighbors to exclude
    atom_mask_mode=2,  # Side-chain atoms only
    imol_map=2
)
print(f"Side-chain correlation: {correlation}")

map_to_model_correlation_stats_py()

Purpose: Get detailed statistics (mean, std dev, etc.) for map-model correlation.

Function Signature:

PyObject *map_to_model_correlation_stats_py(
    int imol,
    PyObject *residue_specs,
    PyObject *neighb_resid
Полный SKILL.md на GitHub

Установить coot-correlations в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл coot-correlations?

Using Density-Fit Correlations in Coot

Как установить скилл coot-correlations?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл coot-correlations запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить coot-correlations с