Table of Contents
In this basic tutorial, you will learn to use VNL for calculating the band structure and some other properties of a crystal. The tutorial does not discuss the science of such a calculation much; the purpose of the tutorial is to show how to operate VNL, specifically how to set up calculations and visualize the results.
In the next chapter you will learn how to construct geometries using the Builder, but in this example you will pick the crystal from a set of predefined systems.
Launch the Database tool
by selecting
Tools>Database
from the menu in the main VNL window.
When the tool opens, type “sio2” in the search field, and select the "SiO2 (cristobalite)" crystal in the list of matches. Information about the lattice, including its symmetries (e.g. that the selected crystal is face centered cubic), can be seen in the lower panel.
|
|
Tip |
|---|---|
|
Most VNL tools contain a 3D preview of the currently active geometry. Use the right mouse button to rotate the 3D view, use the scroll wheel to zoom (or hold down Ctrl and right mouse button and move the mouse), and press the scroll wheel and move the mouse to pan the camera (or hold down Shift and the right mouse button and move the mouse). |
Once the geometry has been defined you are ready to set up the calculation. The tool used for this purpose is the Script Generator.
Transfer the crystal to the Script Generator by clicking the "Send to" icon
in the lower-right of the Database window,
and select Script Generator from the pop-up
menu.
The Script Generator appears and the Database window is automatically minimized.
As outlined in the Introduction, the main steps to perform within the Script Generator are to define the method or calculator to use (DFT, semi-empirical, etc), configure its parameters (mostly related to accuracy), and select the physical properties to compute.
Here is how to do this in practice:
Add a New Calculator to the script by double-clicking the corresponding icon in the left panel.
To calculate the band structure of the crystal, double-click Analysis and select Bandstructure from the pop-up menu.
Next insert an ElectronDifferenceDensity block, also available under "Analysis".
Finally, specify sio2.nc as the file name where the results will be saved into
under Default output file in the Global IO box. As noted in the
introduction, if you do
not specify a directory but only a file name, the NetCDF file
will be saved in the directory where you started VNL.
If you now double-click the Bandstructure block in the script, you can see that the suggested route in the Brillouin zone already includes the common symmetry points for the face centered cubic lattice. Thus, the default settings are fine, however to obtain smoother curves increase the number of points per segment between each symmetry point to 100, and then close this dialog.
In principle also the calculator itself has defaults for all parameters. However, you should always check them carefully in order to obtain the desired accuracy, not least in terms of which method that should be used. Therefore, double-click the "New Calculator" block in the script to open it.
The default method is DFT, but since this method does not give a good band gap for semiconductors, select the semi-empirical extended Hückel model. For improved accuracy, also set the k-point sampling to 5x5x5.
Click OK to close the calculator dialog.
It is good practice to always save the scripts before running them, for future reference and in case you want to rerun it some time later. Use the File menu in the Script Generator to save the script.
All physical systems and calculations are handled internally in VNL as Python
scripts. To view the script associated with the calculation you just have defined,
click the Send To icon
and select Editor. The Editor will appear, displaying the Python
script you just have set up with the help of the Database and the Script Generator.
By editing the script you can make minor final changes by hand, or introduce advanced procedures like looping over the lattice constant, etc.
Scripts can be run directly from inside VNL via
the Job Manager. To calculate
the Si band structure, use the "Send To" button
from the Script Generator and select Job Manager
from the menu that appears.
The Job Manager window appears, containing the script you just set up. Simultaneously, the Script Generator is minimized (not closed).
|
|
Tip |
|---|---|
|
You can also drop the saved script file itself on the
Job Manager icon on the toolbar, or use the "Send To" button |
The status of the script is shown as Queued since the job has not yet been executed. To start the execution of the calculation, press the Run Queue button. The state of the job changes to Running while the job is being executed, and in addition, informative log messages will appear in a separate log window. When the state of the job in the Job Manager changes to Done, the job is completed.
|
|
Tip |
|---|---|
|
To remove a job that is not running, select it and press Delete on the keyboard. A running job can be stopped with the actions key. |
After the job is finished (it takes seconds to complete only), you are ready to study the calculated band structure of the silicon crystal. To do this, return to the main VNL window.
|
|
Tip |
|---|---|
|
Use the Windows menu, available in each tool in VNL, to conveniently switch between different windows. |
Select the generated NetCDF file sio2.nc in the file browser of the main window.
When the file is selected, the contents of the NetCDF file
are displayed in the upper right-hand panel called Result Browser.
The lower right-hand panel, the Result Viewer, contains a number of actions that can be performed on the object currently selected in the Result Browser. In the base of the band structure, you can click the Plot button to view the band structure, or Export to export the raw data of the band structure to a file that can be used for plotting with a third-party application.
Due to the large band gap it is hard to see the structure
in the valence and conduction bands separately, but you can use the mouse
to zoom in by drawing a rectangle (zoom out by right-clicking and choosing
Reset zoom ).
The NetCDF file also contains an Electron Difference Density object. This is a 3D grid, and such quantities are viewed with the Viewer tool in VNL.
To view the electron difference density as a contour plot, click the corresponding button in the Result Viewer. The 3D Viewer will open up with the contour plot. To also see the atomic configuration in the view, go back to the main window, and drag the BulkConfiguration from the Result Browser to the open Viewer window.
You need to adjust some view settings to get a good picture of the electron difference density. Therefore, right-click the 3D Viewer window and open the Properties dialog.
Under Contour cut plane, change the color map to Hot and the plane normal rotation angle θz to 135 degrees.
To export the plot as an image, use the menu Plots>Export image.
This concludes the first part of the introduction to VNL. Next, you will proceed with a transport calculation for a graphene nanoribbon.