Difference between revisions of "MAC Install"

From PyMOLWiki
Jump to navigation Jump to search
(→‎Pre-compiled: Update Homebrew info to reflect new location of PyMOL formula and no more need for flags in dependencies.)
(→‎Pre-compiled: Make Homebrew the recommended package manager)
 
Line 38: Line 38:
 
== Open-Source PyMOL ==
 
== Open-Source PyMOL ==
  
=== Pre-compiled ===
+
=== Package managers ===
  
Pre-compiled Open-Source PyMOL is available [https://github.com/schrodinger/pymol-open-source/blob/master/LICENSE free of charge] with the [https://www.macports.org/ MacPorts], [http://www.finkproject.org/ Fink] and [http://brew.sh/ Homebrew] environments.
+
Open-Source PyMOL is available [https://github.com/schrodinger/pymol-open-source/blob/master/LICENSE free of charge] and may be readily installed via the [http://brew.sh/ Homebrew] (recommended), [https://www.macports.org/ MacPorts], or [http://www.finkproject.org/ Fink] package managers.
  
 
<source lang="bash">
 
<source lang="bash">
 +
# Homebrew (recommended)
 +
brew install brewsci/bio/pymol
 +
 
# Fink
 
# Fink
 
fink install pymol-py27
 
fink install pymol-py27
Line 48: Line 51:
 
# MacPorts
 
# MacPorts
 
sudo port install pymol
 
sudo port install pymol
 
# Homebrew
 
brew install brewsci/bio/pymol
 
 
</source>
 
</source>
  

Latest revision as of 13:05, 8 October 2018

This page describes how to install PyMOL on Mac OS X.

Incentive PyMOL

Schrödinger provides pre-compiled PyMOL to paying sponsors. The bundle also includes ready-to-use APBS, RigiMOL, an MPEG encoder for movie export, and a small molecule energy minimization engine.

Download: https://pymol.org/

Installation: Drag PyMOL.app on the /Applications shortcut. (In principle, you could drag it into any Finder window and run it from there, it doesn’t have to live in /Applications).

Uninstallation: Move /Applications/PyMOL.app to Trash

Launching from Command Line

The unix executable resides at /Applications/PyMOL.app/Contents/MacOS/PyMOL

X11 Hybrid

Applies to PyMOL 1.x, not to PyMOL 2.x

MacPyMOL can optionally run with the same two-window GUI which PyMOL uses on Windows and Linux. This GUI has some additional features, like the Plugin menu and the Builder.

Requires XQuartz.

There are two ways to launch the X11 interface:

  1. Rename or copy/duplicate /Applications/MacPyMOL.app to /Applications/MacPyMOLX11Hybrid.app or to /Applications/PyMOLX11Hybrid.app
  2. Launch the unix executable with the -m flag: /Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m

Stereo on 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

Open-Source PyMOL

Package managers

Open-Source PyMOL is available free of charge and may be readily installed via the Homebrew (recommended), MacPorts, or Fink package managers.

# Homebrew (recommended)
brew install brewsci/bio/pymol

# Fink
fink install pymol-py27

# MacPorts
sudo port install pymol

You may need to make sure that the dependencies are installed with the required flags, e.g. for MacPorts:

# MacPorts
sudo port install tcl -corefoundation
sudo port install tk -quartz

If PyMOL complains that it wasn't able to find X11, try starting xquartz first, then run pymol from the console.

Install from Source

If you want the latest PyMOL code (warning: might include experimental changes), then follow the Linux installation instructions. You will need an environment like Fink, MacPorts or Homebrew to install the dependencies. Make sure you use the appropriate python interpreter (e.g. /sw/bin/python2.7 when using Fink).

To run PyMOL with a native PyQt library (linked against macOS OpenGL framework, not against XQuartz), it needs to be built with the --osx-frameworks option:

python setup.py --osx-frameworks install

Install APBS with Fink

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.

Stereo issues

Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`. You can also set up an alias in your ~/.profile:

alias pymol='pymol -M'

See Also