Introduction

Table of Contents

ATK and VNL

Atomistix ToolKit (ATK) gives you access to a powerful set of modeling tools for investigating a variety of nanoscale systems such as molecules, bulk and two-probe systems. The systems may contain nanowires, nanotubes, graphene, high-k dielectric interfaces, semiconductors, metals, etc, and the calculations are based on the following techniques:

  • density-functional theory (DFT)

  • extended Hückel theory

  • classical potentials

  • non-equilibrium Green's functions (NEGF)

In this tutorial we will give a short introduction to the basic work flow of setting up a calculation and analyzing the results. We will primarily use the graphical user interface (GUI) Virtual NanoLab (VNL) for all operations, but also briefly show how the command-line interface can be utilized.

VNL is designed with ease-of-use in mind − you can focus on the physical properties of the systems under investigation, and let the program handle the details of the numerical models and the setup of the input scripts for the calculations.

Users who desire more fine-grained control over the numerical parameters can however also use Python scripting to set up, run and control the calculations. At any step in the work flow the user can export the simulation as a Python script, which can be executed by the command-line tool atkpython. This makes it easy to set up a calculation on a workstation but carry out the calculations on a cluster or more powerful computer. The result files can then be brought back to the workstation for analysis; all input and output files are fully platform cross-compatible between Linux and Windows, and between 32 and 64 bit architectures.

All tools in VNL can also interpret Python code. This can be used to define a more complex geometry as a set of logical or repetitive operations in a script, which then directly can be used as input to the next step in the work flow. VNL is also extensible through user-defined plug-in components, that can build special structures and perform specific analysis and plotting.

[Tip] Tip

The command-line tool atkpython can also be used interactively, as regular Python (actually IPython), with history, completion, help on ATK commands, etc.

Three different representations of carbon nanotubes in ATK: as built in the Builder in VNL, as the detailed Python script this produces, or as generated and inspected using ATKPython commands on the interactive command line.

Figure 1: Three different representations of carbon nanotubes in ATK: as built in the Builder in VNL, as the detailed Python script this produces, or as generated and inspected using ATKPython commands on the interactive command line.


The topic of this tutorial is however to demonstrate the basic work flow in VNL. More details on how to make the most of ATK via scripting can be found in the online tutorials, and a complete description of all the parameters used in the Python interface to ATK, and in many cases a longer discussion about their physical relevance, can be found in the ATK reference manual. Also see python.org for general information on Python.

Prerequisites

We will assume that a working copy of Atomistix ToolKit has already been installed, as described in the installation guide,

To start VNL, double-click the desktop icon created by the installer, or type vnl in a command-line terminal window. (You may have to log out and in after the installation in order for the license environment variable to be registered properly.) On Windows there will also be an entry in the Start Menu.

Overview of the work flow

The procedure for studying a nanoscale system with ATK typically involves a sequence of steps, which correspond to the tools available on the main toolbar in VNL.

  1. First, one needs to define the geometry of the system − that is, the coordinates of all atoms (and the unit cell, if relevant). For a transport system (a device geometry), one must specify the electrodes and central/scattering region. For this task, VNL contains an advanced Builder for atomic geometries, that can be used to set up even complex systems. These can then be used for electronic structure and transport calculations with ATK, but they can also exported to standard or custom-defined file formats for use with other codes.

  2. Next, one should specify the details of the numerical calculator that should be used for the computation, along with the desired physical properties that should be extracted from the calculation. This is done in VNL using the Script Generator or Scripter for short.

    The main steps to perform within the Script Generator are

    • Choose the calculator that should be used for the calculation, e.g. Classical Potentials, Extended Hückel or DFT.

    • Define the parameters of the model, e.g. the k-point sampling, the exchange-correlation functional, the basis sets and other numerical accuracy settings, but also some more physical input properties like the bias voltage in a transport calculation.

    • Select the physical properties that should be extracted from the calculation, such as the total energy, the band structure, or the electron difference density.

    In addition one can set up geometry optimization or molecular dynamics runs from the Script Generator, and for spin-dependent calculations one usually needs to set up the initial spin configuration. These points are covered in other tutorials.

  3. The Script Generator produces a Python script; it is recommended to always save it, for later reference. You may edit this script either in the internal Editor or in any external text editor of your preference.

  4. The script (symbolically denoted script.py here) can be executed by dropping it on the Job Manager, either directly from the instrument that created it, the Editor, or from the file system.

    Alternatively, the script can be run from the command line on the local machine as

    atkpython script.py > script.log

    or copied to a cluster to be run in parallel.

  5. The data generated by ATK is stored in a NetCDF file which you specify in the Scripter when setting up the calculation.

    [Important] Important

    If no absolute path is provided for the NetCDF file, the file will be saved in the directory in which VNL was started (to which you can always navigate quickly by pressing the Home button on the toolbar) or the directory in which the script was run, in case you used the command-line approach.

    On Windows, if you use the Desktop or Start Menu shortcut, the default "Home" directory can be customized in the shortcut properties.

    The contents of the NetCDF file can be inspected in VNL by selecting the file in the file browser. A list of the objects contained in the file will then appear in the panel called Result Browser.

    When an object is selected, the lower panel, called the Result Viewer contains certain actions that can be performed, like Plot (for 2D plotting) or Export. The objects can also be dragged and dropped onto instruments like the Viewer (for 3D plotting) or the Analyzer for specialized analysis.

Moving data around in VNL

The work flow in VNL relies rather heavily on the concept of drag and drop to transfer data between the different instruments and tools. To move a geometry from one Builder to another, drag the script icon in the lower right-hand corner of the source window onto the relevant place in the target window or icon on the main toolbar. Objects in the NetCDF files can also be dragged and dropped onto instruments and analyzers.

To proceed to the next step in the main work flow, it is usually more convenient to use the Send to menu, which pops up when you click the icon , also located in the lower right-hand corner of each window. This can be used to for instance send a ready structure from a Builder to the Script Generator or the Editor, or from the Script Generator to the Job Manager.

Let us now begin the tour of Virtual NanoLab, where you will see all of these concepts and operations in action in the context of some simple but non-trivial calculations. In the first step you will compute the band structure of β-cristobalite.