<?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=Dehurt</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=Dehurt"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Dehurt"/>
	<updated>2026-05-30T17:36:33Z</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=8211</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=8211"/>
		<updated>2009-12-04T18:54:11Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Representation-independent color control */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface#Representation-independent Color Control]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[Surface#Representation-independent Color Control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8210</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=8210"/>
		<updated>2009-12-04T18:53:22Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[Surface#Representation-independent Color Control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8209</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=8209"/>
		<updated>2009-12-04T18:51:47Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[#Representation-independent Color Control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8208</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=8208"/>
		<updated>2009-12-04T18:46:39Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|right]]&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[Representation-independent Color Control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8207</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=8207"/>
		<updated>2009-12-04T18:46:16Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|right]]&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[===Representation-independent Color Control===]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8206</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=8206"/>
		<updated>2009-12-04T18:44:03Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Coloring */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|right]]&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[representation-independent color control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8205</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=8205"/>
		<updated>2009-12-04T18:42:00Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|right]]&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[representation-independent color control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Solvent-accessible_surface.jpg&amp;diff=2812</id>
		<title>File:Solvent-accessible surface.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Solvent-accessible_surface.jpg&amp;diff=2812"/>
		<updated>2009-12-04T18:38:48Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: uploaded a new version of &amp;quot;File:Solvent-accessible surface.jpg&amp;quot;:&amp;amp;#32;Solvent-accessible surface example. Note the crystallographic waters and detergent touching the boundary of the probe-inflated surface.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Solvent-accessible surface example. Note the crystallographic waters and detergent touching the boundary of the probe-inflated surface.&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Solvent-accessible_surface.jpg&amp;diff=2811</id>
		<title>File:Solvent-accessible surface.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Solvent-accessible_surface.jpg&amp;diff=2811"/>
		<updated>2009-12-04T18:35:44Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: Solvent-accessible surface example. Note the crystallographic waters and detergent touching the boundary of the probe-inflated surface.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Solvent-accessible surface example. Note the crystallographic waters and detergent touching the boundary of the probe-inflated surface.&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5652</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5652"/>
		<updated>2009-12-04T18:34:07Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5651</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5651"/>
		<updated>2009-12-04T18:33:59Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5650</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5650"/>
		<updated>2009-12-04T18:33:44Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5649</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5649"/>
		<updated>2009-12-04T18:33:25Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5648</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5648"/>
		<updated>2009-12-04T18:33:08Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|right]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5647</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5647"/>
		<updated>2009-12-04T18:32:44Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|right]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5646</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5646"/>
		<updated>2009-12-04T18:31:12Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
[[File:Representation independent color control.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Representation_independent_color_control.jpg&amp;diff=2252</id>
		<title>File:Representation independent color control.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Representation_independent_color_control.jpg&amp;diff=2252"/>
		<updated>2009-12-04T18:29:56Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5645</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5645"/>
		<updated>2009-12-04T18:28:29Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface a different color than the underlying cartoon or ligands, first duplicate the object and change the colors accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5644</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5644"/>
		<updated>2009-12-04T18:25:48Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Displaying a protein as surface with a ligand as sticks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5643</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5643"/>
		<updated>2009-12-04T18:25:30Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Displaying a protein as surface with a ligand as sticks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5642</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5642"/>
		<updated>2009-12-04T18:24:42Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Displaying a protein as surface with a ligand as sticks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
- Load your protein&lt;br /&gt;
- Select the ligand &lt;br /&gt;
- Create a separate object for the ligand &lt;br /&gt;
- Remove ligand atoms from the protein&lt;br /&gt;
- Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
- Load the protein&lt;br /&gt;
- S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
- S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=8204</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=8204"/>
		<updated>2009-12-04T18:15:43Z</updated>

		<summary type="html">&lt;p&gt;Dehurt: /* Display solvent accessible surface */&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;
&amp;lt;source lang=&amp;quot;python&amp;quot;&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'&lt;br /&gt;
&amp;lt;/source&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;
[[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &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;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&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;
as 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;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds 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 [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&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;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
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.&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 [http://www.ebi.ac.uk/~gareth/pymol/downloads/scripts/hbond.py script] drawing nice hydrogen bonds from [http://www.ebi.ac.uk/~gareth 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;
==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;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&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 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;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&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 surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem C))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&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;
===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;
====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.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;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 [[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;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Dehurt</name></author>
	</entry>
</feed>