QuantumATK as GUI for Quantum ESPRESSO¶
In this tutorial you will learn the basics of how to use QuantumATK as a graphical user interface for setting up and analyzing Quantum ESPRESSO calculations.
- Outline:
We will consider the case of bulk silicon, and use QuantumATK to set up the structure and export a Quantum ESPRESSO (QE) input file.
We will then run the calculation and use QuantumATK to analyze a few results.
Many more video tutorials are available on the QuantumWise YouTube channel.
Note
This tutorial assumes you have access to the Quantum ESPRESSO distribution, or at least a working pw.x executable. If not, it can be obtained free of charge at quantum-espresso.org/download and is sometimes also available from Linux package managers, see for example here for relevant Ubuntu packages.
See also
This is an introductory tutorial. For more advanced topics, such as calculating and analyzing bandstructure and density of states, see Silicon bandstructure and DOS using QuantumATK and Quantum ESPRESSO.
Setting up a configuration using QuantumATK¶
Exporting a Quantum ESPRESSO input file¶
Right-click the Silicon (alpha) Stash item and choose
.Navigate to a suitable directory, choose
in the Files of Type drop-down menu, and save the input file as “scf.in”.The QE input file has now been generated by QuantumATK and is saved as “scf.in”.
Open a terminal and navigate to the directory containing the input file. Inspect the contents of the file. It should look like illustrated below.
&CONTROL calculation='scf', outdir='.', prefix='calc', pseudo_dir='$PSEUDO_DIR', verbosity='low', tstress=.false., tprnfor=.false., / &SYSTEM ibrav=2, celldm(1)=10.2623466921d0, nat=2, ntyp=1, ecutwfc=30.0d0, ecutrho=120.0d0, input_dft='LDA', occupations='smearing', smearing='gaussian', degauss=0.002000d0, / &ELECTRONS diagonalization='david', conv_thr=1d-06, mixing_mode='plain', mixing_beta=0.700d0, / ATOMIC_SPECIES Si 28.085500d0 Si.UPF ATOMIC_POSITIONS {alat} Si 0.0000000000d0 0.0000000000d0 0.0000000000d0 Si 0.2500000000d0 0.2500000000d0 0.2500000000d0 K_POINTS {automatic} 1 1 1 0 0 0Note
The default input file contains the settings and instructions needed for basic self-consistent QE calculations, but a few modifications are required before you can execute the calculation. In particular, the pseudopotential directory needs to be specified, and you may wish to tune a few of the parameters.
See also
The Quantum ESPRESSO website offers a full description of all possible settings for the input file at this link.
Adapting the input file¶
First we need a pseudopotential. Go to the Quantum Espresso pseupotential repository at this link and download the silicon pseudopotential named Si.pbe-n-rrkjus_psl.0.1.UPF, or simply download it using this direct link. Save it in the folder that contains scf.in.
Open scf.in with your favorite editor, and make the following changes:
Change the outdir option to outdir=’silicon’,;
Point to your local pseudopotential:
change the pseudo_dir option to pseudo_dir=’.’,;
change the name of the pseudopotential from Si.UPF to Si.pbe-n-rrkjus_psl.0.1.UPF;
Increase the density and potential cutoff energy (in Rydbergs) from ecutrho=120.0d0, to ecutrho=300.0d0, (because we are using an ultrasoft pseudopotential, not a normconserving one);
Remove lines 20-22. They specify options for smearing of electronic occupations; which is not needed for semiconductor bulks;
Insert instead nbnd=10, to include a few conduction bands;
Change the exchange-correlation density functional from input_dft=’LDA’, to input_dft=’PBE’,;
Tighten the SCF convergence threshold from conv_thr=1d-06, to conv_thr=1d-08,;
Increase the k-point sampling from a 1x1x1 grid to a 9x9x9 grid by changing the last line from 1 1 1 0 0 0 to 9 9 9 0 0 0.
Warning
It is important to preserve the comma-separation of lines in sections such as the CONTROL, SYSTEM, and ELECTRONS cards. All lines in those sections should end with a comma, otherwise the calculation will crash.
Your scf.in input file should now look like illustrated below.
&CONTROL calculation='scf', outdir='silicon', prefix='calc', pseudo_dir='.', verbosity='low', tstress=.false., tprnfor=.false., / &SYSTEM ibrav=2, celldm(1)=10.2623466921d0, nat=2, ntyp=1, ecutwfc=30.0d0, ecutrho=300.0d0, nbnd=10, input_dft='PBE', / &ELECTRONS diagonalization='david', conv_thr=1d-08, mixing_mode='plain', mixing_beta=0.700d0, / ATOMIC_SPECIES Si 28.085500d0 Si.pbe-n-rrkjus_psl.0.1.UPF ATOMIC_POSITIONS {alat} Si 0.0000000000d0 0.0000000000d0 0.0000000000d0 Si 0.2500000000d0 0.2500000000d0 0.2500000000d0 K_POINTS {automatic} 9 9 9 0 0 0
Running the ground state calculation¶
Run the Quantum ESPRESSO calculation and send the standard output to a file named scf.out:
pw.x < scf.in > scf.out
Once the calculation has finished (should be very fast), a number of QE output items should be visible on the QuantumATK LabFloor:
scf.in contains the initial bulk configuration;
scf.out contains the bulk configuration (icon ) and a total-energy report (icon ;
the ground state electron charge density is available from data-file.xml.
Analyzing results¶
Viewing the configuration¶
Total energy components¶
Electron charge density projections¶
The 1D Projector plugin allows you to visualize real-space projections of the ground state electron charge density.
On the LabFloor, highlight the data-file.xml item and click
in the plugins panel.Click the
button to project the electron density onto a 2D plane along the C-axis and plot the sum along this axis.You can also plot the electron density along a line that passes through a specific point and is parallel to one of the crystal axes. To do this, change Projection type from Sum to Through point, click
, and then click . The result is a plot of the charge density along the C-axis.
Isosurfaces and contour plots¶
Finally, let us use the Grid Operations plugin to visualize an isosurface and a contour plot of the electron density.
On the LabFloor, highlight the data-file.xml item and click
in the plugins panel.The ElectronDensity object has the default alias A1. Type this into the input line in the Grids panel and hit
Enter
on your keyboard.On the right-hand side you can now choose between Isosurface and Cutplane plots. The View botton shows the selected plot.
More Quantum ESPRESSO calculations¶
You can easily use the output configuration in the LabFloor as a starting point for setting up structures for more QE calculations:
The Builder can also be used to visualize the first Brillouin zone of the silicon crystal:
Double-click the icon named “scf.out” in the Stash, and choose .
Hold down the right mouse bottom to rotate the visualization for close inspection. High-symmetry points in reciprocal space are indicated in green letters.
See also
You are now ready to continue with Silicon bandstructure and DOS using QuantumATK and Quantum ESPRESSO, where you learn more about calculating and analyzing the electronic structure of semiconductors.