pemsley/coot/correlations
Claude Code and agent skill by pemsley/coot
- community
Checking that the SKILL.md file is still in the repository.
Using Density-Fit Correlations in Coot
Install
npx vskill@latest install pemsley/coot/correlationsSKILL.md
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:
Parameters:
imol: The model molecule indexchain_id: The chain identifier (e.g., "A", "B")imol_map: The map molecule index to correlate againstn_residue_per_residue_range: Window size for averaging (use 1 for per-residue stats)exclude_NOC_flag: Whether to exclude backbone N, O, C atoms (1 to exclude, 0 to include)
IMPORTANT BUG: When exclude_NOC_flag=0, the side-chain correlation array (stats[1]) returns all zeros/NaN values. To get valid side-chain correlations, you must use exclude_NOC_flag=1.
Returns: A list with two elements:
stats[0]: All-atom correlations -[[chain, resno, ins_code], [n_points, correlation]]stats[1]: Side-chain correlations (only valid whenexclude_NOC_flag=1)
Example Usage:
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:
Atom Mask Modes:
0: All atoms1: Main-chain atoms if standard amino acid, else all atoms2: Side-chain atoms if standard amino acid, else all atoms3: Side-chain atoms excluding CB if standard amino acid, else all atoms4: Main-chain atoms if standard amino acid, else nothing5: Side-chain atoms if standard amino acid, else nothing10: Atom radius dependent on B-factor
Returns: Float - correlation coefficient between model and map
Example Usage:
map_to_model_correlation_stats_py()
Purpose: Get detailed statistics (mean, std dev, etc.) for map-model correlation.
Function Signature:
Returns: Statistics object with mean, std dev, min, max correlation values
map_to_model_correlation_per_residue_py()
Purpose: Get correlation values individually for each specified residue.
Function Signature:
Returns: List of (residue_spec, correlation) pairs
Example Usage:
Validation Functions
all_molecule_ramachandran_score_py()
Purpose: Comprehensive Ramachandran validation for an entire molecule.
Use Case: "Validate the backbone geometry" or "Find Ramachandran outliers"
Function Signature:
Returns: A list of exactly 6 elements (confirmed from C++ source):
rama_data[0]: overall score (float)rama_data[1]: n_residues (int)rama_data[2]: score_non_sec_str (float)rama_data[3]: n_residues_non_sec_str (int)rama_data[4]: n_zeros (int)rama_data[5]: per-residue list ← this is what you want
Each per-residue entry: [[phi, psi], [chain_id, resno, ins_code], probability, [prev_resname, this_resname, next_resname]]
rama_data[5] and rama_data[-1] are equivalent. Both are correct.
Score Interpretation:
- High scores (>1.0): GOOD - highly favored geometry
- Low scores (<0.01): BAD - outliers/unfavored regions
- Lower probability = worse geometry
Example Usage:
all_molecule_rotamer_score_py()
Purpose: Comprehensive rotamer validation for side chains.
Use Case: "Check rotamer quality" or "Find unusual side-chain conformations"
Function Signature:
Returns: [overall_score, n_residues]
Example Usage:
rotamer_graphs_py()
Purpose: Get detailed rotamer information for each residue.
Use Case: "Find the worst rotamer outlier"
Function Signature:
Returns: List of [chain_id, resno, ins_code, score_percentage, resname]
Score Interpretation:
- High scores (>50%): GOOD rotamers
- Low scores (<5%): BAD rotamers - poor conformations
- 0.0 or very low: Severe outliers
Example Usage:
deviant_geometry()
Purpose: Check for unusual bond lengths, angles, and other geometric outliers.
Function Signature:
Returns: None (displays results in GUI or console)
Common Validation Workflow
Refinement Functions
auto_fit_best_rotamer()
Purpose: Automatically fit the best rotamer for a residue.
Function Signature:
Returns: The new rotamer probability score
Example Usage:
refine_zone()
Purpose: Real-space refinement of a residue range.
Function Signature:
Example Usage:
pepflip()
Purpose: Flip a peptide bond (useful for fixing cis/trans peptides).
Function Signature:
Example Usage:
Tips for Better Documentation
For Search Queries
When users ask questions like:
- "Which side chain is worst fitting?" → Use
map_to_model_correlation_stats_per_residue_range_py() - "Find Ramachandran outliers" → Use
all_molecule_ramachandran_score_py()and look for minimum scores - "Check rotamer quality" → Use
rotamer_graphs_py()and look for minimum scores - "Validate the model" → Combine Ramachandran, rotamer, density fit, and geometry checks
Key Concepts
- Scores vs. Statistics:
- Ramachandran scores: Lower = worse (outliers have low probability)
- Rotamer scores: Lower = worse (percentage probability)
- Correlation: Higher = better fit to density
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmcp/docs/skills/correlations/SKILL.md
Popularity
- Repository stars
- 156
- Repository forks
- 58
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pemsley/coot/correlations)