<?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=Jaredsampson</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=Jaredsampson"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Jaredsampson"/>
	<updated>2026-05-14T12:12:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Set_Color&amp;diff=14636</id>
		<title>Set Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Set_Color&amp;diff=14636"/>
		<updated>2019-10-02T17:38:15Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Add link to missing set_object_color command page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Set_Color]] defines a new color with color indices (0.0-1.0). Numbers between 0 an 255 can be used as well. (If at least one value is larger than 1, pymol will interpret all 3 values as between 0 and 255). If an existing color name is used, the old color will be overridden. &lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color name, [ red-float, green-float, blue-float ]&lt;br /&gt;
set_color name = [ red-float, green-float, blue-float ]  #(DEPRECATED)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_color( string name, float-list rgb )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;set_color red, [1,0.01,0.01]&lt;br /&gt;
 Color: &amp;quot;red&amp;quot; defined as [ 1.000, 0.010, 0.010 ].&lt;br /&gt;
PyMOL&amp;gt;set_color khaki, [195,176,145]&lt;br /&gt;
 Color: &amp;quot;khaki&amp;quot; defined as [ 0.765, 0.690, 0.569 ].&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These will be added to the end of the list of Pymol's color indices that you can view the [[Get Color Indices]] command.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
* [[set_object_color]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Set Color]]&lt;br /&gt;
[[Category:Coloring|Set Color]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:4gms_colors.png&amp;diff=14413</id>
		<title>File:4gms colors.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:4gms_colors.png&amp;diff=14413"/>
		<updated>2018-12-06T04:07:14Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: formatting for script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Prepared in response to a pymol-users thread from 11/30/2018-12/5/2018 about the appearance of transparency in a published figure.&lt;br /&gt;
&lt;br /&gt;
Script to reproduce:&lt;br /&gt;
&lt;br /&gt;
 bg_color white&lt;br /&gt;
 fetch 4gms, async=0&lt;br /&gt;
 &lt;br /&gt;
 # hemagglutinin selections&lt;br /&gt;
 select ha, chain A&lt;br /&gt;
 select l130, ha and resi 133-138&lt;br /&gt;
 select l150, ha and resi 155-163&lt;br /&gt;
 select h190, ha and resi 187-196&lt;br /&gt;
 select l220, ha and resi 225-228&lt;br /&gt;
 select loops, l130 or l150 or h190 or l220&lt;br /&gt;
 &lt;br /&gt;
 # antibody selection&lt;br /&gt;
 select h2, chain H and resi 51-59&lt;br /&gt;
 deselect&lt;br /&gt;
 &lt;br /&gt;
 # basic view&lt;br /&gt;
 hide everything&lt;br /&gt;
 as cartoon, ha&lt;br /&gt;
 as cartoon, h2&lt;br /&gt;
 cartoon tube&lt;br /&gt;
 &lt;br /&gt;
 # colors&lt;br /&gt;
 color orange, h2&lt;br /&gt;
 color palecyan, ha&lt;br /&gt;
 color deepteal, loops&lt;br /&gt;
 &lt;br /&gt;
 set_view (\&lt;br /&gt;
     -0.718157351,    0.514449000,   -0.468602538,\&lt;br /&gt;
     -0.667115033,   -0.317360103,    0.673974276,\&lt;br /&gt;
      0.198008969,    0.796632588,    0.571111977,\&lt;br /&gt;
      0.000045628,   -0.000060942,  -75.169761658,\&lt;br /&gt;
     20.388980865,  -23.567779541,   38.543788910,\&lt;br /&gt;
     52.026283264,   98.326217651,  -20.000000000 )&lt;br /&gt;
 &lt;br /&gt;
 set ray_opaque_background, 1&lt;br /&gt;
 png 4gms_colors.png, height=800, width=800, ray=1&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:4gms_colors.png&amp;diff=14412</id>
		<title>File:4gms colors.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:4gms_colors.png&amp;diff=14412"/>
		<updated>2018-12-06T04:04:52Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Prepared in response to a pymol-users thread from 11/30/2018-12/5/2018 about the appearance of transparency in a published figure.

Script to reproduce:

bg_color white
fetch 4gms, async=0

# hemagglutinin selections
select ha, chain A
select l130, ha...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Prepared in response to a pymol-users thread from 11/30/2018-12/5/2018 about the appearance of transparency in a published figure.&lt;br /&gt;
&lt;br /&gt;
Script to reproduce:&lt;br /&gt;
&lt;br /&gt;
bg_color white&lt;br /&gt;
fetch 4gms, async=0&lt;br /&gt;
&lt;br /&gt;
# hemagglutinin selections&lt;br /&gt;
select ha, chain A&lt;br /&gt;
select l130, ha and resi 133-138&lt;br /&gt;
select l150, ha and resi 155-163&lt;br /&gt;
select h190, ha and resi 187-196&lt;br /&gt;
select l220, ha and resi 225-228&lt;br /&gt;
select loops, l130 or l150 or h190 or l220&lt;br /&gt;
&lt;br /&gt;
# antibody selection&lt;br /&gt;
select h2, chain H and resi 51-59&lt;br /&gt;
deselect&lt;br /&gt;
&lt;br /&gt;
# basic view&lt;br /&gt;
hide everything&lt;br /&gt;
as cartoon, ha&lt;br /&gt;
as cartoon, h2&lt;br /&gt;
cartoon tube&lt;br /&gt;
&lt;br /&gt;
# colors&lt;br /&gt;
color orange, h2&lt;br /&gt;
color palecyan, ha&lt;br /&gt;
color deepteal, loops&lt;br /&gt;
&lt;br /&gt;
set_view (\&lt;br /&gt;
    -0.718157351,    0.514449000,   -0.468602538,\&lt;br /&gt;
    -0.667115033,   -0.317360103,    0.673974276,\&lt;br /&gt;
     0.198008969,    0.796632588,    0.571111977,\&lt;br /&gt;
     0.000045628,   -0.000060942,  -75.169761658,\&lt;br /&gt;
    20.388980865,  -23.567779541,   38.543788910,\&lt;br /&gt;
    52.026283264,   98.326217651,  -20.000000000 )&lt;br /&gt;
&lt;br /&gt;
set ray_opaque_background, 1&lt;br /&gt;
png 4gms_colors.png, height=800, width=800, ray=1&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:MAC_Install&amp;diff=14397</id>
		<title>Talk:MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:MAC_Install&amp;diff=14397"/>
		<updated>2018-10-08T17:15:11Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Package managers */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This needs a contribution from someone with experience with stereo on a mac.  I have none.&lt;br /&gt;
&lt;br /&gt;
== Package managers ==&lt;br /&gt;
&lt;br /&gt;
Does anyone still use Fink or MacPorts for PyMOL?  Just curious.  I don't hear about them much anymore (but admittedly this may be confirmation bias).  -Jared&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=14400</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=14400"/>
		<updated>2018-10-08T17:05:05Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Pre-compiled */ Make Homebrew the recommended package manager&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Mac OS X.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
Installation: Drag '''PyMOL.app''' on the '''/Applications''' shortcut. (In principle, you could drag it into any Finder window and run it from there, it doesn’t have to live in /Applications).&lt;br /&gt;
&lt;br /&gt;
Uninstallation: Move '''/Applications/PyMOL.app''' to Trash&lt;br /&gt;
&lt;br /&gt;
=== Launching from Command Line ===&lt;br /&gt;
&lt;br /&gt;
The unix executable resides at '''/Applications/PyMOL.app/Contents/MacOS/PyMOL'''&lt;br /&gt;
&lt;br /&gt;
=== X11 Hybrid ===&lt;br /&gt;
&lt;br /&gt;
''Applies to PyMOL 1.x, not to PyMOL 2.x''&lt;br /&gt;
&lt;br /&gt;
MacPyMOL can optionally run with the same two-window GUI which PyMOL uses on Windows and Linux. This GUI has some additional features, like the [[Plugins|Plugin]] menu and the [[Builder]].&lt;br /&gt;
&lt;br /&gt;
Requires [http://xquartz.macosforge.org/ XQuartz].&lt;br /&gt;
&lt;br /&gt;
There are two ways to launch the X11 interface:&lt;br /&gt;
# Rename or copy/duplicate '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app''' or to '''/Applications/PyMOLX11Hybrid.app'''&lt;br /&gt;
# Launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
=== Stereo on Second Monitor ===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' [https://sourceforge.net/p/pymol/mailman/message/11671952/ Warren DeLano; PyMOL Users Archive]&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
=== Package managers ===&lt;br /&gt;
&lt;br /&gt;
Open-Source PyMOL is available [https://github.com/schrodinger/pymol-open-source/blob/master/LICENSE free of charge] and may be readily installed via the [http://brew.sh/ Homebrew] (recommended), [https://www.macports.org/ MacPorts], or [http://www.finkproject.org/ Fink] package managers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Homebrew (recommended)&lt;br /&gt;
brew install brewsci/bio/pymol&lt;br /&gt;
&lt;br /&gt;
# Fink&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need to make sure that the dependencies are installed with the required flags, e.g. for MacPorts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install tcl -corefoundation&lt;br /&gt;
sudo port install tk -quartz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If PyMOL complains that it wasn't able to find X11, try starting xquartz first, then run pymol from the console.&lt;br /&gt;
&lt;br /&gt;
=== Install from Source ===&lt;br /&gt;
&lt;br /&gt;
If you want the latest PyMOL code (warning: might include experimental changes), then follow the [[Linux_Install#Install_from_source|Linux installation instructions]]. You will need an environment like Fink, MacPorts or Homebrew to install the dependencies. Make sure you use the appropriate python interpreter (e.g. '''/sw/bin/python2.7''' when using Fink).&lt;br /&gt;
&lt;br /&gt;
To run PyMOL with a native PyQt library (linked against macOS OpenGL framework, not against XQuartz), it needs to be built with the &amp;lt;code&amp;gt;--osx-frameworks&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py --osx-frameworks install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install APBS with Fink ===&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=== Stereo issues ===&lt;br /&gt;
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`.  You can also set up an alias in your ~/.profile:&lt;br /&gt;
&lt;br /&gt;
 alias pymol='pymol -M'&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[Windows Install]]&lt;br /&gt;
* [[MovieSchool_6#Exporting_your_Movie|FreeMOL installation for MPEG movie export]]&lt;br /&gt;
* [[User:Wgscott|Bill Scott’s]] [[MacOSX-specific .pymolrc file]] and his crystallographic software [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
* [[Launching_PyMOL#MacOS_X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Mac]]&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=14399</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=14399"/>
		<updated>2018-10-08T17:01:48Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Pre-compiled */ Update Homebrew info to reflect new location of PyMOL formula and no more need for flags in dependencies.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Mac OS X.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
Installation: Drag '''PyMOL.app''' on the '''/Applications''' shortcut. (In principle, you could drag it into any Finder window and run it from there, it doesn’t have to live in /Applications).&lt;br /&gt;
&lt;br /&gt;
Uninstallation: Move '''/Applications/PyMOL.app''' to Trash&lt;br /&gt;
&lt;br /&gt;
=== Launching from Command Line ===&lt;br /&gt;
&lt;br /&gt;
The unix executable resides at '''/Applications/PyMOL.app/Contents/MacOS/PyMOL'''&lt;br /&gt;
&lt;br /&gt;
=== X11 Hybrid ===&lt;br /&gt;
&lt;br /&gt;
''Applies to PyMOL 1.x, not to PyMOL 2.x''&lt;br /&gt;
&lt;br /&gt;
MacPyMOL can optionally run with the same two-window GUI which PyMOL uses on Windows and Linux. This GUI has some additional features, like the [[Plugins|Plugin]] menu and the [[Builder]].&lt;br /&gt;
&lt;br /&gt;
Requires [http://xquartz.macosforge.org/ XQuartz].&lt;br /&gt;
&lt;br /&gt;
There are two ways to launch the X11 interface:&lt;br /&gt;
# Rename or copy/duplicate '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app''' or to '''/Applications/PyMOLX11Hybrid.app'''&lt;br /&gt;
# Launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
=== Stereo on Second Monitor ===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' [https://sourceforge.net/p/pymol/mailman/message/11671952/ Warren DeLano; PyMOL Users Archive]&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
=== Pre-compiled ===&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Open-Source PyMOL is available [https://github.com/schrodinger/pymol-open-source/blob/master/LICENSE free of charge] with the [https://www.macports.org/ MacPorts], [http://www.finkproject.org/ Fink] and [http://brew.sh/ Homebrew] environments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Fink&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
# Homebrew&lt;br /&gt;
brew install brewsci/bio/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need to make sure that the dependencies are installed with the required flags, e.g. for MacPorts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install tcl -corefoundation&lt;br /&gt;
sudo port install tk -quartz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If PyMOL complains that it wasn't able to find X11, try starting xquartz first, then run pymol from the console.&lt;br /&gt;
&lt;br /&gt;
=== Install from Source ===&lt;br /&gt;
&lt;br /&gt;
If you want the latest PyMOL code (warning: might include experimental changes), then follow the [[Linux_Install#Install_from_source|Linux installation instructions]]. You will need an environment like Fink, MacPorts or Homebrew to install the dependencies. Make sure you use the appropriate python interpreter (e.g. '''/sw/bin/python2.7''' when using Fink).&lt;br /&gt;
&lt;br /&gt;
To run PyMOL with a native PyQt library (linked against macOS OpenGL framework, not against XQuartz), it needs to be built with the &amp;lt;code&amp;gt;--osx-frameworks&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py --osx-frameworks install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install APBS with Fink ===&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=== Stereo issues ===&lt;br /&gt;
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`.  You can also set up an alias in your ~/.profile:&lt;br /&gt;
&lt;br /&gt;
 alias pymol='pymol -M'&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[Windows Install]]&lt;br /&gt;
* [[MovieSchool_6#Exporting_your_Movie|FreeMOL installation for MPEG movie export]]&lt;br /&gt;
* [[User:Wgscott|Bill Scott’s]] [[MacOSX-specific .pymolrc file]] and his crystallographic software [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
* [[Launching_PyMOL#MacOS_X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Mac]]&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Isomesh&amp;diff=14278</id>
		<title>Isomesh</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Isomesh&amp;diff=14278"/>
		<updated>2018-03-08T17:19:21Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* USAGE */  add units for &amp;quot;level&amp;quot; parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''isomesh''' creates a mesh isosurface object from a map object.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 isomesh name, map, level [,(selection) [,buffer [,state [,carve ]]]] &lt;br /&gt;
&lt;br /&gt;
*name = the name for the new mesh isosurface object.&lt;br /&gt;
*map = the name of the map object to use for computing the mesh.&lt;br /&gt;
*level = the contour level (in sigma units)&lt;br /&gt;
*selection = an atom selection about which to display the mesh with an additional &amp;quot;buffer&amp;quot; (if provided).&lt;br /&gt;
*state = the state into which the object should be loaded (default=1) (set state=0 to append new mesh as a new state)&lt;br /&gt;
*carve = a radius about each atom in the selection for which to include density. If &amp;quot;carve&amp;quot; is not provided, then the whole brick is displayed.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load the map&lt;br /&gt;
load mymap.xplor, themap&lt;br /&gt;
# view the isomesh map&lt;br /&gt;
isomesh themapobject, themap, 2.0, site, carve=1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Image:Isomesh_ex1.png|thumb|right|300px|Output from the 2nd example]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# create fake map for demo&lt;br /&gt;
load $TUT/1hpv.pdb&lt;br /&gt;
&lt;br /&gt;
# set b and q for all atoms&lt;br /&gt;
alter all, b=10&lt;br /&gt;
alter all, q=1&lt;br /&gt;
&lt;br /&gt;
# make a new map&lt;br /&gt;
map_new fake_map, gaussian, 0.5, all&lt;br /&gt;
&lt;br /&gt;
# carved brick&lt;br /&gt;
isomesh carved, fake_map, 1.0, resi 200, carve=2.1&lt;br /&gt;
&lt;br /&gt;
color marine, carved&lt;br /&gt;
&lt;br /&gt;
# normal brick&lt;br /&gt;
isomesh normal, fake_map, 1.0, resi 200, 2.1&lt;br /&gt;
&lt;br /&gt;
orient resi 200&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
====USAGE====&lt;br /&gt;
If the mesh object already exists, then the new mesh will be appended onto the object as a new state (unless you indicate a state).&lt;br /&gt;
&lt;br /&gt;
*state &amp;gt; 0: specific state&lt;br /&gt;
*state = 0: all states&lt;br /&gt;
*state = -1: current state&lt;br /&gt;
&lt;br /&gt;
*source_state &amp;gt; 0: specific state&lt;br /&gt;
*source_state = 0: include all states starting with 0&lt;br /&gt;
*source_state = -1: current state&lt;br /&gt;
*source_state = -2: last state in map&lt;br /&gt;
&lt;br /&gt;
====MAP AROUND THE CENTER====&lt;br /&gt;
&lt;br /&gt;
You can create mesh around the center of the view by specifying &amp;quot;center&amp;quot; as the selection argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
isomesh normal, fake_map, 1.0, center&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====MAP OUTSIDE THE CALCULATED AREA====&lt;br /&gt;
&lt;br /&gt;
When [[map_auto_expand_sym]] is ON, you can create mesh beyond the precalculated volume. In this&lt;br /&gt;
case, symmetry information (lattice constants, space group) of the model specified in the selection &lt;br /&gt;
argument if available, or (new in 1.7) from the map object.&lt;br /&gt;
&lt;br /&gt;
====MAP LEVELS====&lt;br /&gt;
* Generally speaking there is some ambiguity with visualization tools as to how map data is to treated:  Some map file formats are normalized by convention (in the file data itself) and others do not.  Some visualization tools automatically normalize maps upon reading, others do not.  PyMOL's default behavior is dependent upon map file type: CCP4 and O/BRIX/DSN6 maps are automatically normalized upon reading (disable via '''normalize_*''' settings), other maps types are not.  PyMOL's normalization is a straight statistical average of all map points -- this may or may not be what you want.   If migrating to PyMOL from another tool, then it is definitely worth comparing how the maps are being represented by creating an equivalent figure in both, making sure that they match, and if they do not, then figuring out why not. ''From the PyMOL list.  Author: Warren DeLano.''&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
*[[isodot]]&lt;br /&gt;
*[[load]]&lt;br /&gt;
*[[fetch]]&lt;br /&gt;
*[[dynamic_mesh]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Isomesh]]&lt;br /&gt;
[[Category:States|Isomesh]]&lt;br /&gt;
[[Category:Electron_Density]]&lt;br /&gt;
[[Category:Maps]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14187</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14187"/>
		<updated>2017-11-15T19:21:03Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Download the script and run locally */ Add a &amp;quot;run from Github&amp;quot; example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Import as a module ===&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module, call the &amp;lt;code&amp;gt;set_colors()&amp;lt;/code&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color cb_red, myObject&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;code&amp;gt;cb_&amp;lt;/code&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color yellow, myOtherObject   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;code&amp;gt;grays&amp;lt;/code&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a `cb_colors` menu to the OpenGL GUI (see screenshot)&lt;br /&gt;
# This will also add the colors if `set_colors()` hasn't yet been run.&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the latest version of the script from Github ===&lt;br /&gt;
&lt;br /&gt;
In a PyMOL session, run at the command line:&lt;br /&gt;
&lt;br /&gt;
 run https://github.com/Pymol-Scripts/Pymol-script-repo/raw/master/colorblindfriendly.py&lt;br /&gt;
&lt;br /&gt;
This will add all the colors as well as the OpenGL menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Download the script and run locally ===&lt;br /&gt;
&lt;br /&gt;
Save the script from the link in the box at the top right to your computer.&lt;br /&gt;
&lt;br /&gt;
In a PyMOL session, run at the command line:&lt;br /&gt;
&lt;br /&gt;
 run /path/to/colorblindfriendly.py&lt;br /&gt;
&lt;br /&gt;
This will add all the colors as well as the OpenGL menu.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; GUI menu (generated by the &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function) requires PyMOL 1.6.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14143</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14143"/>
		<updated>2017-10-26T20:08:59Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Usage */ Add instructions for running as dowloaded script.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Import as a module ===&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module, call the &amp;lt;code&amp;gt;set_colors()&amp;lt;/code&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color cb_red, myObject&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;code&amp;gt;cb_&amp;lt;/code&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color yellow, myOtherObject   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;code&amp;gt;grays&amp;lt;/code&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a `cb_colors` menu to the OpenGL GUI (see screenshot)&lt;br /&gt;
# This will also add the colors if `set_colors()` hasn't yet been run.&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download the script and run locally ===&lt;br /&gt;
&lt;br /&gt;
Save the script from the link in the box at the top right to your computer.&lt;br /&gt;
&lt;br /&gt;
In a PyMOL session, run at the command line:&lt;br /&gt;
&lt;br /&gt;
 run /path/to/colorblindfriendly.py&lt;br /&gt;
&lt;br /&gt;
This will add all the colors as well as the OpenGL menu.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; GUI menu (generated by the &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function) requires PyMOL 1.6.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14142</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14142"/>
		<updated>2017-10-26T19:50:19Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Usage */  update code samples and use &amp;lt;code&amp;gt; instead of &amp;lt;tt&amp;gt; tags.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module, call the &amp;lt;code&amp;gt;set_colors()&amp;lt;/code&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color cb_red, myObject&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;code&amp;gt;cb_&amp;lt;/code&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color yellow, myOtherObject   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;code&amp;gt;cb_colors&amp;lt;/code&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;code&amp;gt;grays&amp;lt;/code&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a `cb_colors` menu to the OpenGL GUI (see screenshot)&lt;br /&gt;
# This will also add the colors if `set_colors()` hasn't yet been run.&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; GUI menu (generated by the &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function) requires PyMOL 1.6.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14140</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14140"/>
		<updated>2017-10-26T13:51:08Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Requirements */ update to reflect support for older PyMOLs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
call the &amp;lt;tt&amp;gt;set_colors()&amp;lt;/tt&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color myObject, cb_red&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;tt&amp;gt;cb_&amp;lt;/tt&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;tt&amp;gt;replace&amp;lt;/tt&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color myOtherObject, yellow   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;tt&amp;gt;grays&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a cb_colors menu item to the OpenGL GUI ([C] menu in the right panel)&lt;br /&gt;
# this also adds the colors&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; GUI menu (generated by the &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function) requires PyMOL 1.6.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14139</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14139"/>
		<updated>2017-10-26T04:42:54Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Usage */ fix object name for consistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
call the &amp;lt;tt&amp;gt;set_colors()&amp;lt;/tt&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color myObject, cb_red&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;tt&amp;gt;cb_&amp;lt;/tt&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;tt&amp;gt;replace&amp;lt;/tt&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color myOtherObject, yellow   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;tt&amp;gt;grays&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a cb_colors menu item to the OpenGL GUI ([C] menu in the right panel)&lt;br /&gt;
# this also adds the colors&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function and OpenGL &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; menu currently only works with PyMOL 2.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14138</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14138"/>
		<updated>2017-10-26T04:41:20Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Usage */ Update usage for version 0.2; Add requirements section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
[[File:colorblindfriendly_menu.png|thumb|Screenshot of the &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; color menu in the OpenGL GUI in PyMOL 2.0.]]&lt;br /&gt;
&lt;br /&gt;
After importing the module,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly as cbf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
call the &amp;lt;tt&amp;gt;set_colors()&amp;lt;/tt&amp;gt; function to add the colors to PyMOL's color palette.  Then, use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add the new colors&lt;br /&gt;
cbf.set_colors()&lt;br /&gt;
color myObject, cb_red&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors can also be made to replace the built-in colors (i.e. they are created both with and without the &amp;quot;&amp;lt;tt&amp;gt;cb_&amp;lt;/tt&amp;gt;&amp;quot; prefix.). Do this by passing the &amp;lt;tt&amp;gt;replace&amp;lt;/tt&amp;gt; keyword argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Replace built-in colors with cbf ones&lt;br /&gt;
cbf.set_colors(replace=True)&lt;br /&gt;
color my_other_object, yellow   # actually cb_yellow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can also add an entry to the color menu in the right-side OpenGL GUI.  So clicking on [C], there will now be a &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; menu item, which expands to give all the color blind-friendly colors, except black, which is available in the &amp;lt;tt&amp;gt;grays&amp;lt;/tt&amp;gt; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add a cb_colors menu item to the OpenGL GUI ([C] menu in the right panel)&lt;br /&gt;
# this also adds the colors&lt;br /&gt;
cbf.add_menu()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;add_menu()&amp;lt;/tt&amp;gt; function and OpenGL &amp;lt;tt&amp;gt;cb_colors&amp;lt;/tt&amp;gt; menu currently only works with PyMOL 2.0 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14137</id>
		<title>Colorblindfriendly</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Colorblindfriendly&amp;diff=14137"/>
		<updated>2017-10-26T04:04:34Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Colors */ show 0-255 values instead.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = colorblindfriendly.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.&lt;br /&gt;
&lt;br /&gt;
This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.&lt;br /&gt;
&lt;br /&gt;
The colors listed here are defined according to recommendations found at [http://jfly.iam.u-tokyo.ac.jp/html/color_blind/#pallet J*FLY].  This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colors ==&lt;br /&gt;
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.&lt;br /&gt;
{| cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
! width=&amp;quot;20&amp;quot;|&amp;amp;nbsp;||bgcolor=#ddd width=&amp;quot;100&amp;quot;|name||bgcolor=#ddd width=&amp;quot;50&amp;quot;|R||bgcolor=#ddd width=&amp;quot;50&amp;quot;|G||bgcolor=#ddd width=&amp;quot;50&amp;quot;|B||bgcolor=#ddd|alternate names&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#000000&amp;quot;|&amp;amp;nbsp;||cb_black||0||0||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#e69f00&amp;quot;|&amp;amp;nbsp;||cb_orange||230||159||0||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#56b4e9&amp;quot;|&amp;amp;nbsp;||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#009e73&amp;quot;|&amp;amp;nbsp;||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#f0e442&amp;quot;|&amp;amp;nbsp;||cb_yellow||240||228||66||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#0072b2&amp;quot;|&amp;amp;nbsp;||cb_blue||0||114||178||&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#d55e00&amp;quot;|&amp;amp;nbsp;||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
|bgcolor=&amp;quot;#cc79a7&amp;quot;|&amp;amp;nbsp;||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Use these color names just like any other named color, using the &amp;lt;code&amp;gt;[[color]]&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import colorblindfriendly&lt;br /&gt;
color cb_skyblue, all&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Coloring]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14145</id>
		<title>Get Color Indices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14145"/>
		<updated>2017-10-26T02:25:12Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: add reference to Get_color_index&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_indices''' in combination with '''get_color_tuple''' will retrieve the RGB values for colors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.get_color_indices()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will retrieve the Pymol color names and corresponding internal color indices. The Pymol names can be used to designate color for objects, see [[Color]].  To retrieve a single index for a specific color name, use '''[[get_color_index]]''' instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;print cmd.get_color_tuple(index-number)&amp;lt;/source&amp;gt; will retrieve individual RGB components when ''index-number'' is replaced with one of the color indices from above.&lt;br /&gt;
&lt;br /&gt;
The color index, an integer, gets returned when color is returned while employing [[Iterate]]. You can thus use the  '''get_color_tuple''' command above to convert that to RGB color values if you need to use the colors outside Pymol.&lt;br /&gt;
&lt;br /&gt;
Tangentially related is the fact you can name additional colors,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color color-name, [r,b,g]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a new color that will appear in the GUI list.  From the&lt;br /&gt;
open-source GUI you can use the &amp;quot;add&amp;quot; button in the color list viewer.&lt;br /&gt;
In MacPyMOL, enter the new name into the MacPyMOL color editor window,&lt;br /&gt;
set the RGBs, and then click Apply.&lt;br /&gt;
See [[Set Color]] for more details and examples.&lt;br /&gt;
The colors created will be added to the end of the list of Pymol's color indices that you can view the '''get_color_indices()''' command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_color_index]]&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
* [[Iterate]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Color Indices]]&lt;br /&gt;
[[Category:Coloring|Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_color_index&amp;diff=14148</id>
		<title>Get color index</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_color_index&amp;diff=14148"/>
		<updated>2017-10-26T02:23:21Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Add See Also and Categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_index''' in combination with '''get_color_tuple''' will retrieve the RGB values for a single color.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;print cmd.get_color_index('black')&lt;br /&gt;
1&lt;br /&gt;
PyMOL&amp;gt;print cmd.get_color_tuple(1)&lt;br /&gt;
(0.0, 0.0, 0.0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_Color_Indices]]&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get color index]]&lt;br /&gt;
[[Category:Coloring|Get color index]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_color_index&amp;diff=14147</id>
		<title>Get color index</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_color_index&amp;diff=14147"/>
		<updated>2017-10-26T02:21:28Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_index''' in combination with '''get_color_tuple''' will retrieve the RGB values for a single color.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;print cmd.get_color_index('black')&lt;br /&gt;
1&lt;br /&gt;
PyMOL&amp;gt;print cmd.get_color_tuple(1)&lt;br /&gt;
(0.0, 0.0, 0.0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=14089</id>
		<title>Selection Algebra</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=14089"/>
		<updated>2017-07-29T00:26:48Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Selection Operator/Modifier Table */ fix vertical line display for &amp;quot;or&amp;quot; operator&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Selections can be made more precise or inclusive by combining them with logical operators, including the boolean '''and''', '''or''', and '''not'''. The boolean '''and''' selects only those items that have both (or all) of the named properties, and the boolean '''or''' selects items that have either (or any) of them. Venn diagrams show that '''and ''' selects the areas of overlap, while '''or''' selects both areas. &lt;br /&gt;
&lt;br /&gt;
See [http://pymol.sourceforge.net/newman/user/S0220venn.jpg simple logic Venn diagram].&lt;br /&gt;
&lt;br /&gt;
== Selection Operator/Modifier Table ==&lt;br /&gt;
Selection operators and modifiers are listed below. The dummy variables ''s1'' and ''s2'' stand for selection-expressions such as &amp;quot;chain a&amp;quot; or &amp;quot;hydro.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=10&lt;br /&gt;
|-&lt;br /&gt;
! Operator&lt;br /&gt;
! Short Form&lt;br /&gt;
! Effect&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| not ''s''1&lt;br /&gt;
| !''s''1&lt;br /&gt;
| Selects atoms that are not included in ''s''1. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sidechains, ! bb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 and ''s''2&lt;br /&gt;
| ''s''1 &amp;amp;amp; ''s''2&lt;br /&gt;
| Selects atoms included in both ''s''1 and ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select far_bb, bb &amp;amp;amp;farfrm_ten&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 or ''s''2&lt;br /&gt;
| ''s''1 &amp;amp;#124; ''s''2&lt;br /&gt;
| Selects atoms included in either ''s''1 or ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select all_prot, bb | sidechain&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
|Selects atoms in ''s''1 whose identifiers name, resi, resn, chain and segi &amp;lt;u&amp;gt;'''all'''&amp;lt;/u&amp;gt; match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select same_atms, pept in prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 like ''s''2&lt;br /&gt;
| ''s''1 l. ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 whose identifiers name and resi match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select similar_atms, pept like prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 gap ''X''&lt;br /&gt;
|&lt;br /&gt;
|Selects all atoms whose van der Waals radii are separated from the van der Waals radii of ''s''1 by a minimum of'' X'' Angstroms.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select farfrm_ten, resi 10 gap 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 around ''X''&lt;br /&gt;
| ''s''1 a. ''X''&lt;br /&gt;
|Selects atoms with centers within'' X'' Angstroms of the center of any atom in''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten, resi 10 around 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 expand ''X''&lt;br /&gt;
| ''s''1 x. ''X''&lt;br /&gt;
|Expands ''s''1 by all atoms within ''X'' Angstroms of the center of any atom in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten_x, near_ten expand 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 within ''X'' of ''s''2&lt;br /&gt;
| ''s''1 w. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 that are within ''X'' Angstroms of any atom in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select bbnearten, bb w. 4 of resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 near_to ''X'' of ''s''2&lt;br /&gt;
| ''s''1 nto. ''X'' of ''s''2&lt;br /&gt;
| Same as ''within'', but excludes ''s''2 from the selection (and thus is identical to &amp;lt;code&amp;gt;s1 and ''s2'' around X&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 beyond ''X'' of ''s''2&lt;br /&gt;
| ''s''1 be. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s1'' that are at least ''X'' Anstroms away from ''s2''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byres ''s''1&lt;br /&gt;
| br. ''s''1&lt;br /&gt;
| Expands selection to complete residues.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_res, br. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bymolecule ''s''1&lt;br /&gt;
| bm. ''s''1&lt;br /&gt;
| Expands selection to complete molecules.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_mol, bm. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byfragment ''s''1&lt;br /&gt;
| bf. ''s''1&lt;br /&gt;
| Expands selection to complete fragments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_frag, bf. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bysegment ''s''1&lt;br /&gt;
| bs. ''s''1&lt;br /&gt;
| Expands selection to complete segments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_seg, bs. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byobject ''s''1&lt;br /&gt;
| bo. ''s''1&lt;br /&gt;
| Expands selection to complete objects.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_obj, bo. near_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bycell ''s''1&lt;br /&gt;
| &lt;br /&gt;
| Expands selection to unit cell.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_cell, bycell orig_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byring ''s''1&lt;br /&gt;
| &lt;br /&gt;
| ''New in 1.8.2'': All rings of size ≤ 7 which have at least one atom in ''s''1&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select rings, byring (all)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| neighbor ''s''1&lt;br /&gt;
| nbr. ''s''1&lt;br /&gt;
| Selects atoms directly bonded to ''s''1, excludes ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select vicinos, neighbor resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bound_to ''s1''&lt;br /&gt;
| bto. ''s1''&lt;br /&gt;
| Selects atoms directly bonded to ''s1'', may include ''s1''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 extend ''X''&lt;br /&gt;
| ''s''1 xt. ''X''&lt;br /&gt;
| Extends ''s''1 by ''X'' bonds connected to atoms in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select connect_x, near10 extend 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| pepseq ''SEQ''&lt;br /&gt;
| ps. ''SEQ''&lt;br /&gt;
| Selects peptide sequence matching upper-case one-letter sequence ''SEQ'' (see also [[FindSeq]]).&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select 1tvn and ps. FATEW&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rep ''rep''&lt;br /&gt;
|&lt;br /&gt;
| Selects atoms which show representation ''rep''.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sele, rep spheres&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of distance operators ==&lt;br /&gt;
&lt;br /&gt;
There are serveral very similar operators that select by pairwise atom distances. The following table lists the details how they differ.&lt;br /&gt;
&lt;br /&gt;
'''Syntax 1''': ''s1'' operator X of ''s2''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Syntax 2''': ''s1'' and (''s2'' operator X)&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=4 style=&amp;quot;text-align:center&amp;quot; class=wikitable&lt;br /&gt;
! operator !! distance is ... !! measured from !! includes s2 !! syntax !! notes&lt;br /&gt;
|-&lt;br /&gt;
|  near_to ||  ≤ X            ||     center    ||    never    ||   1    || equivalent to &amp;quot;around&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   within ||  ≤ X            ||     center    ||if matches s1||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|   beyond ||  &amp;gt; X            ||     center    ||    never    ||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|      gap ||  &amp;gt; X            ||   center+vdw  ||    never    ||   2    ||&lt;br /&gt;
|-&lt;br /&gt;
|   around ||  ≤ X            ||     center    ||    never    ||   2    || equivalent to &amp;quot;near_to&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   expand ||  ≤ X            ||     center    ||   always    ||   2    ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Logical selections can be combined. For example, you might select atoms that are part of chain a, but not residue number 125:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# selects atoms that are part of chain A, but not residue number 125.&lt;br /&gt;
select chain A and (not resi 125)&lt;br /&gt;
&lt;br /&gt;
# The following two selections are equivalent, &lt;br /&gt;
select (name CB or name CG1 or name CG2) and chain A&lt;br /&gt;
&lt;br /&gt;
# select c-beta's, c-gamma-1's and c-gamma-2's &lt;br /&gt;
# that are in chain A.&lt;br /&gt;
select name CB+CG1+CG2 and chain A&lt;br /&gt;
&lt;br /&gt;
# select all residues within 5 Ang. or any organic small molecules&lt;br /&gt;
select br. all within 5 of organic&lt;br /&gt;
&lt;br /&gt;
# select helices&lt;br /&gt;
select ss 'H'&lt;br /&gt;
&lt;br /&gt;
# select anything shown as a line&lt;br /&gt;
select rep lines&lt;br /&gt;
&lt;br /&gt;
# select all residues with a b-factor less than 20, within 3 angstroms of any water&lt;br /&gt;
select br. b&amp;lt;20 &amp;amp; (all within 3 of resn HOH)&lt;br /&gt;
&lt;br /&gt;
# select anything colored blue&lt;br /&gt;
select color blue&lt;br /&gt;
&lt;br /&gt;
# select the 1st arginine&lt;br /&gt;
select first resn ARG&lt;br /&gt;
&lt;br /&gt;
# select 1foo's segment G's chain X's residue 444's alpha carbon&lt;br /&gt;
select 1foo/G/X/444/CA&lt;br /&gt;
# same thing&lt;br /&gt;
select 1foo and segi G and c. X and i. 444 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the entire object that residue 23's beta caron is in:&lt;br /&gt;
select bo. i. 23 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the molecule that chain C is in&lt;br /&gt;
select bm. c. C&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like the results of groups of arithmetic operations, the results of groups of logical operations depend on which operation is performed first. They have an order of precedence. To ensure that the operations are performed in the order you have in mind, use parentheses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;byres ((chain A or (chain B and (not resi 125))) around 5)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PyMOL will expand its logical selection out from the innermost parentheses.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Single-word Selectors]], [[Selection Macros]], [[Property_Selectors]], [[Identify]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Selector Quick Reference]]&lt;br /&gt;
[[Category:Selecting|Selection Algebra]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13868</id>
		<title>PyMOLProbity</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13868"/>
		<updated>2017-01-16T04:19:26Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Description */ add link to repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  =  https://github.com/jaredsampson/pymolprobity/raw/master/pymolprobity.tar.gz&lt;br /&gt;
|author   = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:PyMOLProbity_GUI.png|480px|thumb|right|The PyMOLProbity GUI can be used to inspect and adjust clashes and flip orientations of flippable side chain groups.]]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/jaredsampson/pymolprobity PyMOLProbity] is a plugin allows the user to produce MolProbity-style&lt;br /&gt;
visualization of atomic interactions within a structure (e.g.  H-bonds, van der&lt;br /&gt;
Waals interactions and clashes) directly within a PyMOL session.  The plugin&lt;br /&gt;
runs local copies of several executable programs from the &lt;br /&gt;
[http://kinemage.biochem.duke.edu/ Richardson Lab] at Duke University, &lt;br /&gt;
authors of the [http://molprobity.biochem.duke.edu/ MolProbity] software, parses the output, and&lt;br /&gt;
displays the results in the PyMOL viewport.  There are both a graphical user&lt;br /&gt;
interface (GUI) for general point-and-click use, and a command-line interface&lt;br /&gt;
(CLI) suitable for scripting.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For installation instructions, please see the [https://github.com/jaredsampson/pymolprobity/blob/master/README.md README] file in the &lt;br /&gt;
[https://github.com/jaredsampson/pymolprobity repository].&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
&lt;br /&gt;
Once PyMOLProbity is installed, it should appear as an option in PyMOL's ''Plugin'' menu.  Load or fetch a structure, and launch the GUI by selecting ''Plugin &amp;gt; PyMOLProbity''.&lt;br /&gt;
&lt;br /&gt;
* Use the ''Add Hydrogens'' tab to add hydrogens with Reduce. This will also calculate which N/Q/H residue side chains should be flipped, and perform those flips.  Note that this should be done even if the model already includes explicit hydrogens.&lt;br /&gt;
* To examine these more closely, select the ''Review Flips'' tab.  Here, you can zoom to inspect each flippable residue and choose the ones you wish to keep or change.  Save any changes using the '''''Save Selections''''' button.  &lt;br /&gt;
* Finally, use the ''Visualize Contacts'' tab to run Probe on the modified coordinates and generate contact dots and clash vectors for all the atoms in your object.&lt;br /&gt;
&lt;br /&gt;
=== Command-Line Interface ===&lt;br /&gt;
&lt;br /&gt;
The plugin makes the following functions available:&lt;br /&gt;
&lt;br /&gt;
* '''reduce_obj'''(obj, flip=1): Run reduce on a loaded PyMOL object (or named selection) with (default) or without making the Asn/Gln/His flips recommended by Reduce.&lt;br /&gt;
&lt;br /&gt;
* '''flipkin_obj'''(obj): Run Flipkin to create both NQ and H flipkin kinemage visualization of the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
* '''probe_obj'''(obj): Run Probe on either a structure saved from the Flipkin tab of the GUI, or the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
Note that both `flipkin_obj` and `probe_obj` require previously having run `reduce_obj` on the same object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13867</id>
		<title>PyMOLProbity</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13867"/>
		<updated>2017-01-14T17:48:13Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Getting Started */ Update GUI section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  =  https://github.com/jaredsampson/pymolprobity/raw/master/pymolprobity.tar.gz&lt;br /&gt;
|author   = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:PyMOLProbity_GUI.png|480px|thumb|right|The PyMOLProbity GUI can be used to inspect and adjust clashes and flip orientations of flippable side chain groups.]]&lt;br /&gt;
&lt;br /&gt;
PyMOLProbity is a plugin allows the user to produce MolProbity-style&lt;br /&gt;
visualization of atomic interactions within a structure (e.g.  H-bonds, van der&lt;br /&gt;
Waals interactions and clashes) directly within a PyMOL session.  The plugin&lt;br /&gt;
runs local copies of several executable programs from the &lt;br /&gt;
[http://kinemage.biochem.duke.edu/ Richardson Lab] at Duke University, &lt;br /&gt;
authors of the [http://molprobity.biochem.duke.edu/ MolProbity] software, parses the output, and&lt;br /&gt;
displays the results in the PyMOL viewport.  There are both a graphical user&lt;br /&gt;
interface (GUI) for general point-and-click use, and a command-line interface&lt;br /&gt;
(CLI) suitable for scripting.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For installation instructions, please see the [https://github.com/jaredsampson/pymolprobity/blob/master/README.md README] file in the &lt;br /&gt;
[https://github.com/jaredsampson/pymolprobity repository].&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
&lt;br /&gt;
Once PyMOLProbity is installed, it should appear as an option in PyMOL's ''Plugin'' menu.  Load or fetch a structure, and launch the GUI by selecting ''Plugin &amp;gt; PyMOLProbity''.&lt;br /&gt;
&lt;br /&gt;
* Use the ''Add Hydrogens'' tab to add hydrogens with Reduce. This will also calculate which N/Q/H residue side chains should be flipped, and perform those flips.  Note that this should be done even if the model already includes explicit hydrogens.&lt;br /&gt;
* To examine these more closely, select the ''Review Flips'' tab.  Here, you can zoom to inspect each flippable residue and choose the ones you wish to keep or change.  Save any changes using the '''''Save Selections''''' button.  &lt;br /&gt;
* Finally, use the ''Visualize Contacts'' tab to run Probe on the modified coordinates and generate contact dots and clash vectors for all the atoms in your object.&lt;br /&gt;
&lt;br /&gt;
=== Command-Line Interface ===&lt;br /&gt;
&lt;br /&gt;
The plugin makes the following functions available:&lt;br /&gt;
&lt;br /&gt;
* '''reduce_obj'''(obj, flip=1): Run reduce on a loaded PyMOL object (or named selection) with (default) or without making the Asn/Gln/His flips recommended by Reduce.&lt;br /&gt;
&lt;br /&gt;
* '''flipkin_obj'''(obj): Run Flipkin to create both NQ and H flipkin kinemage visualization of the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
* '''probe_obj'''(obj): Run Probe on either a structure saved from the Flipkin tab of the GUI, or the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
Note that both `flipkin_obj` and `probe_obj` require previously having run `reduce_obj` on the same object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13866</id>
		<title>PyMOLProbity</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13866"/>
		<updated>2017-01-14T17:41:55Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Add screenshot.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  =  https://github.com/jaredsampson/pymolprobity/raw/master/pymolprobity.tar.gz&lt;br /&gt;
|author   = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:PyMOLProbity_GUI.png|480px|thumb|right|The PyMOLProbity GUI can be used to inspect and adjust clashes and flip orientations of flippable side chain groups.]]&lt;br /&gt;
&lt;br /&gt;
PyMOLProbity is a plugin allows the user to produce MolProbity-style&lt;br /&gt;
visualization of atomic interactions within a structure (e.g.  H-bonds, van der&lt;br /&gt;
Waals interactions and clashes) directly within a PyMOL session.  The plugin&lt;br /&gt;
runs local copies of several executable programs from the &lt;br /&gt;
[http://kinemage.biochem.duke.edu/ Richardson Lab] at Duke University, &lt;br /&gt;
authors of the [http://molprobity.biochem.duke.edu/ MolProbity] software, parses the output, and&lt;br /&gt;
displays the results in the PyMOL viewport.  There are both a graphical user&lt;br /&gt;
interface (GUI) for general point-and-click use, and a command-line interface&lt;br /&gt;
(CLI) suitable for scripting.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For installation instructions, please see the [https://github.com/jaredsampson/pymolprobity/blob/master/README.md README] file in the &lt;br /&gt;
[https://github.com/jaredsampson/pymolprobity repository].&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
=== First run ===&lt;br /&gt;
&lt;br /&gt;
Now you can open PyMOL, load or fetch a structure, and launch PyMOLProbity from&lt;br /&gt;
the Plugin menu.  &lt;br /&gt;
&lt;br /&gt;
* Use the ''Add Hydrogens'' tab to add hydrogens with Reduce. This will also calculate which N/Q/H residue side chains should be flipped.  &lt;br /&gt;
* If you would like to examine these more closely, use the ''Review Flips'' tab to examine each flippable residue and choose the ones you wish to flip or keep.&lt;br /&gt;
* Save these using the ''Save Selections'' button.  &lt;br /&gt;
* Finally, use the ''Visualize Contacts'' tab to run Probe on the modified coordinates and generate contact dots and clash vectors for all the atoms in your object.&lt;br /&gt;
&lt;br /&gt;
=== Command-Line Interface ===&lt;br /&gt;
&lt;br /&gt;
The plugin makes the following functions available:&lt;br /&gt;
&lt;br /&gt;
* '''reduce_obj'''(obj, flip=1): Run reduce on a loaded PyMOL object (or named selection) with (default) or without making the Asn/Gln/His flips recommended by Reduce.&lt;br /&gt;
&lt;br /&gt;
* '''flipkin_obj'''(obj): Run Flipkin to create both NQ and H flipkin kinemage visualization of the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
* '''probe_obj'''(obj): Run Probe on either a structure saved from the Flipkin tab of the GUI, or the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
Note that both `flipkin_obj` and `probe_obj` require previously having run `reduce_obj` on the same object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13865</id>
		<title>PyMOLProbity</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PyMOLProbity&amp;diff=13865"/>
		<updated>2017-01-14T05:52:15Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Created page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  =  https://github.com/jaredsampson/pymolprobity/raw/master/pymolprobity.tar.gz&lt;br /&gt;
|author   = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[Image:PyMOLProbity_GUI.png|480px|thumb|The PyMOLProbity GUI can be used to inspect and adjust clashes and flip orientations of flippable side chain groups.]]&lt;br /&gt;
&lt;br /&gt;
PyMOLProbity is a plugin allows the user to produce MolProbity-style&lt;br /&gt;
visualization of atomic interactions within a structure (e.g.  H-bonds, van der&lt;br /&gt;
Waals interactions and clashes) directly within a PyMOL session.  The plugin&lt;br /&gt;
runs local copies of several executable programs from the &lt;br /&gt;
[http://kinemage.biochem.duke.edu/ Richardson Lab] at Duke University, &lt;br /&gt;
authors of the [http://molprobity.biochem.duke.edu/ MolProbity] software, parses the output, and&lt;br /&gt;
displays the results in the PyMOL viewport.  There are both a graphical user&lt;br /&gt;
interface (GUI) for general point-and-click use, and a command-line interface&lt;br /&gt;
(CLI) suitable for scripting.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For installation instructions, please see the [https://github.com/jaredsampson/pymolprobity/blob/master/README.md README] file in the &lt;br /&gt;
[https://github.com/jaredsampson/pymolprobity repository].&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
=== First run ===&lt;br /&gt;
&lt;br /&gt;
Now you can open PyMOL, load or fetch a structure, and launch PyMOLProbity from&lt;br /&gt;
the Plugin menu.  &lt;br /&gt;
&lt;br /&gt;
* Use the ''Add Hydrogens'' tab to add hydrogens with Reduce. This will also calculate which N/Q/H residue side chains should be flipped.  &lt;br /&gt;
* If you would like to examine these more closely, use the ''Review Flips'' tab to examine each flippable residue and choose the ones you wish to flip or keep.&lt;br /&gt;
* Save these using the ''Save Selections'' button.  &lt;br /&gt;
* Finally, use the ''Visualize Contacts'' tab to run Probe on the modified coordinates and generate contact dots and clash vectors for all the atoms in your object.&lt;br /&gt;
&lt;br /&gt;
=== Command-Line Interface ===&lt;br /&gt;
&lt;br /&gt;
The plugin makes the following functions available:&lt;br /&gt;
&lt;br /&gt;
* '''reduce_obj'''(obj, flip=1): Run reduce on a loaded PyMOL object (or named selection) with (default) or without making the Asn/Gln/His flips recommended by Reduce.&lt;br /&gt;
&lt;br /&gt;
* '''flipkin_obj'''(obj): Run Flipkin to create both NQ and H flipkin kinemage visualization of the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
* '''probe_obj'''(obj): Run Probe on either a structure saved from the Flipkin tab of the GUI, or the Reduce-modified structure.&lt;br /&gt;
&lt;br /&gt;
Note that both `flipkin_obj` and `probe_obj` require previously having run `reduce_obj` on the same object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Save&amp;diff=13665</id>
		<title>Save</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Save&amp;diff=13665"/>
		<updated>2016-10-03T19:07:39Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Add COLLADA (.dae) to autodetected formats.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''save''' writes selected atoms to a file.  &lt;br /&gt;
&lt;br /&gt;
=Details=&lt;br /&gt;
* The file format is autodetected if the extension is .pdb, .pqr, .mol, .sdf, .pkl, .pkla, .mmd, .out, .dat, .mmod, .pmo, .pov, .png, .pse, .psw, .aln, .fasta, .obj, .mtl, .wrl, .idtf, .dae, or .mol2.&lt;br /&gt;
* If the file extension is &amp;quot;.pse&amp;quot; (PyMOL Session), the complete PyMOL state is always saved to the file (the selection and state parameters are thus ignored).&lt;br /&gt;
* CLUSTALW formatted alignments can be written by PyMOL as well. Once you perform an alignment like the following,&lt;br /&gt;
::&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align proteinA, proteinB, object=A_on_B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
::the alignment can be written using:&lt;br /&gt;
::&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save A_aligned_with_B.aln, A_on_B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save file [,(selection) [,state [,format]] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== EXAMPLES ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# save only the alpha carbons&lt;br /&gt;
save onlyCAs.pdb, n. CA&lt;br /&gt;
&lt;br /&gt;
# save my MD trajectory file to disk&lt;br /&gt;
save myTraj.pdb, myMDTrajectory, state=0&lt;br /&gt;
&lt;br /&gt;
# save a PyMOL session&lt;br /&gt;
save thisSession.pse&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.save(filename[, selection[, state[, format]]])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
* When saving a session file, then &amp;quot;state&amp;quot; has no effect.&lt;br /&gt;
* Default is state = -1, which saves only the current state.&lt;br /&gt;
* When state = 0, all states in the file are written. If you have more than one state, this produces a multi-state PDB file.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Load]], [[Get Model]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Save]]&lt;br /&gt;
[[Category:States|Save]]&lt;br /&gt;
[[Category:Input Output Module|Save]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PYMOL_PATH&amp;diff=13576</id>
		<title>PYMOL PATH</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PYMOL_PATH&amp;diff=13576"/>
		<updated>2016-06-07T19:42:42Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Contents */ close &amp;lt;tt&amp;gt; tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PYMOL_PATH''' environmental variable points to the root PyMOL directory. It contains internal PyMol code and core modules. It is also the location for plugins installed via the [[Plugin Manager]]. The variable should be set automatically by PyMOL, and should not normally need to be changed by the user.&lt;br /&gt;
&lt;br /&gt;
= Standard Locations =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Windows:''' &amp;lt;tt&amp;gt;C:\Program Files\PyMOL\&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mac:''' &amp;lt;tt&amp;gt;/Applications/MacPyMOL.app/pymol&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu''' (Open-source PyMOL): &amp;lt;tt&amp;gt;/usr/lib/python2.7/dist-packages/pymol&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Determining the location =&lt;br /&gt;
&lt;br /&gt;
For other operating systems or non-standard installation locations, the PYMOL_PATH can be determined by running the following command from within PyMOL:&lt;br /&gt;
&lt;br /&gt;
 print os.environ['PYMOL_PATH']&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
The contents of PYMOL_PATH should generally not be modified, but a few locations can be useful to know:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/examples/&amp;lt;/tt&amp;gt;''' Example PyMOL and Python scripts&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/modules/pmg_tk/startup/&amp;lt;/tt&amp;gt;'''&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/run_on_startup.py&amp;lt;/tt&amp;gt;''' A python script run at startup, before &amp;lt;tt&amp;gt;.pymolrc&amp;lt;/tt&amp;gt;. See [[Plugin Manager]] for details.&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Jaredsampson&amp;diff=13580</id>
		<title>User:Jaredsampson</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Jaredsampson&amp;diff=13580"/>
		<updated>2016-06-07T18:01:45Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm currently a Ph.D. student in Biochemistry and Molecular Biophysics at Columbia University.&lt;br /&gt;
&lt;br /&gt;
Previously I was a technician in [http://kong.med.nyu.edu Xiangpeng Kong's lab] at the NYU School of Medicine, where I took part in structural studies of anti-HIV antibodies and their interactions with their viral epitopes; and a research assistant in [http://www.cwru.edu/med/biochemistry/vandenAkker_lab/ Focco van den Akker's lab] at Case Western Reserve University, studying mechanisms of antibiotic resistance in bacteria via mutations in &amp;amp;beta;-lactamase enzymes.&lt;br /&gt;
&lt;br /&gt;
I was also a recipient of the Warren L. DeLano Memorial PyMOL Open Source Fellowship for 2013-14 and 2014-15.  In the first fellowship, I added the ability to export PyMOL scenes in [[COLLADA]] format.  The 2014-15 project, which is still underway, is the creation of a [https://github.com/jaredsampson/pymolprobity MolProbity plugin for PyMOL] to enable addition of hydrogens and visualization of the dots and clashes as produced by the programs Reduce and Probe, respectively, from the Richardson lab at Duke University.&lt;br /&gt;
&lt;br /&gt;
==Other Scripts==&lt;br /&gt;
[[elbow_angle]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=13557</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=13557"/>
		<updated>2016-06-07T17:31:28Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Get latest source from SVN */ Add HTTP protocol as alternative to troubleshoot sf.net SVN connection.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: http://pymol.org/download&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* [http://subversion.apache.org/ Subversion] to download the source code&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [http://pmw.sf.net Pmw] (Python Megawidgets)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install subversion build-essential python-dev python-pmw libglew-dev \&lt;br /&gt;
  freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install subversion gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install subversion gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from SVN ===&lt;br /&gt;
&lt;br /&gt;
This will download the latest source to '''/tmp/pymol''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
svn co svn://svn.code.sf.net/p/pymol/code/trunk/pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the above address is not available, giving an error such as &lt;br /&gt;
&lt;br /&gt;
 Connection refused: Unable to connect to a repository at URL &amp;lt;nowiki&amp;gt;'svn://svn.code.sf.net/p/pymol/code/trunk/pymol'&amp;lt;/nowiki&amp;gt;: Can't connect to host 'svn.code.sf.net': Connection refused...&lt;br /&gt;
&lt;br /&gt;
you can try using &amp;lt;code&amp;gt;http://&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;svn://&amp;lt;/code&amp;gt; in the URL.&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into '''/opt/pymol-svn'''. If you don't have write permissions to '''/opt''', change the &amp;lt;code&amp;gt;prefix&amp;lt;/code&amp;gt; variable to something like '''$HOME/pymol-svn'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=/opt/pymol-svn&lt;br /&gt;
modules=$prefix/modules&lt;br /&gt;
&lt;br /&gt;
# enable c++11&lt;br /&gt;
export CPPFLAGS=&amp;quot;-std=c++0x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you want to install as root, then split this line up in &amp;quot;build&amp;quot;&lt;br /&gt;
# and &amp;quot;install&amp;quot; and run the &amp;quot;install&amp;quot; with &amp;quot;sudo&amp;quot;&lt;br /&gt;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-lib=$modules \&lt;br /&gt;
    --install-scripts=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/opt/pymol-svn/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, in order to allow running the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt; from the terminal to launch the program do:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /opt/pymol-svn/pymol /usr/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Updating====&lt;br /&gt;
To update the installation merely run:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo rm -r /opt/pymol-svn/pymol&lt;br /&gt;
rm -r /tmp/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
and redo the installation from the beginning with the latest release.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* On Linux Mint 11 there have been reports of gcc-4.5 breaking Pymol. You could use gcc-4.4 instead. (reported by [[User:Tlinnet]])&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 2em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then append &amp;lt;code&amp;gt;--bundled-pmw&amp;lt;/code&amp;gt; to the install command line.&lt;br /&gt;
&lt;br /&gt;
* If you're using Ubuntu 11.10 with an Intel Sandy Bridge video card and get graphics oddities. Please see [https://launchpad.net/~glasen/+archive/intel-driver Intel Driver Post for Ubuntu].&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cartoon&amp;diff=13486</id>
		<title>Cartoon</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cartoon&amp;diff=13486"/>
		<updated>2016-03-28T05:44:38Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Various Transparency Levels */ include mention of &amp;quot;extract&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Cartoon Command==&lt;br /&gt;
===DESCRIPTION===&lt;br /&gt;
'''cartoon''' changes the default cartoon for a set of atoms.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 cartoon type, (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''type:'''&lt;br /&gt;
#skip&lt;br /&gt;
#automatic&lt;br /&gt;
#loop&lt;br /&gt;
#rectangle&lt;br /&gt;
#oval&lt;br /&gt;
#tube&lt;br /&gt;
#arrow&lt;br /&gt;
#dumbbell&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;200px&amp;quot; heights=&amp;quot;200px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Cartoon_skip.png|cartoon_skip; yes, blank.&lt;br /&gt;
Image:Cartoon_automatic.png|cartoon_automatic&lt;br /&gt;
Image:Cartoon_loop.png|cartoon_loop&lt;br /&gt;
Image:Cartoon_rectangle.png|cartoon_rectangle&lt;br /&gt;
Image:Cartoon_oval.png|cartoon_oval&lt;br /&gt;
Image:Cartoon_tube.png|cartoon_tube&lt;br /&gt;
Image:Cartoon_arrow.png|cartoon_arrow&lt;br /&gt;
Image:Cartoon_dumbbell.png|cartoon_dumbbell&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.cartoon(string type, string selection )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
 cartoon rectangle,(chain A)&lt;br /&gt;
 cartoon skip,(resi 145:156)&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
the &amp;quot;automatic&amp;quot; mode utilizes ribbons according to the information in the PDB HELIX and SHEET records.&lt;br /&gt;
&lt;br /&gt;
==Adjusting width of cartoon==&lt;br /&gt;
Try varying the following.&lt;br /&gt;
&lt;br /&gt;
For &amp;amp;beta;-strands:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_rect_length&lt;br /&gt;
cartoon_rect_width&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;amp;alpha;-helices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_oval_length&lt;br /&gt;
cartoon_oval_width&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For loops:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_loop_radius&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For nucleic acid backbones which resemble 'loops'; however, are not classified as such by PyMOL (see more about nucleic acid representation settings at bottom of page):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_tube_radius,0.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;fancy&amp;quot; &amp;amp;alpha;-helices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_dumbbell_length&lt;br /&gt;
cartoon_dumbbell_width&lt;br /&gt;
cartoon_dumbbell_radius  (radius of cylinder at edge of helix ribbon)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In each case &amp;quot;length&amp;quot; refers to what some might call the width and &amp;quot;width&amp;quot; refers to what some might call the thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cartoon_ex.png|thumb|center|Cartoon Representation Example|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Forcing Exact Boundaries in Coloring Secondary Structures===&lt;br /&gt;
To force PyMOL to respect secondary structural elements color-wise (PyMOL smooths out colors near color chagnes for a prettier image) use the following &lt;br /&gt;
PyMOL command:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
set cartoon_discrete_colors, on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cartoon_discrete_color0.png|Discrete Coloring Off|center|thumb]] [[Image:Cartoon_discrete_color1.png|Discrete Coloring On|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Sausage Representation ==&lt;br /&gt;
The familiar sausage representation in PyMOL is called, &amp;quot;putty&amp;quot;.  To enable the putty/sausage view simply do,&lt;br /&gt;
 show cartoon&lt;br /&gt;
 cartoon putty&lt;br /&gt;
 unset cartoon_smooth_loops&lt;br /&gt;
 unset cartoon_flat_sheets&lt;br /&gt;
&lt;br /&gt;
As of v 0.98 or so, there's a Putty option.  Use this.&lt;br /&gt;
&lt;br /&gt;
[[Image:B_factor_putty.png|thumb|Example of B-factor Putty|center|250px]]&lt;br /&gt;
&lt;br /&gt;
==Black and White Representation==&lt;br /&gt;
'''UPDATE''': This method is essentially obseleted by the new setting '''set ray_trace_mode,2'''.  More information on this at [[Ray]].&lt;br /&gt;
For those who want a nifty black and white representation of their protein try the following:&lt;br /&gt;
# Ray trace your protein of choice in a cartoon representation use a BLACK background&lt;br /&gt;
# Save the image&lt;br /&gt;
# Load the image in GIMP. [[Image:Bw1.jpeg|thumb|Black BG Ribbon|center|350px]]&lt;br /&gt;
# Desaturate or Grayscale the image. [[Image:Bw2.jpeg|thumb|Grayscale|center|350px]]&lt;br /&gt;
# Run the filter: Filter-&amp;gt;Edge-Detect-&amp;gt;Edge. [[Image:Bw3.jpeg|thumb|Edge Detect|center|350px]]&lt;br /&gt;
# Select: Layers-&amp;gt;Color-&amp;gt;Invert. [[Image:Bw4.jpeg|thumb|Invert Color|center|350px]]&lt;br /&gt;
# Different methods of edge detection will give you different results.  In the last example, I used Laplace Edge-Detect, then painted an all white layer beneath the current layer to achieve the results. [[Image:Bw5.jpeg|thumb|Other Styles|center|350px|Comments]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm sure there are other ways to do this.  If you want to include it in a publication make sure you ray traced it large enough.  For that, see [[Publication_Quality_Images|Creating Publication Quality Images]].&lt;br /&gt;
&lt;br /&gt;
==CA (Alpha Carbon) Trace==&lt;br /&gt;
If you have a structure with just a alpha carbon trace, you can get a cartoon by&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_trace,1&lt;br /&gt;
show cartoon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If your structure is more than just the CA backbone, the cartoon representation will look incorrect, so use it just with CA trace.&lt;br /&gt;
&lt;br /&gt;
==Various Transparency Levels==&lt;br /&gt;
[[Image:Cartoon_multi_transp.png|thumb|center|Example of Cartoon Multi-level Transparency.  The near cartoon has transparency setting '''0.2''', the segment in the BG '''0.5'''.]]&lt;br /&gt;
One can make different cartoon selections have different transparency values, in PyMOL.  The trick here is to use &amp;quot;create&amp;quot; or &amp;quot;extract&amp;quot; instead of &amp;quot;select&amp;quot;.  Create makes new objects that can have independent settings while leaving the original object intact, whereas extract removes the specified atoms from the original object when creating the new object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load mol_obj.pdb&lt;br /&gt;
&lt;br /&gt;
# transfer a piece of the molecule into a new object&lt;br /&gt;
extract new_obj, chain A&lt;br /&gt;
&lt;br /&gt;
# adjust trasparency for the new object&lt;br /&gt;
set cartoon_transparency, 0.5, new_obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nucleic Acid Representation ==&lt;br /&gt;
[[Image:Nucleic1.png|thumb|center|Showing Nucleic Acids]]&lt;br /&gt;
To control radius of nucleic acids default backbone cartoon:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_tube_radius,0.8   #0.5 seems close to the default setting&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show nucleic acids in a nicer format do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 set cartoon_ring_mode,1&lt;br /&gt;
 show cartoon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Nucleic Acids &amp;amp; Cartoon Settings ===&lt;br /&gt;
Here are some things to try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_ring_mode, 1   # (or 2 or 3)&lt;br /&gt;
set cartoon_ring_finder, 1 # (or 2 or 3 or 4)&lt;br /&gt;
set cartoon_nucleic_acid_mode, 0   # (or 1 or 2 or 3 or 4)&lt;br /&gt;
&lt;br /&gt;
set cartoon_side_chain_helper&lt;br /&gt;
rebuild&lt;br /&gt;
&lt;br /&gt;
set cartoon_ring_transparency, 0.5&lt;br /&gt;
&lt;br /&gt;
set cartoon_ladder_mode, 0 # or 1&lt;br /&gt;
&lt;br /&gt;
set cartoon_ladder_color, color-name&lt;br /&gt;
set cartoon_nucleic_acid_color, color-name&lt;br /&gt;
&lt;br /&gt;
cartoon oval&lt;br /&gt;
set cartoon_oval_width, 0.8&lt;br /&gt;
&lt;br /&gt;
cartoon rect&lt;br /&gt;
&lt;br /&gt;
cartoon dumbbell&lt;br /&gt;
set cartoon_dumbbell_width, 0.4&lt;br /&gt;
set cartoon_dumbbell_radius, 0.4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Overview of nucleic acid cartoons]]&lt;br /&gt;
&lt;br /&gt;
[[Examples of nucleic acid cartoons]]&lt;br /&gt;
&lt;br /&gt;
== Breaking Up a Visualization with Cartoon Skip ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1cll, async=0&lt;br /&gt;
&lt;br /&gt;
create a_copy, 1cll&lt;br /&gt;
&lt;br /&gt;
# show them as cartoons&lt;br /&gt;
&lt;br /&gt;
color blue, 1cll&lt;br /&gt;
&lt;br /&gt;
set cartoon_highlight_color, green, 1cll&lt;br /&gt;
&lt;br /&gt;
color marine, a_copy&lt;br /&gt;
&lt;br /&gt;
set cartoon_highlight_color, magenta, a_copy&lt;br /&gt;
&lt;br /&gt;
# select the region of interest&lt;br /&gt;
&lt;br /&gt;
select to_hide, i. 0-79&lt;br /&gt;
&lt;br /&gt;
show_as cartoon&lt;br /&gt;
&lt;br /&gt;
cartoon skip, to_hide and 1cll&lt;br /&gt;
&lt;br /&gt;
orient&lt;br /&gt;
&lt;br /&gt;
# hide/skip this section in the original&lt;br /&gt;
&lt;br /&gt;
cartoon skip, i. 81-200 and a_copy&lt;br /&gt;
&lt;br /&gt;
ray&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Displaying_Biochemical_Properties]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Cartoon]]&lt;br /&gt;
[[Category:Nucleic_Acids|Cartoon]]&lt;br /&gt;
[[Category:Putty]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13447</id>
		<title>COLLADA</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13447"/>
		<updated>2016-02-26T06:19:46Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Include first version to support COLLADA.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''COLLADA''' is an XML-based open 3D graphics format, designed to be used as an interchange format among various graphics programs.  Beginning with version 1.7.3.2 (SVN rev4097) in the Open Source codebase, PyMOL is able to export COLLADA files, which have a &amp;quot;.dae&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
=Details=&lt;br /&gt;
COLLADA format defines a scene, with a camera and various geometric elements, which are colored and lit according to the properties of the material the object is made from and any effects (e.g. shaders) applied to it.  PyMOL exports the scene exactly as it looks in the viewport when the save command is executed, so the orientations and colors of the objects should be the same.  It currently saves every enabled object in the scene, regardless of any selection passed to the `save` command.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save file.dae&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Full support of all standard representations (cartoon, stick, line, sphere, surface, etc.)&lt;br /&gt;
* Customizable output quality and file size, based on quality settings for active representations (e.g. [[surface_quality]])&lt;br /&gt;
* Transparency support&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Settings ==&lt;br /&gt;
* [[collada_export_lighting]] - Optionally include PyMOL's lighting information.&lt;br /&gt;
* [[collada_geometry_mode]] - Specify how geometry elements are presented.&lt;br /&gt;
* [[geometry_export_mode]] - Exclude camera as well as lighting information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
* '''Shaders.'''  In version 1.4 of the COLLADA specification, only vertex-based meshes are defined, so all regular geometric shapes (e.g. spheres, cylinders, cones) have to be converted into a series of triangle meshes.  This produces output similar to what you would see in PyMOL with `use_shaders` turned off.  (Version 1.5 of the COLLADA spec includes &amp;quot;boundary representation&amp;quot; (&amp;lt;brep&amp;gt;) elements that define such geometric shapes as you might expect: a sphere is defined by a point and a radius, a cylinder by two points and a radius, a cone by two points and two radii.  However, apparently due to the complexity of the physics portion of the 1.5 specification, few programs have even attempted to adopt it yet, so we're stuck with old-school triangle meshes.)&lt;br /&gt;
&lt;br /&gt;
* '''Lighting.'''  Whereas in PyMOL, the lighting of the object appears similar no matter how the object is rotated--that is, the lights move with the camera or viewport--in COLLADA, the lights are fixed in the scene with the objects, and therefore, with PyMOL `[[light_count]]` of 2 or higher, only one side of the objects is lit with the directional lights; the other side appears dark.  For this reason, PyMOL's lights are excluded from COLLADA output files by default.  To include lighting in the output file, turn on the `[[collada_export_lighting]]` setting.&lt;br /&gt;
&lt;br /&gt;
* '''Labels.'''  Like lights, labels would be fixed with the objects, so from all but a narrow range of orientations, the text would be unreadable.&lt;br /&gt;
&lt;br /&gt;
* '''Volumes.'''  PyMOL's volume representation consists of a series of evenly spaced planes perpendicular to the viewport, the orientation of which is changed whenever the view is changed.  Unfortunately, this makes them essentially useless in a COLLADA scene as well, as, once the original orientation is changed, the planes would look less like a 3D volume projection, and more like a stack of flat images slicing through the rest of the scene.&lt;br /&gt;
&lt;br /&gt;
== Increasing the Quality ==&lt;br /&gt;
You can increase the number of triangles exported, and therefore the smoothness of the resulting objects, by increasing the following settings. &lt;br /&gt;
* surface_quality&lt;br /&gt;
* sphere_quality&lt;br /&gt;
* stick_quality&lt;br /&gt;
* cartoon_sampling&lt;br /&gt;
Conversely, to decrease the file size, decrease the settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OutputFormats]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=13353</id>
		<title>Selection Algebra</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=13353"/>
		<updated>2015-12-02T16:36:20Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Selection Operator/Modifier Table */ converted to wiki markup and made several minor edits (e.g. periods at end of &amp;quot;effect&amp;quot; column sentences.)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Selections can be made more precise or inclusive by combining them with logical operators, including the boolean '''and''', '''or''', and '''not'''. The boolean '''and''' selects only those items that have both (or all) of the named properties, and the boolean '''or''' selects items that have either (or any) of them. Venn diagrams show that '''and ''' selects the areas of overlap, while '''or''' selects both areas. &lt;br /&gt;
&lt;br /&gt;
See [http://pymol.sourceforge.net/newman/user/S0220venn.jpg simple logic Venn diagram].&lt;br /&gt;
&lt;br /&gt;
== Selection Operator/Modifier Table ==&lt;br /&gt;
Selection operators and modifiers are listed below. The dummy variables ''s1'' and ''s2'' stand for selection-expressions such as &amp;quot;chain a&amp;quot; or &amp;quot;hydro.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=10&lt;br /&gt;
|-&lt;br /&gt;
! Operator&lt;br /&gt;
! Short Form&lt;br /&gt;
! Effect&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| not ''s''1&lt;br /&gt;
| !''s''1&lt;br /&gt;
| Selects atoms that are not included in ''s''1. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sidechains, ! bb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 and ''s''2&lt;br /&gt;
| ''s''1 &amp;amp;amp; ''s''2&lt;br /&gt;
| Selects atoms included in both ''s''1 and ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select far_bb, bb &amp;amp;amp;farfrm_ten&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 or ''s''2&lt;br /&gt;
| ''s''1 | ''s''2&lt;br /&gt;
| Selects atoms included in either ''s''1 or ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select all_prot, bb | sidechain&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
|Selects atoms in ''s''1 whose identifiers name, resi, resn, chain and segi &amp;lt;u&amp;gt;'''all'''&amp;lt;/u&amp;gt; match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select same_atms, pept in prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 like ''s''2&lt;br /&gt;
| ''s''1 l. ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 whose identifiers name and resi match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select similar_atms, pept like prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 gap ''X''&lt;br /&gt;
|&lt;br /&gt;
|Selects all atoms whose van der Waals radii are separated from the van der Waals radii of ''s''1 by a minimum of'' X'' Angstroms.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select farfrm_ten, resi 10 gap 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 around ''X''&lt;br /&gt;
| ''s''1 a. ''X''&lt;br /&gt;
|Selects atoms with centers within'' X'' Angstroms of the center of any atom in''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten, resi 10 around 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 expand ''X''&lt;br /&gt;
| ''s''1 x. ''X''&lt;br /&gt;
|Expands ''s''1 by all atoms within ''X'' Angstroms of the center of any atom in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten_x, near_ten expand 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 within ''X'' of ''s''2&lt;br /&gt;
| ''s''1 w. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 that are within ''X'' Angstroms of any atom in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select bbnearten, bb w. 4 of resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 near_to ''X'' of ''s''2&lt;br /&gt;
| ''s''1 nto. ''X'' of ''s''2&lt;br /&gt;
| Same as ''within'', but excludes ''s''2 from the selection (and thus is identical to &amp;lt;code&amp;gt;s1 and ''s2'' around X&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 beyond ''X'' of ''s''2&lt;br /&gt;
| ''s''1 be. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s1'' that are at least ''X'' Anstroms away from ''s2''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byres ''s''1&lt;br /&gt;
| br. ''s''1&lt;br /&gt;
| Expands selection to complete residues.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_res, br. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bymolecule ''s''1&lt;br /&gt;
| bm. ''s''1&lt;br /&gt;
| Expands selection to complete molecules.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_mol, bm. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byfragment ''s''1&lt;br /&gt;
| bf. ''s''1&lt;br /&gt;
| Expands selection to complete fragments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_frag, bf. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bysegment ''s''1&lt;br /&gt;
| bs. ''s''1&lt;br /&gt;
| Expands selection to complete segments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_seg, bs. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byobject ''s''1&lt;br /&gt;
| bo. ''s''1&lt;br /&gt;
| Expands selection to complete objects.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_obj, bo. near_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bycell ''s''1&lt;br /&gt;
| &lt;br /&gt;
| Expands selection to unit cell.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_cell, bycell orig_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| neighbor ''s''1&lt;br /&gt;
| nbr. ''s''1&lt;br /&gt;
| Selects atoms directly bonded to ''s''1, excludes ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select vicinos, neighbor resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bound_to ''s1''&lt;br /&gt;
| bto. ''s1''&lt;br /&gt;
| Selects atoms directly bonded to ''s1'', may include ''s1''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 extend ''X''&lt;br /&gt;
| ''s''1 xt. ''X''&lt;br /&gt;
| Extends ''s''1 by ''X'' bonds connected to atoms in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select connect_x, near10 extend 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| pepseq ''SEQ''&lt;br /&gt;
| ps. ''SEQ''&lt;br /&gt;
| Selects peptide sequence matching upper-case one-letter sequence ''SEQ'' (see also [[FindSeq]]).&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select 1tvn and ps. FATEW&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rep ''rep''&lt;br /&gt;
|&lt;br /&gt;
| Selects atoms which show representation ''rep''.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sele, rep spheres&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of distance operators ==&lt;br /&gt;
&lt;br /&gt;
There are serveral very similar operators that select by pairwise atom distances. The following table lists the details how they differ.&lt;br /&gt;
&lt;br /&gt;
'''Syntax 1''': ''s1'' operator X of ''s2''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Syntax 2''': ''s1'' and (''s2'' operator X)&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=4 style=&amp;quot;text-align:center&amp;quot; class=wikitable&lt;br /&gt;
! operator !! distance is ... !! measured from !! includes s2 !! syntax !! notes&lt;br /&gt;
|-&lt;br /&gt;
|  near_to ||  ≤ X            ||     center    ||    never    ||   1    || equivalent to &amp;quot;around&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   within ||  ≤ X            ||     center    ||if matches s1||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|   beyond ||  &amp;gt; X            ||     center    ||    never    ||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|      gap ||  &amp;gt; X            ||   center+vdw  ||    never    ||   2    ||&lt;br /&gt;
|-&lt;br /&gt;
|   around ||  ≤ X            ||     center    ||    never    ||   2    || equivalent to &amp;quot;near_to&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   expand ||  ≤ X            ||     center    ||   always    ||   2    ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Logical selections can be combined. For example, you might select atoms that are part of chain a, but not residue number 125:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# selects atoms that are part of chain a, but not residue number 125.&lt;br /&gt;
select chain a and (not resi 125)&lt;br /&gt;
&lt;br /&gt;
# The following two selections are equivalent, &lt;br /&gt;
select (name cb or name cg1 or name cg2) and chain A&lt;br /&gt;
&lt;br /&gt;
# select c-beta's, c-gamma-1's and c-gamma-2's &lt;br /&gt;
# that are in chain A.&lt;br /&gt;
select name cb+cg1+cg2 and chain A&lt;br /&gt;
&lt;br /&gt;
# select all residues within 5 Ang. or any organic small molecules&lt;br /&gt;
select br. all within 5 of organic&lt;br /&gt;
&lt;br /&gt;
# select helices&lt;br /&gt;
select ss 'h'&lt;br /&gt;
&lt;br /&gt;
# select anything shown as a line&lt;br /&gt;
select rep lines&lt;br /&gt;
&lt;br /&gt;
# select all residues with a b-factor less than 20, within 3 angstroms of any water&lt;br /&gt;
select br. b&amp;lt;20 &amp;amp; (all within 3 of resn HOH)&lt;br /&gt;
&lt;br /&gt;
# select anything colored blue&lt;br /&gt;
select color blue&lt;br /&gt;
&lt;br /&gt;
# select the 1st arginine&lt;br /&gt;
select first resn arg&lt;br /&gt;
&lt;br /&gt;
# select 1foo's segment G's chain X's residue 444's alpha carbon&lt;br /&gt;
select 1foo/G/X/444/CA&lt;br /&gt;
# same thing&lt;br /&gt;
select 1foo and segi G and c. X and i. 444 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the entire object that residue 23's beta caron is in:&lt;br /&gt;
select bo. i. 23 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the molecule that chain C is in&lt;br /&gt;
select bm. c. C&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like the results of groups of arithmetic operations, the results of groups of logical operations depend on which operation is performed first. They have an order of precedence. To ensure that the operations are performed in the order you have in mind, use parentheses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;byres ((chain a or (chain b and (not resi 125))) around 5)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PyMOL will expand its logical selection out from the innermost parentheses.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Single-word Selectors]], [[Selection Macros]], [[Property_Selectors]], [[Identify]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Selector Quick Reference]]&lt;br /&gt;
[[Category:Selecting|Selection Algebra]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13319</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13319"/>
		<updated>2015-11-10T04:28:59Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* With xquartz intalled */ This is untested, but just updating the flags to the current syntax listed in the homebrew/homebrew-science/pymol.rb formula.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS with Fink==&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] include a hybrid PyMOL. It can be installed with:&lt;br /&gt;
 sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
Make sure that the Tk and Tcl packages are installed with the required flags:&lt;br /&gt;
 sudo port -f uninstall tcl&lt;br /&gt;
 sudo port -f uninstall tk&lt;br /&gt;
 &lt;br /&gt;
 sudo port install tcl -corefoundation&lt;br /&gt;
 sudo port install tk -quartz&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.  This can also be done with [https://github.com/caskroom/homebrew-cask Homebrew Cask]:&lt;br /&gt;
&lt;br /&gt;
 brew install caskroom/cask/brew-cask&lt;br /&gt;
 brew cask install xquartz&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew install homebrew/science/pymol&lt;br /&gt;
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Troubleshooting=====&lt;br /&gt;
If you get this error&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 71, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 533, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol._cmd&lt;br /&gt;
 ImportError: dlopen(/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so, 2): Library not loaded: /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
   Referenced from: /usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so&lt;br /&gt;
   Reason: image not found&lt;br /&gt;
You could try this, linking another libGLEW library to the one who is asked for&lt;br /&gt;
 ln -s /usr/local/lib/libGLEW.1.12.0.dylib /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
&lt;br /&gt;
== Stereo issues ==&lt;br /&gt;
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`.  You can also set up an alias in your ~/.profile:&lt;br /&gt;
&lt;br /&gt;
 alias pymol='pymol -M'&lt;br /&gt;
&lt;br /&gt;
== With previously brew-installed python or tcl/tk ==&lt;br /&gt;
Brewed PyMOL requires python compiled with the --with-tcl-tk option and tcl-tk compiled with the --with-threads and --with-x11 options.  If you've already brew-installed either of these packages without these options, you'll have to uninstall and reinstall them as follows, then proceed to install PyMOL (assuming you've already either attempted to `brew install homebrew/science/pymol` or run `brew tap homebrew/science`).&lt;br /&gt;
&lt;br /&gt;
 brew update  # just to keep things current&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew uninstall tcl-tk&lt;br /&gt;
 brew install tcl-tk --with-threads --with-x11&lt;br /&gt;
 brew install python --with-tcl-tk&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13318</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13318"/>
		<updated>2015-11-10T04:19:39Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Switch stereo */ Renamed section, and rewrote most of the content because latest homebrew install no longer switches the stereo/mono paradigm as previously described.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS with Fink==&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] include a hybrid PyMOL. It can be installed with:&lt;br /&gt;
 sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
Make sure that the Tk and Tcl packages are installed with the required flags:&lt;br /&gt;
 sudo port -f uninstall tcl&lt;br /&gt;
 sudo port -f uninstall tk&lt;br /&gt;
 &lt;br /&gt;
 sudo port install tcl -corefoundation&lt;br /&gt;
 sudo port install tk -quartz&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.  This can also be done with [https://github.com/caskroom/homebrew-cask Homebrew Cask]:&lt;br /&gt;
&lt;br /&gt;
 brew install caskroom/cask/brew-cask&lt;br /&gt;
 brew cask install xquartz&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew install homebrew/science/pymol&lt;br /&gt;
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Troubleshooting=====&lt;br /&gt;
If you get this error&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 71, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 533, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol._cmd&lt;br /&gt;
 ImportError: dlopen(/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so, 2): Library not loaded: /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
   Referenced from: /usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so&lt;br /&gt;
   Reason: image not found&lt;br /&gt;
You could try this, linking another libGLEW library to the one who is asked for&lt;br /&gt;
 ln -s /usr/local/lib/libGLEW.1.12.0.dylib /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
&lt;br /&gt;
== Stereo issues ==&lt;br /&gt;
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`.  You can also set up an alias in your ~/.profile:&lt;br /&gt;
&lt;br /&gt;
 alias pymol='pymol -M'&lt;br /&gt;
&lt;br /&gt;
== With xquartz intalled ==&lt;br /&gt;
For it to run well, you need to enable threads.  If you've already brew-installed python without threads, do:&lt;br /&gt;
 brew update&lt;br /&gt;
 brew uninstall tcl&lt;br /&gt;
 brew uninstall tk&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13317</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13317"/>
		<updated>2015-11-10T04:08:55Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* 3. Install PyMOL. */ latest version doesn't require multiple install commands--everything is handled by the install script (apparently)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS with Fink==&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] include a hybrid PyMOL. It can be installed with:&lt;br /&gt;
 sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
Make sure that the Tk and Tcl packages are installed with the required flags:&lt;br /&gt;
 sudo port -f uninstall tcl&lt;br /&gt;
 sudo port -f uninstall tk&lt;br /&gt;
 &lt;br /&gt;
 sudo port install tcl -corefoundation&lt;br /&gt;
 sudo port install tk -quartz&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.  This can also be done with [https://github.com/caskroom/homebrew-cask Homebrew Cask]:&lt;br /&gt;
&lt;br /&gt;
 brew install caskroom/cask/brew-cask&lt;br /&gt;
 brew cask install xquartz&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew install homebrew/science/pymol&lt;br /&gt;
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Troubleshooting=====&lt;br /&gt;
If you get this error&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 71, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 533, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol._cmd&lt;br /&gt;
 ImportError: dlopen(/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so, 2): Library not loaded: /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
   Referenced from: /usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so&lt;br /&gt;
   Reason: image not found&lt;br /&gt;
You could try this, linking another libGLEW library to the one who is asked for&lt;br /&gt;
 ln -s /usr/local/lib/libGLEW.1.12.0.dylib /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
&lt;br /&gt;
== Switch stereo ==&lt;br /&gt;
This installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, Homebrew-installed pymol defaults to assuming the &amp;quot;-M&amp;quot; flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the &amp;quot;-S&amp;quot; flag.&lt;br /&gt;
 pymol -S&lt;br /&gt;
Alternatively, you can install pymol with original stereo graphics on as default by installing with&lt;br /&gt;
 brew install pymol --default-stereo&lt;br /&gt;
&lt;br /&gt;
== With xquartz intalled ==&lt;br /&gt;
For it to run well, you need to enable threads.  If you've already brew-installed python without threads, do:&lt;br /&gt;
 brew update&lt;br /&gt;
 brew uninstall tcl&lt;br /&gt;
 brew uninstall tk&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13316</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13316"/>
		<updated>2015-11-10T04:06:20Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* 2. Install Xquartz. */ add homebrew cask option to install Xquartz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS with Fink==&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] include a hybrid PyMOL. It can be installed with:&lt;br /&gt;
 sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
Make sure that the Tk and Tcl packages are installed with the required flags:&lt;br /&gt;
 sudo port -f uninstall tcl&lt;br /&gt;
 sudo port -f uninstall tk&lt;br /&gt;
 &lt;br /&gt;
 sudo port install tcl -corefoundation&lt;br /&gt;
 sudo port install tk -quartz&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.  This can also be done with [https://github.com/caskroom/homebrew-cask Homebrew Cask]:&lt;br /&gt;
&lt;br /&gt;
 brew install caskroom/cask/brew-cask&lt;br /&gt;
 brew cask install xquartz&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew tap homebrew/science&lt;br /&gt;
 brew tap homebrew/dupes&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you get this error&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 71, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol&lt;br /&gt;
   File &amp;quot;/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/__init__.py&amp;quot;, line 533, in &amp;lt;module&amp;gt;&lt;br /&gt;
     import pymol._cmd&lt;br /&gt;
 ImportError: dlopen(/usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so, 2): Library not loaded: /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
   Referenced from: /usr/local/Cellar/pymol/1.7.4.0/libexec/lib/python2.7/site-packages/pymol/_cmd.so&lt;br /&gt;
   Reason: image not found&lt;br /&gt;
You could try this, linking another libGLEW library to the one who is asked for&lt;br /&gt;
 ln -s /usr/local/lib/libGLEW.1.12.0.dylib /usr/local/lib/libGLEW.1.11.0.dylib&lt;br /&gt;
&lt;br /&gt;
== Switch stereo ==&lt;br /&gt;
This installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, Homebrew-installed pymol defaults to assuming the &amp;quot;-M&amp;quot; flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the &amp;quot;-S&amp;quot; flag.&lt;br /&gt;
 pymol -S&lt;br /&gt;
Alternatively, you can install pymol with original stereo graphics on as default by installing with&lt;br /&gt;
 brew install pymol --default-stereo&lt;br /&gt;
&lt;br /&gt;
== With xquartz intalled ==&lt;br /&gt;
For it to run well, you need to enable threads.  If you've already brew-installed python without threads, do:&lt;br /&gt;
 brew update&lt;br /&gt;
 brew uninstall tcl&lt;br /&gt;
 brew uninstall tk&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PYMOL_PATH&amp;diff=13087</id>
		<title>PYMOL PATH</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PYMOL_PATH&amp;diff=13087"/>
		<updated>2015-08-30T03:17:07Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Contents */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PYMOL_PATH''' environmental variable points to the root PyMOL directory. It contains internal PyMol code and core modules. It is also the location for plugins installed via the [[Plugin Manager]]. The variable should be set automatically by PyMOL, and should not normally need to be changed by the user.&lt;br /&gt;
&lt;br /&gt;
= Standard Locations =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Windows:''' &amp;lt;tt&amp;gt;C:\Program Files\PyMOL\&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mac:''' &amp;lt;tt&amp;gt;/Applications/MacPyMOL.app/pymol&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu''' (Open-source PyMOL): &amp;lt;tt&amp;gt;/usr/lib/python2.7/dist-packages/pymol&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Determining the location =&lt;br /&gt;
&lt;br /&gt;
For other operating systems or non-standard installation locations, the PYMOL_PATH can be determined by running the following command from within PyMOL:&lt;br /&gt;
&lt;br /&gt;
 print os.environ['PYMOL_PATH']&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
The contents of PYMOL_PATH should generally not be modified, but a few locations can be useful to know:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/examples/&amp;lt;/tt&amp;gt;''' Example PyMOL and Python scripts&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/modules/pmg_tk/startup/&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;PYMOL_PATH/run_on_startup.py&amp;lt;/tt&amp;gt;''' A python script run at startup, before &amp;lt;tt&amp;gt;.pymolrc&amp;lt;/tt&amp;gt;. See [[Plugin Manager]] for details.&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=13089</id>
		<title>Plugin Manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=13089"/>
		<updated>2015-08-29T19:18:50Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: add Plugins category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since version 1.5.0.5 PyMOL comes with a '''Plugin Manager''', which can be used to load plugins such as those in the [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&amp;lt;br&amp;gt;&lt;br /&gt;
Older versions have a basic version of this manager: '''Plugin''' &amp;gt; '''Manage Plugins''', however, here the scripts need to be added individually.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad. The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches. An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&lt;br /&gt;
&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the [[PYMOL_PATH|PyMOL home directory]]. An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
 &lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
 &lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
 &lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
 &lt;br /&gt;
# Make setting changes to Plugin Manager&lt;br /&gt;
try: # in case the PyMOL is older and doe not have the module pymol.plugins&lt;br /&gt;
    import pymol.plugins&lt;br /&gt;
 &lt;br /&gt;
    #THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&lt;br /&gt;
    pymol.plugins.set_startup_path([os.path.join(pymol_git, 'plugins'), os.path.join(sys.prefix, 'Lib', 'site-packages', 'pmg_tk', 'startup')])&lt;br /&gt;
 &lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
    pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
    # This can be used to trace if PyMOL executed the file correctly&lt;br /&gt;
    print 'Loaded run_on_stratup.py'&lt;br /&gt;
except:&lt;br /&gt;
    print 'NB! Plugin Manager not present!'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this block will also add the '''Pymol-script-repo''' and the subfolder '''Pymol-script-repo/modules''' to PyMOL's search path. This is something that is required in earlier PyMOL version to allow import of scripts. Thus this version of '''run_on_startup.py''' can be used for older versions, too.&lt;br /&gt;
&lt;br /&gt;
Note that the settings specific for the ''new'' version of the '''Plugin Manager''' will not have an effect.&lt;br /&gt;
&lt;br /&gt;
===What if the 'Pymol-script-repo' is not in the PyMOL directory?===&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the '''run_on_startup.py''' file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:/MY/RANDOM/PATH/TO/Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the slash ('/') instead of backslash ('\'), beware Windows users!&lt;br /&gt;
&lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins # Note that this requires the 'new' Plugin Manager&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plane_Wizard&amp;diff=12936</id>
		<title>Plane Wizard</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plane_Wizard&amp;diff=12936"/>
		<updated>2015-08-13T21:36:56Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Improve handling of auto_zoom setting (store original setting, then re-set it).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wizard has a simple purpose - to draw a cgo plane that passes through three points picked by the user. Most of the wizard itself was copied from the measure wizard.&lt;br /&gt;
&lt;br /&gt;
To use, put it in the same directory as the other wizards. This is not quality code, and there may be bugs, but it seems to work okay.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
from pymol.wizard import Wizard&lt;br /&gt;
from chempy import cpv&lt;br /&gt;
from pymol.cgo import *&lt;br /&gt;
&lt;br /&gt;
def makePrimitive(cgo, name):&lt;br /&gt;
    az = cmd.get('auto_zoom', quiet=1)&lt;br /&gt;
    cmd.set('auto_zoom', 0, quiet=1)&lt;br /&gt;
    cmd.load_cgo(cgo, name)&lt;br /&gt;
    cmd.set('auto_zoom', az, quiet=1)&lt;br /&gt;
&lt;br /&gt;
def point(p):&lt;br /&gt;
    x, y, z = p&lt;br /&gt;
    return [COLOR, 1, 1, 1, SPHERE, float(x), float(y), float(z), 0.5]&lt;br /&gt;
&lt;br /&gt;
def line(p1, p2):&lt;br /&gt;
    x1, y1, z1 = p1&lt;br /&gt;
    x2, y2, z2 = p2&lt;br /&gt;
    return [CYLINDER, float(x1), float(y1), float(z1), float(x2), float(y2), float(z2), 0.25, 1, 1, 1, 1, 1, 1]&lt;br /&gt;
&lt;br /&gt;
def plane(corner1, corner2, corner3, corner4, normal):&lt;br /&gt;
    planeObj = []&lt;br /&gt;
    planeObj.extend(point(corner1))&lt;br /&gt;
    planeObj.extend(point(corner2))&lt;br /&gt;
    planeObj.extend(point(corner3))&lt;br /&gt;
    planeObj.extend(point(corner4))&lt;br /&gt;
    planeObj.extend(line(corner1, corner2))&lt;br /&gt;
    planeObj.extend(line(corner2, corner3))&lt;br /&gt;
    planeObj.extend(line(corner3, corner4))&lt;br /&gt;
    planeObj.extend(line(corner4, corner1))&lt;br /&gt;
&lt;br /&gt;
    planeObj.extend([COLOR, 0.8, 0.8, 0.8])&lt;br /&gt;
    planeObj.extend([BEGIN, TRIANGLE_STRIP])&lt;br /&gt;
    planeObj.append(NORMAL)&lt;br /&gt;
    planeObj.extend(normal)&lt;br /&gt;
    for corner in [corner1, corner2, corner3, corner4, corner1]:&lt;br /&gt;
        planeObj.append(VERTEX)&lt;br /&gt;
        planeObj.extend(corner)&lt;br /&gt;
    planeObj.append(END)&lt;br /&gt;
    return planeObj&lt;br /&gt;
&lt;br /&gt;
def planeFromPoints(point1, point2, point3, facetSize):&lt;br /&gt;
    v1 = cpv.normalize(cpv.sub(point2, point1))&lt;br /&gt;
    v2 = cpv.normalize(cpv.sub(point3, point1))&lt;br /&gt;
    normal = cpv.cross_product(v1, v2)&lt;br /&gt;
    v2 = cpv.cross_product(normal, v1)&lt;br /&gt;
    x = cpv.scale(v1, facetSize)&lt;br /&gt;
    y = cpv.scale(v2, facetSize)&lt;br /&gt;
    center = point2&lt;br /&gt;
    corner1 = cpv.add(cpv.add(center, x), y)&lt;br /&gt;
    corner2 = cpv.sub(cpv.add(center, x), y)&lt;br /&gt;
    corner3 = cpv.sub(cpv.sub(center, x), y)&lt;br /&gt;
    corner4 = cpv.add(cpv.sub(center, x), y)&lt;br /&gt;
    return plane(corner1, corner2, corner3, corner4, normal)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class PlaneWizard(Wizard):&lt;br /&gt;
&lt;br /&gt;
    def __init__(self):&lt;br /&gt;
        Wizard.__init__(self)&lt;br /&gt;
&lt;br /&gt;
        # some attributes to do with picking&lt;br /&gt;
        self.pick_count = 0&lt;br /&gt;
        self.object_count = 0&lt;br /&gt;
        self.object_prefix = &amp;quot;pw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        # the plane facet size (the 'radius' of the section of plane we show)&lt;br /&gt;
        self.facetSize = 5&lt;br /&gt;
&lt;br /&gt;
        self.selection_mode = cmd.get_setting_legacy(&amp;quot;mouse_selection_mode&amp;quot;)&lt;br /&gt;
        cmd.set(&amp;quot;mouse_selection_mode&amp;quot;,0) # set selection mode to atomic&lt;br /&gt;
        cmd.deselect()&lt;br /&gt;
&lt;br /&gt;
    def reset(self):&lt;br /&gt;
        cmd.delete(self.object_prefix + &amp;quot;*&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;sele*&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;_indicate*&amp;quot;)&lt;br /&gt;
        cmd.unpick()&lt;br /&gt;
        cmd.refresh_wizard()&lt;br /&gt;
&lt;br /&gt;
    def delete_all(self):&lt;br /&gt;
        cmd.delete(&amp;quot;plane*&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    def cleanup(self):&lt;br /&gt;
        cmd.set(&amp;quot;mouse_selection_mode&amp;quot;,self.selection_mode) # restore selection mode&lt;br /&gt;
        self.reset()&lt;br /&gt;
        self.delete_all()&lt;br /&gt;
&lt;br /&gt;
    def get_prompt(self):&lt;br /&gt;
        self.prompt = None&lt;br /&gt;
        if self.pick_count == 0:&lt;br /&gt;
            self.prompt = [ 'Please click on the first atom...']&lt;br /&gt;
        elif self.pick_count == 1:&lt;br /&gt;
            self.prompt = [ 'Please click on the second atom...' ]&lt;br /&gt;
        elif self.pick_count == 2:&lt;br /&gt;
            self.prompt = [ 'Please click on the third atom...' ]&lt;br /&gt;
        return self.prompt&lt;br /&gt;
&lt;br /&gt;
    def do_select(self, name):&lt;br /&gt;
        # &amp;quot;edit&amp;quot; only this atom, and not others with the object prefix&lt;br /&gt;
        try:&lt;br /&gt;
            cmd.edit(&amp;quot;%s and not %s*&amp;quot; % (name, self.object_prefix))&lt;br /&gt;
            self.do_pick(0)&lt;br /&gt;
        except pymol.CmdException, pmce:&lt;br /&gt;
            print pmce&lt;br /&gt;
&lt;br /&gt;
    def pickNextAtom(self, atom_name):&lt;br /&gt;
        # transfer the click selection to a named selection&lt;br /&gt;
        cmd.select(atom_name, &amp;quot;(pk1)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # delete the click selection&lt;br /&gt;
        cmd.unpick()&lt;br /&gt;
&lt;br /&gt;
        # using the magic of indicate, highlight stuff&lt;br /&gt;
        indicate_selection = &amp;quot;_indicate&amp;quot; + self.object_prefix&lt;br /&gt;
        cmd.select(indicate_selection, atom_name)&lt;br /&gt;
        cmd.enable(indicate_selection)&lt;br /&gt;
&lt;br /&gt;
        self.pick_count += 1&lt;br /&gt;
        self.error = None&lt;br /&gt;
&lt;br /&gt;
        # necessary to force update of the prompt&lt;br /&gt;
        cmd.refresh_wizard()&lt;br /&gt;
&lt;br /&gt;
    def do_pick(self, picked_bond):&lt;br /&gt;
&lt;br /&gt;
        # this shouldn't actually happen if going through the &amp;quot;do_select&amp;quot;&lt;br /&gt;
        if picked_bond:&lt;br /&gt;
            self.error = &amp;quot;Error: please select bonds, not atoms&amp;quot;&lt;br /&gt;
            print self.error&lt;br /&gt;
            return&lt;br /&gt;
&lt;br /&gt;
        atom_name = self.object_prefix + str(self.pick_count)&lt;br /&gt;
        if self.pick_count &amp;lt; 2:&lt;br /&gt;
            self.pickNextAtom(atom_name)&lt;br /&gt;
        else:&lt;br /&gt;
            self.pickNextAtom(atom_name)&lt;br /&gt;
&lt;br /&gt;
            point1 = cmd.get_atom_coords(&amp;quot;(%s%s)&amp;quot; % (self.object_prefix, &amp;quot;0&amp;quot;))&lt;br /&gt;
            point2 = cmd.get_atom_coords(&amp;quot;(%s%s)&amp;quot; % (self.object_prefix, &amp;quot;1&amp;quot;))&lt;br /&gt;
            point3 = cmd.get_atom_coords(&amp;quot;(%s%s)&amp;quot; % (self.object_prefix, &amp;quot;2&amp;quot;))&lt;br /&gt;
            plane = planeFromPoints(point1, point2, point3, self.facetSize)&lt;br /&gt;
&lt;br /&gt;
            planeName = &amp;quot;plane-%02d&amp;quot; % self.object_count&lt;br /&gt;
            self.object_count += 1&lt;br /&gt;
            makePrimitive(plane, planeName)&lt;br /&gt;
            cmd.show(&amp;quot;cgo&amp;quot;, &amp;quot;plane*&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
            self.pick_count = 0&lt;br /&gt;
            self.reset()&lt;br /&gt;
&lt;br /&gt;
    def get_panel(self):&lt;br /&gt;
        return [&lt;br /&gt;
            [ 1, 'Plane Wizard',''],&lt;br /&gt;
            [ 2, 'Reset','cmd.get_wizard().reset()'],&lt;br /&gt;
            [ 2, 'Delete All Planes' , 'cmd.get_wizard().delete_all()'],&lt;br /&gt;
            [ 2, 'Done','cmd.set_wizard()'],&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
# create an instance&lt;br /&gt;
&lt;br /&gt;
wiz = PlaneWizard()&lt;br /&gt;
&lt;br /&gt;
# make this the active wizard&lt;br /&gt;
&lt;br /&gt;
cmd.set_wizard(wiz)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Category:Script_Library|Plane Wizard]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugins&amp;diff=12735</id>
		<title>Plugins</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugins&amp;diff=12735"/>
		<updated>2015-06-08T03:22:30Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Using Fink */ Change title of section to reflect additonal package managers. Fix link for Fink, add links for MacPorts and Homebrew. Update install example to refer to pymol-py27 fink package and remove unnecessary tags.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plugins are modules which can add functionality to Pymol.&lt;br /&gt;
&lt;br /&gt;
== Plugins on OS X ==&lt;br /&gt;
&lt;br /&gt;
=== Using MacPyMOL ===&lt;br /&gt;
The standard OS X Pymol application, MacPyMOL.app does not run with the Tcl/Tk interface which is required for plugins to work. However, a quick renaming of the program from MacPyMOL.app to PyMOLX11Hybrid.app makes the application run as an X11 application, and plugins are now available.&lt;br /&gt;
&lt;br /&gt;
To rename the executable, right click (or control click) on MacPyMOL and choose &amp;quot;Get Info&amp;quot; in the Panel. Change the Name &amp;amp; Extension to PyMOLX11Hybrid.app. This name can also be changed using the mv command in Terminal.app. &lt;br /&gt;
&lt;br /&gt;
Once this change is made, half of the program will show up under the X11 icon, and half will show up under the MacPyMOL icon.&lt;br /&gt;
&lt;br /&gt;
=== Using a Package Manager ===&lt;br /&gt;
An alternative to renaming MacPyMOL is to download the PyMOL installation using a package manager such as [[MAC_Install#PyMOL_and_Fink|Fink]], [[MAC_Install#PyMOL_in_MacPorts|MacPorts]], or [[MAC_Install#Installing_PyMOL_with_Homebrew|Homebrew]].&lt;br /&gt;
&lt;br /&gt;
 fink install pymol-py27&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12738</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12738"/>
		<updated>2015-06-07T21:02:35Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Correct link to raw plugin file in repo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL version (&amp;gt;1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with steric vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to [[User:Andwar| contact me]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Git intro]]&lt;br /&gt;
* [[Plugin_manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12737</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12737"/>
		<updated>2015-06-07T20:41:34Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Add plugins category.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL version (&amp;gt;1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with steric vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to [[User:Andwar| contact me]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Git intro]]&lt;br /&gt;
* [[Plugin_manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Collada_geometry_mode&amp;diff=12767</id>
		<title>Collada geometry mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Collada_geometry_mode&amp;diff=12767"/>
		<updated>2015-05-20T22:52:24Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Collada geometry mode''' controls the types of &amp;lt;code&amp;gt;geometry&amp;lt;/code&amp;gt; elements used in [[COLLADA]] output.  Different modes can be useful depending on how the output file will be used, as different graphics viewing and editing applications have varying levels of support for the various features of the COLLADA [https://www.khronos.org/files/collada_spec_1_4.pdf specification].&lt;br /&gt;
&lt;br /&gt;
=Values=&lt;br /&gt;
Currently there are 2 modes implemented for COLLADA geometry export.&lt;br /&gt;
* '''0''': (default) Use any valid COLLADA 1.4.1 elements, including &amp;lt;code&amp;gt;triangles&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trifans&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tristrips&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;polylist&amp;lt;/code&amp;gt;, etc.  This is the recommended mode for most applications, including Apple's Preview and iBooks/iBooks Author.&lt;br /&gt;
* '''1''': Blender-compatible mode.  Use only &amp;lt;code&amp;gt;polylist&amp;lt;/code&amp;gt; elements.  This generally results in a larger file size, as &amp;lt;code&amp;gt;polylist&amp;lt;/code&amp;gt; elements require explicit data for things like the number of vertices in each polygon (&amp;lt;code&amp;gt;&amp;lt;vcount&amp;gt;&amp;lt;/code&amp;gt;), whereas the more specific elements like &amp;lt;code&amp;gt;triangles&amp;lt;/code&amp;gt; do not (by definition, each triangle has 3 vertices).&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set collada_geometry_mode, 0    # Valid COLLADA 1.4.1 (default)&lt;br /&gt;
set collada_geometry_mode, 1    # Blender-compatible mode&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
The following script creates two output files containing a single cylinder, one with the default collada_geometry_mode set to 0 (cgm0.dae) and the other set to 1 (cgm1.dae).  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
pseudoatom ps1, pos=[-0.5,0,0]&lt;br /&gt;
pseudoatom ps2, pos=[0.5,0,0]&lt;br /&gt;
hide nonbonded&lt;br /&gt;
distance d, ps1, ps2&lt;br /&gt;
set dash_round_ends, 0&lt;br /&gt;
set dash_gap, 0&lt;br /&gt;
hide labels, d&lt;br /&gt;
save cgm0.dae&lt;br /&gt;
set collada_geometry_mode, 1&lt;br /&gt;
save cgm1.dae&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Running &amp;lt;code&amp;gt;diff cgm0.dae cgm1.dae&amp;lt;/code&amp;gt; on the two output files results in the following output, indicating that for collada_geometry_mode=1, &amp;lt;code&amp;gt;polylist&amp;lt;/code&amp;gt; elements were used to create the ends of the cylinder, rather than &amp;lt;code&amp;gt;triangle&amp;lt;/code&amp;gt; elements.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
70c70&lt;br /&gt;
&amp;lt;         &amp;lt;triangles count=&amp;quot;8&amp;quot; material=&amp;quot;geom0-material&amp;quot;&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt;         &amp;lt;polylist count=&amp;quot;8&amp;quot; material=&amp;quot;geom0-material&amp;quot;&amp;gt;&lt;br /&gt;
73a74&lt;br /&gt;
&amp;gt;           &amp;lt;vcount&amp;gt;3 3 3 3 3 3 3 3 &amp;lt;/vcount&amp;gt;&lt;br /&gt;
75,76c76,77&lt;br /&gt;
&amp;lt;         &amp;lt;/triangles&amp;gt;&lt;br /&gt;
&amp;lt;         &amp;lt;triangles count=&amp;quot;8&amp;quot; material=&amp;quot;geom0-material&amp;quot;&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt;         &amp;lt;/polylist&amp;gt;&lt;br /&gt;
&amp;gt;         &amp;lt;polylist count=&amp;quot;8&amp;quot; material=&amp;quot;geom0-material&amp;quot;&amp;gt;&lt;br /&gt;
79a81&lt;br /&gt;
&amp;gt;           &amp;lt;vcount&amp;gt;3 3 3 3 3 3 3 3 &amp;lt;/vcount&amp;gt;&lt;br /&gt;
81c83&lt;br /&gt;
&amp;lt;         &amp;lt;/triangles&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt;         &amp;lt;/polylist&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[COLLADA]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Modeling_and_Editing_Structures&amp;diff=12789</id>
		<title>Modeling and Editing Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Modeling_and_Editing_Structures&amp;diff=12789"/>
		<updated>2015-05-20T16:21:26Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Adding and using your own fragments */ clarified that editing modules/pmg_tk/skins/normal/__init__.py would add a menu item, not a hotkey.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Modeling in PyMOL=&lt;br /&gt;
&lt;br /&gt;
==Saving with transformed coordinates==&lt;br /&gt;
&lt;br /&gt;
Here is a simple script that saves the molecule with coordinates from the current orientation.&lt;br /&gt;
(invoke it with 'run save_transformed.py' and type the new save_transformed.py command thereafter).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Adds the command save_transformed&lt;br /&gt;
# Usage: save_transformed object, file&lt;br /&gt;
def save_transformed(object,file):&lt;br /&gt;
    m = cmd.get_view(0)&lt;br /&gt;
    ttt = [m[0], m[1], m[2], 0.0,&lt;br /&gt;
           m[3], m[4], m[5], 0.0,&lt;br /&gt;
           m[6], m[7], m[8], 0.0,&lt;br /&gt;
           0.0,   0.0,  0.0, 1.0]&lt;br /&gt;
    cmd.transform_object(object,ttt)&lt;br /&gt;
    cmd.save(file,object)&lt;br /&gt;
&lt;br /&gt;
cmd.extend('save_transformed',save_transformed)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Translate or rotate individual objects==&lt;br /&gt;
There is a &amp;quot;[[translate]]&amp;quot; function similar to &amp;quot;[[rotate]]&amp;quot;, feel free to use them in the following forms:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
translate vector,object-name,state&lt;br /&gt;
   (vector needs to be something like [x,y,z])&lt;br /&gt;
&lt;br /&gt;
   translate [1,0,0],pept&lt;br /&gt;
&lt;br /&gt;
rotate axis,angle,object-name,state&lt;br /&gt;
   (axis can be either the letter x,y,z or a 3D vector [x,y,z])&lt;br /&gt;
   rotate x,90,pept&lt;br /&gt;
   rotate [1,1,1],10,pept&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Moving one segment relative to the rest==&lt;br /&gt;
&lt;br /&gt;
This means moving two parts of one object into different directions. The easiest way to do this is to split the objects and then use the rotate command.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load 1FJ1.pdb&lt;br /&gt;
&lt;br /&gt;
# split PDB file&lt;br /&gt;
&lt;br /&gt;
create anti=(chain F) &lt;br /&gt;
create fab=(chain A,B)&lt;br /&gt;
&lt;br /&gt;
# delete original object&lt;br /&gt;
delete 1FJ1&lt;br /&gt;
&lt;br /&gt;
# color objects&lt;br /&gt;
color green,fab&lt;br /&gt;
color pink,anti&lt;br /&gt;
&lt;br /&gt;
# color interface&lt;br /&gt;
select inter = (byres ((fab within 5 of anti)\&lt;br /&gt;
   or (anti within 5 of fab)))&lt;br /&gt;
&lt;br /&gt;
color yellow,inter&lt;br /&gt;
&lt;br /&gt;
# splay apart&lt;br /&gt;
orient&lt;br /&gt;
origin fab&lt;br /&gt;
rotate y,60,fab&lt;br /&gt;
origin anti&lt;br /&gt;
rotate y,-60, anti&lt;br /&gt;
&lt;br /&gt;
# zoom interface region&lt;br /&gt;
zoom inter&lt;br /&gt;
show sph,inter&lt;br /&gt;
disable inter&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==[[Split_States|Split states]] to objects==&lt;br /&gt;
There is also a new command in the 0.95 series:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
   split_states object-name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which will spread a PDB &amp;quot;biological unit&amp;quot; (or any multi-state object -- including SD files) over a series of independent objects. This makes it possible to interact with such objects more naturally than with &amp;quot;all_states = 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Altering secondary structures==&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 alter A/10:34/, ss='H'&lt;br /&gt;
 alter A/35:40/, ss='L'&lt;br /&gt;
 alter A/41:60/, ss='S'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Altering van der Waals radii==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter (elem Fe),vdw=1.8&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
(The value for Fe is wrecked in PyMOL at the moment, so running the above line might be a good idea).&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Altering atom coordinates==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter_state 1,(pdb1cse),x=x-10.0 &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The latter section can contain formulae involving at least the xyz coordinates, lots of constants and the (+-*/) operators.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Deleting bonds==&lt;br /&gt;
&lt;br /&gt;
Select the bond using Ctrl-right-click, then either&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or hit Ctrl-D.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Converting D- to L- amino acids==&lt;br /&gt;
The inversion function was changed in version 0.95 to take advantage of multiple picked atoms. To invert a center, Ctrl-middle-click to pick the center atom as pk1 and two stationary atoms as pk2 and pk3. Then type Ctrl-E to invert.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Adding disulfide bonds==&lt;br /&gt;
You can use the [[bond]] command to attach them:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
bond 24/sg,26/sg&lt;br /&gt;
bond 56/sg,99/sg&lt;br /&gt;
unpick&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
(unpick will hide the bond baton which gets displayed.)&lt;br /&gt;
Additionally, the residue names can be changed for bonded cysteines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter cys/,name='CYX'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or for specific residues&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter 24+26+56+99/,name='CYX'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Adding hydrogen bonds==&lt;br /&gt;
:''See [[Displaying_Biochemical_Properties#Hydrogen_bonds_and_Polar_Contacts|Displaying biochemical properties]].''&lt;br /&gt;
&lt;br /&gt;
==Protonating ligands==&lt;br /&gt;
If your ligands come in with valid valencies and formal charges, PyMOL's h_add command can protonate ligands. (NOTE that there is a minor technical hiccup with SD-files which are loaded by default as immutable &amp;quot;discrete&amp;quot; objects.) Suffice it to say that in order to make changes to the chemical structure, an object must be loaded with the &amp;quot;discrete&amp;quot; flag set to zero.&lt;br /&gt;
Unfortunately, much of the molecular editing stuff remains to be documented. Here's an example sequence, but I'm not sure it will help to much...as indicated in the manual, this is immature functionality with some major gaps. Attach in particular is very limited...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# show valences&lt;br /&gt;
set valence=0.05&lt;br /&gt;
&lt;br /&gt;
# load cysteine fragment&lt;br /&gt;
fragment cys&lt;br /&gt;
&lt;br /&gt;
# remove hydrogens&lt;br /&gt;
remove (hydro)&lt;br /&gt;
&lt;br /&gt;
# edit gamma S&lt;br /&gt;
edit cys////sg&lt;br /&gt;
&lt;br /&gt;
# add hydrogen&lt;br /&gt;
attach H,1,1&lt;br /&gt;
&lt;br /&gt;
# add planer, trivalent nitrogen onto C terminus&lt;br /&gt;
edit cys////C&lt;br /&gt;
attach N,3,3&lt;br /&gt;
&lt;br /&gt;
# edit that nitrogen&lt;br /&gt;
edit (elem N and neighbor cys////C)&lt;br /&gt;
&lt;br /&gt;
# attach a tetrahedral methyl (note random position)&lt;br /&gt;
attach C,4,4&lt;br /&gt;
&lt;br /&gt;
# here's an example of adding a whole residue from the library&lt;br /&gt;
edit cys////N&lt;br /&gt;
editor.attach_amino_acid(&amp;quot;pk1&amp;quot;,&amp;quot;ace&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now restore missing hydrogens (note that the names are off...)&lt;br /&gt;
h_add&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Superposition of two molecules==&lt;br /&gt;
Using pair_fit requires that you specify a set of paired atoms in each structure. Fortunately, you no longer have to specify each pair separately, so long as the ordering is the same in each selection (almost always true).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pair_fit ( trna10 and resid 10:15 and name P ), ( ref4 and resid 10:15 and name P )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pair_fit prot1///11-26/CA, prot2///34-49/CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
would superimpose prot1 on prot2 using C-alphas from residues 11-26 in prot1 and 34-49 in prot2.&lt;br /&gt;
&lt;br /&gt;
==Manual superposition of two molecules==&lt;br /&gt;
You can also align to structures using mouse rotation/translation. For this, you need to protect those molecules you don't want to move with (action menu -&amp;gt; movement -&amp;gt; protect) in the selection menu.&lt;br /&gt;
&lt;br /&gt;
Protect one object, deprotect the other, grab the deprotected object and move with Shift-Mouse. &lt;br /&gt;
Don't forget to  switch to Mouse Editing mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding and using your own fragments==&lt;br /&gt;
Pymol has some build-in fragments (amino acids and simple functional groups). You can add your own fragments, eg. sugars, in this way:&lt;br /&gt;
&lt;br /&gt;
Create the molecule you want to use as a fragment. Save it as a .pkl file in &amp;lt;pymol_path&amp;gt;/data/chempy/fragments.&lt;br /&gt;
&lt;br /&gt;
How to use the fragment:&lt;br /&gt;
&lt;br /&gt;
Pick the atom (ctrl-middle) where you want to add the fragment. This will usually be a hydrogen atom (which will be removed). Then use the command:&lt;br /&gt;
&lt;br /&gt;
 editor.attach_fragment('pk1','my_fragment_name',11,0)&lt;br /&gt;
&lt;br /&gt;
where my_fragment_name is the name of the pkl-file (w/o .pkl extension) and 11 is the number of the connecting (hydrogen) atom in the fragment. &lt;br /&gt;
To determine this number, press '[L]abel' -&amp;gt; 'atom identifiers' -&amp;gt; 'index' and choose the hydrogen atom you want.&lt;br /&gt;
&lt;br /&gt;
If you want a menu item for your fragment, you can probably put it in &amp;lt;pymol_path&amp;gt;/modules/pmg_tk/skins/normal/__init__.py, but I haven't tried this.&lt;br /&gt;
&lt;br /&gt;
[[Category:Advanced Issues|Modeling and Editing Structures]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:States]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Mset&amp;diff=12801</id>
		<title>Mset</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Mset&amp;diff=12801"/>
		<updated>2015-05-06T14:31:19Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* EXAMPLES */ fixed python comments to use # instead of //&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''mset''' sets up a relationship between molecular states and movie frames.  This makes it possible to control which states are shown in which frame.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 mset specification [ ,frame ]&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.mset( string specification [, int frame] )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
mset 1         # simplest case, one state -&amp;gt; one frame&lt;br /&gt;
mset 1 x10     # ten frames, all corresponding to state 1&lt;br /&gt;
mset 1 x30 1 -15 15 x30 15 -1&lt;br /&gt;
# more realistic example:&lt;br /&gt;
# the first thirty frames are state 1&lt;br /&gt;
# the next 15 frames pass through states 1-15&lt;br /&gt;
# the next 30 frames are of state 15&lt;br /&gt;
# the next 15 frames iterate back to state 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
mset 1 x200 -78 -2 -78 -2 -78 x200 79 -156 157 x200 -234 235 x400 &lt;br /&gt;
# mset 1 x200 makes the first state last for 200 frames&lt;br /&gt;
# -78 -2 takes us FROM state 1 to 78, then back to frame 2.  I've repeated this for dramatic effect.&lt;br /&gt;
# Then we pause at 78 for 200 frames, then go from 79-156 and pause at 157 for 200 frames, etc.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.mset(&amp;quot;1 -%d&amp;quot; % cmd.count_states())&lt;br /&gt;
# this will create a one-to-one mapping of states to movie frames. useful for making movies from trajectory files. &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[mdo]], [[mplay]], [[mclear]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Mset]]&lt;br /&gt;
[[Category:States|Mset]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=12614</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=12614"/>
		<updated>2015-04-16T16:12:50Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* 3. Install PyMOL. */ Added sentence to indicate the end of the installation process.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Mighty Mouse / Magic Mouse===&lt;br /&gt;
http://images.apple.com/mightymouse/images/index360scroll220050802.gif&lt;br /&gt;
&lt;br /&gt;
A 3-button mouse is essential.  [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.&lt;br /&gt;
&lt;br /&gt;
The Mighty Mouse was superseded in late 2009 by the [http://en.wikipedia.org/wiki/Magic_Mouse Magic Mouse]. Although a great mouse with scrolling capability, the magic mouse is a 2-button mouse with gesture-enabled surface, and so it lacks a built-in middle button. To use it as-is, choose a 2 button mode in the Mouse menu.&lt;br /&gt;
&lt;br /&gt;
However, to enable 3-button usage on the Magic Mouse, one can download and install the third-party [http://magicprefs.com/ MagicPrefs] preference pane.  On the &amp;quot;Clicks and Taps&amp;quot; tab, assign &amp;quot;One Finger Middle Axis Click&amp;quot; to the &amp;quot;Middle Click&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
If using an X11 version of PyMOL on a Mac, one can also enable the &amp;quot;Emulate three button mouse&amp;quot; preference (X11 &amp;gt; Preferences &amp;gt; Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.&lt;br /&gt;
&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS and friends with fink==&lt;br /&gt;
&lt;br /&gt;
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs apbs], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr].  If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi mpi version of apbs].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin. Here is [http://xanana.ucsc.edu/xtal/pymol_screenshot.png a big screenshot of the fink APBS package being invoked via the pymol plugin].&lt;br /&gt;
&lt;br /&gt;
'''Nucleic acids''' may prove problematic for the apbs plugin.  If so, use the pdb2pqr command-line tool to create a pqr file manually, instead of using the plugin to generate it.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] (at least 1.8.2) also include a hybrid PyMOL and also apbs. One can install it with&lt;br /&gt;
 sudo port install pymol apbs apbs-mpi&lt;br /&gt;
==Pymol from MacPorts using simple GUI approach==&lt;br /&gt;
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary&lt;br /&gt;
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.&lt;br /&gt;
# Search for Pymol via gui and install&lt;br /&gt;
# Launch Terminal app and execute pymol&lt;br /&gt;
===Config issues===&lt;br /&gt;
* If you already have a .bash_profile, you may need to copy the lines which macports [http://guide.macports.org/#installing.shell installation puts in .profile] into .bash_profile&lt;br /&gt;
* Pymol installation in macports uses the subversion repository so you may need to configure the svn command line client [http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.1 config file] for your proxy settings in ~/.subversion/servers&lt;br /&gt;
* If the menu/control window does not appear when launching pymol and the terminal window reports &amp;quot;ImportError: No module named _tkinter&amp;quot;, macports python may have installed without tkinter even if the no_tkinter option was not selected in the gui. To fix, uninstall python26 via gui then execute the following at the command line to force ignoring of no_tkinter.&lt;br /&gt;
 sudo port install python26 -no_tkinter&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew tap homebrew/science&lt;br /&gt;
 brew tap homebrew/dupes&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Switch stereo ==&lt;br /&gt;
This installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, Homebrew-installed pymol defaults to assuming the &amp;quot;-M&amp;quot; flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the &amp;quot;-S&amp;quot; flag.&lt;br /&gt;
 pymol -S&lt;br /&gt;
Alternatively, you can install pymol with original stereo graphics on as default by installing with&lt;br /&gt;
 brew install pymol --default-stereo&lt;br /&gt;
&lt;br /&gt;
== With xquartz intalled ==&lt;br /&gt;
For it to run well, you need to enable threads.  If you've already brew-installed python without threads, do:&lt;br /&gt;
 brew update&lt;br /&gt;
 brew uninstall tcl&lt;br /&gt;
 brew uninstall tk&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=12613</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=12613"/>
		<updated>2015-04-16T16:08:33Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* 1. Install homebrew. */ updated homebrew install command per https://developer.github.com/changes/2014-04-25-user-content-security/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation|Mac]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing MacPyMOL=&lt;br /&gt;
==Essentials==&lt;br /&gt;
The [http://pymol.org/dsc download] is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, [http://www.apple.com/mightymouse/ scrollbutton mouse] that works well with pymol and permits horizontal scrolling.  Most other mice will also work well.&lt;br /&gt;
&lt;br /&gt;
== X11 Hybrid ==&lt;br /&gt;
&lt;br /&gt;
MacPyMOL comes with a native OSX interface which doesn't require X11 ([http://xquartz.macosforge.org/ XQuartz]). However, some features, like the '''Plugin''' menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
==Warning on Mouse Drivers==&lt;br /&gt;
One word of warning: '''Do not install 3rd party drivers''' for multi-button mice if you can avoid it.  These often mess with the mapping of the middle button or have other horrific side effects.  Fortunately, with OS X, you should not need to.&lt;br /&gt;
==Invoking pymol from the unix command line==&lt;br /&gt;
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL&lt;br /&gt;
&lt;br /&gt;
I ([[User:Wgscott|Bill Scott]]) wrote a cheezy [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/pymol pymol] shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable.  I also use [[MacOSX-specific .pymolrc file|this ~/.pymolrc]] file.&lt;br /&gt;
&lt;br /&gt;
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
You don't need any of these to use MacPyMOL.  But you didn't really '''need''' a Mac either.  Face it: You need these.&lt;br /&gt;
===Mighty Mouse / Magic Mouse===&lt;br /&gt;
http://images.apple.com/mightymouse/images/index360scroll220050802.gif&lt;br /&gt;
&lt;br /&gt;
A 3-button mouse is essential.  [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.&lt;br /&gt;
&lt;br /&gt;
The Mighty Mouse was superseded in late 2009 by the [http://en.wikipedia.org/wiki/Magic_Mouse Magic Mouse]. Although a great mouse with scrolling capability, the magic mouse is a 2-button mouse with gesture-enabled surface, and so it lacks a built-in middle button. To use it as-is, choose a 2 button mode in the Mouse menu.&lt;br /&gt;
&lt;br /&gt;
However, to enable 3-button usage on the Magic Mouse, one can download and install the third-party [http://magicprefs.com/ MagicPrefs] preference pane.  On the &amp;quot;Clicks and Taps&amp;quot; tab, assign &amp;quot;One Finger Middle Axis Click&amp;quot; to the &amp;quot;Middle Click&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
If using an X11 version of PyMOL on a Mac, one can also enable the &amp;quot;Emulate three button mouse&amp;quot; preference (X11 &amp;gt; Preferences &amp;gt; Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.&lt;br /&gt;
&lt;br /&gt;
===Stereo===&lt;br /&gt;
http://images.apple.com/powermac/images/graphicspymol20051018.jpg&lt;br /&gt;
&lt;br /&gt;
The [http://www.apple.com/powermac/upgrade.html latest Macs] finally support [http://www.apple.com/powermac/graphics.html stereo in a window].  There is more information in the [[Monitors Hardware Options]] section.&lt;br /&gt;
&lt;br /&gt;
===Second Monitor===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
=PyMOL and Fink=&lt;br /&gt;
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform.  It is essentially a full working Linux system integrated with the Apple OS.  Even X11 applications can be run.  To use PyMOL with fink, you will first need to install [http://fink.sourceforge.net/ fink].  This usually takes a while, but is straightforward.&lt;br /&gt;
&lt;br /&gt;
Once fink is installed, you have two options: (1) use the PyMOL package setup by [[User:wgscott|wgscott]], which might be old, but easier to install; or, download the PyMOL source and build.  As usual, it comes down to ease of install vs. new features.&lt;br /&gt;
&lt;br /&gt;
== PyMOL Directly from Fink ==&lt;br /&gt;
To install PyMOL directly from fink, type:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013).  Fink uses its own unix-type python installation. For other versions list up pymol packages using '''fink list pymol*''' on command line.&lt;br /&gt;
&lt;br /&gt;
===Notes and Possible Issues ===&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/package.php/pymol-py25 fink pymol package] currently exists in the [http://fink.sourceforge.net/faq/usage-fink.php#unstable unstable branch of fink], so you will either have to [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/How_to_Activate_the_Unstable_Branch activate the unstable branch] or make the following symbolic links:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
You might need to create the latter directory if it doesn't already exist, i.e., issue the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /sw/fink/dists/local/main/finkinfo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol.  For example in your home directory, the .bashrc (or .bash_profile) file should contain:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export DISPLAY=&amp;quot;:0.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically.  If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol' &lt;br /&gt;
* Fink pymol also reads ~/.pymolrc in your home directory.&lt;br /&gt;
* I ([[User:wgscott|wgscott]]) have put a whole lot of further information on how to use fink to install crystallographic software on my own [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
&lt;br /&gt;
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.&lt;br /&gt;
&lt;br /&gt;
= PyMOL Install from Source, Using Fink =&lt;br /&gt;
If the above didn't work, or you really want the latest PyMOL code, then:&lt;br /&gt;
* Download the latest PyMOL source and unpack it.&lt;br /&gt;
* Ensure that you have installed, in Fink:&lt;br /&gt;
** python-2.5 pmw-py25&lt;br /&gt;
** mesa mesa-shlibs&lt;br /&gt;
** libpng3 libpng3-shlibs&lt;br /&gt;
** freetype2 freetype2-deve&lt;br /&gt;
** freeglut freeglut-shlibs&lt;br /&gt;
* Change directory into the new PyMOL dir, eg. ''cd pymol''&lt;br /&gt;
* Then, install PyMOL with,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes and Possible Issues==&lt;br /&gt;
* If you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If you get an error about something like ''GL_PALETTE_TEXTURE'' then you need to comment out those few lines in the code that throws the error.  Read the output.&lt;br /&gt;
&lt;br /&gt;
==Install APBS and friends with fink==&lt;br /&gt;
&lt;br /&gt;
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs apbs], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr].  If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi mpi version of apbs].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin. Here is [http://xanana.ucsc.edu/xtal/pymol_screenshot.png a big screenshot of the fink APBS package being invoked via the pymol plugin].&lt;br /&gt;
&lt;br /&gt;
'''Nucleic acids''' may prove problematic for the apbs plugin.  If so, use the pdb2pqr command-line tool to create a pqr file manually, instead of using the plugin to generate it.&lt;br /&gt;
&lt;br /&gt;
=PyMOL in MacPorts=&lt;br /&gt;
Recent versions of [http://www.macports.org/ MacPorts] (at least 1.8.2) also include a hybrid PyMOL and also apbs. One can install it with&lt;br /&gt;
 sudo port install pymol apbs apbs-mpi&lt;br /&gt;
==Pymol from MacPorts using simple GUI approach==&lt;br /&gt;
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary&lt;br /&gt;
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.&lt;br /&gt;
# Search for Pymol via gui and install&lt;br /&gt;
# Launch Terminal app and execute pymol&lt;br /&gt;
===Config issues===&lt;br /&gt;
* If you already have a .bash_profile, you may need to copy the lines which macports [http://guide.macports.org/#installing.shell installation puts in .profile] into .bash_profile&lt;br /&gt;
* Pymol installation in macports uses the subversion repository so you may need to configure the svn command line client [http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.1 config file] for your proxy settings in ~/.subversion/servers&lt;br /&gt;
* If the menu/control window does not appear when launching pymol and the terminal window reports &amp;quot;ImportError: No module named _tkinter&amp;quot;, macports python may have installed without tkinter even if the no_tkinter option was not selected in the gui. To fix, uninstall python26 via gui then execute the following at the command line to force ignoring of no_tkinter.&lt;br /&gt;
 sudo port install python26 -no_tkinter&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
; When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted: This is a known problem.  Select &amp;quot;Millions of Colors&amp;quot; in '''System Preferences-&amp;gt;Display'''.&lt;br /&gt;
; There seems to be a race condition between the Tk window and the openGL window.  (The focus for the windows are very quickly flashing back and forth.): This is a well-known problem.  The blame here is circular: Apple blames developers, developers blame Apple.  Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release.  Upgrade to 10.6 and this problem goes away.&lt;br /&gt;
;When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [https://trac.macports.org/ticket/24895]: If you don't need stereo then start PyMOL in mono mode with &amp;lt;pre&amp;gt;pymol -M&amp;lt;/pre&amp;gt;If you need stereo then you probably need to wait for a fix in the graphics driver.&lt;br /&gt;
&lt;br /&gt;
=Installing PyMOL with Homebrew=&lt;br /&gt;
== General Procedure ==&lt;br /&gt;
====1. Install [http://brew.sh/ homebrew].====&lt;br /&gt;
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ruby -e &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
You will be prompted to install the the Xcode Command Line Tools if you don't already have them.  After installation finishes, it is probably a good idea to run&lt;br /&gt;
 brew doctor&lt;br /&gt;
to make sure there are no issues with your setup.&lt;br /&gt;
&lt;br /&gt;
====2. Install Xquartz.====&lt;br /&gt;
Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default.  Download and install [http://xquartz.macosforge.org Xquartz] to satisfy this requirement.&lt;br /&gt;
&lt;br /&gt;
====3. Install PyMOL.====&lt;br /&gt;
 brew tap homebrew/science&lt;br /&gt;
 brew tap homebrew/dupes&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
== Switch stereo ==&lt;br /&gt;
This installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, Homebrew-installed pymol defaults to assuming the &amp;quot;-M&amp;quot; flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the &amp;quot;-S&amp;quot; flag.&lt;br /&gt;
 pymol -S&lt;br /&gt;
Alternatively, you can install pymol with original stereo graphics on as default by installing with&lt;br /&gt;
 brew install pymol --default-stereo&lt;br /&gt;
&lt;br /&gt;
== With xquartz intalled ==&lt;br /&gt;
For it to run well, you need to enable threads.  If you've already brew-installed python without threads, do:&lt;br /&gt;
 brew update&lt;br /&gt;
 brew uninstall tcl&lt;br /&gt;
 brew uninstall tk&lt;br /&gt;
 brew uninstall python&lt;br /&gt;
 brew install python --with-brewed-tk --enable-threads --with-x11&lt;br /&gt;
 brew install pymol&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous installation=&lt;br /&gt;
===Exporting MPG movies===&lt;br /&gt;
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13446</id>
		<title>COLLADA</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13446"/>
		<updated>2014-09-29T22:52:56Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''COLLADA''' is an XML-based open 3D graphics format, designed to be used as an interchange format among various graphics programs.  Beginning with version [to be determined], Open Source PyMOL is able to export COLLADA files, which have a &amp;quot;.dae&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
=Details=&lt;br /&gt;
COLLADA format defines a scene, with a camera and various geometric elements, which are colored and lit according to the properties of the material the object is made from and any effects (e.g. shaders) applied to it.  PyMOL exports the scene exactly as it looks in the viewport when the save command is executed, so the orientations and colors of the objects should be the same.  It currently saves every enabled object in the scene, regardless of any selection passed to the `save` command.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save file.dae&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Full support of all standard representations (cartoon, stick, line, sphere, surface, etc.)&lt;br /&gt;
* Customizable output quality and file size, based on quality settings for active representations (e.g. [[surface_quality]])&lt;br /&gt;
* Transparency support&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Settings ==&lt;br /&gt;
* [[collada_export_lighting]] - Optionally include PyMOL's lighting information.&lt;br /&gt;
* [[collada_geometry_mode]] - Specify how geometry elements are presented.&lt;br /&gt;
* [[geometry_export_mode]] - Exclude camera as well as lighting information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
* '''Shaders.'''  In version 1.4 of the COLLADA specification, only vertex-based meshes are defined, so all regular geometric shapes (e.g. spheres, cylinders, cones) have to be converted into a series of triangle meshes.  This produces output similar to what you would see in PyMOL with `use_shaders` turned off.  (Version 1.5 of the COLLADA spec includes &amp;quot;boundary representation&amp;quot; (&amp;lt;brep&amp;gt;) elements that define such geometric shapes as you might expect: a sphere is defined by a point and a radius, a cylinder by two points and a radius, a cone by two points and two radii.  However, apparently due to the complexity of the physics portion of the 1.5 specification, few programs have even attempted to adopt it yet, so we're stuck with old-school triangle meshes.)&lt;br /&gt;
&lt;br /&gt;
* '''Lighting.'''  Whereas in PyMOL, the lighting of the object appears similar no matter how the object is rotated--that is, the lights move with the camera or viewport--in COLLADA, the lights are fixed in the scene with the objects, and therefore, with PyMOL `[[light_count]]` of 2 or higher, only one side of the objects is lit with the directional lights; the other side appears dark.  For this reason, PyMOL's lights are excluded from COLLADA output files by default.  To include lighting in the output file, turn on the `[[collada_export_lighting]]` setting.&lt;br /&gt;
&lt;br /&gt;
* '''Labels.'''  Like lights, labels would be fixed with the objects, so from all but a narrow range of orientations, the text would be unreadable.&lt;br /&gt;
&lt;br /&gt;
* '''Volumes.'''  PyMOL's volume representation consists of a series of evenly spaced planes perpendicular to the viewport, the orientation of which is changed whenever the view is changed.  Unfortunately, this makes them essentially useless in a COLLADA scene as well, as, once the original orientation is changed, the planes would look less like a 3D volume projection, and more like a stack of flat images slicing through the rest of the scene.&lt;br /&gt;
&lt;br /&gt;
== Increasing the Quality ==&lt;br /&gt;
You can increase the number of triangles exported, and therefore the smoothness of the resulting objects, by increasing the following settings. &lt;br /&gt;
* surface_quality&lt;br /&gt;
* sphere_quality&lt;br /&gt;
* stick_quality&lt;br /&gt;
* cartoon_sampling&lt;br /&gt;
Conversely, to decrease the file size, decrease the settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OutputFormats]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Jaredsampson&amp;diff=12107</id>
		<title>User:Jaredsampson</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Jaredsampson&amp;diff=12107"/>
		<updated>2014-08-13T21:54:51Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm a technician in Xiangpeng Kong's lab at the NYU School of Medicine, where I take part in structural studies of anti-HIV antibodies and their interactions with their viral epitopes.&lt;br /&gt;
&lt;br /&gt;
==Scripts==&lt;br /&gt;
[[elbow_angle]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Elbow_angle&amp;diff=12105</id>
		<title>Elbow angle</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Elbow_angle&amp;diff=12105"/>
		<updated>2014-08-13T18:47:55Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Syntax */ added rationale for default limit residues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = elbow_angle.py&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = BSD&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This script allows you to calculate the elbow angle of an antibody Fab fragment object and optionally draw a graphical representation of the vectors used to calculate the elbow angle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
elbow_angle object [, light=L [, heavy=H [, limit_l=107 [, limit_h=113 [, draw=0 ]]]]]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first argument should be a PyMOL object.  You can calculate the elbow angles of multiple Fabs from the same object (one at a time) by specifying the chains manually for each Fab.&lt;br /&gt;
&lt;br /&gt;
The `light` and `heavy` arguments are for PDB chain IDs, and `limit_l` and `limit_h` are the last residue of the light and heavy chain variable domains, respectively.  (For Kabat-numbered structures, these limits will be 107 and 113, respectively.  For structures with different numbering schemes, the limits can be estimated by visual inspection of the PDB file.)  Setting `draw=1` will draw the &amp;quot;dumbbells&amp;quot; seen in the images below.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
===Basic usage===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load an antibody Fab fragment from the PDB&lt;br /&gt;
fetch 3ghe, async=0&lt;br /&gt;
# calculate the elbow angle and draw the vectors&lt;br /&gt;
elbow_angle 3ghe, draw=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This will produce something like the first image below.&lt;br /&gt;
&lt;br /&gt;
Note that if you don't specify the light/heavy chain IDs or the variable domain limit residue numbers, the default values (L/H and 107/113, respectively) will be used.  If your antibody is not Kabat or Chothia numbered, or has different chain names, this will result in an incorrect value or, in the case of wrong chain IDs, may cause the script to fail entirely due to an empty selection.  Have a look at Dr. Andrew Martin's [http://www.bioinf.org.uk/abs/abnum/ Abnum] for more information on antibody numbering.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;320&amp;quot; widths=&amp;quot;320&amp;quot;&amp;gt;&lt;br /&gt;
Image:elbow_angle_3ghe.png|Fab fragment 3ghe shown with draw=1.&lt;br /&gt;
Image:Stanfield.png|5 PDB examples from Stanfield, et al., JMB 2006, shown in the same orientations as in Figure 1 of that paper.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The black &amp;quot;dumbbells&amp;quot; pass through the centers of mass of the variable and constant domains of each Fab (as determined using [[com|com.py]]). The green and red dumbbells denote the residues used to split the variable and constant domains, with a green ball for the light chain, and a red ball for the heavy chain.&lt;br /&gt;
&lt;br /&gt;
===Included Example===&lt;br /&gt;
There is also an example .pml file in the Pymol-script-repo/examples directory which can be run by the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ex&lt;br /&gt;
ex elbow_angle&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run the following .pml file:&lt;br /&gt;
{{Infobox script-repo&lt;br /&gt;
|type      = pml&lt;br /&gt;
|filename  = examples/elbow_angle.pml&lt;br /&gt;
|author    = [[User:jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = BSD&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;include src=&amp;quot;https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/examples/elbow_angle.pml&amp;quot; highlight=&amp;quot;python&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and will produce the second image above.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
The elbow angle is the angle between the pseudo-twofold axes between the light and heavy chain variable and constant domains, respectively.  The rotation matrix to superpose VL onto VH and CL onto CH are calculated and the vectors corresponding to the rotation axes are determined (using Christoph Gohlke's [[transformations|transformations.py]]).  The elbow angle is the obtuse angle obtained by taking the arccos of the dot product of the two vectors.  For consistency, the elbow angle is reported as less than 180&amp;amp;deg; when the cross product of the Variable and Constant domain rotation axis vectors ( '''V''' &amp;amp;#10799; '''C''' ) is a vector pointing the same direction as that from the limit_h residue alpha carbon atom to the limit_l alpha carbon atom.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cealign_plugin&amp;diff=13294</id>
		<title>Cealign plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cealign_plugin&amp;diff=13294"/>
		<updated>2014-08-12T19:00:36Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Comparison to PyMol */ Whoops...fixed text to go with image order.  Added PDB links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Go directly to [[Cealign#Version_0.8-RBS|DOWNLOAD]]'''&lt;br /&gt;
&lt;br /&gt;
Note: CEAlign is now built into PyMOL as a native command.  See the open-source project page.&lt;br /&gt;
&lt;br /&gt;
This page is the home page of the open-source CEAlign PyMOL plugin.  The CE algorithm is a fast and accurate protein structure alignment algorithm, pioneered by Drs. Shindyalov and Bourne (See &lt;br /&gt;
References).  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
There are a few changes from the original CE publication (See Notes).  The source code is implemented in C (and another in C++) with the rotations finally done by Numpy in Python (or C++ in version 0.9).  Because the computationally complex portion of the code is written in C, it's quick.  That is, on my machines --- relatively fast 64-bit machines --- I can align two 400+ amino acid structures in about 0.300 s with the C++ implementation.&lt;br /&gt;
&lt;br /&gt;
This plugs into PyMol very easily.  See [[Cealign#The_Code|the code]] and [[Cealign#Examples|examples]] for installation and usage.&lt;br /&gt;
&lt;br /&gt;
== Comparison to PyMol ==&lt;br /&gt;
'''Why should you use this?'''&lt;br /&gt;
&lt;br /&gt;
PyMOL's structure alignment algorithm is fast and robust.  However, its first step is to perform a sequence alignment of the two selections.  Thus, proteins in the '''twilight zone''' or those having a low sequence identity, may not align well.  Because CE is a structure-based alignment, this is not a problem.  Consider the following example.  The two images below demonstrate the difference superimposing [http://www.rcsb.org/pdb/explore/explore.do?structureId=1C0m 1C0M] chain B onto [http://www.rcsb.org/pdb/explore/explore.do?structureId=1BCO 1BCO]. The first image below shows the results from PyMol's `align` command: an alignment of '''221 atoms''' (not residues) to an RMSD of '''15.7 Angstroms'''.  The second image is the result of CEAlign, which used alpha carbons of '''152 residues''' with an RMSD of '''4.96 Angstroms'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:pymol_align.png|PyMol's results (221 atoms; 15.7 Ang. )&lt;br /&gt;
Image:cealign_ex1.png|Cealign's results (152 aligned; 4.96 Ang.)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fit vs. optAlign ===&lt;br /&gt;
====Take Home messages====&lt;br /&gt;
* [[fit]] and [[optAlign]] perform nearly equally as well&lt;br /&gt;
* if you need an algorithm with an appropriate reference, use [[optAlign]] (references at bottom of page).&lt;br /&gt;
* [[fit]] is faster -- if you're aligning many structures, use it over [[optAlign]]&lt;br /&gt;
&lt;br /&gt;
====Discussion====&lt;br /&gt;
[[optAlign]] is a function within the [[Cealign]] package that performs the optimal superposition of two objects of equal length.  [[optAlign]] follows the Kabsch algorithm which is a closed form, and provably optimal solution to the problem.  [[fit]] on the other hand uses the Jacobi rotations to iteratively arrive at the solution of optimal superposition.  The difference in error between [[optAilgn]] and [[fit]] seems to be a non-issue (see below) as they both arrive at equivalent solutions for the rotation matrix.  The two algorithms are undertake different approaches to orthogonally diagonalizing the correlation matrix.&lt;br /&gt;
&lt;br /&gt;
PyMOL's [[fit]] is fast and works well.  If you have to use something with a known reference then check out the &amp;quot;optAlign&amp;quot; function from the qkabsch.py file that comes with this [[Cealign]] package.  If not, you can just use [[fit]] and avoid installing new software.  :-)&lt;br /&gt;
&lt;br /&gt;
optAlign is slower than fit.  I just tested both on a sample NMR ensemble; and, while not an extensive validation of &amp;quot;fit&amp;quot; it shows that (1) fit is faster; and (2) fit gets the same exact RMSD as &amp;quot;optAlign&amp;quot; (when optAlign is told to use all atoms, not just CA).  To make optAlign use all atoms and not just the alpha-carbon backbones, comment out (that is, put a &amp;quot;#&amp;quot; at the start of) lines 183 and 184 in qkabsch.py, where it says &amp;quot;CUT HERE.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
delete 1nmr&lt;br /&gt;
&lt;br /&gt;
# compare fit and optAlign RMSDs&lt;br /&gt;
for x in cmd.get_names(): print cmd.fit(&amp;quot;1nmr_0001&amp;quot;, x)&lt;br /&gt;
for x in cmd.get_names(): optAlign(x, &amp;quot;1nmr_0001&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source  lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# results from fit&lt;br /&gt;
0.0&lt;br /&gt;
4.50344991684&lt;br /&gt;
5.33588504791&lt;br /&gt;
5.78613853455&lt;br /&gt;
7.25597000122&lt;br /&gt;
6.67145586014&lt;br /&gt;
3.25131297112&lt;br /&gt;
3.36766290665&lt;br /&gt;
6.74802017212&lt;br /&gt;
5.1579709053&lt;br /&gt;
5.96959495544&lt;br /&gt;
6.68093347549&lt;br /&gt;
4.13217163086&lt;br /&gt;
5.51539039612&lt;br /&gt;
6.24266338348&lt;br /&gt;
6.03838825226&lt;br /&gt;
5.01363992691&lt;br /&gt;
5.33336305618&lt;br /&gt;
6.87617444992&lt;br /&gt;
7.797062397&lt;br /&gt;
&lt;br /&gt;
#results from optAlign&lt;br /&gt;
RMSD=0.000000&lt;br /&gt;
RMSD=4.503450&lt;br /&gt;
RMSD=5.335886&lt;br /&gt;
RMSD=5.786138&lt;br /&gt;
RMSD=7.255970&lt;br /&gt;
RMSD=6.671456&lt;br /&gt;
RMSD=3.251313&lt;br /&gt;
RMSD=3.367663&lt;br /&gt;
RMSD=6.748021&lt;br /&gt;
RMSD=5.157971&lt;br /&gt;
RMSD=5.969595&lt;br /&gt;
RMSD=6.680934&lt;br /&gt;
RMSD=4.132172&lt;br /&gt;
RMSD=5.515390&lt;br /&gt;
RMSD=6.242664&lt;br /&gt;
RMSD=6.038388&lt;br /&gt;
RMSD=5.013640&lt;br /&gt;
RMSD=5.333363&lt;br /&gt;
RMSD=6.876174&lt;br /&gt;
RMSD=7.797062&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Usage ===&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
CEAlign has the semantic, and syntactic formalism of&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign MASTER, TARGET&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where a post-condition of the algorithm is that the coordinates of the '''MASTER''' protein are unchanged.  This allows for easier multi-protein alignments.  For example,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1AUE, 1BZ4&lt;br /&gt;
cealign 1AUE, 1B68&lt;br /&gt;
cealign 1AUE, 1A7V&lt;br /&gt;
cealign 1AUE, 1CPR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will superimpose all the TARGETS onto the MASTER.&lt;br /&gt;
&lt;br /&gt;
=====Examples=====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1cll and i. 42-55, 1ggz and c. A&lt;br /&gt;
cealign 1kao, 1ctq&lt;br /&gt;
cealign 1fao, 1eaz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Multiple Structure Alignments=====&lt;br /&gt;
Use the '''alignto''' command, now provided with cealign.  Just type,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alignto PROT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to align all your proteins in PyMOL to the one called, '''PROT'''.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
See '''Changes''' for updates.  But, overall, the results here are great. &lt;br /&gt;
&lt;br /&gt;
* Note: PyMOL v1.5.0.4 (svn revision 4001) has updates that improve some alignments slightly. These improved results are shown here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:v7_1fao_1eaz.png|EASY: 1FAO vs. 1EAZ; 96 residues, 1.09 Ang&lt;br /&gt;
Image:v7_1cbs_1hmt.png|EASY: 1CBS vs. 1HMT; 128 residues, 2.01 Ang&lt;br /&gt;
Image:v7_1a15_1b50.png|MODERATE: 1A15 vs 1B50; 56 residues, 2.54 Ang.&lt;br /&gt;
Image:v7_1oan_1s6n.png|EASY: 1OAN vs. 1S6N (state 1); 96 residues aligned to 2.66 Ang. RMSD.&lt;br /&gt;
Image:v7_1rlw_1byn.png|HARD: 1RLW to 1BYN; 104 residues; 2.21 Ang.&lt;br /&gt;
Image:v7_1ten_3hhr.png|HARD: 1TEN vs. 3HHR; 80 residues, 2.96 Ang.&lt;br /&gt;
Image:v7_2sim_1nsb.png|HARD: 2SIM vs. 1NSB; 272 residues, 4.92 Ang.&lt;br /&gt;
Image:v7_1cew_1mol.png|HARD: 1CEW vs. 1MOL; 80 residues, 3.67 Ang.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
===Mac OS X (10.5, 10.6)===&lt;br /&gt;
[[Image:Cealign mac os x.png|300px|thumb|center|CEAlign running on Mac OS X (10.5)]]&lt;br /&gt;
* Install PyMOL under fink.&lt;br /&gt;
* Download and install cealign (download instructions below)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* In PyMOL, run the two scripts needed for cealign: &amp;quot;cealign.py&amp;quot; and &amp;quot;qkabsch.py&amp;quot;. These are located in the cealign directory you previously downloaded.&lt;br /&gt;
* Voila!&lt;br /&gt;
* Note that the above python version must match the same version that is used by PyMOL. If you are using the pre-compiled version of MacPyMOL, the above instructions won't work.&lt;br /&gt;
* Note: if you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Windows systems===&lt;br /&gt;
====CEAlign 0.9====&lt;br /&gt;
This is a Win32 build of CEAlign 0.9 [http://pymolwiki.org/index.php/Cealign#Beta_Version_0.9]&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Christoph Gohlke's latest '''unofficial''' PyMol build: http://www.lfd.uci.edu/~gohlke/#pythonlibs&lt;br /&gt;
* &amp;quot;Python 2.6.2 Windows installer&amp;quot; from python.org: http://www.python.org/download/&lt;br /&gt;
* '''CEAlign09Win32.zip''' from: http://users.umassmed.edu/shivender.shandilya/pymol/CEAlign09Win32.zip&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Download the '''CEAlign09Win32.zip''' file&lt;br /&gt;
# Unzip the downloaded file and follow the directions as per the included README.txt&lt;br /&gt;
# Enjoy the ''awesomeness'' that is CEAlign!&lt;br /&gt;
====CEAlign 0.8====&lt;br /&gt;
This is a quick and dirty method to use CEAlign 0.8 on Win32 system with the '''official''' Pymol builds...&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Latest PyMol, installed on your system&lt;br /&gt;
* Numpy for python 2.4 -- quick download of just what's needed: http://users.umassmed.edu/shivender.shandilya/pymol/cealign08/numpy.zip&lt;br /&gt;
[Note: If this file is corrupt, you may download the latest 'Numpy for Python 2.4' directly from SourceForge.net&lt;br /&gt;
* Pre-compiled ccealign.pyd python module: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/ccealign.zip&lt;br /&gt;
* Modified pymolrc: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/pymolrc&lt;br /&gt;
* cealign.py and qkabsch.py from the Cealign-0.8-RBS package: download below&lt;br /&gt;
&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Unzip the numpy.zip file, which will give you a folder named '''numpy'''&lt;br /&gt;
# Move this entire folder to: C:\Program Files\DeLano Scientific\PyMOL\modules\  (or the corresponding location on your system)&lt;br /&gt;
# Unzip ccealign.zip, which will give you a file called  '''ccealign.pyd'''&lt;br /&gt;
# Move this pyd file to: C:\Program Files\DeLano Scientific\PyMOL\py24\DLLs\  (or the corresponding location on your system)&lt;br /&gt;
# Copy the downloaded '''pymolrc''' file to: C:\Program Files\DeLano Scientific\PyMOL\   (or the corresponding location on your system)&lt;br /&gt;
# Extract and copy the files cealign.py and qkabsch.py from the Cealign-0.8-RBS package to: C:\Program Files\DeLano Scientific\PyMOL\py24\Lib\   (or the corresponding location on your system)&lt;br /&gt;
# Run PyMol and load some molecules&lt;br /&gt;
# Run this command in Pymol: '''cealign molecule1, molecule2'''&lt;br /&gt;
# Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Gentoo Linux===&lt;br /&gt;
Add the science overlay via&lt;br /&gt;
 layman -a sci&lt;br /&gt;
and emerge the cealign plugin&lt;br /&gt;
 emerge pymol-plugins-cealign&lt;br /&gt;
&lt;br /&gt;
===*nix systems===&lt;br /&gt;
====Requirements====&lt;br /&gt;
* C compiler&lt;br /&gt;
* Python 2.4+ with distutils&lt;br /&gt;
* Numpy&lt;br /&gt;
** for User-compiled PyMOL: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install&amp;lt;/source&amp;gt;&lt;br /&gt;
** for the precompiled version of PyMOL &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR_TO/pymol/ext/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Directions====&lt;br /&gt;
# uncompress the distribution file '''cealign-VERSION.tgz'''&lt;br /&gt;
# cd cealign-VERSION&lt;br /&gt;
# sudo python setup.py install  # if you installed by PyMOL by hand&lt;br /&gt;
## python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR/TO/pymol/ext/  # if you are using the precompiled binary download&lt;br /&gt;
# insert &amp;quot;run DIR_TO_CEALIGN/cealign.py&amp;quot; and &amp;quot;run DIR_TO_CEALIGN/qkabsch.py&amp;quot; into your '''.pymolrc''' file, or just run the two Python scripts by hand.&lt;br /&gt;
# load some molecules&lt;br /&gt;
# run, '''cealign molecule1, molecule2'''&lt;br /&gt;
# enjoy&lt;br /&gt;
&lt;br /&gt;
=====Pre-compiled Hackish Install=====&lt;br /&gt;
For those people that prefer to use the pre-compiled version of PyMOL, here are the basics for your install.  '''This is a poor method of installing Cealign.  I suggest users compile and install their own PyMOL.'''  The final goal is to get &lt;br /&gt;
# '''ccealign.so''' module into '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# numpy installed (get the numpy directory into (or linked into) '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# and be able to run cealign.py and qkabsch.py from PyMOL.&lt;br /&gt;
If you can do the above three steps, '''cealign''' should run from the pre-compiled PyMOL.&lt;br /&gt;
&lt;br /&gt;
In more detail, on a completely fictitious machine --- that is, I created the following commands from a fake machine and I don't expect a copy/paste of this to work '''anywhere''', but the commands should be helpful enough to those who need it:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# NOTES:&lt;br /&gt;
# This is fake code: don't copy/paste it.&lt;br /&gt;
#&lt;br /&gt;
# PYMOL='dir to precompiled PyMOL install'&lt;br /&gt;
# CEALIGN='dir where you will unpack cealign'&lt;br /&gt;
# replace lib with lib64 for x86-64&lt;br /&gt;
# install numpy&lt;br /&gt;
apt-get install numpy&lt;br /&gt;
&lt;br /&gt;
# link numpy to PyMOL&lt;br /&gt;
ln -s /usr/local/lib/python2.4/site-packages/numpy PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# download and install Cealign&lt;br /&gt;
wget http://www.pymolwiki.org/images/e/ed/Cealign-0.6.tar.bz2&lt;br /&gt;
tar -jxvf Cealign-0.6.tar.bz2&lt;br /&gt;
cd cealign-0.6&lt;br /&gt;
sudo python setup.py build&lt;br /&gt;
cp build/lib-XYZ-linux/ccealign.so PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# run pymol and try it out&lt;br /&gt;
pymol&lt;br /&gt;
run CEALIGN/cealign.py&lt;br /&gt;
run CEALIGN/qkabsch.py&lt;br /&gt;
fetch 1cew 1mol, async=0&lt;br /&gt;
cealign 1c, 1m&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Code ==&lt;br /&gt;
Please unpack and read the documentation.  All comments/questions should be directed to Jason Vertrees (javertre _at_ utmb ...dot... edu).  &lt;br /&gt;
&lt;br /&gt;
'''LATEST IS v0.8-RBS'''.  (Dedicated to Bryan Sutton for allowing me to use his computer for testing.)&lt;br /&gt;
&lt;br /&gt;
=== Version 0.8-RBS ===&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.tar.bz2|CE Align v0.8-RBS]] (bz2)'''&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.zip|CE Align v0.8-RBS]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
=== Beta Version 0.9 ===&lt;br /&gt;
Use at your own peril.  Please report any problems or inconsistent alignments to this discussion page, or to me directly; my email address all over this page.&lt;br /&gt;
&lt;br /&gt;
'''Improvements/Changes''':&lt;br /&gt;
* All C++&lt;br /&gt;
** So, faster&lt;br /&gt;
** comes with the dependencies built in&lt;br /&gt;
* No numpy&lt;br /&gt;
&lt;br /&gt;
''' Download: [[Media:Cealign-0.9.zip|CE Align v0.9]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
== Coming Soon ==&lt;br /&gt;
* Windows binary&lt;br /&gt;
* Linux Binaries (32bit, x86-64)&lt;br /&gt;
* Better instructions for precompiled distributions&lt;br /&gt;
* Optimization&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== 2008-03-25 ===&lt;br /&gt;
Pure C++ code released.  See the beta version above.&lt;br /&gt;
&lt;br /&gt;
=== 2007-04-14 ===&lt;br /&gt;
v0.8-RBS source updated.  Found the bug that had been plaguing 32-bit machines.  This should be the last release for a little while.&lt;br /&gt;
&lt;br /&gt;
Also, I provide the option of aligning based solely upon RMSD or upon the better CE-Score.  See the '''References''' for information on the '''CE Score'''.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
Post your problems/solutions here.&lt;br /&gt;
&lt;br /&gt;
=== Unicode Issues in Python/Numpy ===&lt;br /&gt;
'''Problem''': Running/Installing cealign gives&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parser.py&amp;quot;,&lt;br /&gt;
line 308, in parse&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parsing.py&amp;quot;,&lt;br /&gt;
line 410, in run_file&lt;br /&gt;
  File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
    import numpy&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 36, in ?&lt;br /&gt;
    import core&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/core/__init__.py&amp;quot;, line 5, in ?&lt;br /&gt;
    import multiarray&lt;br /&gt;
ImportError: /home/byron/software/pymol/ext/lib/python2.4/site-packages/numpy/core/multiarray.so:&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the important line is&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This problem indicates that your Numpy Unicode is using a different byte-size for unicode characters than is the Python distribution your PyMOL is running from.  For example, this can happen if you use the pre-built PyMOL and some other pre-built Numpy package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': Hand-install Numpy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LinAlg Module Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parser.py&amp;quot;, line 285, in parse&lt;br /&gt;
parsing.run_file(exp_path(args[nest][0]),pymol_names,pymol_names)&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parsing.py&amp;quot;, line 407, in run_file&lt;br /&gt;
execfile(file,global_ns,local_ns)&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 40, in ?&lt;br /&gt;
import linalg&lt;br /&gt;
ImportError: No module named linalg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': You do not have the linear algebra module installed (or Python can't find it) on your machine.  One workaround is to install [http://www.scipy.org/ Scientific Python]. (on debian/ubuntu this can be done by: sudo apt-get install python-scipy) Another is to reinstall the Numpy package from source, ensuring that you have the necessary requirements for the linear algebra module (linpack, lapack, fft, etc.).&lt;br /&gt;
&lt;br /&gt;
=== CCEAlign &amp;amp; NumPy Modules Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;run cealign.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
  File &amp;quot;/usr/local/pymol/scripts/cealign-0.1/cealign.py&amp;quot;, line 59, in ?&lt;br /&gt;
    from ccealign import ccealign&lt;br /&gt;
ImportError: No module named ccealign&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
ImportError: No module named numpy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': This problem occurs under [http://www.apple.com/macosx Apple Mac OS X] if (a) the Apple's python executable on your machine (/usr/bin/python, currently version 2.3.5) is superseded by [http://fink.sourceforge.net/ Fink]'s python executable (/sw/bin/python, currently version 2.5) and (b) you are using [http://delsci.com/rel/099/#MacOSX precompiled versions of PyMOL] (MacPyMOL, PyMOLX11Hybrid or PyMOL for Mac OS X/X11). These executables ignore Fink's python and instead use Apple's - so, in order to run CE Align, one must install NumPy (as well as CE Align itself) using Apple's python. To do so, first download the [http://sourceforge.net/project/showfiles.php?group_id=1369&amp;amp;package_id=175103 Numpy source code archive] (currently version 1.0.1), unpack it, change directory to numpy-1.0.1 and specify the full path to Apple's python executable during installation: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;. Then, donwload the [http://www.pymolwiki.org/index.php/Cealign#The_Code CE Align source code archive] (currently version 0.2), unpack it, change directory to cealign-0.2 and finally install CE Align as follows: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[User:Lucajovine|Luca Jovine]] 05:11, 25 January 2007 (CST).&lt;br /&gt;
&lt;br /&gt;
=== The Function SimpAlign() is not found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;cealign 1CLL,1GGZ&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;C:\Program Files (x86)\DeLano Scientific\PyMOL/modules\pymol\parser.py&amp;quot;, line 203, in parse&lt;br /&gt;
    result=apply(kw[nest][0],args[nest],kw_args[nest])&lt;br /&gt;
  File &amp;quot;py24/Lib/cealign.py&amp;quot;, line 177, in cealign&lt;br /&gt;
    curScore = simpAlign( matA, matB, mol1, mol2, stored.mol1, stored.mol2, align=0, L=len(matA) )&lt;br /&gt;
NameError: global name 'simpAlign' is not defined&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I am running PyMOL v. 0.99rc6 on Win XP Professional x64 edition version 2003 sp2 and have followed the windows install procedure as described above.&lt;br /&gt;
&lt;br /&gt;
'''Answer''': This simply means that PyMOL couldn't find the simplAlign function.  To let PyMOL know about this, you must run the following commands before running [[cealign]]:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /your/path/to/cealign/qkabsch.py&lt;br /&gt;
run /your/path/to/cealign/cealign.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
but most people that use cealign would just put these two lines in their '''.pymolrc''' file.&lt;br /&gt;
&lt;br /&gt;
=== Short Alignments Don't Work ===&lt;br /&gt;
If you are trying to align fewer than 16 residues then use [[align]], [[super]], or [[optAlign]].  CE uses a window size of 8; and to build a path of more than one window, you need 2*8=16 residues.  I will insert some code to re-route small alignments to one of the aforementioned alignment algorithms.&lt;br /&gt;
&lt;br /&gt;
=== It Worked A Second Ago! ===&lt;br /&gt;
[[Image:Rewind.png|thumb|right|Showing the rewind button to rewind to state 1.]]&lt;br /&gt;
&lt;br /&gt;
If you were using cealign (or alignto) and now the commands don't work -- that is, they return an RMSD, but don't actually superimpose the objects, then you have a simple problem dealing with states.  Most likely the cause of this oddness was (1) when you issued &amp;quot;cealign prot1, prot2&amp;quot; one of them was actually an ensemble of states or (2) you are trying to align to proteins with only one state, but are not looking at state one (because the last protein you were considering had more than one state and you quit editing that protein on a state that's not state 1).  To fix this, use the rewind button to get the proteins back into state 1 &amp;amp; reissue the cealign/alignto command.&lt;br /&gt;
&lt;br /&gt;
=== file is not of required architecture ===&lt;br /&gt;
This error happens on a Mac when you compile one bit of code with gcc-4.0/g++-4.0 and then try to make a library with code compiled from gcc-4.2/g++-4.2.  If you recent installed Snow Leopard (Mac OS X 10.6) then this might bother you when you try to install Cealign or even PyMOL.  To get around this, ensure that you're building all components with the same gcc/g++ executable.  Here's how I did it,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# sudo rm /usr/bin/gcc /usr/bin/g++&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/g++-4.0 /usr/bin/g++&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I commented out those lines to stop people from blindly copy/pasting possible harmful lines.  Please ensure that your /usr/bin/gcc and /usr/bin/g++ are actually symbolic links, otherwise you could be doing bad things to your computer.  In my case, I only relinked gcc and not g++, hence the error.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Text taken from PubMed and formatted for the wiki.  The first reference is the most important for this code.&lt;br /&gt;
&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''Protein structure alignment by incremental combinatorial extension (CE) of the optimal path.'''  ''Protein Eng.'' 1998 Sep;11(9):739-47.  PMID: 9796821 [PubMed - indexed for MEDLINE]&lt;br /&gt;
# Jia Y, Dewey TG, Shindyalov IN, Bourne PE. '''A new scoring function and associated statistical significance for structure alignment by CE.'''  ''J Comput Biol.'' 2004;11(5):787-99. PMID: 15700402 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Pekurovsky D, Shindyalov IN, Bourne PE. '''A case study of high-throughput biological data processing on parallel platforms.'''  ''Bioinformatics.'' 2004 Aug 12;20(12):1940-7. Epub 2004 Mar 25.  PMID: 15044237 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''An alternative view of protein fold space.'''  ''Proteins.'' 2000 Feb 15;38(3):247-60.  PMID: 10713986 [PubMed - indexed for MEDLINE]&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
The CEAlign and all its subprograms that I wrote, are released under the open source Free BSD License (BSDL).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structure_Alignment|Cealign]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cealign&amp;diff=12091</id>
		<title>Cealign</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cealign&amp;diff=12091"/>
		<updated>2014-08-12T19:00:36Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Comparison to PyMol */ Whoops...fixed text to go with image order.  Added PDB links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Go directly to [[Cealign#Version_0.8-RBS|DOWNLOAD]]'''&lt;br /&gt;
&lt;br /&gt;
Note: CEAlign is now built into PyMOL as a native command.  See the open-source project page.&lt;br /&gt;
&lt;br /&gt;
This page is the home page of the open-source CEAlign PyMOL plugin.  The CE algorithm is a fast and accurate protein structure alignment algorithm, pioneered by Drs. Shindyalov and Bourne (See &lt;br /&gt;
References).  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
There are a few changes from the original CE publication (See Notes).  The source code is implemented in C (and another in C++) with the rotations finally done by Numpy in Python (or C++ in version 0.9).  Because the computationally complex portion of the code is written in C, it's quick.  That is, on my machines --- relatively fast 64-bit machines --- I can align two 400+ amino acid structures in about 0.300 s with the C++ implementation.&lt;br /&gt;
&lt;br /&gt;
This plugs into PyMol very easily.  See [[Cealign#The_Code|the code]] and [[Cealign#Examples|examples]] for installation and usage.&lt;br /&gt;
&lt;br /&gt;
== Comparison to PyMol ==&lt;br /&gt;
'''Why should you use this?'''&lt;br /&gt;
&lt;br /&gt;
PyMOL's structure alignment algorithm is fast and robust.  However, its first step is to perform a sequence alignment of the two selections.  Thus, proteins in the '''twilight zone''' or those having a low sequence identity, may not align well.  Because CE is a structure-based alignment, this is not a problem.  Consider the following example.  The two images below demonstrate the difference superimposing [http://www.rcsb.org/pdb/explore/explore.do?structureId=1C0m 1C0M] chain B onto [http://www.rcsb.org/pdb/explore/explore.do?structureId=1BCO 1BCO]. The first image below shows the results from PyMol's `align` command: an alignment of '''221 atoms''' (not residues) to an RMSD of '''15.7 Angstroms'''.  The second image is the result of CEAlign, which used alpha carbons of '''152 residues''' with an RMSD of '''4.96 Angstroms'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:pymol_align.png|PyMol's results (221 atoms; 15.7 Ang. )&lt;br /&gt;
Image:cealign_ex1.png|Cealign's results (152 aligned; 4.96 Ang.)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fit vs. optAlign ===&lt;br /&gt;
====Take Home messages====&lt;br /&gt;
* [[fit]] and [[optAlign]] perform nearly equally as well&lt;br /&gt;
* if you need an algorithm with an appropriate reference, use [[optAlign]] (references at bottom of page).&lt;br /&gt;
* [[fit]] is faster -- if you're aligning many structures, use it over [[optAlign]]&lt;br /&gt;
&lt;br /&gt;
====Discussion====&lt;br /&gt;
[[optAlign]] is a function within the [[Cealign]] package that performs the optimal superposition of two objects of equal length.  [[optAlign]] follows the Kabsch algorithm which is a closed form, and provably optimal solution to the problem.  [[fit]] on the other hand uses the Jacobi rotations to iteratively arrive at the solution of optimal superposition.  The difference in error between [[optAilgn]] and [[fit]] seems to be a non-issue (see below) as they both arrive at equivalent solutions for the rotation matrix.  The two algorithms are undertake different approaches to orthogonally diagonalizing the correlation matrix.&lt;br /&gt;
&lt;br /&gt;
PyMOL's [[fit]] is fast and works well.  If you have to use something with a known reference then check out the &amp;quot;optAlign&amp;quot; function from the qkabsch.py file that comes with this [[Cealign]] package.  If not, you can just use [[fit]] and avoid installing new software.  :-)&lt;br /&gt;
&lt;br /&gt;
optAlign is slower than fit.  I just tested both on a sample NMR ensemble; and, while not an extensive validation of &amp;quot;fit&amp;quot; it shows that (1) fit is faster; and (2) fit gets the same exact RMSD as &amp;quot;optAlign&amp;quot; (when optAlign is told to use all atoms, not just CA).  To make optAlign use all atoms and not just the alpha-carbon backbones, comment out (that is, put a &amp;quot;#&amp;quot; at the start of) lines 183 and 184 in qkabsch.py, where it says &amp;quot;CUT HERE.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
delete 1nmr&lt;br /&gt;
&lt;br /&gt;
# compare fit and optAlign RMSDs&lt;br /&gt;
for x in cmd.get_names(): print cmd.fit(&amp;quot;1nmr_0001&amp;quot;, x)&lt;br /&gt;
for x in cmd.get_names(): optAlign(x, &amp;quot;1nmr_0001&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source  lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# results from fit&lt;br /&gt;
0.0&lt;br /&gt;
4.50344991684&lt;br /&gt;
5.33588504791&lt;br /&gt;
5.78613853455&lt;br /&gt;
7.25597000122&lt;br /&gt;
6.67145586014&lt;br /&gt;
3.25131297112&lt;br /&gt;
3.36766290665&lt;br /&gt;
6.74802017212&lt;br /&gt;
5.1579709053&lt;br /&gt;
5.96959495544&lt;br /&gt;
6.68093347549&lt;br /&gt;
4.13217163086&lt;br /&gt;
5.51539039612&lt;br /&gt;
6.24266338348&lt;br /&gt;
6.03838825226&lt;br /&gt;
5.01363992691&lt;br /&gt;
5.33336305618&lt;br /&gt;
6.87617444992&lt;br /&gt;
7.797062397&lt;br /&gt;
&lt;br /&gt;
#results from optAlign&lt;br /&gt;
RMSD=0.000000&lt;br /&gt;
RMSD=4.503450&lt;br /&gt;
RMSD=5.335886&lt;br /&gt;
RMSD=5.786138&lt;br /&gt;
RMSD=7.255970&lt;br /&gt;
RMSD=6.671456&lt;br /&gt;
RMSD=3.251313&lt;br /&gt;
RMSD=3.367663&lt;br /&gt;
RMSD=6.748021&lt;br /&gt;
RMSD=5.157971&lt;br /&gt;
RMSD=5.969595&lt;br /&gt;
RMSD=6.680934&lt;br /&gt;
RMSD=4.132172&lt;br /&gt;
RMSD=5.515390&lt;br /&gt;
RMSD=6.242664&lt;br /&gt;
RMSD=6.038388&lt;br /&gt;
RMSD=5.013640&lt;br /&gt;
RMSD=5.333363&lt;br /&gt;
RMSD=6.876174&lt;br /&gt;
RMSD=7.797062&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Usage ===&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
CEAlign has the semantic, and syntactic formalism of&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign MASTER, TARGET&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where a post-condition of the algorithm is that the coordinates of the '''MASTER''' protein are unchanged.  This allows for easier multi-protein alignments.  For example,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1AUE, 1BZ4&lt;br /&gt;
cealign 1AUE, 1B68&lt;br /&gt;
cealign 1AUE, 1A7V&lt;br /&gt;
cealign 1AUE, 1CPR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will superimpose all the TARGETS onto the MASTER.&lt;br /&gt;
&lt;br /&gt;
=====Examples=====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1cll and i. 42-55, 1ggz and c. A&lt;br /&gt;
cealign 1kao, 1ctq&lt;br /&gt;
cealign 1fao, 1eaz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Multiple Structure Alignments=====&lt;br /&gt;
Use the '''alignto''' command, now provided with cealign.  Just type,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alignto PROT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to align all your proteins in PyMOL to the one called, '''PROT'''.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
See '''Changes''' for updates.  But, overall, the results here are great. &lt;br /&gt;
&lt;br /&gt;
* Note: PyMOL v1.5.0.4 (svn revision 4001) has updates that improve some alignments slightly. These improved results are shown here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:v7_1fao_1eaz.png|EASY: 1FAO vs. 1EAZ; 96 residues, 1.09 Ang&lt;br /&gt;
Image:v7_1cbs_1hmt.png|EASY: 1CBS vs. 1HMT; 128 residues, 2.01 Ang&lt;br /&gt;
Image:v7_1a15_1b50.png|MODERATE: 1A15 vs 1B50; 56 residues, 2.54 Ang.&lt;br /&gt;
Image:v7_1oan_1s6n.png|EASY: 1OAN vs. 1S6N (state 1); 96 residues aligned to 2.66 Ang. RMSD.&lt;br /&gt;
Image:v7_1rlw_1byn.png|HARD: 1RLW to 1BYN; 104 residues; 2.21 Ang.&lt;br /&gt;
Image:v7_1ten_3hhr.png|HARD: 1TEN vs. 3HHR; 80 residues, 2.96 Ang.&lt;br /&gt;
Image:v7_2sim_1nsb.png|HARD: 2SIM vs. 1NSB; 272 residues, 4.92 Ang.&lt;br /&gt;
Image:v7_1cew_1mol.png|HARD: 1CEW vs. 1MOL; 80 residues, 3.67 Ang.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
===Mac OS X (10.5, 10.6)===&lt;br /&gt;
[[Image:Cealign mac os x.png|300px|thumb|center|CEAlign running on Mac OS X (10.5)]]&lt;br /&gt;
* Install PyMOL under fink.&lt;br /&gt;
* Download and install cealign (download instructions below)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* In PyMOL, run the two scripts needed for cealign: &amp;quot;cealign.py&amp;quot; and &amp;quot;qkabsch.py&amp;quot;. These are located in the cealign directory you previously downloaded.&lt;br /&gt;
* Voila!&lt;br /&gt;
* Note that the above python version must match the same version that is used by PyMOL. If you are using the pre-compiled version of MacPyMOL, the above instructions won't work.&lt;br /&gt;
* Note: if you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Windows systems===&lt;br /&gt;
====CEAlign 0.9====&lt;br /&gt;
This is a Win32 build of CEAlign 0.9 [http://pymolwiki.org/index.php/Cealign#Beta_Version_0.9]&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Christoph Gohlke's latest '''unofficial''' PyMol build: http://www.lfd.uci.edu/~gohlke/#pythonlibs&lt;br /&gt;
* &amp;quot;Python 2.6.2 Windows installer&amp;quot; from python.org: http://www.python.org/download/&lt;br /&gt;
* '''CEAlign09Win32.zip''' from: http://users.umassmed.edu/shivender.shandilya/pymol/CEAlign09Win32.zip&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Download the '''CEAlign09Win32.zip''' file&lt;br /&gt;
# Unzip the downloaded file and follow the directions as per the included README.txt&lt;br /&gt;
# Enjoy the ''awesomeness'' that is CEAlign!&lt;br /&gt;
====CEAlign 0.8====&lt;br /&gt;
This is a quick and dirty method to use CEAlign 0.8 on Win32 system with the '''official''' Pymol builds...&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Latest PyMol, installed on your system&lt;br /&gt;
* Numpy for python 2.4 -- quick download of just what's needed: http://users.umassmed.edu/shivender.shandilya/pymol/cealign08/numpy.zip&lt;br /&gt;
[Note: If this file is corrupt, you may download the latest 'Numpy for Python 2.4' directly from SourceForge.net&lt;br /&gt;
* Pre-compiled ccealign.pyd python module: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/ccealign.zip&lt;br /&gt;
* Modified pymolrc: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/pymolrc&lt;br /&gt;
* cealign.py and qkabsch.py from the Cealign-0.8-RBS package: download below&lt;br /&gt;
&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Unzip the numpy.zip file, which will give you a folder named '''numpy'''&lt;br /&gt;
# Move this entire folder to: C:\Program Files\DeLano Scientific\PyMOL\modules\  (or the corresponding location on your system)&lt;br /&gt;
# Unzip ccealign.zip, which will give you a file called  '''ccealign.pyd'''&lt;br /&gt;
# Move this pyd file to: C:\Program Files\DeLano Scientific\PyMOL\py24\DLLs\  (or the corresponding location on your system)&lt;br /&gt;
# Copy the downloaded '''pymolrc''' file to: C:\Program Files\DeLano Scientific\PyMOL\   (or the corresponding location on your system)&lt;br /&gt;
# Extract and copy the files cealign.py and qkabsch.py from the Cealign-0.8-RBS package to: C:\Program Files\DeLano Scientific\PyMOL\py24\Lib\   (or the corresponding location on your system)&lt;br /&gt;
# Run PyMol and load some molecules&lt;br /&gt;
# Run this command in Pymol: '''cealign molecule1, molecule2'''&lt;br /&gt;
# Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Gentoo Linux===&lt;br /&gt;
Add the science overlay via&lt;br /&gt;
 layman -a sci&lt;br /&gt;
and emerge the cealign plugin&lt;br /&gt;
 emerge pymol-plugins-cealign&lt;br /&gt;
&lt;br /&gt;
===*nix systems===&lt;br /&gt;
====Requirements====&lt;br /&gt;
* C compiler&lt;br /&gt;
* Python 2.4+ with distutils&lt;br /&gt;
* Numpy&lt;br /&gt;
** for User-compiled PyMOL: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install&amp;lt;/source&amp;gt;&lt;br /&gt;
** for the precompiled version of PyMOL &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR_TO/pymol/ext/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Directions====&lt;br /&gt;
# uncompress the distribution file '''cealign-VERSION.tgz'''&lt;br /&gt;
# cd cealign-VERSION&lt;br /&gt;
# sudo python setup.py install  # if you installed by PyMOL by hand&lt;br /&gt;
## python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR/TO/pymol/ext/  # if you are using the precompiled binary download&lt;br /&gt;
# insert &amp;quot;run DIR_TO_CEALIGN/cealign.py&amp;quot; and &amp;quot;run DIR_TO_CEALIGN/qkabsch.py&amp;quot; into your '''.pymolrc''' file, or just run the two Python scripts by hand.&lt;br /&gt;
# load some molecules&lt;br /&gt;
# run, '''cealign molecule1, molecule2'''&lt;br /&gt;
# enjoy&lt;br /&gt;
&lt;br /&gt;
=====Pre-compiled Hackish Install=====&lt;br /&gt;
For those people that prefer to use the pre-compiled version of PyMOL, here are the basics for your install.  '''This is a poor method of installing Cealign.  I suggest users compile and install their own PyMOL.'''  The final goal is to get &lt;br /&gt;
# '''ccealign.so''' module into '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# numpy installed (get the numpy directory into (or linked into) '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# and be able to run cealign.py and qkabsch.py from PyMOL.&lt;br /&gt;
If you can do the above three steps, '''cealign''' should run from the pre-compiled PyMOL.&lt;br /&gt;
&lt;br /&gt;
In more detail, on a completely fictitious machine --- that is, I created the following commands from a fake machine and I don't expect a copy/paste of this to work '''anywhere''', but the commands should be helpful enough to those who need it:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# NOTES:&lt;br /&gt;
# This is fake code: don't copy/paste it.&lt;br /&gt;
#&lt;br /&gt;
# PYMOL='dir to precompiled PyMOL install'&lt;br /&gt;
# CEALIGN='dir where you will unpack cealign'&lt;br /&gt;
# replace lib with lib64 for x86-64&lt;br /&gt;
# install numpy&lt;br /&gt;
apt-get install numpy&lt;br /&gt;
&lt;br /&gt;
# link numpy to PyMOL&lt;br /&gt;
ln -s /usr/local/lib/python2.4/site-packages/numpy PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# download and install Cealign&lt;br /&gt;
wget http://www.pymolwiki.org/images/e/ed/Cealign-0.6.tar.bz2&lt;br /&gt;
tar -jxvf Cealign-0.6.tar.bz2&lt;br /&gt;
cd cealign-0.6&lt;br /&gt;
sudo python setup.py build&lt;br /&gt;
cp build/lib-XYZ-linux/ccealign.so PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# run pymol and try it out&lt;br /&gt;
pymol&lt;br /&gt;
run CEALIGN/cealign.py&lt;br /&gt;
run CEALIGN/qkabsch.py&lt;br /&gt;
fetch 1cew 1mol, async=0&lt;br /&gt;
cealign 1c, 1m&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Code ==&lt;br /&gt;
Please unpack and read the documentation.  All comments/questions should be directed to Jason Vertrees (javertre _at_ utmb ...dot... edu).  &lt;br /&gt;
&lt;br /&gt;
'''LATEST IS v0.8-RBS'''.  (Dedicated to Bryan Sutton for allowing me to use his computer for testing.)&lt;br /&gt;
&lt;br /&gt;
=== Version 0.8-RBS ===&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.tar.bz2|CE Align v0.8-RBS]] (bz2)'''&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.zip|CE Align v0.8-RBS]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
=== Beta Version 0.9 ===&lt;br /&gt;
Use at your own peril.  Please report any problems or inconsistent alignments to this discussion page, or to me directly; my email address all over this page.&lt;br /&gt;
&lt;br /&gt;
'''Improvements/Changes''':&lt;br /&gt;
* All C++&lt;br /&gt;
** So, faster&lt;br /&gt;
** comes with the dependencies built in&lt;br /&gt;
* No numpy&lt;br /&gt;
&lt;br /&gt;
''' Download: [[Media:Cealign-0.9.zip|CE Align v0.9]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
== Coming Soon ==&lt;br /&gt;
* Windows binary&lt;br /&gt;
* Linux Binaries (32bit, x86-64)&lt;br /&gt;
* Better instructions for precompiled distributions&lt;br /&gt;
* Optimization&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== 2008-03-25 ===&lt;br /&gt;
Pure C++ code released.  See the beta version above.&lt;br /&gt;
&lt;br /&gt;
=== 2007-04-14 ===&lt;br /&gt;
v0.8-RBS source updated.  Found the bug that had been plaguing 32-bit machines.  This should be the last release for a little while.&lt;br /&gt;
&lt;br /&gt;
Also, I provide the option of aligning based solely upon RMSD or upon the better CE-Score.  See the '''References''' for information on the '''CE Score'''.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
Post your problems/solutions here.&lt;br /&gt;
&lt;br /&gt;
=== Unicode Issues in Python/Numpy ===&lt;br /&gt;
'''Problem''': Running/Installing cealign gives&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parser.py&amp;quot;,&lt;br /&gt;
line 308, in parse&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parsing.py&amp;quot;,&lt;br /&gt;
line 410, in run_file&lt;br /&gt;
  File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
    import numpy&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 36, in ?&lt;br /&gt;
    import core&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/core/__init__.py&amp;quot;, line 5, in ?&lt;br /&gt;
    import multiarray&lt;br /&gt;
ImportError: /home/byron/software/pymol/ext/lib/python2.4/site-packages/numpy/core/multiarray.so:&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the important line is&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This problem indicates that your Numpy Unicode is using a different byte-size for unicode characters than is the Python distribution your PyMOL is running from.  For example, this can happen if you use the pre-built PyMOL and some other pre-built Numpy package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': Hand-install Numpy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LinAlg Module Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parser.py&amp;quot;, line 285, in parse&lt;br /&gt;
parsing.run_file(exp_path(args[nest][0]),pymol_names,pymol_names)&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parsing.py&amp;quot;, line 407, in run_file&lt;br /&gt;
execfile(file,global_ns,local_ns)&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 40, in ?&lt;br /&gt;
import linalg&lt;br /&gt;
ImportError: No module named linalg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': You do not have the linear algebra module installed (or Python can't find it) on your machine.  One workaround is to install [http://www.scipy.org/ Scientific Python]. (on debian/ubuntu this can be done by: sudo apt-get install python-scipy) Another is to reinstall the Numpy package from source, ensuring that you have the necessary requirements for the linear algebra module (linpack, lapack, fft, etc.).&lt;br /&gt;
&lt;br /&gt;
=== CCEAlign &amp;amp; NumPy Modules Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;run cealign.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
  File &amp;quot;/usr/local/pymol/scripts/cealign-0.1/cealign.py&amp;quot;, line 59, in ?&lt;br /&gt;
    from ccealign import ccealign&lt;br /&gt;
ImportError: No module named ccealign&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
ImportError: No module named numpy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': This problem occurs under [http://www.apple.com/macosx Apple Mac OS X] if (a) the Apple's python executable on your machine (/usr/bin/python, currently version 2.3.5) is superseded by [http://fink.sourceforge.net/ Fink]'s python executable (/sw/bin/python, currently version 2.5) and (b) you are using [http://delsci.com/rel/099/#MacOSX precompiled versions of PyMOL] (MacPyMOL, PyMOLX11Hybrid or PyMOL for Mac OS X/X11). These executables ignore Fink's python and instead use Apple's - so, in order to run CE Align, one must install NumPy (as well as CE Align itself) using Apple's python. To do so, first download the [http://sourceforge.net/project/showfiles.php?group_id=1369&amp;amp;package_id=175103 Numpy source code archive] (currently version 1.0.1), unpack it, change directory to numpy-1.0.1 and specify the full path to Apple's python executable during installation: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;. Then, donwload the [http://www.pymolwiki.org/index.php/Cealign#The_Code CE Align source code archive] (currently version 0.2), unpack it, change directory to cealign-0.2 and finally install CE Align as follows: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[User:Lucajovine|Luca Jovine]] 05:11, 25 January 2007 (CST).&lt;br /&gt;
&lt;br /&gt;
=== The Function SimpAlign() is not found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;cealign 1CLL,1GGZ&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;C:\Program Files (x86)\DeLano Scientific\PyMOL/modules\pymol\parser.py&amp;quot;, line 203, in parse&lt;br /&gt;
    result=apply(kw[nest][0],args[nest],kw_args[nest])&lt;br /&gt;
  File &amp;quot;py24/Lib/cealign.py&amp;quot;, line 177, in cealign&lt;br /&gt;
    curScore = simpAlign( matA, matB, mol1, mol2, stored.mol1, stored.mol2, align=0, L=len(matA) )&lt;br /&gt;
NameError: global name 'simpAlign' is not defined&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I am running PyMOL v. 0.99rc6 on Win XP Professional x64 edition version 2003 sp2 and have followed the windows install procedure as described above.&lt;br /&gt;
&lt;br /&gt;
'''Answer''': This simply means that PyMOL couldn't find the simplAlign function.  To let PyMOL know about this, you must run the following commands before running [[cealign]]:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /your/path/to/cealign/qkabsch.py&lt;br /&gt;
run /your/path/to/cealign/cealign.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
but most people that use cealign would just put these two lines in their '''.pymolrc''' file.&lt;br /&gt;
&lt;br /&gt;
=== Short Alignments Don't Work ===&lt;br /&gt;
If you are trying to align fewer than 16 residues then use [[align]], [[super]], or [[optAlign]].  CE uses a window size of 8; and to build a path of more than one window, you need 2*8=16 residues.  I will insert some code to re-route small alignments to one of the aforementioned alignment algorithms.&lt;br /&gt;
&lt;br /&gt;
=== It Worked A Second Ago! ===&lt;br /&gt;
[[Image:Rewind.png|thumb|right|Showing the rewind button to rewind to state 1.]]&lt;br /&gt;
&lt;br /&gt;
If you were using cealign (or alignto) and now the commands don't work -- that is, they return an RMSD, but don't actually superimpose the objects, then you have a simple problem dealing with states.  Most likely the cause of this oddness was (1) when you issued &amp;quot;cealign prot1, prot2&amp;quot; one of them was actually an ensemble of states or (2) you are trying to align to proteins with only one state, but are not looking at state one (because the last protein you were considering had more than one state and you quit editing that protein on a state that's not state 1).  To fix this, use the rewind button to get the proteins back into state 1 &amp;amp; reissue the cealign/alignto command.&lt;br /&gt;
&lt;br /&gt;
=== file is not of required architecture ===&lt;br /&gt;
This error happens on a Mac when you compile one bit of code with gcc-4.0/g++-4.0 and then try to make a library with code compiled from gcc-4.2/g++-4.2.  If you recent installed Snow Leopard (Mac OS X 10.6) then this might bother you when you try to install Cealign or even PyMOL.  To get around this, ensure that you're building all components with the same gcc/g++ executable.  Here's how I did it,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# sudo rm /usr/bin/gcc /usr/bin/g++&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/g++-4.0 /usr/bin/g++&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I commented out those lines to stop people from blindly copy/pasting possible harmful lines.  Please ensure that your /usr/bin/gcc and /usr/bin/g++ are actually symbolic links, otherwise you could be doing bad things to your computer.  In my case, I only relinked gcc and not g++, hence the error.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Text taken from PubMed and formatted for the wiki.  The first reference is the most important for this code.&lt;br /&gt;
&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''Protein structure alignment by incremental combinatorial extension (CE) of the optimal path.'''  ''Protein Eng.'' 1998 Sep;11(9):739-47.  PMID: 9796821 [PubMed - indexed for MEDLINE]&lt;br /&gt;
# Jia Y, Dewey TG, Shindyalov IN, Bourne PE. '''A new scoring function and associated statistical significance for structure alignment by CE.'''  ''J Comput Biol.'' 2004;11(5):787-99. PMID: 15700402 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Pekurovsky D, Shindyalov IN, Bourne PE. '''A case study of high-throughput biological data processing on parallel platforms.'''  ''Bioinformatics.'' 2004 Aug 12;20(12):1940-7. Epub 2004 Mar 25.  PMID: 15044237 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''An alternative view of protein fold space.'''  ''Proteins.'' 2000 Feb 15;38(3):247-60.  PMID: 10713986 [PubMed - indexed for MEDLINE]&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
The CEAlign and all its subprograms that I wrote, are released under the open source Free BSD License (BSDL).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structure_Alignment|Cealign]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cealign_plugin&amp;diff=13293</id>
		<title>Cealign plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cealign_plugin&amp;diff=13293"/>
		<updated>2014-08-12T18:49:56Z</updated>

		<summary type="html">&lt;p&gt;Jaredsampson: /* Comparison to PyMol */ switched order of images for logical flow (align, then cealign)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Go directly to [[Cealign#Version_0.8-RBS|DOWNLOAD]]'''&lt;br /&gt;
&lt;br /&gt;
Note: CEAlign is now built into PyMOL as a native command.  See the open-source project page.&lt;br /&gt;
&lt;br /&gt;
This page is the home page of the open-source CEAlign PyMOL plugin.  The CE algorithm is a fast and accurate protein structure alignment algorithm, pioneered by Drs. Shindyalov and Bourne (See &lt;br /&gt;
References).  &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
There are a few changes from the original CE publication (See Notes).  The source code is implemented in C (and another in C++) with the rotations finally done by Numpy in Python (or C++ in version 0.9).  Because the computationally complex portion of the code is written in C, it's quick.  That is, on my machines --- relatively fast 64-bit machines --- I can align two 400+ amino acid structures in about 0.300 s with the C++ implementation.&lt;br /&gt;
&lt;br /&gt;
This plugs into PyMol very easily.  See [[Cealign#The_Code|the code]] and [[Cealign#Examples|examples]] for installation and usage.&lt;br /&gt;
&lt;br /&gt;
== Comparison to PyMol ==&lt;br /&gt;
'''Why should you use this?'''&lt;br /&gt;
&lt;br /&gt;
PyMOL's structure alignment algorithm is fast and robust.  However, its first step is to perform a sequence alignment of the two selections.  Thus, proteins in the '''twilight zone''' or those having a low sequence identity, may not align well.  Because CE is a structure-based alignment, this is not a problem.  Consider the following example.  The image at LEFT was the result of CE-aligning two proteins (1C0M chain B to 1BCO).  The result is '''152''' aligned (alpha carbons) residues (not atoms) at '''4.96 Angstroms'''.  The image on the RIGHT shows the results from PyMol's align command: an alignment of '''221 atoms''' (not residues) at an RMSD of '''15.7 Angstroms'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:pymol_align.png|PyMol's results (221 atoms; 15.7 Ang. )&lt;br /&gt;
Image:cealign_ex1.png|Cealign's results (152 aligned; 4.96 Ang.)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fit vs. optAlign ===&lt;br /&gt;
====Take Home messages====&lt;br /&gt;
* [[fit]] and [[optAlign]] perform nearly equally as well&lt;br /&gt;
* if you need an algorithm with an appropriate reference, use [[optAlign]] (references at bottom of page).&lt;br /&gt;
* [[fit]] is faster -- if you're aligning many structures, use it over [[optAlign]]&lt;br /&gt;
&lt;br /&gt;
====Discussion====&lt;br /&gt;
[[optAlign]] is a function within the [[Cealign]] package that performs the optimal superposition of two objects of equal length.  [[optAlign]] follows the Kabsch algorithm which is a closed form, and provably optimal solution to the problem.  [[fit]] on the other hand uses the Jacobi rotations to iteratively arrive at the solution of optimal superposition.  The difference in error between [[optAilgn]] and [[fit]] seems to be a non-issue (see below) as they both arrive at equivalent solutions for the rotation matrix.  The two algorithms are undertake different approaches to orthogonally diagonalizing the correlation matrix.&lt;br /&gt;
&lt;br /&gt;
PyMOL's [[fit]] is fast and works well.  If you have to use something with a known reference then check out the &amp;quot;optAlign&amp;quot; function from the qkabsch.py file that comes with this [[Cealign]] package.  If not, you can just use [[fit]] and avoid installing new software.  :-)&lt;br /&gt;
&lt;br /&gt;
optAlign is slower than fit.  I just tested both on a sample NMR ensemble; and, while not an extensive validation of &amp;quot;fit&amp;quot; it shows that (1) fit is faster; and (2) fit gets the same exact RMSD as &amp;quot;optAlign&amp;quot; (when optAlign is told to use all atoms, not just CA).  To make optAlign use all atoms and not just the alpha-carbon backbones, comment out (that is, put a &amp;quot;#&amp;quot; at the start of) lines 183 and 184 in qkabsch.py, where it says &amp;quot;CUT HERE.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
delete 1nmr&lt;br /&gt;
&lt;br /&gt;
# compare fit and optAlign RMSDs&lt;br /&gt;
for x in cmd.get_names(): print cmd.fit(&amp;quot;1nmr_0001&amp;quot;, x)&lt;br /&gt;
for x in cmd.get_names(): optAlign(x, &amp;quot;1nmr_0001&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source  lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# results from fit&lt;br /&gt;
0.0&lt;br /&gt;
4.50344991684&lt;br /&gt;
5.33588504791&lt;br /&gt;
5.78613853455&lt;br /&gt;
7.25597000122&lt;br /&gt;
6.67145586014&lt;br /&gt;
3.25131297112&lt;br /&gt;
3.36766290665&lt;br /&gt;
6.74802017212&lt;br /&gt;
5.1579709053&lt;br /&gt;
5.96959495544&lt;br /&gt;
6.68093347549&lt;br /&gt;
4.13217163086&lt;br /&gt;
5.51539039612&lt;br /&gt;
6.24266338348&lt;br /&gt;
6.03838825226&lt;br /&gt;
5.01363992691&lt;br /&gt;
5.33336305618&lt;br /&gt;
6.87617444992&lt;br /&gt;
7.797062397&lt;br /&gt;
&lt;br /&gt;
#results from optAlign&lt;br /&gt;
RMSD=0.000000&lt;br /&gt;
RMSD=4.503450&lt;br /&gt;
RMSD=5.335886&lt;br /&gt;
RMSD=5.786138&lt;br /&gt;
RMSD=7.255970&lt;br /&gt;
RMSD=6.671456&lt;br /&gt;
RMSD=3.251313&lt;br /&gt;
RMSD=3.367663&lt;br /&gt;
RMSD=6.748021&lt;br /&gt;
RMSD=5.157971&lt;br /&gt;
RMSD=5.969595&lt;br /&gt;
RMSD=6.680934&lt;br /&gt;
RMSD=4.132172&lt;br /&gt;
RMSD=5.515390&lt;br /&gt;
RMSD=6.242664&lt;br /&gt;
RMSD=6.038388&lt;br /&gt;
RMSD=5.013640&lt;br /&gt;
RMSD=5.333363&lt;br /&gt;
RMSD=6.876174&lt;br /&gt;
RMSD=7.797062&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Usage ===&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
CEAlign has the semantic, and syntactic formalism of&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign MASTER, TARGET&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where a post-condition of the algorithm is that the coordinates of the '''MASTER''' protein are unchanged.  This allows for easier multi-protein alignments.  For example,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1AUE, 1BZ4&lt;br /&gt;
cealign 1AUE, 1B68&lt;br /&gt;
cealign 1AUE, 1A7V&lt;br /&gt;
cealign 1AUE, 1CPR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will superimpose all the TARGETS onto the MASTER.&lt;br /&gt;
&lt;br /&gt;
=====Examples=====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cealign 1cll and i. 42-55, 1ggz and c. A&lt;br /&gt;
cealign 1kao, 1ctq&lt;br /&gt;
cealign 1fao, 1eaz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Multiple Structure Alignments=====&lt;br /&gt;
Use the '''alignto''' command, now provided with cealign.  Just type,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alignto PROT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to align all your proteins in PyMOL to the one called, '''PROT'''.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
See '''Changes''' for updates.  But, overall, the results here are great. &lt;br /&gt;
&lt;br /&gt;
* Note: PyMOL v1.5.0.4 (svn revision 4001) has updates that improve some alignments slightly. These improved results are shown here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:v7_1fao_1eaz.png|EASY: 1FAO vs. 1EAZ; 96 residues, 1.09 Ang&lt;br /&gt;
Image:v7_1cbs_1hmt.png|EASY: 1CBS vs. 1HMT; 128 residues, 2.01 Ang&lt;br /&gt;
Image:v7_1a15_1b50.png|MODERATE: 1A15 vs 1B50; 56 residues, 2.54 Ang.&lt;br /&gt;
Image:v7_1oan_1s6n.png|EASY: 1OAN vs. 1S6N (state 1); 96 residues aligned to 2.66 Ang. RMSD.&lt;br /&gt;
Image:v7_1rlw_1byn.png|HARD: 1RLW to 1BYN; 104 residues; 2.21 Ang.&lt;br /&gt;
Image:v7_1ten_3hhr.png|HARD: 1TEN vs. 3HHR; 80 residues, 2.96 Ang.&lt;br /&gt;
Image:v7_2sim_1nsb.png|HARD: 2SIM vs. 1NSB; 272 residues, 4.92 Ang.&lt;br /&gt;
Image:v7_1cew_1mol.png|HARD: 1CEW vs. 1MOL; 80 residues, 3.67 Ang.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
===Mac OS X (10.5, 10.6)===&lt;br /&gt;
[[Image:Cealign mac os x.png|300px|thumb|center|CEAlign running on Mac OS X (10.5)]]&lt;br /&gt;
* Install PyMOL under fink.&lt;br /&gt;
* Download and install cealign (download instructions below)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /sw/bin/python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* In PyMOL, run the two scripts needed for cealign: &amp;quot;cealign.py&amp;quot; and &amp;quot;qkabsch.py&amp;quot;. These are located in the cealign directory you previously downloaded.&lt;br /&gt;
* Voila!&lt;br /&gt;
* Note that the above python version must match the same version that is used by PyMOL. If you are using the pre-compiled version of MacPyMOL, the above instructions won't work.&lt;br /&gt;
* Note: if you get an error about '''-Wno-long-double''' then your gcc is mismatched.  I fixed this by pointing the symbolic link ''/usr/bin/gcc'' from ''/usr/bin/gcc-4.2'' to ''/usr/bin/gcc-4.0''.  Or, in code,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# These command are commented out to stop people from copy/pasting b/c &lt;br /&gt;
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc&lt;br /&gt;
# is a symbolic link and not a real binary.  If so, I used the following&lt;br /&gt;
# to fix the -Wno-long-double error.&lt;br /&gt;
# sudo rm /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Windows systems===&lt;br /&gt;
====CEAlign 0.9====&lt;br /&gt;
This is a Win32 build of CEAlign 0.9 [http://pymolwiki.org/index.php/Cealign#Beta_Version_0.9]&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Christoph Gohlke's latest '''unofficial''' PyMol build: http://www.lfd.uci.edu/~gohlke/#pythonlibs&lt;br /&gt;
* &amp;quot;Python 2.6.2 Windows installer&amp;quot; from python.org: http://www.python.org/download/&lt;br /&gt;
* '''CEAlign09Win32.zip''' from: http://users.umassmed.edu/shivender.shandilya/pymol/CEAlign09Win32.zip&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Download the '''CEAlign09Win32.zip''' file&lt;br /&gt;
# Unzip the downloaded file and follow the directions as per the included README.txt&lt;br /&gt;
# Enjoy the ''awesomeness'' that is CEAlign!&lt;br /&gt;
====CEAlign 0.8====&lt;br /&gt;
This is a quick and dirty method to use CEAlign 0.8 on Win32 system with the '''official''' Pymol builds...&lt;br /&gt;
=====Requirements=====&lt;br /&gt;
* Latest PyMol, installed on your system&lt;br /&gt;
* Numpy for python 2.4 -- quick download of just what's needed: http://users.umassmed.edu/shivender.shandilya/pymol/cealign08/numpy.zip&lt;br /&gt;
[Note: If this file is corrupt, you may download the latest 'Numpy for Python 2.4' directly from SourceForge.net&lt;br /&gt;
* Pre-compiled ccealign.pyd python module: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/ccealign.zip&lt;br /&gt;
* Modified pymolrc: http://users.umassmed.edu/Shivender.Shandilya/pymol/cealign08/pymolrc&lt;br /&gt;
* cealign.py and qkabsch.py from the Cealign-0.8-RBS package: download below&lt;br /&gt;
&lt;br /&gt;
=====Directions=====&lt;br /&gt;
# Unzip the numpy.zip file, which will give you a folder named '''numpy'''&lt;br /&gt;
# Move this entire folder to: C:\Program Files\DeLano Scientific\PyMOL\modules\  (or the corresponding location on your system)&lt;br /&gt;
# Unzip ccealign.zip, which will give you a file called  '''ccealign.pyd'''&lt;br /&gt;
# Move this pyd file to: C:\Program Files\DeLano Scientific\PyMOL\py24\DLLs\  (or the corresponding location on your system)&lt;br /&gt;
# Copy the downloaded '''pymolrc''' file to: C:\Program Files\DeLano Scientific\PyMOL\   (or the corresponding location on your system)&lt;br /&gt;
# Extract and copy the files cealign.py and qkabsch.py from the Cealign-0.8-RBS package to: C:\Program Files\DeLano Scientific\PyMOL\py24\Lib\   (or the corresponding location on your system)&lt;br /&gt;
# Run PyMol and load some molecules&lt;br /&gt;
# Run this command in Pymol: '''cealign molecule1, molecule2'''&lt;br /&gt;
# Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Gentoo Linux===&lt;br /&gt;
Add the science overlay via&lt;br /&gt;
 layman -a sci&lt;br /&gt;
and emerge the cealign plugin&lt;br /&gt;
 emerge pymol-plugins-cealign&lt;br /&gt;
&lt;br /&gt;
===*nix systems===&lt;br /&gt;
====Requirements====&lt;br /&gt;
* C compiler&lt;br /&gt;
* Python 2.4+ with distutils&lt;br /&gt;
* Numpy&lt;br /&gt;
** for User-compiled PyMOL: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install&amp;lt;/source&amp;gt;&lt;br /&gt;
** for the precompiled version of PyMOL &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR_TO/pymol/ext/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Directions====&lt;br /&gt;
# uncompress the distribution file '''cealign-VERSION.tgz'''&lt;br /&gt;
# cd cealign-VERSION&lt;br /&gt;
# sudo python setup.py install  # if you installed by PyMOL by hand&lt;br /&gt;
## python setup.py install --prefix &amp;quot;&amp;quot; --root /DIR/TO/pymol/ext/  # if you are using the precompiled binary download&lt;br /&gt;
# insert &amp;quot;run DIR_TO_CEALIGN/cealign.py&amp;quot; and &amp;quot;run DIR_TO_CEALIGN/qkabsch.py&amp;quot; into your '''.pymolrc''' file, or just run the two Python scripts by hand.&lt;br /&gt;
# load some molecules&lt;br /&gt;
# run, '''cealign molecule1, molecule2'''&lt;br /&gt;
# enjoy&lt;br /&gt;
&lt;br /&gt;
=====Pre-compiled Hackish Install=====&lt;br /&gt;
For those people that prefer to use the pre-compiled version of PyMOL, here are the basics for your install.  '''This is a poor method of installing Cealign.  I suggest users compile and install their own PyMOL.'''  The final goal is to get &lt;br /&gt;
# '''ccealign.so''' module into '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# numpy installed (get the numpy directory into (or linked into) '''PYMOL/ext/lib/python2.4/site-packages'''&lt;br /&gt;
# and be able to run cealign.py and qkabsch.py from PyMOL.&lt;br /&gt;
If you can do the above three steps, '''cealign''' should run from the pre-compiled PyMOL.&lt;br /&gt;
&lt;br /&gt;
In more detail, on a completely fictitious machine --- that is, I created the following commands from a fake machine and I don't expect a copy/paste of this to work '''anywhere''', but the commands should be helpful enough to those who need it:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# NOTES:&lt;br /&gt;
# This is fake code: don't copy/paste it.&lt;br /&gt;
#&lt;br /&gt;
# PYMOL='dir to precompiled PyMOL install'&lt;br /&gt;
# CEALIGN='dir where you will unpack cealign'&lt;br /&gt;
# replace lib with lib64 for x86-64&lt;br /&gt;
# install numpy&lt;br /&gt;
apt-get install numpy&lt;br /&gt;
&lt;br /&gt;
# link numpy to PyMOL&lt;br /&gt;
ln -s /usr/local/lib/python2.4/site-packages/numpy PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# download and install Cealign&lt;br /&gt;
wget http://www.pymolwiki.org/images/e/ed/Cealign-0.6.tar.bz2&lt;br /&gt;
tar -jxvf Cealign-0.6.tar.bz2&lt;br /&gt;
cd cealign-0.6&lt;br /&gt;
sudo python setup.py build&lt;br /&gt;
cp build/lib-XYZ-linux/ccealign.so PYMOL/ext/lib/python2.4/site-packages&lt;br /&gt;
&lt;br /&gt;
# run pymol and try it out&lt;br /&gt;
pymol&lt;br /&gt;
run CEALIGN/cealign.py&lt;br /&gt;
run CEALIGN/qkabsch.py&lt;br /&gt;
fetch 1cew 1mol, async=0&lt;br /&gt;
cealign 1c, 1m&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Code ==&lt;br /&gt;
Please unpack and read the documentation.  All comments/questions should be directed to Jason Vertrees (javertre _at_ utmb ...dot... edu).  &lt;br /&gt;
&lt;br /&gt;
'''LATEST IS v0.8-RBS'''.  (Dedicated to Bryan Sutton for allowing me to use his computer for testing.)&lt;br /&gt;
&lt;br /&gt;
=== Version 0.8-RBS ===&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.tar.bz2|CE Align v0.8-RBS]] (bz2)'''&lt;br /&gt;
* '''Download: [[Media:Cealign-0.8-RBS.zip|CE Align v0.8-RBS]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
=== Beta Version 0.9 ===&lt;br /&gt;
Use at your own peril.  Please report any problems or inconsistent alignments to this discussion page, or to me directly; my email address all over this page.&lt;br /&gt;
&lt;br /&gt;
'''Improvements/Changes''':&lt;br /&gt;
* All C++&lt;br /&gt;
** So, faster&lt;br /&gt;
** comes with the dependencies built in&lt;br /&gt;
* No numpy&lt;br /&gt;
&lt;br /&gt;
''' Download: [[Media:Cealign-0.9.zip|CE Align v0.9]] (zip)'''&lt;br /&gt;
&lt;br /&gt;
== Coming Soon ==&lt;br /&gt;
* Windows binary&lt;br /&gt;
* Linux Binaries (32bit, x86-64)&lt;br /&gt;
* Better instructions for precompiled distributions&lt;br /&gt;
* Optimization&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== 2008-03-25 ===&lt;br /&gt;
Pure C++ code released.  See the beta version above.&lt;br /&gt;
&lt;br /&gt;
=== 2007-04-14 ===&lt;br /&gt;
v0.8-RBS source updated.  Found the bug that had been plaguing 32-bit machines.  This should be the last release for a little while.&lt;br /&gt;
&lt;br /&gt;
Also, I provide the option of aligning based solely upon RMSD or upon the better CE-Score.  See the '''References''' for information on the '''CE Score'''.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
Post your problems/solutions here.&lt;br /&gt;
&lt;br /&gt;
=== Unicode Issues in Python/Numpy ===&lt;br /&gt;
'''Problem''': Running/Installing cealign gives&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parser.py&amp;quot;,&lt;br /&gt;
line 308, in parse&lt;br /&gt;
  File &amp;quot;/home/byron/software/pymol_1.00b17/pymol/modules/pymol/parsing.py&amp;quot;,&lt;br /&gt;
line 410, in run_file&lt;br /&gt;
  File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
    import numpy&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 36, in ?&lt;br /&gt;
    import core&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/numpy/core/__init__.py&amp;quot;, line 5, in ?&lt;br /&gt;
    import multiarray&lt;br /&gt;
ImportError: /home/byron/software/pymol/ext/lib/python2.4/site-packages/numpy/core/multiarray.so:&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the important line is&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
undefined symbol: _PyUnicodeUCS4_IsWhitespace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This problem indicates that your Numpy Unicode is using a different byte-size for unicode characters than is the Python distribution your PyMOL is running from.  For example, this can happen if you use the pre-built PyMOL and some other pre-built Numpy package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': Hand-install Numpy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LinAlg Module Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parser.py&amp;quot;, line 285, in parse&lt;br /&gt;
parsing.run_file(exp_path(args[nest][0]),pymol_names,pymol_names)&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/pymol/parsing.py&amp;quot;, line 407, in run_file&lt;br /&gt;
execfile(file,global_ns,local_ns)&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
File &amp;quot;/usr/lib/python2.4/site-packages/numpy/__init__.py&amp;quot;, line 40, in ?&lt;br /&gt;
import linalg&lt;br /&gt;
ImportError: No module named linalg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': You do not have the linear algebra module installed (or Python can't find it) on your machine.  One workaround is to install [http://www.scipy.org/ Scientific Python]. (on debian/ubuntu this can be done by: sudo apt-get install python-scipy) Another is to reinstall the Numpy package from source, ensuring that you have the necessary requirements for the linear algebra module (linpack, lapack, fft, etc.).&lt;br /&gt;
&lt;br /&gt;
=== CCEAlign &amp;amp; NumPy Modules Not Found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;run cealign.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
  File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
  File &amp;quot;/usr/local/pymol/scripts/cealign-0.1/cealign.py&amp;quot;, line 59, in ?&lt;br /&gt;
    from ccealign import ccealign&lt;br /&gt;
ImportError: No module named ccealign&lt;br /&gt;
run qkabsch.py&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py&amp;quot;, line 297, in parse&lt;br /&gt;
File &amp;quot;/home/local/warren/MacPyMOL060530/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parsing.py&amp;quot;, line 408, in run_file&lt;br /&gt;
File &amp;quot;qkabsch.py&amp;quot;, line 86, in ?&lt;br /&gt;
import numpy&lt;br /&gt;
ImportError: No module named numpy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''': This problem occurs under [http://www.apple.com/macosx Apple Mac OS X] if (a) the Apple's python executable on your machine (/usr/bin/python, currently version 2.3.5) is superseded by [http://fink.sourceforge.net/ Fink]'s python executable (/sw/bin/python, currently version 2.5) and (b) you are using [http://delsci.com/rel/099/#MacOSX precompiled versions of PyMOL] (MacPyMOL, PyMOLX11Hybrid or PyMOL for Mac OS X/X11). These executables ignore Fink's python and instead use Apple's - so, in order to run CE Align, one must install NumPy (as well as CE Align itself) using Apple's python. To do so, first download the [http://sourceforge.net/project/showfiles.php?group_id=1369&amp;amp;package_id=175103 Numpy source code archive] (currently version 1.0.1), unpack it, change directory to numpy-1.0.1 and specify the full path to Apple's python executable during installation: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;. Then, donwload the [http://www.pymolwiki.org/index.php/Cealign#The_Code CE Align source code archive] (currently version 0.2), unpack it, change directory to cealign-0.2 and finally install CE Align as follows: &amp;lt;tt&amp;gt;sudo /usr/bin/python setup.py install | tee install.log&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[User:Lucajovine|Luca Jovine]] 05:11, 25 January 2007 (CST).&lt;br /&gt;
&lt;br /&gt;
=== The Function SimpAlign() is not found ===&lt;br /&gt;
'''Problem''': Running CE Align gives the following error message:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;cealign 1CLL,1GGZ&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;C:\Program Files (x86)\DeLano Scientific\PyMOL/modules\pymol\parser.py&amp;quot;, line 203, in parse&lt;br /&gt;
    result=apply(kw[nest][0],args[nest],kw_args[nest])&lt;br /&gt;
  File &amp;quot;py24/Lib/cealign.py&amp;quot;, line 177, in cealign&lt;br /&gt;
    curScore = simpAlign( matA, matB, mol1, mol2, stored.mol1, stored.mol2, align=0, L=len(matA) )&lt;br /&gt;
NameError: global name 'simpAlign' is not defined&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I am running PyMOL v. 0.99rc6 on Win XP Professional x64 edition version 2003 sp2 and have followed the windows install procedure as described above.&lt;br /&gt;
&lt;br /&gt;
'''Answer''': This simply means that PyMOL couldn't find the simplAlign function.  To let PyMOL know about this, you must run the following commands before running [[cealign]]:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /your/path/to/cealign/qkabsch.py&lt;br /&gt;
run /your/path/to/cealign/cealign.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
but most people that use cealign would just put these two lines in their '''.pymolrc''' file.&lt;br /&gt;
&lt;br /&gt;
=== Short Alignments Don't Work ===&lt;br /&gt;
If you are trying to align fewer than 16 residues then use [[align]], [[super]], or [[optAlign]].  CE uses a window size of 8; and to build a path of more than one window, you need 2*8=16 residues.  I will insert some code to re-route small alignments to one of the aforementioned alignment algorithms.&lt;br /&gt;
&lt;br /&gt;
=== It Worked A Second Ago! ===&lt;br /&gt;
[[Image:Rewind.png|thumb|right|Showing the rewind button to rewind to state 1.]]&lt;br /&gt;
&lt;br /&gt;
If you were using cealign (or alignto) and now the commands don't work -- that is, they return an RMSD, but don't actually superimpose the objects, then you have a simple problem dealing with states.  Most likely the cause of this oddness was (1) when you issued &amp;quot;cealign prot1, prot2&amp;quot; one of them was actually an ensemble of states or (2) you are trying to align to proteins with only one state, but are not looking at state one (because the last protein you were considering had more than one state and you quit editing that protein on a state that's not state 1).  To fix this, use the rewind button to get the proteins back into state 1 &amp;amp; reissue the cealign/alignto command.&lt;br /&gt;
&lt;br /&gt;
=== file is not of required architecture ===&lt;br /&gt;
This error happens on a Mac when you compile one bit of code with gcc-4.0/g++-4.0 and then try to make a library with code compiled from gcc-4.2/g++-4.2.  If you recent installed Snow Leopard (Mac OS X 10.6) then this might bother you when you try to install Cealign or even PyMOL.  To get around this, ensure that you're building all components with the same gcc/g++ executable.  Here's how I did it,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# sudo rm /usr/bin/gcc /usr/bin/g++&lt;br /&gt;
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc&lt;br /&gt;
# sudo ln -s /usr/bin/g++-4.0 /usr/bin/g++&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I commented out those lines to stop people from blindly copy/pasting possible harmful lines.  Please ensure that your /usr/bin/gcc and /usr/bin/g++ are actually symbolic links, otherwise you could be doing bad things to your computer.  In my case, I only relinked gcc and not g++, hence the error.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Text taken from PubMed and formatted for the wiki.  The first reference is the most important for this code.&lt;br /&gt;
&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''Protein structure alignment by incremental combinatorial extension (CE) of the optimal path.'''  ''Protein Eng.'' 1998 Sep;11(9):739-47.  PMID: 9796821 [PubMed - indexed for MEDLINE]&lt;br /&gt;
# Jia Y, Dewey TG, Shindyalov IN, Bourne PE. '''A new scoring function and associated statistical significance for structure alignment by CE.'''  ''J Comput Biol.'' 2004;11(5):787-99. PMID: 15700402 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Pekurovsky D, Shindyalov IN, Bourne PE. '''A case study of high-throughput biological data processing on parallel platforms.'''  ''Bioinformatics.'' 2004 Aug 12;20(12):1940-7. Epub 2004 Mar 25.  PMID: 15044237 [PubMed - indexed for MEDLINE]&lt;br /&gt;
#  Shindyalov IN, Bourne PE. '''An alternative view of protein fold space.'''  ''Proteins.'' 2000 Feb 15;38(3):247-60.  PMID: 10713986 [PubMed - indexed for MEDLINE]&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
The CEAlign and all its subprograms that I wrote, are released under the open source Free BSD License (BSDL).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structure_Alignment|Cealign]]&lt;/div&gt;</summary>
		<author><name>Jaredsampson</name></author>
	</entry>
</feed>