macOS (Intel-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

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.

  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. 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 Intel processor.

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 the 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 the nextnano software). 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.

      Wine
    • Run
      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      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.


Last update: 07/11/2024