<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Basiliscus</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Basiliscus"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Basiliscus"/>
	<updated>2026-04-21T15:00:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8180</id>
		<title>Displaying Biochemical Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8180"/>
		<updated>2007-09-11T17:17:22Z</updated>

		<summary type="html">&lt;p&gt;Basiliscus: I think &amp;quot;Adding Hydrogen Bonds&amp;quot; and &amp;quot;Polar Contacts&amp;quot; should be merged.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Selecting secondary structures==&lt;br /&gt;
A few examples:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 select helix, (ss h)&lt;br /&gt;
 select sheet, (ss s)&lt;br /&gt;
 select loop, (ss l+'')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Manually Assigning Secondary Structure===&lt;br /&gt;
You can manually assign secondary stuctures to your protein by&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 alter 96-103/, ss='S'&lt;br /&gt;
 alter 96-103/, ss='H'&lt;br /&gt;
 alter 96-103/, ss='L'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to set residues 96-103 to beta Strand, alpha Helix, and Loop respectively.&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[[Cmd dss]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Color by atom type from a script==&lt;br /&gt;
See [[Color]] for this.&lt;br /&gt;
 &lt;br /&gt;
==Displaying double bonds==&lt;br /&gt;
You can go into the lines mode and turning on the valence display:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide&lt;br /&gt;
show lines&lt;br /&gt;
set valence, 0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A higher value for valence spreads things out more. I don't know of a way to get the dotted notation.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Calculating dihedral angles==&lt;br /&gt;
The get_dihedral function requires four single-atom selections to work:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
get_dihedral prot1///9/C, prot1///10/N, prot1///10/CA, prot1///10/C&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Contacts==&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the PyMol menus one may display Polar Contacts.  These are defined as&lt;br /&gt;
 set h_bond_cutoff_center, 3.6&lt;br /&gt;
with ideal geometry and&lt;br /&gt;
 set h_bond_cutoff_edge, 3.2&lt;br /&gt;
with minimally acceptable geometry.&lt;br /&gt;
&lt;br /&gt;
These settings can be changed *before* running the detection process (dist&lt;br /&gt;
command mode=2 or via the menus).&lt;br /&gt;
&lt;br /&gt;
Note that the hydrogen bond geometric criteria used in PyMOL was designed to&lt;br /&gt;
emulate that used by DSSP.&lt;br /&gt;
&lt;br /&gt;
==Adding hydrogen bonds==&lt;br /&gt;
Regarding H-bonds. There isn't a built-in function yet, but 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 [[Cmd h_add]] on the proteins, or provide ligands with valence information and then use h_add.&lt;br /&gt;
&lt;br /&gt;
Two examples are below. For clarity, they draw dashes between the heavy atoms and hide the hydrogens.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE 1: Show hydrogen bonds between protein &lt;br /&gt;
# and docked ligands (which must have hydrogens)&lt;br /&gt;
&lt;br /&gt;
load target.pdb,prot&lt;br /&gt;
load docked_ligs.sdf,lig&lt;br /&gt;
&lt;br /&gt;
# add hydrogens to protein&lt;br /&gt;
&lt;br /&gt;
h_add prot&lt;br /&gt;
&lt;br /&gt;
select don, (elem n,o and (neighbor hydro))&lt;br /&gt;
select acc, (elem o or (elem n and not (neighbor hydro)))&lt;br /&gt;
dist HBA, (lig and acc),(prot and don), 3.2&lt;br /&gt;
dist HBD, (lig and don),(prot and acc), 3.2&lt;br /&gt;
delete don&lt;br /&gt;
delete acc&lt;br /&gt;
hide (hydro)&lt;br /&gt;
&lt;br /&gt;
hide labels,HBA&lt;br /&gt;
hide labels,HBD&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE 2&lt;br /&gt;
# Show hydrogen bonds between two proteins&lt;br /&gt;
&lt;br /&gt;
load prot1.pdb&lt;br /&gt;
load prot2.pdb&lt;br /&gt;
&lt;br /&gt;
h_add prot1&lt;br /&gt;
h_add prot2&lt;br /&gt;
&lt;br /&gt;
select don, (elem n,o and (neighbor hydro))&lt;br /&gt;
select acc, (elem o or (elem n and not (neighbor hydro)))&lt;br /&gt;
dist HBA, (prot1 and acc),(prot2 and don), 3.2&lt;br /&gt;
dist HBD, (prot1 and don),(prot2 and acc), 3.2&lt;br /&gt;
delete don&lt;br /&gt;
delete acc&lt;br /&gt;
hide (hydro)&lt;br /&gt;
&lt;br /&gt;
hide labels,HBA&lt;br /&gt;
hide labels,HBD&lt;br /&gt;
&lt;br /&gt;
# NOTE: that you could also use this approach between two&lt;br /&gt;
# non-overlapping selections within a single object.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is also a script drawing nice hydrogen bonds from Gareth Stockwell&lt;br /&gt;
&lt;br /&gt;
(The &amp;quot;polar contacts&amp;quot; mentioned above are probably better at finding hydrogen bonds than these scripts. &amp;quot;Polar contacts&amp;quot; check geometry as well as distance.)&lt;br /&gt;
&lt;br /&gt;
=== Easy Hydrogen Bonds ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
dist name, sele1, sele2, mode=2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assign color by B-factor==&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
 &lt;br /&gt;
==Polar surface area==&lt;br /&gt;
For a solvent accessible PSA approximation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
remove hydro&lt;br /&gt;
remove solvent&lt;br /&gt;
show dots&lt;br /&gt;
set dot_solvent, on&lt;br /&gt;
get_area elem N+O&lt;br /&gt;
get_area elem C+S&lt;br /&gt;
get_area all&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For molecular PSA approximation&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
remove hydro&lt;br /&gt;
remove solvent&lt;br /&gt;
set dot_solvent, off&lt;br /&gt;
get_area elem N+O&lt;br /&gt;
get_area elem C+S&lt;br /&gt;
get_area all&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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...&lt;br /&gt;
 &lt;br /&gt;
==Display solvent accessible surface==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
PyMOL can only show solvent accessible surfaces using the dot or sphere representations:&lt;br /&gt;
&lt;br /&gt;
for dots:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
show dots&lt;br /&gt;
set dot_mode,1&lt;br /&gt;
set dot_density,3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for spheres:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter all,vdw=vdw+1.4&lt;br /&gt;
show spheres&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Displaying the C-Alpha trace of proteins==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide&lt;br /&gt;
show ribbon&lt;br /&gt;
set ribbon_sampling,1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if your model only contains CA atoms, you'll also need to issue:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ribbon_trace,1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Displaying the Amino Acid Backbone==&lt;br /&gt;
The easiest way to see the backbone of the protein is to do&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide all&lt;br /&gt;
show ribbon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't like the ribbon representation, you can also do something like&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide all&lt;br /&gt;
show sticks, name C+O+N+CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can replace '''sticks''' in the above by other representations like '''spheres''' or '''lines'''.&lt;br /&gt;
&lt;br /&gt;
==Displaying the Phosphate backbone of nucleic acids==&lt;br /&gt;
&lt;br /&gt;
====Native Nucleic Acid Rendering in PyMol====&lt;br /&gt;
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.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Should you ever want to show the phosphate trace of a nucleic acid molecule:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def p_trace(selection=&amp;quot;(all)&amp;quot;):&lt;br /&gt;
    s = str(selection)&lt;br /&gt;
    cmd.hide('lines',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('spheres',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('sticks',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('ribbon',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.show('cartoon',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.set('cartoon_sampling',1,&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.set('cartoon_tube_radius',0.5,&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
cmd.extend('p_trace',p_trace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
p_trace (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Align proteins with CA fit==&lt;br /&gt;
If two proteins have significant homology, you can use the [[Cmd align]] command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align prot1////ca,prot2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;/div&gt;</summary>
		<author><name>Basiliscus</name></author>
	</entry>
</feed>