If you need to visualise molecular structures, RasMol is a venerable program that should run on multiple platforms. I was recently asked to help getting it working on modern Mac OSX. There are instructions on the RasMol website, but not for modern Mac OSX. Hence, these rough notes – offered in the hope they may help others…

RasMol uses the older X11 windowing system that is no longer provided as part of macOS, so we’ll install the open source XQuartz X11 system from XQuartz.org.
Download the .dmg (disk image file), open it, and run the installer. You’ll then need to log out and log in.

Then download RasMol from its SourceForge download area. You’ll need the file:

Once this has downloaded (into your Downloads folder), you’ll need to open a Terminal, and extract its contents, with the following commands. Note that MyMacBook$ is the prompt provided by the Terminal/OS, and that each command must be entered on one line – so there’s a single ‘tar’ command that starts with ‘tar’ and ends with ‘.gz’ before you press enter:

MyMacBook$ cd Downloads
MyMacBook$ tar xzvf RasMol_2_7_5_3_i86_64_OSX_High_Sierra_19Dec18.tar.gz
(Many lines will scroll by)

We’ll put this extracted software somewhere a bit easier to get to:

MyMacBook$ mv RasMol_2_7_5_3_i86_64_OSX_High_Sierra_19Dec18 ~/Applications/RasMol_2_7_5_3

(Now it’s in your personal Applications folder).

We need a launch script, since the one that comes with the software doesn’t seem to work, since it can’t find XQuartz’s libraries. So from the terminal:

MyMacBook$ cd ~/Applciations/RasMol_2_7_5_3
MyMacBook$ nano run-rasmol.sh

This puts you into the ‘nano’ text editor, then you must copy and paste (there are three lines here):


Then press Control-X, and press Y then return to save the file. Then to make this launch script executable:

MyMacBook$ chmod 755 run-rasmol.sh

OK, nearly there.

Only kidding 🙂

Let’s create an alias to let you run RasMol a little more easily…

MyMacBook$ cd (then press return)
MyMacBook$ nano .bashrc

Again, you’re in the nano editor, so copy and paste this – note that your file may already contain lines, just add the ‘alias’ line near the end:

alias rasmol='cd ~/Applications/RasMol_2_7_5_3; ./run-rasmol.sh'

Then Control-X, and Y then return to save the file.

Righty, let’s run XQuartz (via spotlight [Command-Space]). After a few seconds, you’ll see an X11 terminal window (xterm) appear. This is different from the usual Mac Terminal. You won’t be able to run RasMol from the Mac Terminal: you must run it within the XQuartz system, and you do this from the xterm window. Note that the OS prompt will be different in the xterm window, in my case, it is bash-3.2$ – so in the xterm, type:

bash-3.2$ rasmol (then press return)

Then you’ll see the beautiful RasMol window. It’s very different from what you’re used to on macOS, but this is how we used to use graphical programs back in the 80s.

The main RasMol window has its own menu – it’s not in the top menu bar like ‘normal’ Mac programs.

When you close XQuartz, you close ALL the X11 programs you’re running – xterm, rasmol, etc.

To open a file in RasMol, use the File menu, then Open…, then use the old-style file dialog to navigate using the ‘..’ (Parent Folder) directories to find where you’ve stored your RasMol files.


Updated 11/09/2020 with clarifications after comments by Vivian Vu, thank you!