Tutorials#
The nextnanopy Python package comes with a set of tutorials, published as Jupyter notebooks on GitHub.
The tutorials are written to be useful even if you only read them: each notebook shows its code alongside the resulting output and figures, so you can follow along without a nextnano installation or a running kernel.
If you do want to run them yourself, we recommend that you
open them in JupyterLab, which is well suited to running and editing notebooks, and
clone or download the nextnanopy repository in full and run the notebooks from their place in
docs/examples/, so that the input and data files they use resolve at their expected relative paths.
The tutorials are best read in order; we recommend every new nextnanopy user to go through Tutorials 0-2:
- Tutorial 0 - Set up the configuration —
point nextnanopy at your nextnano executables, databases and licenses. A one-time setup you do before running anything.
- Tutorial 1 - Execute an input file and
Tutorial 2 - Plotting data files — the core workflow: load and edit an input file, run the solver, then load and plot the results. These two are the most important; once you are comfortable with them you can build almost any custom workflow.
- Tutorial 3 - Sweep to automate the execution —
the
Sweepinterface runs a simulation over a grid of variable values for you, a very handy way to replace hand-written, endlessforloops.
- Tutorial 4 - Navigation in output folder using DataFolder —
a small convenience for locating result files inside an output directory. Optional — skip it if you already navigate folders comfortably with tools like
pathlib.
- Tutorial 5 - Load polygons from a GDSII file —
a niche API for turning GDSII layout polygons into nextnano++ shapes.
- Tutorial 6 - ExecutionQueue for parallel execution (advanced) —
low-level control for managing many simulations in parallel. For experts only — most parallel runs can be built with the simpler
Sweepinterface from Tutorial 3.
In addition, we provide sample scripts to run and postprocess nextnano++, nextnano³, nextnano.NEGF and nextnano.MSB simulations.