Mac with Homebrew for Organic Chemists (M1 Mac ver.)

Let’s make an environment for chemistry on M1 Mac

A method is described to build a chemical environment on M1 Mac using Homebrew, a convenient package management system.

For Intel Mac, see below:


Homebrew (A Package Manager for Mac) For organic chemists, Homebrew is a very useful software, although it is not as es[…]

Homebrew (A Package Manager for Mac)

For organic chemists, Homebrew is very useful software, although it is not as essential as MS Office or ChemDrawHomebrew is a package management system for Mac. Herein, I would like to explain how to build an environment on a Mac using Homebrew.

  • Homebrew
    Homebrew is a package management system used from a terminal (software to type commands). You can easily install various UNIX-based software by Homebrew.
  • iTerm2
    iTerm2 is a widely used terminal for Mac. It is more powerful than the standard terminal. Homebrew can be used from iTerm2 (also from the standard terminal). It is useful to run Gaussian, python, etc. on a Mac and to connect to remote servers.

Building an Environment with Homebrew

Installation of Homebrew

Homebrew is installed from Terminal with commands. Terminal can be found in Launchpad.


Below is the Terminal screen. Type a command here to install Homebrew.


First, before installing Homebrew, command line tools should be installed. Open Terminal and type the following command ($ is not included). 

$ xcode-select --install

The command to install Homebrew changes occasionally, so check the Homebrew site ( and enter it in the terminal (as of July 1st, 2022, the following command is available. $ is not included). Enter your login password if required.

$ /bin/bash -c "$(curl -fsSL"

The installation will take a while. After installation, you will be prompted to add the path to Homebrew. (On an Intel Mac, Homebrew is installed in /usr/local/, but on an M1 Mac, it is installed in /opt/homebrew/.)

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<User name>/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Once the path is specified, restart the Terminal once and execute the following command in the Terminal.

$ brew doctor

If you run it and there is no error, you have succeeded. It’s a kind of strict check, so even if an error appears, it often works without any problem.

How to Use Homebrew

$ brew update #update Homebrew
$ brew upgrade #upgrade applications installed by Homebrew
$ brew install hogehoge #command to install hogehoge

It is better to run “brew update” and “brew upgrade” occasionally.

Installation of iTerm2

You can easily install iTerm2 by using the brew cask command.

$ brew install --cask iterm2

After the installation, commands are entered from iTerm2, not from Terminal.

You can change the default color scheme of iTerm2 as you like. Change it from Color Presets in [Preferences]-[Profiles]-[Colors]. My setting is Pastel as you can see below.

Installation of gcc and etc.

Enter the following commands into iTerm2 to install the gcc and other major programs.

$ brew install vim coreutils wget gcc openssl

Setting for zsh

You can configure zsh by creating a .zshrc file in your home folder (/Users/<username>/). Add the following to your .zshrc

# Aliases
alias vi=vim

Installation of Dropbox, Evernote, Google Chrome, Skitch by brew cask

With brew cask, you can easily install DropboxEvernoteGoogle ChromeSkicth, etc. from the command line. You do not need to download each package at all.

$ brew install --cask dropbox evernote google-chrome skitch

Installation of VSCode by brew cask

You can also install VSCode, a cool text editor, with brew cask.

$ brew install --cask visual-studio-code

Installation of XQuartz

If XQuartz is not installed, some applications such as Mercury and Platon will not work. It is better to be installed on your Mac. You can easily install it with brew cask command.

$ brew install --cask xquartz

Installation of Other Software

The following software cannot be installed by Homebrew, so you need to install them manually.

  • Microsoft Office
  • ChemDraw
  • Delta
  • Mercury
    Freeware for viewing cif files. You can download it from The Cambridge Crystallographic Data Centre (CCDC).
  • Gaussian & GaussView
  • CYLView
    Freeware for viewing and visualizing calculated chemical structures. You can download if from
  • Filezilla
    Filezilla, software for SFTP connection to remote servers, can be downloaded from the Filezilla website.