There are three options:

A: Run simulations from Terminal (Mac native executable).

B: Run simulations with nextnanopy (Mac native executable).

C: Run simulations with nextnanomat using Wine or Mono (Windows executable).

We strongly recommend the option B.

Basic simulation is possible from (A) Terminal. (B) nextnanopy Python package can not only run the simulations but also sweep variables and postprocess the results. For the options A and B, you need nextnano executables compiled for Mac, which we can provide you on request. Please feel free to contact us at nextnano Help Center. For the option C, Mono requires the Mac executables but Wine uses the ones compiled for Windows.

License activation


If you use ARM Mac for simulation, you have to “emulate Intel processor” before initiating the license activation. Use this code to switch:

$env/usr/bin/arch -x86_64 /bin/zsh ---login

When you enter arch, and the output shows i386, the computer is Intel.

To run a Mac-native executable, two types of licenses are available:

  1. license.txt (old licensing system, will be deprecated in the future)

  2. License_nnp.lic (new licensing system, same as Windows executable)

Which license to use depends on the Mac executable you want to run.

To obtain 1, please contact us via nextnano Help Center to request issuing the license.

To obtain 2, see License activation via command line.


If you use ARM Mac for simulation, as of 5th March 2024, you can run simulation with only license.txt. We are working on this issue.

Permission denied

You might be asked to allow your computer to execute some commands. To add execute permission to the executable, run:

chmod 744 nextnanoLicenseActivator_macOS

Option A: Run simulations from Terminal

Install Homebrew, gcc

You have to install Homebrew to install gcc. Go to \nextnano++\bin and run the command below:

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

Furthermore, run the following two codes as Homebrew requires:

(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/yuta/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

Then finally, you can install gcc.

brew install gcc

Run simulation

The terminal commands for two nextnano++ and nextnano³ sample input files can then be given as follows, to be executed from the nextnano folder:

./nextnano3_gcc_macOS -l "License/License_nnp.lic" "Sample files/nextnano3/examples/"
./nextnano++_gcc_macOS -l "License/License_nnp.lic" "Sample files/nextnano++/examples/Quantum Mechanics examples/"


If you use ARM Mac for simulation, you have to use license.txt rather than License_nnp.lic as of 5th March 2024. The command line in this case will be:

./nextnano++_gcc_macOS --old -l "License/license.txt" "Sample files/nextnano++/examples/Quantum Mechanics examples/"

Detailed documentation on command line features can be found in Command Line (nextnano++) and Command Line (nextnano³).

Option B: Run simulations with nextnanopy

nextnanopy is our open-source Python package for running simulations, sweeping variables and post-processing results.

Install Python

You can install Python package Anaconda to establish a Python environment including NumPy, Matplotlib and an IDE called “Spyder”. With this, you can use nextnanopy from a graphical user interface.

Here, we explain an alternative way to install a Python package from Terminal via Homebrew. We have tested this with ARM64 Mac with macOS 11.4 (Big Sur).

  1. In a macOS Terminal, type in:

    # install Command Line Tools, if not installed on your machine
    xcode-select --install
    # install Homebrew, if not installed (cf. Homebrew website)
    /bin/bash -c "$(curl -fsSL"
    # update Homebrew
    brew update
    # search for available Python packages
    brew search python
    # install Python3
    brew install python3
  2. Unversioned commands ‘python’, ‘pip’ etc. pointing to ‘python3’, ‘pip3’ etc., respectively, are installed into, e.g., /opt/homebrew/opt/python@3.9/libexec/bin. It is useful to set this path to ~./zprofile.

    # open ~/.zprofile with a text editor and write
    ``eval "$(/opt/homebrew/bin/brew shellenv)"``
    ``export PATH=/opt/homebrew/opt/python@3.9/libexec/bin:$PATH``
    # apply the changes
    source ~/.zprofile
    # make sure that the version 3.9 or later has been installed
    python --version
    # upgrade pip (NOT update)
    pip install --upgrade pip
  3. Using pip, please install NumPy and Matplotlib which are required for nextnanopy.

    pip install numpy
    pip install matplotlib

Install nextnanopy

You can either manually or automatically install nextnanopy. For more details, please refer to Installation. Manual installation using Git looks like:

## manual installation
# go to a folder where you want to store local repository of |nextnanopy| project
cd <folder name>

# clone source code from Github
git clone

# build nextnanopy
cd nextnanopy/
python install

For the automatic installation, you can use pip:

pip install nextnanopy

Configure nextnanopy

Open the file with an text editor to adjust the paths to your license, output and executable installation folders:

# (adjust the paths)
# (save the file)
# run the config file to apply changes

Running nextnanopy

Please see Basic Tutorials and sample Python scripts to learn how to run a simulation with nextnanopy. nextnanopy repository includes sample Python scripts under /nextnanopy/templates.

Option C: Run simulations with nextnanomat using Wine or Mono

This option is for those who wish to use GUI nextnanomat to run simulations.

nextnanomat is programmed in C#, and can thus be executed on any operating system. It is, however, developed on and optimized for Windows. On macOS, you have to install either Wine or Mono to run nextnanomat.

Wine was available from Mountain Lion 10.8 until Mojave 10.14. We confirmed that using Wine one could run nextnanomat.exe on Mojave 10.14.

Wine did not work on Catalina 10.15 or later. However, Wine version 6.0.1 released on 7 Jun. 2021 is said to support wine64 on Apple M1. We will test once the built package becomes available.

The following is for macOS 10.14 Mojave.

Installation procedure

  1. Install XQuartz (version 2.7.7 or later).

    • Please open Xquartz and check if it starts without errors.

  2. Install Wine Stable for macOS.

    • On the website, both .pkg files and .tar.gz files are provided. Installation from .pkg files is handy. In this case, however, only the 32-bit version of nextnano software can be used, and currently one has to make sure that appropriate libiomp5.dll files are located in the same directory as “nextnano3.exe” and “nextnano++.exe” (even for the serial version of nextnano). If you need libiomp5.dll files, please contact us.

    • If you install Tarball for “Wine Stable” (32 + 64-bit), the 64-bit version is also available.

  3. Install winetricks.

    • Launch Wine stable from Applications or Launchpad.

    • Terminal window shows up with a short introduction of important commands.

    • Run
      ruby -e "$(curl -fsSL"
      brew install winetricks
  4. Install .NET Framework using winetricks. .NET Framework of version 4.5.2 or later is needed.

winetricks dotnet452

- Follow the instructions and ignore Warnings.
- Restart the computer.
  1. Fonts and configuration

    • Launch Wine stable again.

    • Run:
      winetricks corefonts   # install basic fonts of Windows
      winecfg  # Configure Wine
    • Setting window shows up. Select “Windows 10” for Windows version in the “Application” tab.

    • Press “OK” button.

Running nextnanomat

  1. Launch Wine Stable from Application or Launchpad.

  2. Run:

    wine /<your directory>/nextnanomat.exe
  3. Activate the license with your email address (only once) and have fun!

If you have any feedback on these instructions, please let us know by sending an email to nextnano Help Center. It helps us keeping our documentation up to date.