macOS (ARM-CPU)

License activation

Please see License activation via command line.

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

See Homebrew documentation and install Homebrew.

Furthermore, run the following two codes as Homebrew requires:

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

Install gcc

Our solvers require some libraries to be present on your machine. Please run:

brew install gcc-11

Run simulation

Please refer to Command Line (nextnano++) and Command Line (nextnano³) for how to invoke the executable from Terminal.

Option B: Run simulations with nextnanopy

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

Install Python

One way is to 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 an M1 Mac with macOS 11.4 (Big Sur).

  1. See Homebrew documentation and install Homebrew.

  2. In a macOS Terminal, type in:

    # install Command Line Tools, if not installed on your machine
    xcode-select --install
    
    # update Homebrew
    brew update
    
    # install Python3
    brew install python3
    
  3. 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=/path/to/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
    
  4. 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: How do I install it?

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 https://github.com/nextnanopy/nextnanopy.git

# build nextnanopy
cd nextnanopy/
python setup.py install

Automatic installation:

pip install nextnanopy

Configure nextnanopy

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

open config_nextnano.py
# (adjust the paths)
# (save the file)
# run the config file to apply changes
python config_nextnano.py

Running nextnanopy

Please see Basic Tutorials and sample Python scripts to learn how to run a simulation with nextnanopy. The repository of nextnanopy 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.

The nextnanomat GUI 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. The `built package <https://wiki.winehq.org/Download>`_ might enable GUI experience on Mac machines with ARM processor.


Last update: 07/11/2024