MAC Install

From PyMOLWiki
Jump to: navigation, search


Contents


Installing MacPyMOL

Essentials

The 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, scrollbutton mouse that works well with pymol and permits horizontal scrolling. Most other mice will also work well.

X11 Hybrid

MacPyMOL comes with a native OSX interface which doesn't require X11 (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:

  1. rename /Applications/MacPyMOL.app to /Applications/MacPyMOLX11Hybrid.app
  2. launch the unix executable with the -m flag: /Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m

Warning on Mouse Drivers

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.

Invoking pymol from the unix command line

The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL

I (Bill Scott) wrote a cheezy pymol shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable. I also use this ~/.pymolrc file.

Additional invokation options and further details are discussed under Launching_PyMOL#MacOS_X:

Extras

You don't need any of these to use MacPyMOL. But you didn't really need a Mac either. Face it: You need these.

Mighty Mouse / Magic Mouse

http://images.apple.com/mightymouse/images/index360scroll220050802.gif

A 3-button mouse is essential. Apple's Mighty Mouse is an extra treat.

The Mighty Mouse was superseded in late 2009 by the 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.

However, to enable 3-button usage on the Magic Mouse, one can download and install the third-party MagicPrefs preference pane. On the "Clicks and Taps" tab, assign "One Finger Middle Axis Click" to the "Middle Click" option.

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.

Stereo

http://images.apple.com/powermac/images/graphicspymol20051018.jpg

The latest Macs finally support stereo in a window. There is more information in the Monitors Hardware Options section.

Second Monitor

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.

./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100

Source: Warren DeLano; PyMOL Users Archive

PyMOL and Fink

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 fink. This usually takes a while, but is straightforward.

Once fink is installed, you have two options: (1) use the PyMOL package setup by 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.

PyMOL Directly from Fink

To install PyMOL directly from fink, type:

fink install pymol-py27

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.

Notes and Possible Issues

sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.

You might need to create the latter directory if it doesn't already exist, i.e., issue the command

sudo mkdir -p /sw/fink/dists/local/main/finkinfo
export DISPLAY=":0.0"

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'

PyMOL Install from Source, Using Fink

If the above didn't work, or you really want the latest PyMOL code, then:

/sw/bin/python setup.py install

Notes and Possible Issues

# These command are commented out to stop people from copy/pasting b/c 
# these are possibly dangerous for your system.  Ensure that /usr/bin/gcc
# is a symbolic link and not a real binary.  If so, I used the following
# to fix the -Wno-long-double error.
# sudo rm /usr/bin/gcc
# sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc

Install APBS and friends with fink

APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.

To use the electrostatics plugin, you will need APBS and its dependencies. These are also available as fink packages, and include apbs, maloc and pdb2pqr. If you have multiple processors available, you might wish to install the mpi version of apbs.

Issuing the command

fink install apbs

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 a big screenshot of the fink APBS package being invoked via the pymol plugin.

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.

PyMOL in MacPorts

Recent versions of MacPorts (at least 1.8.2) also include a hybrid PyMOL and also apbs. One can install it with

sudo port install pymol apbs apbs-mpi

Pymol from MacPorts using simple GUI approach

  1. Install MacPorts, including Xcode Tools and X11 if necessary
  2. Install a MacPorts GUI client, for example Porticus. Do a Selfupdate.
  3. Search for Pymol via gui and install
  4. Launch Terminal app and execute pymol

Config issues

sudo port install python26 -no_tkinter

Troubleshooting

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.
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.
When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session [1]
If you don't need stereo then start PyMOL in mono mode with
pymol -M
If you need stereo then you probably need to wait for a fix in the graphics driver.

Installing PyMOL with Homebrew

General Procedure

1. Install homebrew.

At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

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

brew doctor

to make sure there are no issues with your setup.

2. Install Xquartz.

Tcl/Tk requires X11, but since 10.7, Mac OS X no longer comes with X11 by default. Download and install Xquartz to satisfy this requirement.

3. Install PyMOL.

brew tap homebrew/science
brew tap homebrew/dupes
brew install python --with-brewed-tk --enable-threads --with-x11
brew install pymol

Switch stereo

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 "-M" flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the "-S" flag.

pymol -S

Alternatively, you can install pymol with original stereo graphics on as default by installing with

brew install pymol --default-stereo

With xquartz intalled

For it to run well, you need to enable threads. If you've already brew-installed python without threads, do:

brew update
brew uninstall tcl
brew uninstall tk
brew uninstall python
brew install python --with-brewed-tk --enable-threads --with-x11
brew install pymol

Miscellaneous installation

Exporting MPG movies

See MovieSchool 6 for freemol installation.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox