ChimeraX on Apple M1 CPUs
November 2, 2021
We are making a version of our ChimeraX molecular graphics program that runs natively
on Apple's new M1 CPUs for faster interactive calculations.
We'll report some speed-up timings and describe difficulties porting from Intel to the Apple M1 CPU.
A native Apple M1 version of ChimeraX is not yet available, but we expect to release it within 6 months.
- Display protein, nucleic acid, and ligand atomic models, sequences and microscopy data.
- Compute surfaces, hydrogen bonds, align structures, molecular dynamics
- Building models in 3D electron microscopy maps.
- A hundred other tools for analysis of molecular structures.
- About 1/3 of ChimeraX downloads are for Mac
(Windows 23000 (51%), Mac 15500 (34%), Linux 6400 (14%) past year)
New Mac Computers
- Most new Mac computers use Apple's M1 CPU
- All new Mac laptops, Mac mini, iMac 24" use Apple M1 CPUs
- iMac 27" and Mac Pro still use Intel CPUs
- In about 1 more year Apple will not sell any Intel CPU machines.
- Mac computers with M1 CPUs can run all older Intel Mac applications using Rosetta 2 emulation.
- Support for Intel Mac hardware and software will continue for many (5?) years.
Speed of Apple M1 ChimeraX vs Intel ChimeraX
- ChimeraX is 70% Python and 30% C++, the C++ is used for speed.
- C++ code runs about 1.1x - 1.5x longer with Intel emulation on Apple M1.
- Python code runs about 1.5x - 1.9x longer with Intel emulation on Apple M1.
- Apple M1 in Mac Mini is about 1.3x - 2x faster than 2019 MacBook Pro Intel i9 CPU.
- Apple M1 Pro GPU is about the same speed as 2019 MacBook Pro discrete AMD Vega 20 GPU.
- Render speed comparison, Windows Nvidia GTX 1080 Ti (released 2017) is about 3x faster than M1 Pro.
|Calculation1||M1 CPU2||M1 Pro CPU3||Intel CPU4||Notes
|M1 ChimeraX||Intel ChimeraX||M1 ChimeraX||Intel ChimeraX||Intel ChimeraX
|open PDB 3j3q||3.8 sec||5.6||4.0||6.0||6.9||Parsing 230 MByte text file in C++.|
2.4 million atoms.
|7n30 nucleotides slabs||6.7 sec||12.6||6.6||13.0||14.1||Python calculation.|
150,000 atom ribosome structure.
|addh on 7n30||18.0 sec||28.7||16.9||28.8||38.7||Mixed Python and C++ calculation.
|compute surface for 7n30||8.9 sec||9.6||8.0||9.5||11.4||C++ calculation. Multithreaded.
|Map contour calculation EMDB 22657
||0.67 sec||1.02||0.67||1.02||1.17||C++ calculation on 300 MByte data set.|
|Rendering surface 7n30 full lighting||12.8 frames/sec||11.8||25.0||25.7||27||Graphics rendering speed test.|
Intel CPU column has AMD Vega 20 discrete GPU.
- Timings done using the ChimeraX time command. Benchmark details.
- 2021 Mac Mini (MacMini9,1), macOS 11.6, Apple M1 CPU, 16 Gbytes memory.
- 2021 MacBook Pro 16" (MacBookPro18,1), macOS 12.0.1, Apple M1 Pro CPU, 16 Gbytes memory.
- 2019 MacBook Pro (MacBookPro15,3), macOS 11.6, 32 Gbytes memory, Intel i9 8-core 2.4 GHz CPU, AMD Vega 20 GPU.
Difficulties porting ChimeraX to Apple M1 CPUs
- ChimeraX Python and C++ code needs no changes.
- ChimeraX uses 90 packages developed by others.
- 60 are pure Python from the PyPi repository.
- 30 are binary packages that need Apple M1 versions.
- 6 binary packages do not have Apple M1 distributions: ambertools, h5py, imagecodecs, netcdf4, pytables, scipy.
- Qt 6 window toolkit is distributed for Apple M1 but not Qt 5.
- ChimeraX uses Qt 5, the stable Qt version from 2012 - 2021.
- Qt 6 with html support was released September 2021.
- Apple M1 applications must be either all native M1 binaries or all Intel binaries, no mixing.
- Need to distribute either a large univeral package that includes both Intel and M1 binaries,
or two separate ChimeraX versions.
Potential advantages of native Apple M1 ChimeraX
- Better OpenGL driver stability with Apple M1 GPU.
- No graphics driver crashes among 43 ChimeraX bug reports in 2021 with Apple M1.
- About 100 ChimeraX graphics driver crashes reported on Intel Macs in past 2 years.
- Better C++ crash stack traces with native M1 app than with Intel emulation.
- Intel ChimeraX crashes on M1 often give no C++ stack trace.