User Tools

Site Tools


Tab: Template

Here you can overview all variables which are defined in the input file. You can sweep a chosen variable by a list of values (does not support post-processing) or a range of values. Additionally there is the option to compare the sweep results by the post-processing feature: It collects specified data from sweep files and stores them in a separate file, so that e.g. interband transition energy can be visualized as a function of well width.

An example how the template can be used to sweep over a variable, e.g. the quantum well width, is shown in this tutorial. This website describes the template feature of nextnanomat.

Variable definition in input file (required)

<Variable> = <Value> <Comment>


<Variable>: starts with $ or % (% should be preferred), can contain characters A-Z, a-z, 0-9 and the underscore (_) (case-sensitive)

  • For nextnano++, the definition of variables can be found here.
  • For nextnano3, the definition of variables can be found here.

<Value>: any string without # and !, is used as default value in the user interface

<Comment>: starts with # or !, is used as a description of the variable in the user interface (optional) The comment may also include the following keywords (including brackets):

  • (DoNotShowInUserInterface): This variable is not shown to the user in the user interface.
  • (DisplayUnit:<Unit>): a string to show in the user interface as the unit for the variable (optional)
  • (ListOfValues:<default>): default values for List of values
  • (RangeOfValues:From=1,To=10,Step=1): default values for Range of values
  • (HighlightInUserInterface): highlights variable in Template pane in yellow

<Variable>, <Value> and <Comment> may include leading or trailing spaces (which are stripped in the user interface).

Every line that starts with a $ (not nn3) or % (after stripping leading spaces) and includes a = is considered a variable definition.

Sweep over a variable (+ optional post-processing) - in 9 steps

If an input file includes at least one variable definition, it is possible to automatically sweep over it. This input file has to be chosen as the template file. Thus all correct variable definitions are loaded into the list. After choosing a sweeping variable and completing the required fields the input files can be created by Create input files. They will be added to the batch list. To start the simulations you have to switch to the Run-tab.

The sweep of a variable is now completed

When the simulations are done you have the possibility to perform the post-processing feature. For this you have to choose the output file (*.dat) and the column number of the variable you want to compare. Also state the maximum number of values (rows) which will be compared. (It isn't allowed to exceed the existing number of rows.) Now push the button Create file with combined data and visualize your results in the Output-tab.

The location of the buttons can be found in the following picture:

Step 6 is to check the data form of the simulation result you are interested in. Here we consider an example “DoubleQuantumWell*.in” and a sweep over the variable QW_SEPARATION. Go to Output tab and select the data file (eigenvalues for example).

The “data sheet” button (marked yellow) switches from graph plot to .dat view. As an example, here we are interested in the second column and first two rows.

Postprocessing of existing sweep - in 6 steps

You have already done some sweeps, but don't want to compare the results manually?

All relevant information, how to postprocess an existing sweep, can be found in the picture:

Example plot of post-processing

The file above has been used for the post-processing feature. Here the first two eigenvalues are plotted as a function of the quantum well separation. (With this calculation it would have been possible to compare the maximum number of four eigenvalues.)

nnm/template.txt · Last modified: 2020/10/23 09:31 by nextnanowikiadmin