<?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=Mretegan</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=Mretegan"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Mretegan"/>
	<updated>2026-04-15T01:36:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13072</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13072"/>
		<updated>2015-08-22T12:13:03Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Install APBS and friends with fink */ Removed unnecessary details about APBS.&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.&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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13071</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13071"/>
		<updated>2015-08-22T12:10:00Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* PyMOL in MacPorts */&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 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] 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.&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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13070</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13070"/>
		<updated>2015-08-22T12:09:32Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* PyMOL in MacPorts */&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 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] 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 tk&lt;br /&gt;
 sudo port -f uninstall tcl&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.&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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13069</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13069"/>
		<updated>2015-08-22T12:01:45Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Mighty Mouse / Magic Mouse */&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 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] include a hybrid PyMOL. It can be installed with&lt;br /&gt;
 sudo port install 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;
&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;
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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13068</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13068"/>
		<updated>2015-08-22T10:07:08Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* PyMOL in MacPorts */&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] include a hybrid PyMOL. It can be installed with&lt;br /&gt;
 sudo port install 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;
&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;
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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13067</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13067"/>
		<updated>2015-08-22T10:02:41Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* PyMOL in MacPorts */&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] include a hybrid PyMOL. It can installed with&lt;br /&gt;
 sudo port install pymol&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;
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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Iterate&amp;diff=12842</id>
		<title>Iterate</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Iterate&amp;diff=12842"/>
		<updated>2015-07-22T09:21:28Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''iterate''' iterates over an expression with a separate name space for each atom.  However, unlike the &amp;quot;alter&amp;quot; command, atomic properties can not be altered.  Thus, '''iterate''' is more efficient than '''alter'''.&lt;br /&gt;
&lt;br /&gt;
= Details = &lt;br /&gt;
Iterate is a powerful tool that can be used to perform operations and aggregations using atomic selections, and store the results in any global object, such as the predefined '''stored''' object (see [[#PYMOL API]] below for usage of local objects).  For example, one could iterate over all of the alpha carbons and record their B Factors, or print out all of the secondary structure classifications of all the residues. Iterates typically takes a second per thousand atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''iterate''' command only has access to certain properties.  Those properties are:&lt;br /&gt;
*'''model''': the pymol object label (appearing in the selection panel on the right)&lt;br /&gt;
*'''name''': the atom name&lt;br /&gt;
*'''resn''': the residue name&lt;br /&gt;
*'''resi''': the residue identifier (residue number) as a string, including optional insertion code&lt;br /&gt;
*'''resv''': the residue identifier (residue number) as an integer, excluding insertion code&lt;br /&gt;
*'''chain''': the chain name&lt;br /&gt;
*'''alt''': alternate Locations&lt;br /&gt;
*'''elem''': the chemical element&lt;br /&gt;
*'''q''': occupancy&lt;br /&gt;
*'''b''': the B Factor&lt;br /&gt;
*'''segi''': segment identifier (columns 73-76 in PDB file)&lt;br /&gt;
*'''type''' (ATOM,HETATM): the atom type&lt;br /&gt;
*'''formal_charge''': the formal charge of the atom&lt;br /&gt;
*'''partial_charge''': the partial charge of the atom&lt;br /&gt;
*'''numeric_type'''&lt;br /&gt;
*'''text_type''': automatic mol2 atom typing (Incentive PyMOL 1.4+)&lt;br /&gt;
*'''stereo''': automatic stereochemical R/S label (Incentive PyMOL 1.4+)&lt;br /&gt;
*'''ID''': PDB atom id (not guaranteed to be unique!)&lt;br /&gt;
*'''vdw''': Van der Waals radius&lt;br /&gt;
*'''ss''': secondary structure&lt;br /&gt;
*'''color''': color index&lt;br /&gt;
*'''p''': property object to access user-defined properties like '''p.abc''' (Incentive PyMOL 1.7+)&lt;br /&gt;
&lt;br /&gt;
'''Important''': All strings in the expression must be explicitly quoted.  &lt;br /&gt;
&lt;br /&gt;
===Note about Atom Coordinates===&lt;br /&gt;
&lt;br /&gt;
The coordinates of the atom are not accessible via '''iterate'''. To inspect the coordinates of the atoms, see [[Iterate_State]].&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 iterate (selection),expression&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example calculates the net charge on an object.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# create the global variable between Python and PyMOL&lt;br /&gt;
stored.net_charge = 0&lt;br /&gt;
# sum up the stored charges of all the atoms&lt;br /&gt;
iterate (all),stored.net_charge = stored.net_charge + partial_charge&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example fills an array, '''stored.names''' with the names of all the atoms.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# create the global variable between Python and PyMOL&lt;br /&gt;
stored.names = []&lt;br /&gt;
# get all of the names&lt;br /&gt;
iterate (all),stored.names.append(name)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following prints the b-factors for all atoms around residue #1.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
iterate resi 1, print round(b,2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
====Example - b and resi ====&lt;br /&gt;
Just copy and paste this directly into command line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
show_as cartoon ;&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;blue_white_red&amp;quot;, &amp;quot;n. CA&amp;quot;) ;&lt;br /&gt;
m1 = [] ;&lt;br /&gt;
iterate (all and n. CA),m1.append((b,resi,chain)) ;&lt;br /&gt;
zero = [] ;&lt;br /&gt;
[zero.append(i) for i,val in enumerate(m1) if val[0]==0] ;&lt;br /&gt;
m2 = [i for j,i in enumerate(m1) if j not in zero] ;&lt;br /&gt;
for j,i,k in m2: print j,i,k&lt;br /&gt;
bmax,resimax,chainmax =  max(m2, key=lambda p: p[0]) ;&lt;br /&gt;
bmin,resimin,chainmin =  min(m2, key=lambda p: p[0]) ;&lt;br /&gt;
cmd.ramp_new(&amp;quot;R2&amp;quot;, &amp;quot;* n. CA&amp;quot;, range=[0, bmin, bmax], color=&amp;quot;[blue, white, red ]&amp;quot;) ;&lt;br /&gt;
for b,resi,chain in m2: cmd.label(&amp;quot;chain %s and resi %s and n. CA&amp;quot;%(chain,resi), &amp;quot;b=%3.2f&amp;quot;%b)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example shows a common task in PyMOL, changing the B-factor column to display some other property.  Let's assume you have a file with a list of numbers, one per line, for each alpha carbon in the protein.  Furthermore, assume you want to map these values to the alpha carbons in the protein.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# set ALL b-factors to 0.&lt;br /&gt;
alter protName, b=0&lt;br /&gt;
&lt;br /&gt;
# read the new bfactors from disk&lt;br /&gt;
f = open('fileName','r').readlines()&lt;br /&gt;
&lt;br /&gt;
# set the alpha carbon bfactors.&lt;br /&gt;
alter protName and n. CA, b=f.pop(0)&lt;br /&gt;
&lt;br /&gt;
# Spectrum color bfactors by alpha carbons.&lt;br /&gt;
spectrum b, selection=(protName and n. CA)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PYMOL API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.iterate(string selection, string expression, int quiet=1, dict space=None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calling iterate, iterate_state, alter or alter_state from a python script, you can use the 'space' argument to pass local objects into the expression namespace.&lt;br /&gt;
&lt;br /&gt;
The second example from above but without the global pymol.stored variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
myspace = {'names': []}&lt;br /&gt;
cmd.iterate('(all)', 'names.append(name)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
User defined functions can also be included in the namespace:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def myfunc(resi,resn,name):&lt;br /&gt;
    print '%s`%s/%s' % (resn ,resi, name)&lt;br /&gt;
&lt;br /&gt;
myspace = {'myfunc': myfunc}&lt;br /&gt;
cmd.iterate('(all)', 'myfunc(resi,resn,name)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Iterate_State]], [[Alter]], [[Alter_State]], [[Color]], [[Color#Color_by_Spectrum_Example|Coloring with different color sprectrums]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Iterate]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3045</id>
		<title>User:Mretegan</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3045"/>
		<updated>2013-01-16T12:47:40Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5441</id>
		<title>DrawBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5441"/>
		<updated>2013-01-16T12:36:29Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: separated the run command from the python code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Draws a bounding box around a given selection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DrawMinBB.png|Example of a bounding box&lt;br /&gt;
Image:bb_with_padding.png|Two bounding boxes, one with 0 padding, the other with 10 Ang padding.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/drawBoundingBox.py&lt;br /&gt;
fetch 1jsd&lt;br /&gt;
drawBoundingBox 1jsd, r=0.33, g=0.80&lt;br /&gt;
&lt;br /&gt;
# example from above w/padding, draw it light blue&lt;br /&gt;
drawBoundingBox padding=10, r=0.5, g=0.8, b=1.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
Copy the source code to your computer, and execute it by issuing the command &amp;quot;run /path/to/drawBoundingBox.py&amp;quot; in PyMOL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: utf-8 -*-                                                                                     &lt;br /&gt;
from pymol.cgo import *                                                                                     &lt;br /&gt;
from pymol import cmd                                                                                       &lt;br /&gt;
from random import randint                                                                                  &lt;br /&gt;
&lt;br /&gt;
#############################################################################&lt;br /&gt;
#                                                                            &lt;br /&gt;
# drawBoundingBox.py -- Draws a box surrounding a selection &lt;br /&gt;
#&lt;br /&gt;
#                                                                            &lt;br /&gt;
# AUTHOR: Jason Vertrees                                                   &lt;br /&gt;
# DATE  : 2/20/2009                                                          &lt;br /&gt;
# NOTES : See comments below.                                                &lt;br /&gt;
#                                                                            &lt;br /&gt;
#############################################################################&lt;br /&gt;
def drawBoundingBox(selection=&amp;quot;(all)&amp;quot;, padding=0.0, linewidth=2.0, r=1.0, g=1.0, b=1.0):     &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                  &lt;br /&gt;
        DESCRIPTION                                                          &lt;br /&gt;
                Given selection, draw the bounding box around it.          &lt;br /&gt;
&lt;br /&gt;
        USAGE:&lt;br /&gt;
                drawBoundingBox [selection, [padding, [linewidth, [r, [g, b]]]]]&lt;br /&gt;
&lt;br /&gt;
        PARAMETERS:&lt;br /&gt;
                selection,              the selection to enboxen.  :-)&lt;br /&gt;
                                        defaults to (all)&lt;br /&gt;
   &lt;br /&gt;
                padding,                defaults to 0&lt;br /&gt;
&lt;br /&gt;
                linewidth,              width of box lines&lt;br /&gt;
                                        defaults to 2.0&lt;br /&gt;
&lt;br /&gt;
                r,                      red color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                               &lt;br /&gt;
&lt;br /&gt;
                g,                      green color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                 &lt;br /&gt;
&lt;br /&gt;
                b,                      blue color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                &lt;br /&gt;
&lt;br /&gt;
        RETURNS&lt;br /&gt;
                string, the name of the CGO box&lt;br /&gt;
&lt;br /&gt;
        NOTES&lt;br /&gt;
                * This function creates a randomly named CGO box that minimally spans the protein. The&lt;br /&gt;
                user can specify the width of the lines, the padding and also the color.                            &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                                                    &lt;br /&gt;
&lt;br /&gt;
        ([minX, minY, minZ],[maxX, maxY, maxZ]) = cmd.get_extent(selection)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;Box dimensions (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        minX = minX - float(padding)&lt;br /&gt;
        minY = minY - float(padding)&lt;br /&gt;
        minZ = minZ - float(padding)&lt;br /&gt;
        maxX = maxX + float(padding)&lt;br /&gt;
        maxY = maxY + float(padding)&lt;br /&gt;
        maxZ = maxZ + float(padding)&lt;br /&gt;
&lt;br /&gt;
        if padding != 0:&lt;br /&gt;
                 print &amp;quot;Box dimensions + padding (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        boundingBox = [&lt;br /&gt;
                LINEWIDTH, float(linewidth),&lt;br /&gt;
&lt;br /&gt;
                BEGIN, LINES,&lt;br /&gt;
                COLOR, float(r), float(g), float(b),&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                END&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
        boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
        while boxName in cmd.get_names():&lt;br /&gt;
                boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
&lt;br /&gt;
        cmd.load_cgo(boundingBox,boxName)&lt;br /&gt;
        return boxName&lt;br /&gt;
&lt;br /&gt;
cmd.extend (&amp;quot;drawBoundingBox&amp;quot;, drawBoundingBox)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Bounding_Box]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|DrawMinBoundingBox]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=6897</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=6897"/>
		<updated>2012-03-24T15:55:10Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &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;
===Warning on Mouse Drivers===&lt;br /&gt;
&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;
&lt;br /&gt;
===Invoking pymol from the unix command line===&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
====Mighty Mouse / Magic Mouse====&lt;br /&gt;
&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;
&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;
=Installing X-windows based pymol on Mac OS X=&lt;br /&gt;
&lt;br /&gt;
===Why would you want to do this?===&lt;br /&gt;
&lt;br /&gt;
#You want to run a [http://www.oreilly.com/openbook/freedom/ free], guilt-free, open-source version of pymol&lt;br /&gt;
#You just happen to prefer the [http://wiki.python.org/moin/TkInter tkinter] menu&lt;br /&gt;
#You want to use [http://pymol.sourceforge.net/plugins.html plugins], for example, the [http://www-personal.umich.edu/~mlerner/PyMOL/  apbs plugin] for free grasp-like electrostatic calculations.&lt;br /&gt;
&lt;br /&gt;
----&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-py25&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install python2.5 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.4 and even python2.3.  Fink uses its own unix-type python installation.&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;
&lt;br /&gt;
&lt;br /&gt;
==== PyMOL Install from Source, Using Fink ====&lt;br /&gt;
If the above didn't work, of 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;
----&lt;br /&gt;
&lt;br /&gt;
===PyMOLX11Hybrid=== &lt;br /&gt;
&lt;br /&gt;
MacPyMOL for Tiger now includes a hybrid X11 mode. Assuming that X11 is already installed, simply duplicate MacPyMOL.app and rename it &amp;quot;PyMOLX11Hybrid.app&amp;quot; and launch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===PyMOL in MacPorts===&lt;br /&gt;
&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;
&lt;br /&gt;
====Pymol from MacPorts using simple GUI approach====&lt;br /&gt;
&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;
&lt;br /&gt;
=====Config issues=====&lt;br /&gt;
&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;
&lt;br /&gt;
 sudo port install python26 -no_tkinter&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12465</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12465"/>
		<updated>2011-12-03T12:48:54Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install open-source PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Install distribution specific binary package ==&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:&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;
sudo apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install pymol'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
su -c 'emerge -av pymol'&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
sudo zypper install 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;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements:&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;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
  libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install subversion python-devel freeglut-devel freetype-devel tkinter python-pmw'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
sudo -c '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;
sudo zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&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 https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&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;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-purelib=$modules \&lt;br /&gt;
    --install-platlib=$modules&lt;br /&gt;
&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $prefix/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this (you may copy this launcher into your '''$PATH''',&lt;br /&gt;
like to '''/usr/local/bin'''):&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;
=== Problems ===&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;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;
&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 run the additional command &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to install a copy of the Python MegaWidgets.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu/Mint compile and install with MPEG support ==&lt;br /&gt;
Make a text file &amp;quot;installpymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
###################################################&lt;br /&gt;
[ -d $pymoldir ] || mkdir $pymoldir&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $pymolsvn&lt;br /&gt;
[ -d $pymoldir/wikiscripts ] || mkdir $pymoldir/wikiscripts&lt;br /&gt;
 &lt;br /&gt;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
sudo apt-get install gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol $pymolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
## To add a path/folder where you can put pymol wikiscripts&lt;br /&gt;
t=&amp;quot;'&amp;quot;&lt;br /&gt;
echo &amp;quot;import sys&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
echo &amp;quot;sys.path.append($t$pymoldir/wikiscripts$t)&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $freemolsvn&lt;br /&gt;
svn co svn://bioinformatics.org/svnroot/freemol/trunk $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
 &lt;br /&gt;
## Make a shortcut to export freemol and then execute pymol&lt;br /&gt;
echo '#!/bin/bash' &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;export FREEMOL=$freemolsvn/freemol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;#$pymoldir/pymol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
tail -n +2 $pymoldir/pymol &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
chmod u+x $pymoldir/pymolMPEG.sh &lt;br /&gt;
 &lt;br /&gt;
## Make a link, so we can call execute pymol&lt;br /&gt;
sudo ln -s $pymoldir/pymolMPEG.sh /usr/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update script ===&lt;br /&gt;
To pull and update PyMOL, one can make this script&lt;br /&gt;
&lt;br /&gt;
Make a text file &amp;quot;updatepymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x updatepymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn up $pymolsvn&lt;br /&gt;
svn up $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change MPEG settings ===&lt;br /&gt;
Change settings in&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/home/tlinnet/Software/pymol/svnfreemol/freemol/libpy/freemol/mpeg_encode.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For example, change in line 205:&amp;lt;br&amp;gt; &lt;br /&gt;
FRAME_RATE 24&amp;lt;br&amp;gt;&lt;br /&gt;
(Not, only legal values is allowed: 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60)&lt;br /&gt;
&lt;br /&gt;
Then restart PyMOL. &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12464</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12464"/>
		<updated>2011-12-03T12:40:58Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install open-source PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Install distribution specific binary package ==&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:&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;
sudo apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install pymol'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
su -c 'emerge -av pymol'&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
sudo zypper install 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;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements:&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;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
  libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install subversion python-devel freeglut-devel freetype-devel tkinter python-pmw'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
sudo -c '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;
sudo zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&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 https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&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;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-purelib=$modules \&lt;br /&gt;
    --install-platlib=$modules&lt;br /&gt;
&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $prefix/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this (you may copy this launcher into your '''$PATH''',&lt;br /&gt;
like to '''/usr/local/bin'''):&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;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* gcc-4.5 is broken for pymol install, use gcc-4.4 (Mint11 Linux, PyMOL 1.4.1, reported by [[User:Tlinnet]])&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;
&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 run the additional command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to install a copy of the Python MegaWidgets.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu/Mint compile and install with MPEG support ==&lt;br /&gt;
Make a text file &amp;quot;installpymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
###################################################&lt;br /&gt;
[ -d $pymoldir ] || mkdir $pymoldir&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $pymolsvn&lt;br /&gt;
[ -d $pymoldir/wikiscripts ] || mkdir $pymoldir/wikiscripts&lt;br /&gt;
 &lt;br /&gt;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
sudo apt-get install gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol $pymolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
## To add a path/folder where you can put pymol wikiscripts&lt;br /&gt;
t=&amp;quot;'&amp;quot;&lt;br /&gt;
echo &amp;quot;import sys&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
echo &amp;quot;sys.path.append($t$pymoldir/wikiscripts$t)&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $freemolsvn&lt;br /&gt;
svn co svn://bioinformatics.org/svnroot/freemol/trunk $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
 &lt;br /&gt;
## Make a shortcut to export freemol and then execute pymol&lt;br /&gt;
echo '#!/bin/bash' &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;export FREEMOL=$freemolsvn/freemol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;#$pymoldir/pymol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
tail -n +2 $pymoldir/pymol &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
chmod u+x $pymoldir/pymolMPEG.sh &lt;br /&gt;
 &lt;br /&gt;
## Make a link, so we can call execute pymol&lt;br /&gt;
sudo ln -s $pymoldir/pymolMPEG.sh /usr/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update script ===&lt;br /&gt;
To pull and update PyMOL, one can make this script&lt;br /&gt;
&lt;br /&gt;
Make a text file &amp;quot;updatepymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x updatepymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn up $pymolsvn&lt;br /&gt;
svn up $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change MPEG settings ===&lt;br /&gt;
Change settings in&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/home/tlinnet/Software/pymol/svnfreemol/freemol/libpy/freemol/mpeg_encode.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For example, change in line 205:&amp;lt;br&amp;gt; &lt;br /&gt;
FRAME_RATE 24&amp;lt;br&amp;gt;&lt;br /&gt;
(Not, only legal values is allowed: 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60)&lt;br /&gt;
&lt;br /&gt;
Then restart PyMOL. &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12463</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12463"/>
		<updated>2011-12-03T12:40:21Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install open-source PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Install distribution specific binary package ==&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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install pymol'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
su -c 'emerge -av pymol'&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
sudo zypper install 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;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint11&lt;br /&gt;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
  libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install subversion python-devel freeglut-devel freetype-devel tkinter python-pmw'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
sudo -c '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;
sudo zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&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 https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&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;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-purelib=$modules \&lt;br /&gt;
    --install-platlib=$modules&lt;br /&gt;
&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $prefix/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this (you may copy this launcher into your '''$PATH''',&lt;br /&gt;
like to '''/usr/local/bin'''):&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;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* gcc-4.5 is broken for pymol install, use gcc-4.4 (Mint11 Linux, PyMOL 1.4.1, reported by [[User:Tlinnet]])&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;
&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 run the additional command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to install a copy of the Python MegaWidgets.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu/Mint compile and install with MPEG support ==&lt;br /&gt;
Make a text file &amp;quot;installpymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
###################################################&lt;br /&gt;
[ -d $pymoldir ] || mkdir $pymoldir&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $pymolsvn&lt;br /&gt;
[ -d $pymoldir/wikiscripts ] || mkdir $pymoldir/wikiscripts&lt;br /&gt;
 &lt;br /&gt;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
sudo apt-get install gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol $pymolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
## To add a path/folder where you can put pymol wikiscripts&lt;br /&gt;
t=&amp;quot;'&amp;quot;&lt;br /&gt;
echo &amp;quot;import sys&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
echo &amp;quot;sys.path.append($t$pymoldir/wikiscripts$t)&amp;quot; &amp;gt;&amp;gt; ~/.pymolrc&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
[ -d $pymolsvn ] || mkdir $freemolsvn&lt;br /&gt;
svn co svn://bioinformatics.org/svnroot/freemol/trunk $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
 &lt;br /&gt;
## Make a shortcut to export freemol and then execute pymol&lt;br /&gt;
echo '#!/bin/bash' &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;export FREEMOL=$freemolsvn/freemol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;#$pymoldir/pymol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
tail -n +2 $pymoldir/pymol &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
chmod u+x $pymoldir/pymolMPEG.sh &lt;br /&gt;
 &lt;br /&gt;
## Make a link, so we can call execute pymol&lt;br /&gt;
sudo ln -s $pymoldir/pymolMPEG.sh /usr/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update script ===&lt;br /&gt;
To pull and update PyMOL, one can make this script&lt;br /&gt;
&lt;br /&gt;
Make a text file &amp;quot;updatepymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x updatepymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first 3 lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymolsvn=/home/tlinnet/Software/pymol/svnpymol&lt;br /&gt;
pymoldir=/home/tlinnet/Software/pymol&lt;br /&gt;
freemolsvn=/home/tlinnet/Software/pymol/svnfreemol&lt;br /&gt;
 &lt;br /&gt;
# gcc 4.5 broken for install in ubuntu&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
 &lt;br /&gt;
svn up $pymolsvn&lt;br /&gt;
svn up $freemolsvn&lt;br /&gt;
 &lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
cd $pymolsvn&lt;br /&gt;
python setup.py build&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup.py install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
install $pymolsvn/pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
cd $freemolsvn/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$freemolsvn/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change MPEG settings ===&lt;br /&gt;
Change settings in&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/home/tlinnet/Software/pymol/svnfreemol/freemol/libpy/freemol/mpeg_encode.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For example, change in line 205:&amp;lt;br&amp;gt; &lt;br /&gt;
FRAME_RATE 24&amp;lt;br&amp;gt;&lt;br /&gt;
(Not, only legal values is allowed: 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60)&lt;br /&gt;
&lt;br /&gt;
Then restart PyMOL. &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Axes&amp;diff=4230</id>
		<title>Axes</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Axes&amp;diff=4230"/>
		<updated>2011-03-27T12:17:32Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# axes.py&lt;br /&gt;
from pymol.cgo import *&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
from pymol.vfont import plain&lt;br /&gt;
&lt;br /&gt;
# create the axes object, draw axes with cylinders coloured red, green,&lt;br /&gt;
#blue for X, Y and Z&lt;br /&gt;
&lt;br /&gt;
obj = [&lt;br /&gt;
   CYLINDER, 0., 0., 0., 10., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.,&lt;br /&gt;
   CYLINDER, 0., 0., 0., 0., 10., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,&lt;br /&gt;
   CYLINDER, 0., 0., 0., 0., 0., 10., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,&lt;br /&gt;
   ]&lt;br /&gt;
&lt;br /&gt;
# add labels to axes object (requires pymol version 0.8 or greater, I&lt;br /&gt;
# believe&lt;br /&gt;
&lt;br /&gt;
cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[10.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[0.,10.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[0.,0.,10.],'Z',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
&lt;br /&gt;
# then we load it into PyMOL&lt;br /&gt;
cmd.load_cgo(obj,'axes')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This script draws a simple cartesian coordinate system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol.cgo import *&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
w = 0.06 # cylinder width &lt;br /&gt;
l = 0.75 # cylinder length&lt;br /&gt;
h = 0.25 # cone hight&lt;br /&gt;
d = w * 1.618 # cone base diameter&lt;br /&gt;
&lt;br /&gt;
obj = [CYLINDER, 0.0, 0.0, 0.0,   l, 0.0, 0.0, w, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,&lt;br /&gt;
       CYLINDER, 0.0, 0.0, 0.0, 0.0,   l, 0.0, w, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,&lt;br /&gt;
       CYLINDER, 0.0, 0.0, 0.0, 0.0, 0.0,   l, w, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,&lt;br /&gt;
       CONE,   l, 0.0, 0.0, h+l, 0.0, 0.0, d, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, &lt;br /&gt;
       CONE, 0.0,   l, 0.0, 0.0, h+l, 0.0, d, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, &lt;br /&gt;
       CONE, 0.0, 0.0,   l, 0.0, 0.0, h+l, d, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0]&lt;br /&gt;
&lt;br /&gt;
cmd.load_cgo(obj, 'axes')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the script and run it. Tested with Pymol 1.3.&lt;br /&gt;
[[File:Axes_demo.png|400px|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|Axes]]&lt;br /&gt;
[[Category:Math_Scripts|Axes]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Axes&amp;diff=4229</id>
		<title>Axes</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Axes&amp;diff=4229"/>
		<updated>2011-03-27T12:16:34Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# axes.py&lt;br /&gt;
from pymol.cgo import *&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
from pymol.vfont import plain&lt;br /&gt;
&lt;br /&gt;
# create the axes object, draw axes with cylinders coloured red, green,&lt;br /&gt;
#blue for X, Y and Z&lt;br /&gt;
&lt;br /&gt;
obj = [&lt;br /&gt;
   CYLINDER, 0., 0., 0., 10., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.,&lt;br /&gt;
   CYLINDER, 0., 0., 0., 0., 10., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,&lt;br /&gt;
   CYLINDER, 0., 0., 0., 0., 0., 10., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,&lt;br /&gt;
   ]&lt;br /&gt;
&lt;br /&gt;
# add labels to axes object (requires pymol version 0.8 or greater, I&lt;br /&gt;
# believe&lt;br /&gt;
&lt;br /&gt;
cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[10.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[0.,10.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
cyl_text(obj,plain,[0.,0.,10.],'Z',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])&lt;br /&gt;
&lt;br /&gt;
# then we load it into PyMOL&lt;br /&gt;
cmd.load_cgo(obj,'axes')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This script draws a simple cartesian coordinate system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol.cgo import *&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
w = 0.06 # cylinder width &lt;br /&gt;
l = 0.75 # cylinder length&lt;br /&gt;
h = 0.25 # cone hight&lt;br /&gt;
d = w * 1.618 # cone base diameter&lt;br /&gt;
&lt;br /&gt;
obj = [CYLINDER, 0.0, 0.0, 0.0,   l, 0.0, 0.0, w, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,&lt;br /&gt;
       CYLINDER, 0.0, 0.0, 0.0, 0.0,   l, 0.0, w, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,&lt;br /&gt;
       CYLINDER, 0.0, 0.0, 0.0, 0.0, 0.0,   l, w, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,&lt;br /&gt;
       CONE,   l, 0.0, 0.0, h+l, 0.0, 0.0, d, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, &lt;br /&gt;
       CONE, 0.0,   l, 0.0, 0.0, h+l, 0.0, d, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, &lt;br /&gt;
       CONE, 0.0, 0.0,   l, 0.0, 0.0, h+l, d, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0]&lt;br /&gt;
&lt;br /&gt;
cmd.load_cgo(obj, 'axes')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the script and run it in Pymol. Tested in version 1.3.&lt;br /&gt;
[[File:Axes_demo.png|400px|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|Axes]]&lt;br /&gt;
[[Category:Math_Scripts|Axes]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Axes_demo.png&amp;diff=1622</id>
		<title>File:Axes demo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Axes_demo.png&amp;diff=1622"/>
		<updated>2011-03-27T12:12:54Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Demo for a simple cartesian coordinate system.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Demo for a simple cartesian coordinate system.&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12444</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12444"/>
		<updated>2011-03-22T22:00:45Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Gentoo Linux (x86 &amp;amp; amd64) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have internet access, and all the dependencies are satisfied. &lt;br /&gt;
&lt;br /&gt;
To obtain a copy of the current revision version issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into the source directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have root or superuser privileges you can continue with the installation. If not follow [http://pymolwiki.org/index.php/Linux_Install#Installing_without_root_Privileges this guide]&lt;br /&gt;
&lt;br /&gt;
Run the first stage of the installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the second stage of the installation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A launch script '''pymol''' will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test your installation. If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py uninstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing without root Privileges ====&lt;br /&gt;
&lt;br /&gt;
Use the prefix command to specify where to install PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you'll need to modify your '''PYTHONPATH''' variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install to prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling By Hand ===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP = $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMOL from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux ==&lt;br /&gt;
As root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
eselect opengl ati&lt;br /&gt;
eselect opengl nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
All beta releases are maintained in the science overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a sci&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux==&lt;br /&gt;
&lt;br /&gt;
The pymol package can be installed with minimal effort using the GUI Synaptic Package Manager, or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
Further details on using Ubuntu for crystallography can be found [http://xanana.ucsc.edu/linux/debian_linux.html here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE :''' If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12443</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12443"/>
		<updated>2011-03-22T21:59:15Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Ubuntu Linux (x86 32,64; mac ppc) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have internet access, and all the dependencies are satisfied. &lt;br /&gt;
&lt;br /&gt;
To obtain a copy of the current revision version issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into the source directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have root or superuser privileges you can continue with the installation. If not follow [http://pymolwiki.org/index.php/Linux_Install#Installing_without_root_Privileges this guide]&lt;br /&gt;
&lt;br /&gt;
Run the first stage of the installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the second stage of the installation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A launch script '''pymol''' will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test your installation. If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py uninstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing without root Privileges ====&lt;br /&gt;
&lt;br /&gt;
Use the prefix command to specify where to install PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you'll need to modify your '''PYTHONPATH''' variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install to prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling By Hand ===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP = $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMOL from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux (x86 &amp;amp; amd64) ==&lt;br /&gt;
as root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
eselect opengl ati&lt;br /&gt;
eselect opengl nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
All beta releases are maintained in the science overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a sci&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux==&lt;br /&gt;
&lt;br /&gt;
The pymol package can be installed with minimal effort using the GUI Synaptic Package Manager, or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
Further details on using Ubuntu for crystallography can be found [http://xanana.ucsc.edu/linux/debian_linux.html here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE :''' If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8515</id>
		<title>Ramp New</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8515"/>
		<updated>2010-07-04T22:17:33Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ramp_new]] creates a color ramp based on a map potential value or based on proximity to a molecular object.&lt;br /&gt;
&lt;br /&gt;
Color ramps are extremely powerful but complicated to use.  &lt;br /&gt;
&lt;br /&gt;
In the simplest case, they can be used to color representations based on the potential values found in a map object at the corresponding positions in space.  In another simple case, representations can be colored based on proximity to a target.  Note that since ramp targets must themselves be real objects (not merely selections), the &amp;quot;create&amp;quot; command may be needed in order to generate an appropriate target.  In more complicated cases, they can be used to color representations on one object based atoms found in another.  Ramps can operate recursively.  In other words, the output color  from one ramp can be used as the input color for another.  For example, you could color by map potential within a certain distance of the target object, beyond which, a uniform color is applied.&lt;br /&gt;
&lt;br /&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;
# normal PyMOL usage&lt;br /&gt;
ramp_new name, map_name [, range [, color [, state [, selection [,&lt;br /&gt;
        beyond [, within [, sigma [, zero ]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# in the API&lt;br /&gt;
cmd.ramp_new(string name, string map_name, list range, list color, &lt;br /&gt;
  int state, string selection, float beyond, float&lt;br /&gt;
  within, float sigma, int zero, int quiet)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*'''ramp_name''' = string: name of the ramp object&lt;br /&gt;
*'''map_name''' = string: name of the map (for potential) or molecular object (for proximity)&lt;br /&gt;
*'''range''' = list: values corresponding to slots in the ramp&lt;br /&gt;
*'''color''' = list: colors corresponding to slots in the ramp&lt;br /&gt;
*'''state''' = integer: state identifier&lt;br /&gt;
*'''selection''' = selection: for automatic ranging&lt;br /&gt;
*'''beyond''' = number: with automatic ranging, are we excluding values beyond a certain distance from the selection?&lt;br /&gt;
*'''within''' = number: with automatic ranging, are we only including valuess within a certain distance from the selection?&lt;br /&gt;
*'''sigma''' = number: with automatic ranging, how many standard deviations from the mean do we go?&lt;br /&gt;
*'''zero''' = integer: with automatic ranging, do we force the central value to be zero?&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ramp_new e_pot_color, e_pot_map, [-10, 0, 10], [red, white, blue]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This creates a new ramp object named '''e_pot_color''', based on the values of the potential found in '''e_pot_map'''.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load pdbset.pqr&lt;br /&gt;
load pdbset_pot.dx&lt;br /&gt;
&lt;br /&gt;
ramp_new ramp, pdbset_pot, [ -3, 0, 3]&lt;br /&gt;
&lt;br /&gt;
show surface&lt;br /&gt;
set surface_ramp_above_mode&lt;br /&gt;
set surface_color, ramp, pdbset&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elaborate examples ==&lt;br /&gt;
Using a ramp and a distance measure, we can color the surface by some property--here, I'll chose distance from some important atom in the receptor to the ligand atom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:Surface_by_prop3.png|Ligand surface colored by distance from some given atom.  The remainder of the protein is hidden to more clearly visualize the calculated distances and surface color&lt;br /&gt;
Image:Surface_by_prop2.png&lt;br /&gt;
Image:Surface_by_prop.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reproduce the results shown here you must do the following:&lt;br /&gt;
* obtain a protein&lt;br /&gt;
* calculate some property for some set of atoms (like distance from some central location) and stuff the values into the b-factor&lt;br /&gt;
* create a new object from the atoms for which you just measured a property&lt;br /&gt;
* create a new ramp from the object with ramp_new&lt;br /&gt;
* set the surface color of the new object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another possible application of the ramp_new command can be the representation of the ELF function [http://en.wikipedia.org/wiki/Electron_localization_function]. This function can be calculated with the TopMod software [http://www.lct.jussieu.fr/suite64.html].&lt;br /&gt;
&lt;br /&gt;
* Load the cube file containing the ELF function, e.g. H2O_elf.cube.&lt;br /&gt;
* Create an isosurface with a contour level of 0.8.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;isosurface elf, H2O_elf, 0.8&amp;lt;/source&amp;gt;&lt;br /&gt;
* Load the cube containing the basin information, e.g. H20_esyn.cube. Basically in this cube for each point in the first cube you have either one of the numbers from 1 to 5. More details on what these numbers mean can be found in the TopMod manual.&lt;br /&gt;
* Create a new ramp.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;ramp_new ramp, H2O_esyn, [1, 2, 3, 5], [tv_orange, lightblue, palegreen, deeppurple]&amp;lt;/source&amp;gt;&lt;br /&gt;
* Assign the color ramp to the ELF isosurface.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set surface_color, ramp, elf&amp;lt;/source&amp;gt;&lt;br /&gt;
* Rebuild if necessary.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;rebuild&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=2 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:H2O.png|Localization domains of H2O. The bounding isosurface is ELF=0.8&lt;br /&gt;
Image:BeCl2.png|Localization domains of BeCl2. The bounding isosurface is ELF=0.8&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[load]], [[color]], [[create]], [[slice]], [[gradient]], [[Expand_To_Surface]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Ramp new]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8514</id>
		<title>Ramp New</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8514"/>
		<updated>2010-07-04T22:16:44Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ramp_new]] creates a color ramp based on a map potential value or based on proximity to a molecular object.&lt;br /&gt;
&lt;br /&gt;
Color ramps are extremely powerful but complicated to use.  &lt;br /&gt;
&lt;br /&gt;
In the simplest case, they can be used to color representations based on the potential values found in a map object at the corresponding positions in space.  In another simple case, representations can be colored based on proximity to a target.  Note that since ramp targets must themselves be real objects (not merely selections), the &amp;quot;create&amp;quot; command may be needed in order to generate an appropriate target.  In more complicated cases, they can be used to color representations on one object based atoms found in another.  Ramps can operate recursively.  In other words, the output color  from one ramp can be used as the input color for another.  For example, you could color by map potential within a certain distance of the target object, beyond which, a uniform color is applied.&lt;br /&gt;
&lt;br /&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;
# normal PyMOL usage&lt;br /&gt;
ramp_new name, map_name [, range [, color [, state [, selection [,&lt;br /&gt;
        beyond [, within [, sigma [, zero ]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# in the API&lt;br /&gt;
cmd.ramp_new(string name, string map_name, list range, list color, &lt;br /&gt;
  int state, string selection, float beyond, float&lt;br /&gt;
  within, float sigma, int zero, int quiet)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*'''ramp_name''' = string: name of the ramp object&lt;br /&gt;
*'''map_name''' = string: name of the map (for potential) or molecular object (for proximity)&lt;br /&gt;
*'''range''' = list: values corresponding to slots in the ramp&lt;br /&gt;
*'''color''' = list: colors corresponding to slots in the ramp&lt;br /&gt;
*'''state''' = integer: state identifier&lt;br /&gt;
*'''selection''' = selection: for automatic ranging&lt;br /&gt;
*'''beyond''' = number: with automatic ranging, are we excluding values beyond a certain distance from the selection?&lt;br /&gt;
*'''within''' = number: with automatic ranging, are we only including valuess within a certain distance from the selection?&lt;br /&gt;
*'''sigma''' = number: with automatic ranging, how many standard deviations from the mean do we go?&lt;br /&gt;
*'''zero''' = integer: with automatic ranging, do we force the central value to be zero?&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ramp_new e_pot_color, e_pot_map, [-10, 0, 10], [red, white, blue]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This creates a new ramp object named '''e_pot_color''', based on the values of the potential found in '''e_pot_map'''.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load pdbset.pqr&lt;br /&gt;
load pdbset_pot.dx&lt;br /&gt;
&lt;br /&gt;
ramp_new ramp, pdbset_pot, [ -3, 0, 3]&lt;br /&gt;
&lt;br /&gt;
show surface&lt;br /&gt;
set surface_ramp_above_mode&lt;br /&gt;
set surface_color, ramp, pdbset&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elaborate examples ==&lt;br /&gt;
Using a ramp and a distance measure, we can color the surface by some property--here, I'll chose distance from some important atom in the receptor to the ligand atom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:Surface_by_prop3.png|Ligand surface colored by distance from some given atom.  The remainder of the protein is hidden to more clearly visualize the calculated distances and surface color&lt;br /&gt;
Image:Surface_by_prop2.png&lt;br /&gt;
Image:Surface_by_prop.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reproduce the results shown here you must do the following:&lt;br /&gt;
* obtain a protein&lt;br /&gt;
* calculate some property for some set of atoms (like distance from some central location) and stuff the values into the b-factor&lt;br /&gt;
* create a new object from the atoms for which you just measured a property&lt;br /&gt;
* create a new ramp from the object with ramp_new&lt;br /&gt;
* set the surface color of the new object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another possible application of the ramp_new command can be the representation of the ELF function [http://en.wikipedia.org/wiki/Electron_localization_function]. This function can be calculated with the TopMod software [http://www.lct.jussieu.fr/suite64.html].&lt;br /&gt;
&lt;br /&gt;
* Load the cube file containing the ELF function, e.g. H2O_elf.cube.&lt;br /&gt;
* Create an isosurface with a contour level of 0.8.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;isosurface elf, H2O_elf, 0.8&amp;lt;/source&amp;gt;&lt;br /&gt;
* Load the cube containing the basin information, e.g. H20_esyn.cube. Basically in this cube for each point in the first cube you have either one of the numbers from 1 to 5. More details on what these numbers mean can be found in the TopMod manual.&lt;br /&gt;
* Create a new ramp.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;ramp_new ramp, H2O_esyn, [1, 2, 3, 5], [tv_orange, lightblue, palegreen, deeppurple]&amp;lt;/source&amp;gt;&lt;br /&gt;
* Assign the color ramp to the ELF isosurface.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set surface_color, ramp, elf&amp;lt;/source&amp;gt;&lt;br /&gt;
* Rebuild is necessary.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;rebuild&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=2 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:H2O.png|Localization domains of H2O. The bounding isosurface is ELF=0.8&lt;br /&gt;
Image:BeCl2.png|Localization domains of BeCl2. The bounding isosurface is ELF=0.8&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[load]], [[color]], [[create]], [[slice]], [[gradient]], [[Expand_To_Surface]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Ramp new]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8513</id>
		<title>Ramp New</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8513"/>
		<updated>2010-07-04T22:14:55Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Restructuring and addtions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ramp_new]] creates a color ramp based on a map potential value or based on proximity to a molecular object.&lt;br /&gt;
&lt;br /&gt;
Color ramps are extremely powerful but complicated to use.  &lt;br /&gt;
&lt;br /&gt;
In the simplest case, they can be used to color representations based on the potential values found in a map object at the corresponding positions in space.  In another simple case, representations can be colored based on proximity to a target.  Note that since ramp targets must themselves be real objects (not merely selections), the &amp;quot;create&amp;quot; command may be needed in order to generate an appropriate target.  In more complicated cases, they can be used to color representations on one object based atoms found in another.  Ramps can operate recursively.  In other words, the output color  from one ramp can be used as the input color for another.  For example, you could color by map potential within a certain distance of the target object, beyond which, a uniform color is applied.&lt;br /&gt;
&lt;br /&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;
# normal PyMOL usage&lt;br /&gt;
ramp_new name, map_name [, range [, color [, state [, selection [,&lt;br /&gt;
        beyond [, within [, sigma [, zero ]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# in the API&lt;br /&gt;
cmd.ramp_new(string name, string map_name, list range, list color, &lt;br /&gt;
  int state, string selection, float beyond, float&lt;br /&gt;
  within, float sigma, int zero, int quiet)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*'''ramp_name''' = string: name of the ramp object&lt;br /&gt;
*'''map_name''' = string: name of the map (for potential) or molecular object (for proximity)&lt;br /&gt;
*'''range''' = list: values corresponding to slots in the ramp&lt;br /&gt;
*'''color''' = list: colors corresponding to slots in the ramp&lt;br /&gt;
*'''state''' = integer: state identifier&lt;br /&gt;
*'''selection''' = selection: for automatic ranging&lt;br /&gt;
*'''beyond''' = number: with automatic ranging, are we excluding values beyond a certain distance from the selection?&lt;br /&gt;
*'''within''' = number: with automatic ranging, are we only including valuess within a certain distance from the selection?&lt;br /&gt;
*'''sigma''' = number: with automatic ranging, how many standard deviations from the mean do we go?&lt;br /&gt;
*'''zero''' = integer: with automatic ranging, do we force the central value to be zero?&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ramp_new e_pot_color, e_pot_map, [-10, 0, 10], [red, white, blue]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This creates a new ramp object named '''e_pot_color''', based on the values of the potential found in '''e_pot_map'''.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load pdbset.pqr&lt;br /&gt;
load pdbset_pot.dx&lt;br /&gt;
&lt;br /&gt;
ramp_new ramp, pdbset_pot, [ -3, 0, 3]&lt;br /&gt;
&lt;br /&gt;
show surface&lt;br /&gt;
set surface_ramp_above_mode&lt;br /&gt;
set surface_color, ramp, pdbset&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elaborate examples ==&lt;br /&gt;
Using a ramp and a distance measure, we can color the surface by some property--here, I'll chose distance from some important atom in the receptor to the ligand atom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:Surface_by_prop3.png|Ligand surface colored by distance from some given atom.  The remainder of the protein is hidden to more clearly visualize the calculated distances and surface color&lt;br /&gt;
Image:Surface_by_prop2.png&lt;br /&gt;
Image:Surface_by_prop.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reproduce the results shown here you must do the following:&lt;br /&gt;
* obtain a protein&lt;br /&gt;
* calculate some property for some set of atoms (like distance from some central location) and stuff the values into the b-factor&lt;br /&gt;
* create a new object from the atoms for which you just measured a property&lt;br /&gt;
* create a new ramp from the object with ramp_new&lt;br /&gt;
* set the surface color of the new object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another possible application of the ramp_new command can be the representation of the ELF function [http://en.wikipedia.org/wiki/Electron_localization_function]. This function can be calculated with the TopMod software [http://www.lct.jussieu.fr/suite64.html].&lt;br /&gt;
&lt;br /&gt;
* Load the cube file containing the ELF function, e.g. H2O_elf.cube&lt;br /&gt;
* Create an isosurface with a contour level of 0.8&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;isosurface elf, H2O_elf, 0.8&amp;lt;/source&amp;gt;&lt;br /&gt;
* Load the cube containing the basin information, e.g. H20_esyn.cube. Basically in this cube for each point in the first cube you have either one of the numbers from 1 to 5. More details on what these numbers mean can be found in the TopMod manual.&lt;br /&gt;
* Create a new ramp.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;ramp_new ramp, H2O_esyn, [1, 2, 3, 5], [tv_orange, lightblue, palegreen, deeppurple]&amp;lt;/source&amp;gt;&lt;br /&gt;
* Assign the color ramp to the ELF isosurface&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set surface_color, ramp, elf&amp;lt;/source&amp;gt;&lt;br /&gt;
* Rebuild&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;rebuild&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=2 widths=250 heights=250&amp;gt;&lt;br /&gt;
Image:H2O.png|Localization domains of H2O. The bounding isosurfaces are ELF=0.8&lt;br /&gt;
Image:BeCl2.png|Localization domains of BeCl2. The bounding isosurfaces are ELF=0.8&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[load]], [[color]], [[create]], [[slice]], [[gradient]], [[Expand_To_Surface]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Ramp new]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8512</id>
		<title>Ramp New</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ramp_New&amp;diff=8512"/>
		<updated>2010-07-04T21:20:57Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ramp_new]] creates a color ramp based on a map potential value or based on proximity to a molecular object.&lt;br /&gt;
&lt;br /&gt;
Color ramps are extremely powerful but complicated to use.  &lt;br /&gt;
&lt;br /&gt;
In the simplest case, they can be used to color representations based on the potential values found in a map object at the corresponding positions in space.  In another simple case, representations can be colored based on proximity to a target.  Note that since ramp targets must themselves be real objects (not merely selections), the &amp;quot;create&amp;quot; command may be needed in order to generate an appropriate target.  In more complicated cases, they can be used to color representations on one object based atoms found in another.  Ramps can operate recursively.  In other words, the output color  from one ramp can be used as the input color for another.  For example, you could color by map potential within a certain distance of the target object, beyond which, a uniform color is applied.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
Using a ramp and a distance measure, we can color the surface by some property--here, I'll chose distance from some important atom in the receptor to the ligand atom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=200 heights=200&amp;gt;&lt;br /&gt;
Image:Surface_by_prop3.png|Ligand surface colored by distance from some given atom.  The remainder of the protein is hidden to more clearly visualize the calculated distances and surface color&lt;br /&gt;
Image:Surface_by_prop2.png&lt;br /&gt;
Image:Surface_by_prop.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reproduce the results shown here you must do the following:&lt;br /&gt;
* obtain a protein&lt;br /&gt;
* calculate some property for some set of atoms (like distance from some central location) and stuff the values into the b-factor&lt;br /&gt;
* create a new object from the atoms for which you just measured a property&lt;br /&gt;
* create a new ramp from the object with ramp_new&lt;br /&gt;
* set the surface color of the new object&lt;br /&gt;
&lt;br /&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;
# normal PyMOL usage&lt;br /&gt;
ramp_new name, map_name [, range [, color [, state [, selection [,&lt;br /&gt;
        beyond [, within [, sigma [, zero ]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# in the API&lt;br /&gt;
cmd.ramp_new(string name, string map_name, list range, list color, &lt;br /&gt;
  int state, string selection, float beyond, float&lt;br /&gt;
  within, float sigma, int zero, int quiet)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*'''name''' = string: name of the ramp object&lt;br /&gt;
*'''map_name''' = string: name of the map (for potential) or molecular object (for proximity)&lt;br /&gt;
*'''range''' = list: values corresponding to slots in the ramp&lt;br /&gt;
*'''color''' = list: colors corresponding to slots in the ramp&lt;br /&gt;
*'''state''' = integer: state identifier&lt;br /&gt;
*'''selection''' = selection: for automatic ranging&lt;br /&gt;
*'''beyond''' = number: with automatic ranging, are we excluding values beyond a certain distance from the selection?&lt;br /&gt;
*'''within''' = number: with automatic ranging, are we only including valuess within a certain distance from the selection?&lt;br /&gt;
*'''sigma''' = number: with automatic ranging, how many standard deviations from the mean do we go?&lt;br /&gt;
*'''zero''' = integer: with automatic ranging, do we force the central value to be zero?&lt;br /&gt;
 &lt;br /&gt;
= Example =&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ramp_new e_pot_color, e_pot_map, [-10,0,10], [red,white,blue]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Normal Usage == &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load pdbset1.pqr&lt;br /&gt;
load pdbset_1.dx&lt;br /&gt;
&lt;br /&gt;
load pdbset3.pqr&lt;br /&gt;
load pdbset_3.dx&lt;br /&gt;
&lt;br /&gt;
ramp_new ramp1, pdbset_1, [ -3, 0, 3]&lt;br /&gt;
ramp_new ramp3, pdbset_3, [ -3, 0, 3]&lt;br /&gt;
&lt;br /&gt;
show surface&lt;br /&gt;
&lt;br /&gt;
set surface_ramp_above_mode&lt;br /&gt;
&lt;br /&gt;
set surface_color, ramp1, pdbset1&lt;br /&gt;
set surface_color, ramp3, pdbset3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[load]], [[color]], [[create]], [[slice]], [[gradient]], [[Expand_To_Surface]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Ramp new]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:BeCl2.png&amp;diff=1629</id>
		<title>File:BeCl2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:BeCl2.png&amp;diff=1629"/>
		<updated>2010-06-30T17:07:12Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: uploaded a new version of &amp;quot;File:BeCl2.png&amp;quot;:&amp;amp;#32;Electron localization function for BeCl2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Electron localization function for the BeCl2&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:H2O.png&amp;diff=2336</id>
		<title>File:H2O.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:H2O.png&amp;diff=2336"/>
		<updated>2010-06-30T17:05:59Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Electron localization function for H2O&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Electron localization function for H2O&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:BeCl2.png&amp;diff=1628</id>
		<title>File:BeCl2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:BeCl2.png&amp;diff=1628"/>
		<updated>2010-06-30T17:05:20Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Electron localization function for the BeCl2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Electron localization function for the BeCl2&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Linux_Install&amp;diff=344</id>
		<title>Talk:Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Linux_Install&amp;diff=344"/>
		<updated>2009-04-03T00:33:43Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[User:Wgscott|I]] added an Ubuntu section.  I hope it doesn't suck too much.&lt;br /&gt;
&lt;br /&gt;
* This page needs some major reformatting.  Can someone take a look and see about clearing up a section s/he is familiar with?  Thanks!&lt;br /&gt;
* Some of the info here if outdated and redundant. I can take care of the Fedora install and the compilation from source. Is there any wiki policy on major modifications? [[User:Mretegan|Marius]]&lt;br /&gt;
* Dome some editing for Fedora part and general compilation. What is the role of the compile by hand section? Isn't that obsolete. Also the SuSe (which is now is OpenSuSe) needs some rewriting. [[User:Mretegan|Marius]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12441</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12441"/>
		<updated>2009-04-03T00:14:39Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* From Source */ Typho&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have internet access, and all the dependencies are satisfied. &lt;br /&gt;
&lt;br /&gt;
To obtain a copy of the current revision version issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into the source directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have root or superuser privileges you can continue with the installation. If not follow [http://pymolwiki.org/index.php/Linux_Install#Installing_without_root_Privileges this guide]&lt;br /&gt;
&lt;br /&gt;
Run the first stage of the installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the second stage of the installation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A launch script '''pymol''' will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test your installation. If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py uninstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing without root Privileges ====&lt;br /&gt;
&lt;br /&gt;
Use the prefix command to specify where to install PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you'll need to modify your '''PYTHONPATH''' variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install to prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling By Hand ===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP = $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMOL from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux (x86) ==&lt;br /&gt;
as root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
opengl-update ati&lt;br /&gt;
opengl-update nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
A version of the latest svn build is avaible via the dberkholz overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a dberkholz &amp;amp;&amp;amp; emerge =sci-chemistry/pymol-9999&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux (x86 32,64; mac ppc)==&lt;br /&gt;
&lt;br /&gt;
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png&lt;br /&gt;
&lt;br /&gt;
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : '''If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12440</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12440"/>
		<updated>2009-04-03T00:12:02Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Generic Linux */ Rewrite and merged information.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have internet access, and all the dependencies are satisfied. &lt;br /&gt;
&lt;br /&gt;
To obtain a copy of the current revision version issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into the source directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have root or superuser privileges you can continue with the installation. If not follow this guide [http://pymolwiki.org/index.php/Linux_Install#Installing_without_root_Privileges normal user]&lt;br /&gt;
&lt;br /&gt;
Run the first stage of the installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the second stage of the installation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A launch script '''pymol''' will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test your installation. If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py uninstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing without root Privileges ====&lt;br /&gt;
&lt;br /&gt;
Use the prefix command to specify where to install PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you'll need to modify your '''PYTHONPATH''' variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install to prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run PyMOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling By Hand ===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP = $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMOL from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux (x86) ==&lt;br /&gt;
as root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
opengl-update ati&lt;br /&gt;
opengl-update nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
A version of the latest svn build is avaible via the dberkholz overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a dberkholz &amp;amp;&amp;amp; emerge =sci-chemistry/pymol-9999&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux (x86 32,64; mac ppc)==&lt;br /&gt;
&lt;br /&gt;
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png&lt;br /&gt;
&lt;br /&gt;
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : '''If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12439</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12439"/>
		<updated>2009-04-02T23:04:22Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Fedora */ Typho&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Quick Install for Latest Features ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have some sort of superuser (root) access, and have internet access.  It will download the most current version from [http://pymol.sf.net PyMOL's Projet Page] and install it.  This should install PyMOL onto your system so that any users on your system can use it.  To easily get the latest version, do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir pymol_temp&lt;br /&gt;
cd pymol_temp&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
sudo cp ./pymol /usr/local/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, just remove the '''pymol_temp''' directory if you want and you're done.&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
The following instructions require you to be root.&lt;br /&gt;
&lt;br /&gt;
* Under modern Linux, you will need the dependencies installed first.&lt;br /&gt;
** Fedora 9: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install python-devel tkinter libpng-devel freeglut-devel freetype-devel&amp;lt;/source&amp;gt;&lt;br /&gt;
* To obtain a copy of the current source code  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;svn https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol-src&amp;lt;/source&amp;gt;&lt;br /&gt;
* Then go into the source directory ('''pymol-src'''). &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cd pymol-src&amp;lt;/source&amp;gt;&lt;br /&gt;
* Run the first stage of the installation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup.py install&amp;lt;/source&amp;gt;&lt;br /&gt;
* Run the second stage of the installation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py install&amp;lt;/source&amp;gt; A launch script &amp;quot;pymol&amp;quot; will have been created.&lt;br /&gt;
* Test the install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;./pymol&amp;lt;/source&amp;gt;  If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py install pmw&amp;lt;/source&amp;gt; to install a copy of the Python MegaWidgets.&lt;br /&gt;
* You may now wish to copy the executable to a suitable location &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp ./pymol SOME_PATH           # where SOME_PATH is some directory in your $PATH&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall pymol built from source &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py uninstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== From Package ===&lt;br /&gt;
Download the appropriate RPM and use 'rpm' to install it.  Typically,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 rpm -Uvh rpmFileName.rpm&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compiling By Hand===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP=           $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
==== Installing without Superuser (root) Privileges ====&lt;br /&gt;
Use the prefix command to specify where to install PyMOL.  Then, you'll need to modify your '''PYTHONPATH''' variable,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# install to prefix&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
# update your PYTHONPATH variable&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
# install to prefix (this step _is_ needed)&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
# now you can run PyMOL&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing a Script Without Superuser Access ====&lt;br /&gt;
Install the script following the instructions by the distributor.  Then, add the path where the module was built to the PYTHONPATH environment variable (if needed).&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMOL from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux (x86) ==&lt;br /&gt;
as root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
opengl-update ati&lt;br /&gt;
opengl-update nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
A version of the latest svn build is avaible via the dberkholz overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a dberkholz &amp;amp;&amp;amp; emerge =sci-chemistry/pymol-9999&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux (x86 32,64; mac ppc)==&lt;br /&gt;
&lt;br /&gt;
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png&lt;br /&gt;
&lt;br /&gt;
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : '''If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12438</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12438"/>
		<updated>2009-04-02T23:02:03Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Fedora Core Linux (x86) */ Rewrite of this parte since previous information was obsolte.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing PyMol is quite straightforward.&lt;br /&gt;
&lt;br /&gt;
=PyMol=&lt;br /&gt;
Installing PyMol is very simple, even from source.  On Linux, you need the following requirements:&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;
&lt;br /&gt;
== Generic Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Quick Install for Latest Features ===&lt;br /&gt;
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL.  Building PyMOL is generally '''very''' simple.  &lt;br /&gt;
&lt;br /&gt;
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have some sort of superuser (root) access, and have internet access.  It will download the most current version from [http://pymol.sf.net PyMOL's Projet Page] and install it.  This should install PyMOL onto your system so that any users on your system can use it.  To easily get the latest version, do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir pymol_temp&lt;br /&gt;
cd pymol_temp&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
sudo python setup.py install&lt;br /&gt;
sudo python setup2.py install&lt;br /&gt;
sudo cp ./pymol /usr/local/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, just remove the '''pymol_temp''' directory if you want and you're done.&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
The following instructions require you to be root.&lt;br /&gt;
&lt;br /&gt;
* Under modern Linux, you will need the dependencies installed first.&lt;br /&gt;
** Fedora 9: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install python-devel tkinter libpng-devel freeglut-devel freetype-devel&amp;lt;/source&amp;gt;&lt;br /&gt;
* To obtain a copy of the current source code  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;svn https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol-src&amp;lt;/source&amp;gt;&lt;br /&gt;
* Then go into the source directory ('''pymol-src'''). &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cd pymol-src&amp;lt;/source&amp;gt;&lt;br /&gt;
* Run the first stage of the installation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup.py install&amp;lt;/source&amp;gt;&lt;br /&gt;
* Run the second stage of the installation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py install&amp;lt;/source&amp;gt; A launch script &amp;quot;pymol&amp;quot; will have been created.&lt;br /&gt;
* Test the install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;./pymol&amp;lt;/source&amp;gt;  If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py install pmw&amp;lt;/source&amp;gt; to install a copy of the Python MegaWidgets.&lt;br /&gt;
* You may now wish to copy the executable to a suitable location &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp ./pymol SOME_PATH           # where SOME_PATH is some directory in your $PATH&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall pymol built from source &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;python setup2.py uninstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== From Package ===&lt;br /&gt;
Download the appropriate RPM and use 'rpm' to install it.  Typically,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 rpm -Uvh rpmFileName.rpm&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compiling By Hand===&lt;br /&gt;
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues.  To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand.  The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run.  In the most recent available version (0.99rc1) this includes&lt;br /&gt;
* tcl-8_4_11.tgz                        &lt;br /&gt;
* tk-8_4_11.tgz                         &lt;br /&gt;
* zlib-1_2_3.tgz                        &lt;br /&gt;
* libpng-1_2_8.tgz                      &lt;br /&gt;
* python-2_4_2.tgz                      &lt;br /&gt;
* numeric-24_2.tgz                      &lt;br /&gt;
* pmw-1_2.tgz                           &lt;br /&gt;
* freetype-2_1_10.tgz                   &lt;br /&gt;
--and--                                   &lt;br /&gt;
* (freeglut-2_4_0.tgz &lt;br /&gt;
--or-- &lt;br /&gt;
* glut-3_7_6.tgz) &lt;br /&gt;
&lt;br /&gt;
====Supported Packages====&lt;br /&gt;
The above packages don't need to be installed from their source-packages only.  That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages.  '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages.  PyMOL needs the source/header files to compile against.  For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''.&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.&lt;br /&gt;
&lt;br /&gt;
Here's the basic steps to install by source:&lt;br /&gt;
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]&lt;br /&gt;
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory&lt;br /&gt;
# cd pymol&lt;br /&gt;
# cd ext&lt;br /&gt;
# vi build.com  # edit the build file&lt;br /&gt;
# cd ..&lt;br /&gt;
# cp setup/Rules.make . # or correct Rules.make file for your machine&lt;br /&gt;
# vi Rules.make         # make appropriate changes&lt;br /&gt;
# vi setup.py           # make appropriate changes&lt;br /&gt;
# make&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* if you're using a 64-bit machine, lib becomes lib64 for almost everything&lt;br /&gt;
* ensure you have the correct Python path and version (is it 2.3?  2.4?)&lt;br /&gt;
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])&lt;br /&gt;
   LIBP=           $(exec_installdir)/lib'''''64'''''/python$(VERSION)&lt;br /&gt;
&lt;br /&gt;
Copy the appropriate setup/Rules.XXX file to the base PyMol dir.  You'll have to edit the file for your system.  Then run 'make'.&lt;br /&gt;
&lt;br /&gt;
==== Installing without Superuser (root) Privileges ====&lt;br /&gt;
Use the prefix command to specify where to install PyMOL.  Then, you'll need to modify your '''PYTHONPATH''' variable,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# install to prefix&lt;br /&gt;
python setup.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
# update your PYTHONPATH variable&lt;br /&gt;
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages&lt;br /&gt;
# install to prefix (this step _is_ needed)&lt;br /&gt;
python setup2.py install --prefix /dir_to/pymol/py_build&lt;br /&gt;
# now you can run PyMOL&lt;br /&gt;
./pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing a Script Without Superuser Access ====&lt;br /&gt;
Install the script following the instructions by the distributor.  Then, add the path where the module was built to the PYTHONPATH environment variable (if needed).&lt;br /&gt;
&lt;br /&gt;
== External Links to Distribution-specific Packages ==&lt;br /&gt;
&lt;br /&gt;
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:&lt;br /&gt;
&lt;br /&gt;
* Fedora: [https://admin.fedoraproject.org/pkgdb/packages/name/pymol]&lt;br /&gt;
&lt;br /&gt;
* RHEL: [https://fedoraproject.org/wiki/SIGs/SciTech/PackageList] &lt;br /&gt;
&lt;br /&gt;
* Ubuntu: [http://packages.ubuntu.com/jaunty/science/pymol]&lt;br /&gt;
&lt;br /&gt;
* Debian: [http://packages.debian.org/lenny/pymol]&lt;br /&gt;
&lt;br /&gt;
* OpenSUSE: [http://software.opensuse.org/search?p=1&amp;amp;q=pymol]&lt;br /&gt;
&lt;br /&gt;
* Gentoo-portage: [http://gentoo-portage.com/sci-chemistry/pymol]&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
Starting from Fedora 9, you can install PyMol from yum repositories.&lt;br /&gt;
&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for [http://pymolwiki.org/index.php/Linux_Install#Generic_Linux Generic Linux]. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo Linux (x86) ==&lt;br /&gt;
as root:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
emerge pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
be sure to have the proper OpenGL configuration. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
opengl-update ati&lt;br /&gt;
opengl-update nvidia&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
list of available versions in portage [http://www.gentoo-portage.com/sci-chemistry/pymol pymol for gentoo]&lt;br /&gt;
&lt;br /&gt;
A version of the latest svn build is avaible via the dberkholz overlay, which can be used with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
layman -a dberkholz &amp;amp;&amp;amp; emerge =sci-chemistry/pymol-9999&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is ongoing development in providing plugins via ebuilds with an thread in [http://bugs.gentoo.org/show_bug.cgi?id=209970 gentoo bugzilla]. The ebuild can be checked out via svn&lt;br /&gt;
 svn co http://svn.olausson.de/molmod/trunk&lt;br /&gt;
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.&lt;br /&gt;
&lt;br /&gt;
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.&lt;br /&gt;
&lt;br /&gt;
== SuSe ==&lt;br /&gt;
=== 32-bit (x86) ===&lt;br /&gt;
See [[#Generic Linux]] above.&lt;br /&gt;
&lt;br /&gt;
=== 64-bit (x86_64) ===&lt;br /&gt;
See [[#Generic Linux]] above.  Some details for problem solving are here.  64-bit Python install is quite easy.  Make sure your nvidia driver is installed (or ATI, but I have no experience there).&lt;br /&gt;
&lt;br /&gt;
To install PyMol&lt;br /&gt;
*Ensure your system has it's distutils in place and ready to use.  Try the following check:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils import *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Download the [http://pymol.org/ source]&lt;br /&gt;
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].&lt;br /&gt;
** To install Pmw, just decompress it and then move the base director &amp;quot;Pwm&amp;quot; to /usr/lib64/python2.3/site-packages/.  You can test that it's there by testing the import, see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import * from Pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If errors erupt, investigate.&lt;br /&gt;
* decompress the source and cd into the PyMol directory that was just decompressed.&lt;br /&gt;
* If upgrading see [[:Category: Upgrading PyMol|below]].&lt;br /&gt;
* Now enter the following...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
python setup.py build&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup.py install&amp;lt;br&amp;gt;&lt;br /&gt;
sudo python setup2.py&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* The sudo commands will need a root password or someone with sudo capabilities.&lt;br /&gt;
&lt;br /&gt;
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol.com /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''.  So, for later versions (~0.99+) use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp ./pymol /usr/local/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have a working PyMol install.  &lt;br /&gt;
&lt;br /&gt;
'''pymol.com''' should now run your new PyMol install.&lt;br /&gt;
&lt;br /&gt;
==Ubuntu Linux (x86 32,64; mac ppc)==&lt;br /&gt;
&lt;br /&gt;
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png&lt;br /&gt;
&lt;br /&gt;
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : '''If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.&lt;br /&gt;
&lt;br /&gt;
=Preparing your System=&lt;br /&gt;
See [[Linux_XFree86_Configuration]].&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
===XFree86 Config===&lt;br /&gt;
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;br /&gt;
&lt;br /&gt;
===Xorg===&lt;br /&gt;
Adding a &lt;br /&gt;
 Stereo 3&lt;br /&gt;
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): &lt;br /&gt;
&lt;br /&gt;
 ModeLine     &amp;quot;1280x1024_118.00&amp;quot; 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync&lt;br /&gt;
&lt;br /&gt;
appears to slightly improve the stereo quality, in particular when one&lt;br /&gt;
displays labels and/or dashes/dots.&lt;br /&gt;
&lt;br /&gt;
For those having possible driver issues, this link might help&lt;br /&gt;
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]&lt;br /&gt;
&lt;br /&gt;
===xorg.conf for stereo in Fedora Core 6===&lt;br /&gt;
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the &amp;quot;Device&amp;quot; section of xorg.conf has the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver &amp;quot;nvidia&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of xorg.conf to disable &amp;quot;Composite&amp;quot;, which is incompatible with stereographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
     Option &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Section &amp;quot;Screen&amp;quot; add the following line to enable quad-buffered stereo:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option &amp;quot;Stereo&amp;quot; &amp;quot;3&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Problems=&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running.  Such examples could be SCIM, KINPUT/2 or the like.  Try turning off the IME and restarting PyMol to get the widgets to recognize your input.&lt;br /&gt;
&lt;br /&gt;
==libnvidia-tls.so.1: cannot handle TLS data==&lt;br /&gt;
&lt;br /&gt;
If you get an error, upon invoking pymol, of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 109, in ?&lt;br /&gt;
    import pymol&lt;br /&gt;
  File &amp;quot;/usr/lib/python2.4/site-packages/pymol/__init__.py&amp;quot;, line 353, in ?&lt;br /&gt;
    import _cmd&lt;br /&gt;
ImportError: libnvidia-tls.so.1: cannot handle TLS data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then try changing the permissons on   libnvidia-tls.so.1.  i.e,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; sudo chmod 777 /usr/lib/libnvidia-tls.so.1   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Super-Large Files==&lt;br /&gt;
For loading files that require the majority of your system's memory, try tweaking your system's [http://certcities.com/editorial/columns/story.asp?EditorialsID=214 ulimit] before starting PyMOL.  ''' ''Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.'' '''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# shows current setup&lt;br /&gt;
ulimit -a&lt;br /&gt;
&lt;br /&gt;
# allows setting of a limit in current shell.&lt;br /&gt;
ulimit -v SizeInKB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3044</id>
		<title>User:Mretegan</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3044"/>
		<updated>2009-03-30T19:39:05Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Marius Retegan Ph.D&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3043</id>
		<title>User:Mretegan</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Mretegan&amp;diff=3043"/>
		<updated>2009-03-30T19:21:23Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: New page: Marius Retegan&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Marius Retegan&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Linux_Install&amp;diff=343</id>
		<title>Talk:Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Linux_Install&amp;diff=343"/>
		<updated>2009-03-30T19:17:53Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[User:Wgscott|I]] added an Ubuntu section.  I hope it doesn't suck too much.&lt;br /&gt;
&lt;br /&gt;
* This page needs some major reformatting.  Can someone take a look and see about clearing up a section s/he is familiar with?  Thanks!&lt;br /&gt;
* Some of the info here if outdated and redundant. I can take care of the Fedora install and the compilation from source. Is there any wiki policy on major modifications? [[User:Mretegan|Marius]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5436</id>
		<title>DrawBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5436"/>
		<updated>2009-03-30T19:14:58Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Draws a bounding box around a given selection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DrawMinBB.png|Example of a bounding box&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/drawBoundingBox.py&lt;br /&gt;
fetch 1jsd&lt;br /&gt;
drawBoundingBox 1jsd, r=0.33, g=0.80&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
Just copy the source to your computer. Then run&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /path/to/drawBoundingBox.py&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;
# -*- coding: utf-8 -*-                                                                                     &lt;br /&gt;
from pymol.cgo import *                                                                                     &lt;br /&gt;
from pymol import cmd                                                                                       &lt;br /&gt;
from random import randint                                                                                  &lt;br /&gt;
from string import split                                                                                    &lt;br /&gt;
&lt;br /&gt;
#############################################################################&lt;br /&gt;
#                                                                            &lt;br /&gt;
# drawBoundingBox.py -- Draws a box surrounding a selection &lt;br /&gt;
#&lt;br /&gt;
#                                                                            &lt;br /&gt;
# AUTHOR: Jason Vertrees                                                   &lt;br /&gt;
# DATE  : 2/20/2009                                                          &lt;br /&gt;
# NOTES : See comments below.                                                &lt;br /&gt;
#                                                                            &lt;br /&gt;
#############################################################################&lt;br /&gt;
def drawBoundingBox(selection=&amp;quot;(all)&amp;quot;, padding=0.0, linewidth=2.0, r=1.0, g=1.0, b=1.0):     &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                  &lt;br /&gt;
        DESCRIPTION                                                          &lt;br /&gt;
                Given selection, draw the bounding box around it.          &lt;br /&gt;
&lt;br /&gt;
        USAGE:&lt;br /&gt;
                drawBoundingBox [selection, [padding, [linewidth, [r, [g, b]]]]]&lt;br /&gt;
&lt;br /&gt;
        PARAMETERS:&lt;br /&gt;
                selection,              the selection to enboxen.  :-)&lt;br /&gt;
                                        defaults to (all)&lt;br /&gt;
   &lt;br /&gt;
                padding,                defaults to 0&lt;br /&gt;
&lt;br /&gt;
                linewidth,              width of box lines&lt;br /&gt;
                                        defaults to 2.0&lt;br /&gt;
&lt;br /&gt;
                r,                      red color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                               &lt;br /&gt;
&lt;br /&gt;
                g,                      green color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                 &lt;br /&gt;
&lt;br /&gt;
                b,                      blue color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                &lt;br /&gt;
&lt;br /&gt;
        RETURNS&lt;br /&gt;
                string, the name of the CGO box&lt;br /&gt;
&lt;br /&gt;
        NOTES&lt;br /&gt;
                * This function creates a randomly named CGO box that minimally spans the protein. The&lt;br /&gt;
                user can specify the width of the lines, the padding and also the color.                            &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                                                    &lt;br /&gt;
&lt;br /&gt;
        ([minX, minY, minZ],[maxX, maxY, maxZ]) = cmd.get_extent(sel)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;Box dimensions (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        minX = minX - float(padding)&lt;br /&gt;
        minY = minY - float(padding)&lt;br /&gt;
        minZ = minZ - float(padding)&lt;br /&gt;
        maxX = maxX + float(padding)&lt;br /&gt;
        maxY = maxY + float(padding)&lt;br /&gt;
        maxZ = maxZ + float(padding)&lt;br /&gt;
&lt;br /&gt;
       if padding != 0:&lt;br /&gt;
                 print &amp;quot;Box dimensions + padding (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        boundingBox = [&lt;br /&gt;
                LINEWIDTH, float(linewidth),&lt;br /&gt;
&lt;br /&gt;
                BEGIN, LINES,&lt;br /&gt;
                COLOR, float(r), float(g), float(b),&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                END&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
        boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
        while boxName in cmd.get_names():&lt;br /&gt;
                boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
&lt;br /&gt;
        cmd.load_cgo(boundingBox,boxName)&lt;br /&gt;
        return boxName&lt;br /&gt;
&lt;br /&gt;
cmd.extend (&amp;quot;drawBoundingBox&amp;quot;, drawBoundingBox)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Bounding_Box]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|DrawMinBoundingBox]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5435</id>
		<title>DrawBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5435"/>
		<updated>2009-03-30T19:13:42Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Draws a bounding box around a given selection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DrawMinBB.png|Example of a bounding box&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/drawBoundingBox.py&lt;br /&gt;
fetch 1jsd&lt;br /&gt;
drawBoundingBox 1jsd, r=0.33, g=0.80&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
Just copy the source to your computer. Then run&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /path/to/drawBoundingBox.py&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;
# -*- coding: utf-8 -*-                                                                                     &lt;br /&gt;
from pymol.cgo import *                                                                                     &lt;br /&gt;
from pymol import cmd                                                                                       &lt;br /&gt;
from random import randint                                                                                  &lt;br /&gt;
from string import split                                                                                    &lt;br /&gt;
&lt;br /&gt;
#############################################################################&lt;br /&gt;
#                                                                            &lt;br /&gt;
# drawBoundingBox.py -- Draws a box surrounding a selection &lt;br /&gt;
#&lt;br /&gt;
#                                                                            &lt;br /&gt;
# AUTHOR: Jason Vertrees                                                   &lt;br /&gt;
# DATE  : 2/20/2009                                                          &lt;br /&gt;
# NOTES : See comments below.                                                &lt;br /&gt;
#                                                                            &lt;br /&gt;
#############################################################################&lt;br /&gt;
def drawBoundingBox(selection=&amp;quot;(all)&amp;quot;, padding=0.0, linewidth=2.0, r=1.0, g=1.0, b=1.0):     &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                  &lt;br /&gt;
        DESCRIPTION                                                          &lt;br /&gt;
                Given selection, draw the bounding box around it.          &lt;br /&gt;
&lt;br /&gt;
        USAGE:&lt;br /&gt;
                drawBoundingBox [selection, [padding, [linewidth, [r, [g, b]]]]]&lt;br /&gt;
&lt;br /&gt;
        PARAMETERS:&lt;br /&gt;
                selection,              the selection to enboxen.  :-)&lt;br /&gt;
                                        defaults to (all)&lt;br /&gt;
   &lt;br /&gt;
                padding,                defaults to 0&lt;br /&gt;
&lt;br /&gt;
                linewidth,              width of box lines&lt;br /&gt;
                                        defaults to 2.0&lt;br /&gt;
&lt;br /&gt;
                r,                      red color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                               &lt;br /&gt;
&lt;br /&gt;
                g,                      green color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                 &lt;br /&gt;
&lt;br /&gt;
                b,                      blue color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                &lt;br /&gt;
&lt;br /&gt;
        RETURNS&lt;br /&gt;
                string, the name of the CGO box&lt;br /&gt;
&lt;br /&gt;
        NOTES&lt;br /&gt;
                * This function creates a randomly named CGO box that minimally spans the protein. The&lt;br /&gt;
                user can specify the width of the lines, the padding and also the color.                            &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                                                    &lt;br /&gt;
&lt;br /&gt;
        ([minX, minY, minZ],[maxX, maxY, maxZ]) = cmd.get_extent(sel)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;Box dimensions (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        minX = minX - float(padding)&lt;br /&gt;
        minY = minY - float(padding)&lt;br /&gt;
        minZ = minZ - float(padding)&lt;br /&gt;
        maxX = maxX + float(padding)&lt;br /&gt;
        maxY = maxY + float(padding)&lt;br /&gt;
        maxZ = maxZ + float(padding)&lt;br /&gt;
&lt;br /&gt;
       if padding != 0:&lt;br /&gt;
                 print &amp;quot;Box dimensions + padding (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        boundingBox = [&lt;br /&gt;
                LINEWIDTH, float(linewidth),&lt;br /&gt;
&lt;br /&gt;
                BEGIN, LINES,&lt;br /&gt;
                COLOR, float(r), float(g), float(b),&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                END&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
        boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
        while boxName in cmd.get_names():&lt;br /&gt;
                boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
&lt;br /&gt;
        cmd.load_cgo(boundingBox,boxName)&lt;br /&gt;
        return boxName&lt;br /&gt;
cmd.extend (&amp;quot;getBox&amp;quot;, getBox)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Bounding_Box]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|DrawMinBoundingBox]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=4688</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=4688"/>
		<updated>2009-03-30T19:11:37Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Modified drawMinBoundingBox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size:190%; font-weight: bold; color:#038; text-align:center; padding: 5px; margin-bottom: 15px&amp;quot; | Welcome to the PyMOL Wiki&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #333; font-size: 120%&amp;quot;&lt;br /&gt;
| We are the community-based support site for the popular molecular visualization program, [http://pymol.sf.net PyMOL].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; style=&amp;quot;width:90%; margin-bottom: 20px&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| align=&amp;quot;left&amp;quot; width=&amp;quot;20%&amp;quot; style=&amp;quot;border: 1px solid #333; text-align:center; height=100%;&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold; font-size:120%; color: #333; background:#80AFFF;&amp;quot; | New Users&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:#E6EFFF; color:#333; font-size: 110%; padding: 4.5px&amp;quot;| New users are encouraged to [[Special:Userlogin|join]]. Feel free to add any appropriate content; make an account and [[PyMolWiki:Community_Portal|get started]]!&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;right&amp;quot; width=&amp;quot;75%&amp;quot; style=&amp;quot;border: 1px solid #333; text-align:left;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; style=&amp;quot;font-weight: bold; font-size:120%; color: #333; background:#80AFFF; text-align:center&amp;quot; | Quick Links&lt;br /&gt;
|-&lt;br /&gt;
| [[TOPTOC|'''Table of Contents''']] -- ''updated!''&lt;br /&gt;
|| [[Special:Allpages|Index of all pages]]&lt;br /&gt;
|| '''PyMOL Cheat Sheet: [[Media:PymolRef.pdf|PDF]] | [[CheatSheet|Wiki Page]]&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Tutorials|Tutorials]]&lt;br /&gt;
|| [[:Category:Commands|Commands]]&lt;br /&gt;
|| '''Settings''': [[Settings|All]]  | [[:Category:Settings|Documented]]&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Script_Library|'''Script Library''']]&lt;br /&gt;
|| [[:Category:Plugins|'''Plugins''']]&lt;br /&gt;
|| [[:Special:Categories| See All Categories]]&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:FAQ|Frequently Asked Questions]]&lt;br /&gt;
|| [[Gallery|'''Gallery''']] | [[Covers|'''Covers''']]&lt;br /&gt;
|| [[About| '''About PyMOL''']]&lt;br /&gt;
|-&lt;br /&gt;
| ''Track:'' [http://sourceforge.net/tracker/?atid=104546&amp;amp;group_id=4546&amp;amp;func=browse Bugs] [http://sourceforge.net/tracker/?group_id=4546&amp;amp;atid=354546 Feature Req] [http://sourceforge.net/tracker/?group_id=4546&amp;amp;atid=204546 Support Req]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; style=&amp;quot;background: #fafafa; border-right: 1px solid #333; border-left: 1px solid #333; border-bottom: 1px solid #333&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;text-align: left; font-weight:bold; font-size:150%; color:#333; background: #EFE6FF; padding:10px; border: 1px solid #333&amp;quot; | News and Updates ([[Older_News|archive]])&lt;br /&gt;
|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;font-weight: bold; font-size: 110%; text-decoration: underline; color: #000; padding: 12px; text-align: left;&amp;quot; | Wiki&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; Documented a few more settings.  Also, check out the cool, [[Huge_surfaces]] page for handling very large objects and representing them as surfaces, in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; We got our '''2,000,000th''' page view!&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; Added links in the table on the Main Page (above) for submitting &amp;amp; tracking bugs and feature reqeuests.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; New logo for the wiki.  It's DNA.  You can easily see the major/minor grooves.  If you don't see it, force a reload of the page (CTRL-F5, usually).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; New category about PyMOL [[:Category:Performance|performance]]: making the impossible possible, and the difficult easier/faster.&lt;br /&gt;
|}&lt;br /&gt;
|valign=&amp;quot;bottom&amp;quot; width=&amp;quot;150px&amp;quot; style=&amp;quot;padding: 0 20px 20px 0; clear:right;&amp;quot; |[[Image:080701_h.a.steinberg_biochemie.jpg|125px]] Sample Cover from the [[Covers]] gallery.&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;font-weight: bold; font-size: 110%; text-decoration: underline; color: #000; padding: 12px; text-align: left;&amp;quot; | PyMOL&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; '''PyMOL now integrates seamlessly with MS Powerpoint.  See [[Axpymol]].'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; PyMOL now comes with some builtin examples: look in the '''examples''' directory of your source tree.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[group]] command has been added.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; The truly awesome [[grid_mode]] setting has been added.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[Ellipsoids]] representation added for drawing thermal ellipsoids.&lt;br /&gt;
|}&lt;br /&gt;
|valign=&amp;quot;bottom&amp;quot; width=&amp;quot;150px&amp;quot; style=&amp;quot;padding: 0 20px 20px 0&amp;quot; |[[Image:Caver.png|125px]] Screenshot of [[Caver]] showing cavities.&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
{|style=&amp;quot;background-color: transparent;&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold; font-size: 110%; text-decoration: underline; color: #000; padding: 12px; text-align: left;&amp;quot; | Scripts &amp;amp;amp; Plugins&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[GetNamesInSel]] &amp;amp;#8212; find the names of all objects in a selection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[CalcArea]] &amp;amp;#8212; find the area of any given object/selection;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[ConnectedCloud]] &amp;amp;#8212; find connected clouds of objects in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[MakeVinaCommand]] &amp;amp;#8212; Use PyMOL to create a valid command line for the new [http://vina.scripps.edu Vina] docking software.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; [[DrawBoundingBox]] &amp;amp;#8212; Draw a bounding box around your selection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; Locate loaded PyMOL objects that are nearby some other object with [[FindObjectsNearby]].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; Ever wanted to load all the PDBs in a directory within PyMOL?  Now you can load all files in a dir with [[LoadDir]].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams;  [[PDB Web Services Script]] &amp;amp;#8212; Example using PyMOL and the PDB Web Services.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams;  [[LigAlign]] &amp;amp;#8212; Ligand-based active site alignment and comparison.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;padding: 3px 5px 10px 15px;&amp;quot;| &amp;amp;diams; Added a [[COM|simple script]] for finding the center or mass, or moving a selection to the origin.&lt;br /&gt;
|}&lt;br /&gt;
|width=&amp;quot;150px&amp;quot; style=&amp;quot;padding: 0 20px 20px 0; text-align:left&amp;quot; |[[Image:DrawMinBB.png|165px]] Screenshot of [[DrawBoundingBox]] in action.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawMinBoundingBox&amp;diff=8226</id>
		<title>DrawMinBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawMinBoundingBox&amp;diff=8226"/>
		<updated>2009-03-30T19:09:30Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: DrawMinBoundingBox moved to DrawBoundingBox: Now it can use padding, so it's not only min.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DrawBoundingBox]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5434</id>
		<title>DrawBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5434"/>
		<updated>2009-03-30T19:09:30Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: DrawMinBoundingBox moved to DrawBoundingBox: Now it can use padding, so it's not only min.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Draws a bounding box around a given selection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DrawMinBB.png|Example of a bounding box&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/drawBoundingBox.py&lt;br /&gt;
fetch 1jsd&lt;br /&gt;
drawBoundingBox 1jsd, r=0.33, g=0.80&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
Just copy the source to your computer. Then run&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /path/to/drawBoundingBox.py&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;
# -*- coding: utf-8 -*-                                                                                     &lt;br /&gt;
from pymol.cgo import *                                                                                     &lt;br /&gt;
from pymol import cmd                                                                                       &lt;br /&gt;
from random import randint                                                                                  &lt;br /&gt;
from string import split                                                                                    &lt;br /&gt;
&lt;br /&gt;
#############################################################################&lt;br /&gt;
#                                                                            &lt;br /&gt;
# drawBoundingBox.py -- Draws a box surrounding a selection &lt;br /&gt;
#&lt;br /&gt;
#                                                                            &lt;br /&gt;
# AUTHOR: Jason Vertrees                                                   &lt;br /&gt;
# DATE  : 2/20/2009                                                          &lt;br /&gt;
# NOTES : See comments below.                                                &lt;br /&gt;
#                                                                            &lt;br /&gt;
#############################################################################&lt;br /&gt;
def drawBoundingBox(selection=&amp;quot;(all)&amp;quot;, padding=0.0, linewidth=2.0, r=1.0, g=1.0, b=1.0):     &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                  &lt;br /&gt;
        DESCRIPTION                                                          &lt;br /&gt;
                Given selection, draw the bounding box around it.          &lt;br /&gt;
&lt;br /&gt;
        USAGE:&lt;br /&gt;
                drawBoundingBox [selection, [padding, [linewidth, [r, [g, b]]]]]&lt;br /&gt;
&lt;br /&gt;
        PARAMETERS:&lt;br /&gt;
                selection,              the selection to enboxen.  :-)&lt;br /&gt;
                                        defaults to (all)&lt;br /&gt;
   &lt;br /&gt;
                padding,                defaults to 0&lt;br /&gt;
&lt;br /&gt;
                linewidth,              width of box lines&lt;br /&gt;
                                        defaults to 2.0&lt;br /&gt;
&lt;br /&gt;
                r,                      red color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                               &lt;br /&gt;
&lt;br /&gt;
                g,                      green color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                 &lt;br /&gt;
&lt;br /&gt;
                b,                      blue color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                &lt;br /&gt;
&lt;br /&gt;
        RETURNS&lt;br /&gt;
                string, the name of the CGO box&lt;br /&gt;
&lt;br /&gt;
        NOTES&lt;br /&gt;
                * This function creates a randomly named CGO box that minimally spans the protein. The&lt;br /&gt;
                user can specify the width of the lines, the padding and also the color.                            &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                                                    &lt;br /&gt;
&lt;br /&gt;
        ([minX, minY, minZ],[maxX, maxY, maxZ]) = cmd.get_extent(sel)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;Box dimensions (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        minX = minX - float(padding)&lt;br /&gt;
        minY = minY - float(padding)&lt;br /&gt;
        minZ = minZ - float(padding)&lt;br /&gt;
        maxX = maxX + float(padding)&lt;br /&gt;
        maxY = maxY + float(padding)&lt;br /&gt;
        maxZ = maxZ + float(padding)&lt;br /&gt;
&lt;br /&gt;
       if padding != 0:&lt;br /&gt;
                 print &amp;quot;Box dimensions + padding (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        boundingBox = [&lt;br /&gt;
                LINEWIDTH, float(linewidth),&lt;br /&gt;
&lt;br /&gt;
                BEGIN, LINES,&lt;br /&gt;
                COLOR, float(r), float(g), float(b),&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                END&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
        boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
        while boxName in cmd.get_names():&lt;br /&gt;
                boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
&lt;br /&gt;
        cmd.load_cgo(boundingBox,boxName)&lt;br /&gt;
        return boxName&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Bounding_Box]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|DrawMinBoundingBox]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5433</id>
		<title>DrawBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DrawBoundingBox&amp;diff=5433"/>
		<updated>2009-03-30T19:08:36Z</updated>

		<summary type="html">&lt;p&gt;Mretegan: Added the padding option and some useful print statements. Change the name to drawBoundingBox, plus some code alterations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Draws a bounding box around a given selection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DrawMinBB.png|Example of a bounding box&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/drawBoundingBox.py&lt;br /&gt;
fetch 1jsd&lt;br /&gt;
drawBoundingBox 1jsd, r=0.33, g=0.80&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
Just copy the source to your computer. Then run&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run /path/to/drawBoundingBox.py&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;
# -*- coding: utf-8 -*-                                                                                     &lt;br /&gt;
from pymol.cgo import *                                                                                     &lt;br /&gt;
from pymol import cmd                                                                                       &lt;br /&gt;
from random import randint                                                                                  &lt;br /&gt;
from string import split                                                                                    &lt;br /&gt;
&lt;br /&gt;
#############################################################################&lt;br /&gt;
#                                                                            &lt;br /&gt;
# drawBoundingBox.py -- Draws a box surrounding a selection &lt;br /&gt;
#&lt;br /&gt;
#                                                                            &lt;br /&gt;
# AUTHOR: Jason Vertrees                                                   &lt;br /&gt;
# DATE  : 2/20/2009                                                          &lt;br /&gt;
# NOTES : See comments below.                                                &lt;br /&gt;
#                                                                            &lt;br /&gt;
#############################################################################&lt;br /&gt;
def drawBoundingBox(selection=&amp;quot;(all)&amp;quot;, padding=0.0, linewidth=2.0, r=1.0, g=1.0, b=1.0):     &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                  &lt;br /&gt;
        DESCRIPTION                                                          &lt;br /&gt;
                Given selection, draw the bounding box around it.          &lt;br /&gt;
&lt;br /&gt;
        USAGE:&lt;br /&gt;
                drawBoundingBox [selection, [padding, [linewidth, [r, [g, b]]]]]&lt;br /&gt;
&lt;br /&gt;
        PARAMETERS:&lt;br /&gt;
                selection,              the selection to enboxen.  :-)&lt;br /&gt;
                                        defaults to (all)&lt;br /&gt;
   &lt;br /&gt;
                padding,                defaults to 0&lt;br /&gt;
&lt;br /&gt;
                linewidth,              width of box lines&lt;br /&gt;
                                        defaults to 2.0&lt;br /&gt;
&lt;br /&gt;
                r,                      red color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                               &lt;br /&gt;
&lt;br /&gt;
                g,                      green color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                 &lt;br /&gt;
&lt;br /&gt;
                b,                      blue color component, valid range is [0.0, 1.0]&lt;br /&gt;
                                        defaults to 1.0                                &lt;br /&gt;
&lt;br /&gt;
        RETURNS&lt;br /&gt;
                string, the name of the CGO box&lt;br /&gt;
&lt;br /&gt;
        NOTES&lt;br /&gt;
                * This function creates a randomly named CGO box that minimally spans the protein. The&lt;br /&gt;
                user can specify the width of the lines, the padding and also the color.                            &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;                                                                                                    &lt;br /&gt;
&lt;br /&gt;
        ([minX, minY, minZ],[maxX, maxY, maxZ]) = cmd.get_extent(sel)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;Box dimensions (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        minX = minX - float(padding)&lt;br /&gt;
        minY = minY - float(padding)&lt;br /&gt;
        minZ = minZ - float(padding)&lt;br /&gt;
        maxX = maxX + float(padding)&lt;br /&gt;
        maxY = maxY + float(padding)&lt;br /&gt;
        maxZ = maxZ + float(padding)&lt;br /&gt;
&lt;br /&gt;
       if padding != 0:&lt;br /&gt;
                 print &amp;quot;Box dimensions + padding (%.2f, %.2f, %.2f)&amp;quot; % (maxX-minX, maxY-minY, maxZ-minZ)&lt;br /&gt;
&lt;br /&gt;
        boundingBox = [&lt;br /&gt;
                LINEWIDTH, float(linewidth),&lt;br /&gt;
&lt;br /&gt;
                BEGIN, LINES,&lt;br /&gt;
                COLOR, float(r), float(g), float(b),&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, minZ,       #1&lt;br /&gt;
                VERTEX, minX, maxY, minZ,       #3&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, minZ,       #5&lt;br /&gt;
                VERTEX, maxX, maxY, minZ,       #7&lt;br /&gt;
&lt;br /&gt;
                VERTEX, minX, minY, maxZ,       #2&lt;br /&gt;
                VERTEX, minX, maxY, maxZ,       #4&lt;br /&gt;
&lt;br /&gt;
                VERTEX, maxX, minY, maxZ,       #6&lt;br /&gt;
                VERTEX, maxX, maxY, maxZ,       #8&lt;br /&gt;
&lt;br /&gt;
                END&lt;br /&gt;
        ]&lt;br /&gt;
&lt;br /&gt;
        boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
        while boxName in cmd.get_names():&lt;br /&gt;
                boxName = &amp;quot;box_&amp;quot; + str(randint(0,10000))&lt;br /&gt;
&lt;br /&gt;
        cmd.load_cgo(boundingBox,boxName)&lt;br /&gt;
        return boxName&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Bounding_Box]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|DrawMinBoundingBox]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Mretegan</name></author>
	</entry>
</feed>