Displaying Biochemical Properties: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
Line 22: Line 22:
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]


==Color by atom type from a script==
==Coloring ==
See also [[:Category:Coloring]]. 
 
===Color by atom type from a script===
See [[Color]] for this.
See [[Color]] for this.
===Assign color by B-factor===
See section [[Color]] for this.
   
   
==Displaying double bonds==
 
== Bonds ==
PyMOL can deduce bonds from the PDB structure file, even if the '''CONECT''' records are missing.  In fact, PyMOL guesses bonding connectivity based on proximity, based on the empirical observation that two atoms of a given radius will not be generally closer than a certain distance unless they are bonded.
 
===Displaying double bonds===
<gallery widths="300px" heights="300px">
<gallery widths="300px" heights="300px">
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].
Line 39: Line 49:
A higher value for valence spreads things out more. I don't know of a way to get the dotted notation.
A higher value for valence spreads things out more. I don't know of a way to get the dotted notation.


==Calculating dihedral angles==
===Hydrogen bonds and Polar Contacts===
The get_dihedral function requires four single-atom selections to work:
<source lang="python">
get_dihedral prot1///9/C, prot1///10/N, prot1///10/CA, prot1///10/C
</source>
 
 
==Hydrogen bonds and Polar Contacts==
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.
Line 65: Line 68:
emulate that used by DSSP.
emulate that used by DSSP.


=== Hydrogen bonds between specific atoms ===
==== Hydrogen bonds between specific atoms ====
<source lang="python">
<source lang="python">
dist name, sele1, sele2, mode=2
dist name, sele1, sele2, mode=2
Line 71: Line 74:




=== Hydrogen bonds where find->polar contacts doesn't do what you need ===
==== Hydrogen bonds where find->polar contacts doesn't do what you need ====
You can show H-bonds between two objects using atom selections so long as hydrogens are present in both molecules. If you don't have hydrogens, you can use [[h_add]] on the proteins, or provide ligands with valence information and then use h_add.
You can show H-bonds between two objects using atom selections so long as hydrogens are present in both molecules. If you don't have hydrogens, you can use [[h_add]] on the proteins, or provide ligands with valence information and then use h_add.


Line 125: Line 128:
The "polar contacts" mentioned above are probably better at finding hydrogen bonds than these scripts. "Polar contacts" check geometry as well as distance.
The "polar contacts" mentioned above are probably better at finding hydrogen bonds than these scripts. "Polar contacts" check geometry as well as distance.


==Assign color by B-factor==
 
See section [[Color]] for this.
==Calculating dihedral angles==
The get_dihedral function requires four single-atom selections to work:
<source lang="python">
get_dihedral prot1///9/C, prot1///10/N, prot1///10/CA, prot1///10/C
</source>
   
   
== Cavities ==
== Cavities ==
Line 186: Line 193:
<div style="clear:right;"> </div>
<div style="clear:right;"> </div>


==Displaying the C-Alpha trace of proteins==
 
== Backbones ==
===Displaying the C-Alpha trace of proteins===
<source lang="python">
<source lang="python">
hide
hide
Line 198: Line 207:
</source>
</source>


 
===Displaying the Amino Acid Backbone===
==Displaying the Amino Acid Backbone==
The easiest way to see the backbone of the protein is to do
The easiest way to see the backbone of the protein is to do
<source lang="python">
<source lang="python">
Line 213: Line 221:
You can replace '''sticks''' in the above by other representations like '''spheres''' or '''lines'''.
You can replace '''sticks''' in the above by other representations like '''spheres''' or '''lines'''.


==Displaying the Phosphate backbone of nucleic acids==
===Displaying the Phosphate backbone of nucleic acids===
 
====Native Nucleic Acid Rendering in PyMol====
====Native Nucleic Acid Rendering in PyMol====
PyMol now better supports viewing nucleic acid structure. [[Nuccyl]] still seems to be the reigning champ for image quality, but see PyMol's native [[Cartoon]] command.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.
PyMol now better supports viewing nucleic acid structure. [[Nuccyl]] still seems to be the reigning champ for image quality, but see PyMol's native [[Cartoon]] command.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.

Revision as of 08:56, 15 September 2008

Selecting secondary structures

A few examples:

select helix, (ss h)
select sheet, (ss s)
select loop, (ss l+'')

Manually Assigning Secondary Structure

You can manually assign secondary stuctures to your protein by

alter 96-103/, ss='S'
alter 96-103/, ss='H'
alter 96-103/, ss='L'

to set residues 96-103 to beta Strand, alpha Helix, and Loop respectively.

See Also

Dss Caver

FAQ Displaying Biochemical Properties

Coloring

See also Category:Coloring.

Color by atom type from a script

See Color for this.

Assign color by B-factor

See section Color for this.


Bonds

PyMOL can deduce bonds from the PDB structure file, even if the CONECT records are missing. In fact, PyMOL guesses bonding connectivity based on proximity, based on the empirical observation that two atoms of a given radius will not be generally closer than a certain distance unless they are bonded.

Displaying double bonds

You can go into the lines mode and turning on the valence display:

hide
as lines
set valence, 0.1

A higher value for valence spreads things out more. I don't know of a way to get the dotted notation.

Hydrogen bonds and Polar Contacts

Polar Contacts in PyMol

Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts. [A]->find->polar contacts-><select from menu>

The command behind the menus is the distance command called with the additional argument mode=2.

Parameters that control the the identification of H-bonds are defined as

