This web page describes the template feature of nextnanomat.
In the Template tab you can overview all variables which are defined in the input file. You can sweep a chosen variable by a list of values 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 1D - Exciton Binding Energy in an Infinite Quantum Well.
Variable definition in input file (required)¶
<Variable> = <Value> <Comment>
with the following syntax definition:
- Variable (required)
<Variable>starts with a
%should be preferred), can contain the characters
0-9and the underscore (
_). It is case-sensitive.
For nextnano++, the definition of variables and examples can be found in the nextnano++ syntax documentation.
For nextnano³, the definition of variables and examples can be found in the nextnano³ macro documentation.
- Value (required)
Any string after the
!characters is considered as
<Value>. It is used as default value for the Template and Template (Beta) user interface.
- Comment (optional)
Starts with a
!sign and is used as a description of the variable in the Template user interface. The comment may also include the following keywords (including brackets):
This variable is not shown to the user in the Template user interface.
A string to show the unit for the variable (optional)
Default values for
List of valuesinput control
Default values for
Range of valuesinput control
Highlights variable in Template user interface in yellow
Every line that starts with a
$ (not nn3) or
% (after stripping leading spaces) and includes a
= is considered a variable definition.
$well_width = 6 # Variable for quantum well width. (DisplayUnit:<nm>) (RangeOfValues:From=6,To=18,Step=2) (HighlightInUserInterface)
Sweep over a variable + optional post-processing¶
If an input file includes at least one variable definition, it is possible to automatically sweep over it.
Template Tab of nextnanomat can be seen in Figure 22.214.171.124, already pre-filled for a variable sweep.
To reproduce, please follow these steps:
The input file has to be chosen as the template file. Thus all correct variable definitions are loaded into the list.
Choose a sweeping variable and complete the required fields, e.g.
List of valuesfor
The input files can be created by clicking the
Create input filesbutton.
They will be added to the batch list. To start the simulations you have to switch to the
Simulation-tab, see Figure 126.96.36.199.
The sweep of a variable is now completed.
When the simulations are done, you have the possibility to use the post-processing feature. Its input fields are also located in the Template tab and can be seen in Figure 188.8.131.52. To use post-processing,
Choose the output file (*.dat) and the column number of the variable you want to compare, e.g. the file energy_spectrum_quantum_region_Gamma.dat displayed in Figure 184.108.40.206 and Figure 220.127.116.11
Additionally state the maximum number of values (rows) which will be compared. (It is not allowed to exceed the existing number of rows.)
Now push the button
Create file with combined dataand
Visualize your results in the
Output-tab, see Figure 18.104.22.168.
For the steps 5 and 6 it is necessary to check the data structure of the simulation result you are interested in.
Output tab, select the data file and toggle
The result plots the chosen data in relation of the sweeping variable, see Figure 22.214.171.124.
Post-processing of existing sweep¶
If you have already done some sweeps in the past, you can also use the post-processing feature of nextnanomat retroactively. Note, additional to the post-processing steps described above, you need to load the template file and select and fill in the variable values which have been used for the sweep.