# 1.3.4. Generate nextnanopy Config File¶

If you want to execute a nextnano product using nextnanopy, a config file is needed. This file contains all relevant information and paths to the licenses, nextnano executables and material database.

To make it more comfortable for you to use both nextnanomat and nextnanopy or switch to nextnanopy, you can export the settings already stored within nextnanomat into the format needed by nextnanopy.

Taken from the nextnanopy documentation on https://github.com/nextnanopy/nextnanopy/blob/master/docs/examples/Example0_Set_up_the_configuration.rst:

Per default the config file needs to be located at your home directory (usually C:\Users\Your_User\.nextnanopy-config). When you import nextnanopy for the first time, it will automatically generate the configuration file with few default parameters. If this file already exists, it will not modify it. You can set up this configuration file only once and you do not need to worry about it anymore, except when you renew your license or update the nextnano version.

Thus, if you want to have your custom paths as specified in nextnanomat, just export a config file using this function and save it into your home directory. Then nextnanopy will not overwrite that file. After a new installation of a nextnano update, you can easily update the paths for nextnanopy as well, by using this function again.

Example config file:

[nextnano++]
exe = C:\Program Files\nextnano\2021_12_24\nextnano++\bin 64bit\nextnano++_Intel_64bit.exe
database = C:\Program Files\nextnano\2021_12_24\nextnano++\Syntax\database_nnp.in
outputdirectory = D:\nextnano output

[nextnano3]
exe = C:\Program Files\nextnano\2021_12_24\nextnano3\Intel 64bit\nextnano3_Intel_64bit.exe
database = C:\Program Files\nextnano\2021_12_24\nextnano3\Syntax\database_nn3.in
outputdirectory = D:\nextnano output
debuglevel = -1
cancel = -1
softkill = -1

[nextnano.NEGF]
exe = C:\Program Files\nextnano\2021_12_24\nextnanoNEGF_2020_06_22\nextnano.NEGF\nextnano.NEGF.exe