Pymol_Tutorial_2: Specialized Tricks of Pymol for Visualization
Pymol is a powerful and versatile molecular visualization software that allows users to create high-quality 3D representations of molecular structures. Here are some specialized tricky and magical codes of Pymol. If you are new to Pymol, it is highly advised to practice Basic Pymol Tutorial. In case you are looking to learn structure editing in Pymol, please follow here.
1. Tricks Displaying secondary structure
The following code displays the secondary structure of a protein using a color code where alpha helices are red and beta sheets are yellow.
show cartoon
set cartoon_ring_mode, 3
set cartoon_ladder_mode, 1
set cartoon_fancy_helices, 1
color red, ss h
color yellow, ss s
2. Aligning structures
The following code aligns two structures based on their alpha carbons and displays the aligned structures in different colors.
align 1abc and chain A, 2xyz and chain B
color blue, 1abc
color green, 2xyz
3. Creating a surface representation
The following code creates a surface representation of a protein and colors it based on electrostatic potential.
show surface
set surface_color, electrostatic
4. Atom selection
The following code selects all atoms within a certain distance from a specific residue. In the following code, we use 5 angstroms.
select nearby_residues, resi 50 around 5
5. Measuring distances
The following code measures the distance between two selected atoms and displays it in the viewport.
distance hbond, name O and resi 50 and chain A, name HN and resi 100 and chain B
These are just a few examples of the many tricky and magical codes of Pymol. With some experimentation and practice, you can create stunning visualizations and perform complex analyses of molecular structures.
Comments
Post a Comment