https://pymolwiki.org/api.php?action=feedcontributions&user=Kjude&feedformat=atomPyMOLWiki - User contributions [en]2024-03-29T13:57:22ZUser contributionsMediaWiki 1.35.7https://pymolwiki.org/index.php?title=MAC_Install&diff=7924MAC Install2010-01-15T19:33:25Z<p>Kjude: /* Install APBS and friends with fink */</p>
<hr />
<div>[[Category:Installation|Mac]]<br />
<br />
__TOC__<br />
<br />
=Installing MacPyMOL=<br />
===Essentials===<br />
The [http://delsci.com/macpymol/ 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 />
<br />
===Warning on Mouse Drivers===<br />
<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 />
<br />
===Invoking pymol from the unix command line===<br />
<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 />
<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 />
<br />
====Mighty Mouse====<br />
<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 />
====PowerMate Dial====<br />
<br />
http://www.griffintechnology.com/assets/images/products/powermate/prod_powermate_sub01b.jpg<br />
<br />
The [http://www.chemistry.ucsc.edu/~wgscott/xtal/powermate_pymol_osx.html PowerMate dial works nicely with pymol].<br />
<br />
====Stereo====<br />
<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 />
=Installing X-windows based pymol on Mac OS X=<br />
<br />
===Why would you want to do this?===<br />
<br />
#You want to run a [http://www.oreilly.com/openbook/freedom/ free], guilt-free, open-source version of pymol<br />
#You just happen to prefer the [http://wiki.python.org/moin/TkInter tkinter] menu<br />
#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.<br />
<br />
----<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-py25<br />
</source><br />
<br />
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.<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 />
<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 />
----<br />
<br />
===PyMOLX11Hybrid=== <br />
<br />
MacPyMOL for Tiger now includes a hybrid X11 mode. Assuming that X11 is already installed, simply duplicate MacPyMOL.app and rename it "PyMOLX11Hybrid.app" and launch.<br />
<br />
<br />
[[Category:Nucleic_Acids|MAC Install]]<br />
[[Category:Technical Issues|MAC Install]]<br />
<br />
===Troubleshooting===<br />
'''Problem''': When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted.<br /><br />
'''Solution''': This is a known problem. Select "Millions of Colors" in '''System Preferences->Display'''.<br />
<br />
'''Problem''': 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.)<br />
'''Solution''': 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.</div>Kjude