https://pymolwiki.org/api.php?action=feedcontributions&user=MinseokKwak&feedformat=atomPyMOLWiki - User contributions [en]2024-03-29T13:38:25ZUser contributionsMediaWiki 1.35.7https://pymolwiki.org/index.php?title=MAC_Install&diff=11136MAC Install2013-03-12T21:32:09Z<p>MinseokKwak: /* Exporting MPG movies */</p>
<hr />
<div>[[Category:Installation|Mac]]<br />
<br />
__TOC__<br />
<br />
=Installing MacPyMOL=<br />
==Essentials==<br />
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.<br />
==Warning on Mouse Drivers==<br />
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.<br />
==Invoking pymol from the unix command line==<br />
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL<br />
<br />
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.<br />
<br />
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]<br />
<br />
==Extras==<br />
You don't need any of these to use MacPyMOL. But you didn't really '''need''' a Mac either. Face it: You need these.<br />
===Mighty Mouse / Magic Mouse===<br />
http://images.apple.com/mightymouse/images/index360scroll220050802.gif<br />
<br />
A 3-button mouse is essential. [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.<br />
<br />
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.<br />
<br />
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 "Clicks and Taps" tab, assign "One Finger Middle Axis Click" to the "Middle Click" option.<br />
<br />
If using an X11 version of PyMOL on a Mac, one can also enable the "Emulate three button mouse" preference (X11 > Preferences > Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.<br />
<br />
===Stereo===<br />
http://images.apple.com/powermac/images/graphicspymol20051018.jpg<br />
<br />
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.<br />
<br />
===Second Monitor===<br />
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 "-X #" (and perhaps -Y #) option on launch. That way the OpenGL context will be created with stereo support.<br />
<source lang="python"><br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000<br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100<br />
</source><br />
<br />
'''Source:''' ''Warren DeLano; PyMOL Users Archive''<br />
<br />
=PyMOL and Fink=<br />
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.<br />
<br />
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.<br />
<br />
== PyMOL Directly from Fink ==<br />
To install PyMOL directly from fink, type:<br />
<source lang="bash"><br />
fink install pymol-py27<br />
</source><br />
<br />
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.<br />
<br />
===Notes and Possible Issues ===<br />
* 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:<br />
<source lang="bash"><br />
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.<br />
</source> <br />
You might need to create the latter directory if it doesn't already exist, i.e., issue the command<br />
<source lang="bash"><br />
sudo mkdir -p /sw/fink/dists/local/main/finkinfo<br />
</source><br />
* 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:<br />
<source lang="bash"><br />
export DISPLAY=":0.0"<br />
</source><br />
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' <br />
* Fink pymol also reads ~/.pymolrc in your home directory.<br />
* 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].<br />
<br />
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.<br />
<br />
= PyMOL Install from Source, Using Fink =<br />
If the above didn't work, of you really want the latest PyMOL code, then<br />
* Download the latest PyMOL source and unpack it.<br />
* Ensure that you have installed, in Fink:<br />
** python-2.5 pmw-py25<br />
** mesa mesa-shlibs<br />
** libpng3 libpng3-shlibs<br />
** freetype2 freetype2-deve<br />
** freeglut freeglut-shlibs<br />
* Change directory into the new PyMOL dir, eg. ''cd pymol''<br />
* Then, install PyMOL with,<br />
<source lang="bash"><br />
/sw/bin/python setup.py install<br />
</source><br />
<br />
==Notes and Possible Issues==<br />
* 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,<br />
<source lang="bash"><br />
# These command are commented out to stop people from copy/pasting b/c <br />
# these are possibly dangerous for your system. Ensure that /usr/bin/gcc<br />
# is a symbolic link and not a real binary. If so, I used the following<br />
# to fix the -Wno-long-double error.<br />
# sudo rm /usr/bin/gcc<br />
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc<br />
</source><br />
* 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.<br />
<br />
==Install APBS and friends with fink==<br />
<br />
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]<br />
<br />
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].<br />
<br />
Issuing the command<br />
<br />
fink install apbs<br />
<br />
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].<br />
<br />
'''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.<br />
<br />
=PyMOL in MacPorts=<br />
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<br />
sudo port install pymol apbs apbs-mpi<br />
==Pymol from MacPorts using simple GUI approach==<br />
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary<br />
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.<br />
# Search for Pymol via gui and install<br />
# Launch Terminal app and execute pymol<br />
===Config issues===<br />
* 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<br />
* 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<br />
* If the menu/control window does not appear when launching pymol and the terminal window reports "ImportError: No module named _tkinter", 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.<br />
sudo port install python26 -no_tkinter<br />
==Troubleshooting==<br />
; 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 "Millions of Colors" in '''System Preferences->Display'''.<br />
; 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.<br />
;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 <pre>pymol -M</pre>If you need stereo then you probably need to wait for a fix in the graphics driver.<br />
<br />
=PyMOL in brew=<br />
Install [http://mxcl.github.com/homebrew/ homebrew].<br />
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"<br />
Install PyMOL<br />
brew tap homebrew/science<br />
brew install pymol<br />
== Switch stereo ==<br />
This installation switches the stereo/mono graphics paradigm.<br><br />
Recent builds of OSX with intel chips seem to crash with stereo graphics.<br><br />
Therefore, pymol defaults assumes the "-M" flag has been passed to it.<br><br />
You can switch to stereo graphics (if you know it won't crash your computer) with the "-S" flag.<br><br />
Alternatively, you can install pymol with original stereo graphics on as default by installing with<br />
brew install pymol --default-stereo<br />
== With xquartz intalled ==<br />
For it to run well, you need to enable threads, do:<br />
brew update<br />
brew uninstall tcl<br />
brew uninstall tk<br />
brew uninstall python<br />
brew install tk --enable-threads<br />
brew install tcl --enable-threads<br />
brew install python --with-brewed-tk<br />
<br />
=Miscellaneous installation=<br />
===Exporting MPG movies===<br />
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation.<BR><br />
<br />
[[Category:Nucleic_Acids|MAC Install]]<br />
[[Category:Technical Issues|MAC Install]]<br />
[[Category:Mac|MAC Install]]</div>MinseokKwakhttps://pymolwiki.org/index.php?title=MAC_Install&diff=11135MAC Install2013-03-12T21:31:58Z<p>MinseokKwak: /* Exporting MPG movies */</p>
<hr />
<div>[[Category:Installation|Mac]]<br />
<br />
__TOC__<br />
<br />
=Installing MacPyMOL=<br />
==Essentials==<br />
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.<br />
==Warning on Mouse Drivers==<br />
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.<br />
==Invoking pymol from the unix command line==<br />
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL<br />
<br />
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.<br />
<br />
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]<br />
<br />
==Extras==<br />
You don't need any of these to use MacPyMOL. But you didn't really '''need''' a Mac either. Face it: You need these.<br />
===Mighty Mouse / Magic Mouse===<br />
http://images.apple.com/mightymouse/images/index360scroll220050802.gif<br />
<br />
A 3-button mouse is essential. [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.<br />
<br />
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.<br />
<br />
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 "Clicks and Taps" tab, assign "One Finger Middle Axis Click" to the "Middle Click" option.<br />
<br />
If using an X11 version of PyMOL on a Mac, one can also enable the "Emulate three button mouse" preference (X11 > Preferences > Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.<br />
<br />
===Stereo===<br />
http://images.apple.com/powermac/images/graphicspymol20051018.jpg<br />
<br />
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.<br />
<br />
===Second Monitor===<br />
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 "-X #" (and perhaps -Y #) option on launch. That way the OpenGL context will be created with stereo support.<br />
<source lang="python"><br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000<br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100<br />
</source><br />
<br />
'''Source:''' ''Warren DeLano; PyMOL Users Archive''<br />
<br />
=PyMOL and Fink=<br />
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.<br />
<br />
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.<br />
<br />
== PyMOL Directly from Fink ==<br />
To install PyMOL directly from fink, type:<br />
<source lang="bash"><br />
fink install pymol-py27<br />
</source><br />
<br />
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.<br />
<br />
===Notes and Possible Issues ===<br />
* 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:<br />
<source lang="bash"><br />
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.<br />
</source> <br />
You might need to create the latter directory if it doesn't already exist, i.e., issue the command<br />
<source lang="bash"><br />
sudo mkdir -p /sw/fink/dists/local/main/finkinfo<br />
</source><br />
* 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:<br />
<source lang="bash"><br />
export DISPLAY=":0.0"<br />
</source><br />
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' <br />
* Fink pymol also reads ~/.pymolrc in your home directory.<br />
* 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].<br />
<br />
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.<br />
<br />
= PyMOL Install from Source, Using Fink =<br />
If the above didn't work, of you really want the latest PyMOL code, then<br />
* Download the latest PyMOL source and unpack it.<br />
* Ensure that you have installed, in Fink:<br />
** python-2.5 pmw-py25<br />
** mesa mesa-shlibs<br />
** libpng3 libpng3-shlibs<br />
** freetype2 freetype2-deve<br />
** freeglut freeglut-shlibs<br />
* Change directory into the new PyMOL dir, eg. ''cd pymol''<br />
* Then, install PyMOL with,<br />
<source lang="bash"><br />
/sw/bin/python setup.py install<br />
</source><br />
<br />
==Notes and Possible Issues==<br />
* 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,<br />
<source lang="bash"><br />
# These command are commented out to stop people from copy/pasting b/c <br />
# these are possibly dangerous for your system. Ensure that /usr/bin/gcc<br />
# is a symbolic link and not a real binary. If so, I used the following<br />
# to fix the -Wno-long-double error.<br />
# sudo rm /usr/bin/gcc<br />
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc<br />
</source><br />
* 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.<br />
<br />
==Install APBS and friends with fink==<br />
<br />
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]<br />
<br />
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].<br />
<br />
Issuing the command<br />
<br />
fink install apbs<br />
<br />
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].<br />
<br />
'''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.<br />
<br />
=PyMOL in MacPorts=<br />
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<br />
sudo port install pymol apbs apbs-mpi<br />
==Pymol from MacPorts using simple GUI approach==<br />
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary<br />
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.<br />
# Search for Pymol via gui and install<br />
# Launch Terminal app and execute pymol<br />
===Config issues===<br />
* 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<br />
* 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<br />
* If the menu/control window does not appear when launching pymol and the terminal window reports "ImportError: No module named _tkinter", 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.<br />
sudo port install python26 -no_tkinter<br />
==Troubleshooting==<br />
; 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 "Millions of Colors" in '''System Preferences->Display'''.<br />
; 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.<br />
;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 <pre>pymol -M</pre>If you need stereo then you probably need to wait for a fix in the graphics driver.<br />
<br />
=PyMOL in brew=<br />
Install [http://mxcl.github.com/homebrew/ homebrew].<br />
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"<br />
Install PyMOL<br />
brew tap homebrew/science<br />
brew install pymol<br />
== Switch stereo ==<br />
This installation switches the stereo/mono graphics paradigm.<br><br />
Recent builds of OSX with intel chips seem to crash with stereo graphics.<br><br />
Therefore, pymol defaults assumes the "-M" flag has been passed to it.<br><br />
You can switch to stereo graphics (if you know it won't crash your computer) with the "-S" flag.<br><br />
Alternatively, you can install pymol with original stereo graphics on as default by installing with<br />
brew install pymol --default-stereo<br />
== With xquartz intalled ==<br />
For it to run well, you need to enable threads, do:<br />
brew update<br />
brew uninstall tcl<br />
brew uninstall tk<br />
brew uninstall python<br />
brew install tk --enable-threads<br />
brew install tcl --enable-threads<br />
brew install python --with-brewed-tk<br />
<br />
=Miscellaneous installation=<br />
===Exporting MPG movies===<br />
See [[MovieSchool_6#Exporting_your_Movie|MovieSchool 6]] for freemol installation<BR><br />
<br />
[[Category:Nucleic_Acids|MAC Install]]<br />
[[Category:Technical Issues|MAC Install]]<br />
[[Category:Mac|MAC Install]]</div>MinseokKwakhttps://pymolwiki.org/index.php?title=MAC_Install&diff=11134MAC Install2013-03-12T21:30:39Z<p>MinseokKwak: /* PyMOL in brew */</p>
<hr />
<div>[[Category:Installation|Mac]]<br />
<br />
__TOC__<br />
<br />
=Installing MacPyMOL=<br />
==Essentials==<br />
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.<br />
==Warning on Mouse Drivers==<br />
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.<br />
==Invoking pymol from the unix command line==<br />
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL<br />
<br />
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.<br />
<br />
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]<br />
<br />
==Extras==<br />
You don't need any of these to use MacPyMOL. But you didn't really '''need''' a Mac either. Face it: You need these.<br />
===Mighty Mouse / Magic Mouse===<br />
http://images.apple.com/mightymouse/images/index360scroll220050802.gif<br />
<br />
A 3-button mouse is essential. [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.<br />
<br />
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.<br />
<br />
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 "Clicks and Taps" tab, assign "One Finger Middle Axis Click" to the "Middle Click" option.<br />
<br />
If using an X11 version of PyMOL on a Mac, one can also enable the "Emulate three button mouse" preference (X11 > Preferences > Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.<br />
<br />
===Stereo===<br />
http://images.apple.com/powermac/images/graphicspymol20051018.jpg<br />
<br />
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.<br />
<br />
===Second Monitor===<br />
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 "-X #" (and perhaps -Y #) option on launch. That way the OpenGL context will be created with stereo support.<br />
<source lang="python"><br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000<br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100<br />
</source><br />
<br />
'''Source:''' ''Warren DeLano; PyMOL Users Archive''<br />
<br />
=PyMOL and Fink=<br />
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.<br />
<br />
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.<br />
<br />
== PyMOL Directly from Fink ==<br />
To install PyMOL directly from fink, type:<br />
<source lang="bash"><br />
fink install pymol-py27<br />
</source><br />
<br />
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.<br />
<br />
===Notes and Possible Issues ===<br />
* 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:<br />
<source lang="bash"><br />
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.<br />
</source> <br />
You might need to create the latter directory if it doesn't already exist, i.e., issue the command<br />
<source lang="bash"><br />
sudo mkdir -p /sw/fink/dists/local/main/finkinfo<br />
</source><br />
* 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:<br />
<source lang="bash"><br />
export DISPLAY=":0.0"<br />
</source><br />
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' <br />
* Fink pymol also reads ~/.pymolrc in your home directory.<br />
* 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].<br />
<br />
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.<br />
<br />
= PyMOL Install from Source, Using Fink =<br />
If the above didn't work, of you really want the latest PyMOL code, then<br />
* Download the latest PyMOL source and unpack it.<br />
* Ensure that you have installed, in Fink:<br />
** python-2.5 pmw-py25<br />
** mesa mesa-shlibs<br />
** libpng3 libpng3-shlibs<br />
** freetype2 freetype2-deve<br />
** freeglut freeglut-shlibs<br />
* Change directory into the new PyMOL dir, eg. ''cd pymol''<br />
* Then, install PyMOL with,<br />
<source lang="bash"><br />
/sw/bin/python setup.py install<br />
</source><br />
<br />
==Notes and Possible Issues==<br />
* 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,<br />
<source lang="bash"><br />
# These command are commented out to stop people from copy/pasting b/c <br />
# these are possibly dangerous for your system. Ensure that /usr/bin/gcc<br />
# is a symbolic link and not a real binary. If so, I used the following<br />
# to fix the -Wno-long-double error.<br />
# sudo rm /usr/bin/gcc<br />
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc<br />
</source><br />
* 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.<br />
<br />
==Install APBS and friends with fink==<br />
<br />
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]<br />
<br />
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].<br />
<br />
Issuing the command<br />
<br />
fink install apbs<br />
<br />
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].<br />
<br />
'''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.<br />
<br />
=PyMOL in MacPorts=<br />
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<br />
sudo port install pymol apbs apbs-mpi<br />
==Pymol from MacPorts using simple GUI approach==<br />
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary<br />
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.<br />
# Search for Pymol via gui and install<br />
# Launch Terminal app and execute pymol<br />
===Config issues===<br />
* 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<br />
* 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<br />
* If the menu/control window does not appear when launching pymol and the terminal window reports "ImportError: No module named _tkinter", 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.<br />
sudo port install python26 -no_tkinter<br />
==Troubleshooting==<br />
; 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 "Millions of Colors" in '''System Preferences->Display'''.<br />
; 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.<br />
;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 <pre>pymol -M</pre>If you need stereo then you probably need to wait for a fix in the graphics driver.<br />
<br />
=PyMOL in brew=<br />
Install [http://mxcl.github.com/homebrew/ homebrew].<br />
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"<br />
Install PyMOL<br />
brew tap homebrew/science<br />
brew install pymol<br />
== Switch stereo ==<br />
This installation switches the stereo/mono graphics paradigm.<br><br />
Recent builds of OSX with intel chips seem to crash with stereo graphics.<br><br />
Therefore, pymol defaults assumes the "-M" flag has been passed to it.<br><br />
You can switch to stereo graphics (if you know it won't crash your computer) with the "-S" flag.<br><br />
Alternatively, you can install pymol with original stereo graphics on as default by installing with<br />
brew install pymol --default-stereo<br />
== With xquartz intalled ==<br />
For it to run well, you need to enable threads, do:<br />
brew update<br />
brew uninstall tcl<br />
brew uninstall tk<br />
brew uninstall python<br />
brew install tk --enable-threads<br />
brew install tcl --enable-threads<br />
brew install python --with-brewed-tk<br />
<br />
=Miscellaneous installation=<br />
===Exporting MPG movies===<br />
See [[MovieSchool_6#Exporting_your_Movie]] for freemol installation<BR><br />
<br />
[[Category:Nucleic_Acids|MAC Install]]<br />
[[Category:Technical Issues|MAC Install]]<br />
[[Category:Mac|MAC Install]]</div>MinseokKwakhttps://pymolwiki.org/index.php?title=MovieSchool_6&diff=11133MovieSchool 62013-03-12T21:26:16Z<p>MinseokKwak: /* Exporting your Movie */</p>
<hr />
<div>== Exporting your Movie ==<br />
This wiki already has lots of information on how to convert your PyMOL movie to another format. Check out [[Making_Movies|those]] [[Software_Codecs|pages]].<br />
<br />
Once you've setup your movie as in any of the previous examples, you have a couple options for making a movie.<br />
<br />
'''Export from PyMOL''': Newer PyMOLs support <br />
*File&rarr;Save Movie As&rarr;MPEG<br />
*File&rarr;Save Movie As&rarr;PNG Images<br />
from the menu.<br />
<br />
'''mpeg''': This needs a bit of work. The following instructions work with trunk (1.2r2pre). Compile pymol trunk. <br />
<br />
Checkout [http://freemol.org freemol] source from <br />
<source lang="bash"><br />
svn co svn://bioinformatics.org/svnroot/freemol/trunk freemol-trunk<br />
</source><br />
This creates a directory called '''freemol-trunk'''. <br />
Inside '''freemol-trunk''' is a directory called '''freemol'''.<br />
Now you need to setenv (or export) a variable called FREEMOL pointing to the above folder - '''freemol''').<br />
In TCSH and related C-shells:<br />
<source lang="text"><br />
setenv FREEMOL /my/long/path/to/freemol-trunk/freemol<br />
cd freemol-trunk/src/mpeg_encode<br />
</source><br />
or in bash:<br />
<source lang="bash"><br />
export FREEMOL=/my/long/path/to/freemol-trunk/freemol<br />
cd freemol-trunk/src/mpeg_encode<br />
</source><br />
<br />
And then <br />
<source lang="bash"><br />
cd freemol-trunk/src/mpeg_encode<br />
</source><br />
(Ignore all other directories inside directory '''src'''. These were unnecessary, at least for me.)<br />
<source lang="bash"><br />
./configure<br />
make<br />
make install<br />
</source><br />
Add these two lines<br />
<source lang="bash"><br />
FREEMOL=/my/long/path/to/freemol-trunk/freemol<br />
export FREEMOL<br />
</source><br />
to your pymol script (''i.e.'' /sw/bin/pymol). Launch pymol and '''Save Movie as MPEG''' should work now. No need of any complicated codecs.<br />
<br />
'''mpng''': You can still use the good old [[mpng]] option to save all your frames to disk. You can then compile them into a MPEG (see below).<br />
<br />
'''Old Style''': One of the older scripting styles was to make minor changes and dump PNGs. This is essentially obviated with PyMOL's new movie-making functionality. The '''old style''' was to simply call cmd.png every time you made a scene change.<br />
<br />
Hints:<br />
* Movie not ray traced? Make sure you set ray_trace_frames to 1.<br />
<br />
=== Codecs ===<br />
See [[Software_Codecs]] for information on how to stitch together movies from PNGs and optimize them for great crisp-looking movies.<br />
<br />
<br />
[[MovieSchool_5| &larr; Previous Lesson]]<br />
<br />
[[MovieSchool| Back to Start]]<br />
<br />
[[Category:Movies]]<br />
[[Category:Tutorials]]</div>MinseokKwakhttps://pymolwiki.org/index.php?title=MAC_Install&diff=11132MAC Install2013-03-12T21:22:44Z<p>MinseokKwak: /* PyMOL Directly from Fink */</p>
<hr />
<div>[[Category:Installation|Mac]]<br />
<br />
__TOC__<br />
<br />
=Installing MacPyMOL=<br />
==Essentials==<br />
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.<br />
==Warning on Mouse Drivers==<br />
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.<br />
==Invoking pymol from the unix command line==<br />
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL<br />
<br />
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.<br />
<br />
Additional invokation options and further details are discussed under [[Launching_PyMOL#MacOS_X:]]<br />
<br />
==Extras==<br />
You don't need any of these to use MacPyMOL. But you didn't really '''need''' a Mac either. Face it: You need these.<br />
===Mighty Mouse / Magic Mouse===<br />
http://images.apple.com/mightymouse/images/index360scroll220050802.gif<br />
<br />
A 3-button mouse is essential. [http://www.apple.com/mightymouse/ Apple's Mighty Mouse] is an extra treat.<br />
<br />
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.<br />
<br />
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 "Clicks and Taps" tab, assign "One Finger Middle Axis Click" to the "Middle Click" option.<br />
<br />
If using an X11 version of PyMOL on a Mac, one can also enable the "Emulate three button mouse" preference (X11 > Preferences > Input). In this case, pressing Option or Command in conjunction with a left-click results in middle-click or right-click behavior, respectively.<br />
<br />
===Stereo===<br />
http://images.apple.com/powermac/images/graphicspymol20051018.jpg<br />
<br />
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.<br />
<br />
===Second Monitor===<br />
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 "-X #" (and perhaps -Y #) option on launch. That way the OpenGL context will be created with stereo support.<br />
<source lang="python"><br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000<br />
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100<br />
</source><br />
<br />
'''Source:''' ''Warren DeLano; PyMOL Users Archive''<br />
<br />
=PyMOL and Fink=<br />
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.<br />
<br />
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.<br />
<br />
== PyMOL Directly from Fink ==<br />
To install PyMOL directly from fink, type:<br />
<source lang="bash"><br />
fink install pymol-py27<br />
</source><br />
<br />
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.<br />
<br />
===Notes and Possible Issues ===<br />
* 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:<br />
<source lang="bash"><br />
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.<br />
</source> <br />
You might need to create the latter directory if it doesn't already exist, i.e., issue the command<br />
<source lang="bash"><br />
sudo mkdir -p /sw/fink/dists/local/main/finkinfo<br />
</source><br />
* 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:<br />
<source lang="bash"><br />
export DISPLAY=":0.0"<br />
</source><br />
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' <br />
* Fink pymol also reads ~/.pymolrc in your home directory.<br />
* 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].<br />
<br />
* The [http://pdb.finkproject.org/pdb/search.php?summary=pymol fink pymol package] is currently maintained by Jack Howarth.<br />
<br />
= PyMOL Install from Source, Using Fink =<br />
If the above didn't work, of you really want the latest PyMOL code, then<br />
* Download the latest PyMOL source and unpack it.<br />
* Ensure that you have installed, in Fink:<br />
** python-2.5 pmw-py25<br />
** mesa mesa-shlibs<br />
** libpng3 libpng3-shlibs<br />
** freetype2 freetype2-deve<br />
** freeglut freeglut-shlibs<br />
* Change directory into the new PyMOL dir, eg. ''cd pymol''<br />
* Then, install PyMOL with,<br />
<source lang="bash"><br />
/sw/bin/python setup.py install<br />
</source><br />
<br />
==Notes and Possible Issues==<br />
* 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,<br />
<source lang="bash"><br />
# These command are commented out to stop people from copy/pasting b/c <br />
# these are possibly dangerous for your system. Ensure that /usr/bin/gcc<br />
# is a symbolic link and not a real binary. If so, I used the following<br />
# to fix the -Wno-long-double error.<br />
# sudo rm /usr/bin/gcc<br />
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc<br />
</source><br />
* 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.<br />
<br />
==Install APBS and friends with fink==<br />
<br />
[[Image:Rna_surface_apbs.png|thumb|APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.]]<br />
<br />
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].<br />
<br />
Issuing the command<br />
<br />
fink install apbs<br />
<br />
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].<br />
<br />
'''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.<br />
<br />
=PyMOL in MacPorts=<br />
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<br />
sudo port install pymol apbs apbs-mpi<br />
==Pymol from MacPorts using simple GUI approach==<br />
# Install [http://guide.macports.org/#installing MacPorts], including Xcode Tools and X11 if necessary<br />
# Install a MacPorts [http://trac.macports.org/wiki/FAQ#gui GUI client], for example [http://porticus.alittledrop.com/ Porticus]. Do a Selfupdate.<br />
# Search for Pymol via gui and install<br />
# Launch Terminal app and execute pymol<br />
===Config issues===<br />
* 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<br />
* 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<br />
* If the menu/control window does not appear when launching pymol and the terminal window reports "ImportError: No module named _tkinter", 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.<br />
sudo port install python26 -no_tkinter<br />
==Troubleshooting==<br />
; 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 "Millions of Colors" in '''System Preferences->Display'''.<br />
; 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.<br />
;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 <pre>pymol -M</pre>If you need stereo then you probably need to wait for a fix in the graphics driver.<br />
<br />
=PyMOL in brew=<br />
Install [http://mxcl.github.com/homebrew/ homebrew].<br />
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"<br />
Install PyMOL<br />
brew tap homebrew/science<br />
brew install pymol<br />
== Switch stereo ==<br />
This installation switches the stereo/mono graphics paradigm.<br><br />
Recent builds of OSX with intel chips seem to crash with stereo graphics.<br><br />
Therefore, pymol defaults assumes the "-M" flag has been passed to it.<br><br />
You can switch to stereo graphics (if you know it won't crash your computer) with the "-S" flag.<br><br />
Alternatively, you can install pymol with original stereo graphics on as default by installing with<br />
brew install pymol --default-stereo<br />
== With xquartz intalled ==<br />
For it to run well, you need to enable threads, do:<br />
brew update<br />
brew uninstall tcl<br />
brew uninstall tk<br />
brew uninstall python<br />
brew install tk --enable-threads<br />
brew install tcl --enable-threads<br />
brew install python --with-brewed-tk<br />
[[Category:Nucleic_Acids|MAC Install]]<br />
[[Category:Technical Issues|MAC Install]]<br />
[[Category:Mac|MAC Install]]</div>MinseokKwak