7.1. Overview

Note

The nextnanoevo Python package is under development. Its release is planned for 2024.

About

The nextnanoevo Python package is interfacing minimization and evolution algorithms with our other tools nextnano++, nextnano³, and nextnano.NEGF. The package takes care of proper execution of simulations for optimization algorithms and definitions of problems to optimize based on standard nextnano outputs.

The user can choose between optimization algoritms from scipy.optimize and PyGMO:

  • SciPy.optimize contains set of deterministic optimization algorithms to solve root and minimization problems. You can visit the documentation here.

  • PyGMO is a Python library developed by F. Biscani and D. Izzo [Biscani2020]. It is an interface facilitating implementation of various evolutionary algorithms such as evolution strategies or genetic algorithms. It can be used to solve many kinds of single- and multi-objective problems.

We recommend using SciPy algorithms to solve simple single-objective problems, while PyGMO is more suited for multi-objective problems as well as for problems that have convergence issues with deterministic algorithms.

Purpose

For example, one want to study an LED with a goal to maximize quantum efficiency (QE). Let’s assume that someone start with a design having the QE of 4 %. To improve it, one needs to provide the algorithm with information about which parts of the device can be modified (for instance certain lengths or mole fractions) and input the limits of these parameters which should depend on what is experimentally feasible. Then, the algorithm runs maximizing the quantum efficiency after which a new design yielding higher theoretical efficiency of 50 % is found.

Requirements

To run the nextnanoevo module, you need to:

Installation

We recommend installing nextnanoevo with conda package manager. Installation without conda using different python distributions is possible if requirements above are met (but not tested).

Installation with conda

  1. Install Anaconda or Miniconda

    Miniconda is a lightweight version that install only the minimum necessary liabraries).

  2. Create and new conda environment with python 3.10

    $ conda create -n nnevoEnv python=3.10
    
  3. Activate newly created conda environment

    $ conda activate nnevoEnv
    
  4. Install pygmo (this step might take few minutes)

    $ conda config --add channels conda-forge
    $ conda config --set channel_priority strict
    $ conda install pygmo
    
  5. Install nextnanoevo into the activated environment with installation script

    $ path/to/nextnanoevo/install.bat
    

License activation

The license is activated in the same way as other products, for more details visit License activation page

Config setup

In order to use nextnanoevo, at least 2 products should be set up in nextnanopy config.

  • nextnanoevo itself (license option only)

  • nextnano product you want to use it with. For example, for nextnano++ you need to set up license, exe, database and output directory

To set up nextnanoevo license, run the following script.

import nextnanopy as nn
nn.config.set('nextnanoevo', 'license', 'path\to\your\License_nnevo.lic')
nn.config.save()

Tutorial on how to set up other nextnano product can be found here - Tutorial 0 - Set up the configuration.