set h_bond_cutoff_center, 3.6

with ideal geometry and

set h_bond_cutoff_edge, 3.2

with minimally acceptable geometry.

These settings can be changed *before* running the detection process (dist command mode=2 or via the menus).

Note that the hydrogen bond geometric criteria used in PyMOL was designed to emulate that used by DSSP.

Hydrogen bonds between specific atoms

dist name, sele1, sele2, mode=2


Hydrogen bonds where find->polar contacts doesn't do what you need

You can show H-bonds between two objects using atom selections so long as hydrogens are present in both molecules. If you don't have hydrogens, you can use h_add on the proteins, or provide ligands with valence information and then use h_add.

Two examples are below. For clarity, they draw dashes between the heavy atoms and hide the hydrogens.

# EXAMPLE 1: Show hydrogen bonds between protein 
# and docked ligands (which must have hydrogens)

load target.pdb,prot
load docked_ligs.sdf,lig

# add hydrogens to protein

h_add prot

select don, (elem n,o and (neighbor hydro))
select acc, (elem o or (elem n and not (neighbor hydro)))
dist HBA, (lig and acc),(prot and don), 3.2
dist HBD, (lig and don),(prot and acc), 3.2
delete don
delete acc
hide (hydro)

hide labels,HBA
hide labels,HBD
# EXAMPLE 2
# Show hydrogen bonds between two proteins

load prot1.pdb
load prot2.pdb

h_add prot1
h_add prot2

select don, (elem n,o and (neighbor hydro))
select acc, (elem o or (elem n and not (neighbor hydro)))
dist HBA, (prot1 and acc),(prot2 and don), 3.2
dist HBD, (prot1 and don),(prot2 and acc), 3.2
delete don
delete acc
hide (hydro)

hide labels,HBA
hide labels,HBD

# NOTE: that you could also use this approach between two
# non-overlapping selections within a single object.

There is also a script drawing nice hydrogen bonds from Gareth Stockwell.

The "polar contacts" mentioned above are probably better at finding hydrogen bonds than these scripts. "Polar contacts" check geometry as well as distance.


Calculating dihedral angles

The get_dihedral function requires four single-atom selections to work:

get_dihedral prot1///9/C, prot1///10/N, prot1///10/CA, prot1///10/C

Cavities

See Surfaces_and_Voids. Also Caver and CASTp.

Surface-Related

Surface Area

To calculate the surface area of a selection, see Get_Area.

Polar surface area

For a solvent accessible PSA approximation:

set dot_density, 3
remove hydro
remove solvent
show dots
set dot_solvent, on
get_area elem N+O
get_area elem C+S
get_area all

For molecular PSA approximation

set dot_density, 3
remove hydro
remove solvent
set dot_solvent, off
get_area elem N+O
get_area elem C+S
get_area all

Showing dots isn't mandatory, but it's a good idea to confirm that you're getting the value for the atom dot surface you think you're using. Please realize that the resulting numbers are only approximate, reflecting the sum of partial surface areas for all the dots you see. To increase accuracy, set dot_density to 4, but be prepared to wait...

Display solvent accessible surface

Using the surface display mode, PyMOL doesn't show the solvent accessible surface, rather it shows the solvent/protein contact surface. The solvent accessible surface area is usually defined as the surface traced out by the center of a water sphere, having a radius of about 1.4 angstroms, rolled over the protein atoms. The contact surface is the surface traced out by the vdw surfaces of the water atoms when in contact with the protein.

PyMOL can only show solvent accessible surfaces using the dot or sphere representations:

for dots:

show dots
set dot_mode,1
set dot_density,3

for spheres:

alter all,vdw=vdw+1.4
show spheres

Contact Potential

See Protein_contact_potential and APBS.

Prot contact pot.png


Backbones

Displaying the C-Alpha trace of proteins

hide
show ribbon
set ribbon_sampling,1

And if your model only contains CA atoms, you'll also need to issue:

set ribbon_trace,1

Displaying the Amino Acid Backbone

The easiest way to see the backbone of the protein is to do

hide all
show ribbon

If you don't like the ribbon representation, you can also do something like

hide all
show sticks, name C+O+N+CA

You can replace sticks in the above by other representations like spheres or lines.

Displaying the Phosphate backbone of nucleic acids

Native Nucleic Acid Rendering in PyMol

PyMol now better supports viewing nucleic acid structure. Nuccyl still seems to be the reigning champ for image quality, but see PyMol's native Cartoon command. For more information on representing nucleic acids, please see the Nucleic Acids Category.

Cnam 0.png

Should you ever want to show the phosphate trace of a nucleic acid molecule:

def p_trace(selection="(all)"):
    s = str(selection)
    cmd.hide('lines',"("+s+")")
    cmd.hide('spheres',"("+s+")")
    cmd.hide('sticks',"("+s+")")
    cmd.hide('ribbon',"("+s+")")
    cmd.show('cartoon',"("+s+")")
    cmd.set('cartoon_sampling',1,"("+s+")")
    cmd.set('cartoon_tube_radius',0.5,"("+s+")")
cmd.extend('p_trace',p_trace)

and then:

p_trace (selection)

Align proteins with CA fit

If two proteins have significant homology, you can use the Align command:

align prot1////ca,prot2

which will perform a sequence alignment of prot1 against prot2, and then an optimizing fit using the CA positions. I'm not sure if the help text for align got into 0.82, but the next version will definitely have it.