nextnanopy is a Python module to interface the nextnano software. This package includes features for:
- Output files: User-friendly method to load the datafiles which allows easy and flexible post-processing.
- Input files: Load input files, set variables, save by finding unused name, execute the file, write input files, etc.
- Configuration: Setup default nextnano configuration (path to executables, databases, licenses, etc).
- Import from GDS files: Load polygons from GDS files and user-friendly methods to generate raw text of nextnano shapes (beta).
Note: A valid license for the nextnano software is not compulsory for the general use of nextnanopy, unless you would like to execute input files via Python.
Currently, nextnanopy has basic features for nextnano products nextnano++, nextnano³, nextnano.NEGF and nextnano.MSB.
In future releases, we would like to implement:
- Common post-processing methods: Like loading and plotting together bandedges, eigenenergies and eigenlevels, colormap of potential landscape with GDS polygons on top, etc.
- Improved support for specific nextnano.NEGF and nextnano.MSB datafiles
- User-friendly input file creation/modification: The idea is to load any input file and it would detect all the different blocks so the user can easily modify parameters like 'boundary conditions' or 'region material'. Similarly, it should be user-friendly to create any input file from scratch via Python.
- Feedback loops: A routine that allows the user to optimize any figure of merit of a device with a given set of input variables. The user can set a post-processing routine to get the figure of merit from the simulated data and later, a new set of input variables will be generated and executed. This feedback loop will repeat until a set of conditions are satisfied.
- Improve documentation: We will add an extensive documentation in the website as well as in the source code.
- Guidelines for contributors: Set of rules if you want to contribute to the project.
You need a working Python 3.8 installation to be able to use nextnanopy. We highly recommend installing Anaconda, which takes care of installing Python and managing packages. Make sure to download the latest version with Python 3.8.
- Python (tested with 3.8)
- NumPy
- PyVista (For loading VTK files)
- Gdspy (optional: to import gds files)
- Shapely (optional: to manipulate polygons from gds files)
- Matplotlib (optional: to visualize imported polygons)
- Cycler (optional: to visualize imported polygons)
Option 1: Using pip
Simply open Anaconda prompt and type:
pip install nextnanopy
or if you want to upgrade:
pip install --upgrade nextnanopy
- Download the source from github
- Open Anaconda prompt
- Go to the directory of the nextnanopy project
- Build/install by typing:
python setup.py install
For more information, please see the documents in docs/ folder.
Currently, the complete documentation is not available yet. However, there are few examples located in templates/ and docs/examples that will help you to start playing with nextnanopy.
Do you want to help nextnanopy? Please, send an email to python@nextnano.com.
- Feature: InputFile.execute has now show_log (True or False) to turn on/off the log. Note: the log file is always saved.
- Removed default messages when saving an input file
- Buf fix: find unused name when saving input file
- docstring for inputs.py, outputs.py, config.py, mycollections.py, datasets.py
- Updated examples in docs/examples/
- Feature: [DataFile] access with index to coordinates and to variables
df = nextnanopy.DataFile(...)
df['x'] # same as df.coords['x']
df['Gamma'] # same as df.variables['Gamma']
- Feature: [DataFile] is loopable as well as .coords and .variables
- Feature: [InputFile] access with index to input variables
df = nextnanopy.InputFile(...)
df['xmax'] # same as df.variables['xmax']
- Feature: [InputFile] is loopable as well as .coords and .variables
- Feature: [InputFile] extra attributes
df = nextnanopy.InputFile(...)
df.folder_output # returns the output folder if it was executed, otherwise it raises an error
df.filename # settable
df.filename_only # settable
df.folder_input # settable
- Feature: User-friendly information for DataFile, InputFile, Variable, Coord and InputVariable
- Bug fix: .vtr dataset reshape method
- Feature: Support of .vtr data files
- Feature: If unit is not found, default value is 'a.u.'.
- Bug fix: Better methods to find correctly name and unit from data file headers
- Feature: Create an empty input file and set the raw text with the attribute text.
- Bug fix: Find unused name when save input files.
- Feature: Default label for Variables and Coords. The attribute label returns "name (unit)".
- Bug fix: Raw text of input variables without comment was generated incorrectly.
- Bug fix: Find the home path for OSX and Linux.
- Initial release