Compiling ChimeraX

The source code is at GitHub RBVI/ChimeraX repository with instructions for getting it here.

ChimeraX depends on over 50 third-party packages so it can be challenging to build. We recommend using production releases or daily builds from the ChimeraX download page instead of compiling it yourself.

ChimeraX has been built on Windows 10, macOS 10.12 through 10.15, and Linux (RedHat / CentOS 7 and 8, Ubuntu 20,18,16). ChimeraX is coded in Python (currently version 3.7) and C++.

A build is done using make by running

make install

in the top-level directory of the ChimeraX source code. This compiles third party-prequesite packages such as Python 3, and installs many needed third party packages from PyPi using “pip install”. It also installs various non-Python third-party libraries. It builds wheels for about 100 ChimeraX-specific bundles written in Python and C++. And it builds an application with an appropriate directory structure the operating system.

The ChimeraX build as of December 2020 uses PySide2 for the Qt user interface. Formerly it used a commercial license version of PyQt and this was fetched from and required that the build machine can ssh to plato.

The prereqs subdirectory contains Makefiles to build the various third party packages. Most of the ChimeraX build time is making these prereq packages. To save time on subsequent builds the installed packages are archived in a file prereqs/prebuilt-<OS>.tar.bz2.

Nightly Builds

Nightly builds on Mac, Windows and Linux are build with scripts in the ChimeraX git repository build_tools on

Windows Build

Microsoft Visual Studio Community 2017 or 2019 is used to compile C++ on Windows. This compiler was chosen to match the compiler used by the standard Python 3 distribution.

Cygwin is use to provide a unix-like environment (bash shell, make, …) to build ChimeraX on Windows.

Steps for compiling ChimeraX on Windows 10:

  1. Install Microsoft Visual Studio 2019 Community Edition:

    Select components
      "Desktop Development with C++".
      "Universal Windows Platform development".
    The ChimeraX setup script uses old versions of some components
    that you will need to choose from the installer "Individual Components"
      Windows 10 SDK version 10.0.18362.0
      MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.24)
    Alternatively you can edit the script to use the current
    Visual Studio 2019 versions of these components.
    Then start Visual Studio and login, then quit, to complete setup.
  2. Install ​Cygwin, 64-bit version. In addition to the default packages, you’ll need:

    binutils - xdr in md_crds needs ld.exe
    git - to be able to check in changes
    Imagemagick - to create icon files
    make - to run the build process
    openssh - to get network access to plato
    patch - to patch source distribution
    rsync - to install files and fetch them
    unzip - used to build ffmpeg
  3. Clone the ChimeraX repository from GitHub.

  4. Run “. ./” in chimerax root directory to set path to Visual Studio compiler.

  5. “make install” in the repository root.

Linux Build

A long list of required packages are used to compile ChimeraX on Linux. We currently use Singularity images to compile Linux ChimeraX versions on virtual machines including Redhat / CentOS 7 and 8 and Ubuntu 16, 18, and 20. Debian and RPM packages are created for distribution.

The definition files for the virtual machine images list the required packages and are currently part of the private build_tools git repository on TODO: Definition files should be moved to ChimeraX repository at GitHub.

Here is an example of the requirements for building on Ubuntu 20.04:

sudo apt-get install -y --no-install-recommends \
    language-selector-common ffmpeg vim-nox \
    build-essential g++ gfortran \
    chrpath patch openssh-client rsync ca-certificates \
    make autoconf automake libtool pkg-config \
    flex bison yasm unzip tar fakeroot curl wget \
    python2.7 \
    imagemagick \
    libasound2-dev \
    libatk1.0-dev \
    libbz2-dev \
    libcairo2-dev \
    libcups2-dev \
    libdbus-1-dev \
    libegl1-mesa-dev \
    libexpat1-dev \
    libffi-dev \
    libfftw3-dev \
    libfreetype6-dev \
    libgdk-pixbuf2.0-dev \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    libgstreamer1.0-dev \
    libgstreamer-plugins-base1.0-dev \
    libgtk-3-dev \
    libhdf5-dev \
    libicu-dev \
    libjpeg-dev \
    liblzma-dev \
    libmysqlclient-dev \
    libnss3-dev \
    libosmesa6-dev \
    libpango1.0-dev \
    libpcre3-dev \
    libpng-dev \
    libpulse-dev \
    libssl-dev \
    libtiff-dev \
    libx11-dev \
    libxcomposite-dev \
    libxcursor-dev \
    libxft-dev \
    libxi-dev \
    libxmu-dev \
    libxpm-dev \
    libxrandr-dev \
    libxslt1-dev \
    libxss-dev \
    libxt-dev \
    libxtst-dev \
    llvm-dev \
    x11proto-scrnsaver-dev \
    xdg-utils \

macOS Build

XCode compilers are used. Tested with XCode version 12.2 (Jan 2021) on macOS 10.15 (Catalina) and 11 (Big Sur).

  1. Clone the ChimeraX repository from GitHub:

    git clone chimerax
  2. There may be some build tools or libraries needed from Homebrew. We need to start with a clean machine to figure out what is needed. Known dependencies can be installed by running the following command from the chimerax directory.

    brew bundle
  3. In the repository chimerax directory run make to build the application:

    make build-from-scratch >& make.out

macOS with ARM CPUs

A native ARM CPU build of ChimeraX has not yet been made (July 2021). We have made a partly functional version and it was 1-2 times faster than Intel ChimeraX running under Rosetta 2 emulation. A primary obstacle is PyQt5 is not distributed for Mac ARM CPUs. Homebrew provides a native PyQt5 without QtWebEngine which we have tried. The missing QtWebEngine disables some ChimeraX tools like the Log panel. Progress on a native Mac ARM distribution is described in ChimeraX ticket #4663.

Known Issues

  • On macOS Monterey with Anaconda bin directory /opt/anaconda3/bin in the PATH the the ChimeraX lxml compilation can find the incorrect Anaconda lxml header files resulting in broken lxml the missing symbol _xmlFree. Lxml is used by bundle builder and will fail building ChimeraX bundles. A workaround is to temporarily remove Anaconda from PATH.