The align_and_color_with_selection.py script is a PyMOL plugin designed to streamline the comparison of two structural models. It performs structural alignment, highlights differing residues, and creates selections for these residues, making it a valuable tool for structural biologists analyzing homologous structures or variants.
- Structural Alignment:
Aligns two structures using PyMOL's align function. Outputs the RMSD value to indicate the quality of alignment.
- Residue Comparison:
Compares the residue sequences of the two structures after alignment. Identifies residues that differ between the structures.
- Color Coding:
Colors differing residues in red and identical residues in green for visual clarity.
- Selection Creation:
Creates selections for the differing residues in each structure. Names the selections <structure_name>_diff_residues, allowing easy manipulation and visualization.
- User-Friendly Output:
Provides clear information about the alignment and residue differences. Warns if sequences are of different lengths, ensuring users are aware of potential issues.
Comparing structural homologs to identify key differences. Analyzing mutations or variations in protein models. Highlighting and selecting regions of interest for further analysis or visualization.
-
Load the script into PyMOL:
run path/to/align_and_color_with_selection.py
-
Ensure the two structures are loaded (e.g., model1 and model2).
-
Execute the command:
align_and_color_with_selection model1, model2
-
Differing residues will be colored and selections (model1_diff_residues, model2_diff_residues) will be created for easy reference.
This plugin enhances structural analysis workflows by combining alignment, visualization, and residue selection into a single, efficient process. It is especially useful for identifying functional or structural differences in protein complexes or homologous structures.
Example of the result: