March 2019


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:
RasMol_2_7_5_3_i86_64_OSX_High_Sierra_19Dec18.tar.gz.

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):


#/bin/bash
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/X11/lib
./rasmol_XFORMS_32BIT

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:


#!/bin/bash
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!

Back in July 2017 I wrote a post on here in which I gave a rough sketch of a combination transceiver/computer that would allow me to take a single unit, antenna kit and power, and work digital modes portably, with a minimum amount of baggage. Like one might do with the Mountain Topper range of CW transceivers, but capable of operating with digital modes.

When I wrote the article, I was into JT65 and JT9. Now of course, FT8 is the mode du jour.

The DDS of choice was the ‘el cheapo’ AD9850/AD9851 boards that are available on eBay: now I’d go for the Si5351 DDS boards, with a module available from Adafruit, and also available in an ‘el cheapo’ variant! This DDS creates fewer harmonics.

I’m still very much a beginner at RF design: that is still the major risk to the project, as is the absence of copious amounts of spare time in which to work on it!

However, one risk I’d identified – making an Arduino present itself as a sound card + multiple serial devices – seems to be reducible. LUFA (Lightweight USB Framework for AVRs is a “an open-source complete USB stack for the USB-enabled Atmel AVR8 and (some of the) AVR32 microcontroller series, released under the permissive MIT License”. It has examples of Audio In/Out and Serial devices. I’m hoping it can also provide a composite device that allows the single audio I/O channel, and two serial ports (diagnostic and CAT control).

So the next action on this project is to make an Arduino Micro look like a sound card with two serial ports. It’ll be a loopback device, so whatever sound you play at it (i.e. when transmitting) will be played back to you when receiving; whatever you send on serial port A will be echoed back to you with a ‘DIAG’ prepended to it; similarly with port B as the ‘CAT’ port.

Still unknown: SSB transceiver design that’s buildable by a beginner, and that can be connected into a ADC / DAC pair. How many bits of audio do I need to sample, at what rate?

This may well require a microcontroller that’s a bit more powerful than my usual Arduino Micro – possibly one from the Teensy range.

… to be continued…