conservation_view
Color your structure by evolutionary conservation using Shannon entropy. Automatically runs MSA via MMseqs2, computes per-residue scores, and maps them onto the structure.
Instructions
Colors the structure by evolutionary conservation using Shannon entropy.
Runs a full pipeline: extracts the protein sequence from the loaded structure, submits it to an MMseqs2 server (ColabFold public API by default) for multiple sequence alignment, computes per-residue Shannon entropy, and maps the conservation scores onto the structure via the B-factor column and spectrum coloring.
Entropy scores are cached in memory by sequence, so changing the scale or re-running on the same protein does not require a repeat API call.
Magenta/blue = highly conserved (low entropy), white = moderate, cyan/green = highly variable (high entropy).
NOTE: The first call makes an external API call and may take 30 seconds to several minutes depending on the server and sequence length. Subsequent calls for the same sequence are instant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Specific chain ID to analyze. If None, uses the first protein chain found. | |
| scale | No | Color scaling mode. "relative" (default) maps the color gradient to the actual min/max entropy range of this protein, maximizing visual contrast. "absolute" uses the full theoretical entropy range (0 to log2(20)), useful when comparing conservation across different proteins. | relative |
| use_env | No | Search environmental databases in addition to UniRef (default True, gives deeper MSAs) | |
| obj_name | Yes | PyMOL object name (e.g. "1ubq") | |
| selection | No | PyMOL selection to analyze (default "all") | all |
| server_url | No | Override the MMseqs2 server URL (defaults to ColabFold public API, or MCPYMOL_MMSEQS_URL env var) | |
| force_refresh | No | If True, bypass the cache and re-fetch the MSA from the MMseqs2 server even if scores are cached. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |