
How To Do Simple Calculations With Quantum ESPRESSO Shobhana Narasimhan Theoretical Sciences Unit JNCASR, Bangalore [email protected] I. About The Quantum ESPRESSO Distribution 2 Shobhana Narasimhan, JNCASR Quantum ESPRESSO • www.quantum-espresso.org 3 Shobhana Narasimhan, JNCASR The Quantum ESPRESSO Software Distribution P. Giannozzi 4 Shobhana Narasimhan, JNCASR Why “Quantum ESPRESSO”?! 5 Shobhana Narasimhan, JNCASR Licence for Quantum ESPRESSO P. Giannozzi 6 Shobhana Narasimhan, JNCASR Quantum ESPRESSO: Organization P. Giannozzi 7 Shobhana Narasimhan, JNCASR Quantum ESPRESSO as a distribution P. Giannozzi 8 Shobhana Narasimhan, JNCASR Quantum ESPRESSO as a distribution OTHER PACKAGES WANNIER90: Maximally localized Wannier functions Pwcond: Ballistic conductance WanT: Coherent Transport from Maximally Localized Wannier Functions Xspectra: Calculation of x-ray near edge absorption spectra GIPAW: EPR and NMR Chemical Shifts Coming Soon: GWW: GW Band Structure with Ultralocalized Wannier Fns. TD-DFT: Time-Dependent Density Functional Pert. Theory 9 Shobhana Narasimhan, JNCASR What Can Quantum ESPRESSO Do? • Both point and k-point calculations. • Both insulators and metals, with smearing. • Any crystal structure or supercell form. • Norm conserving pseudopotentials, ultrasoft PPs, PAW. • LDA, GGA, DFT+U, hybrid functionals, exact exchange, meta GGA, van der Waals corrected functionals. • Spin polarized calculations, non-collinear magnetism, spin-orbit interactions. • Nudged elastic band to find saddle points. 10 Shobhana Narasimhan, JNCASR II. Doing a “Total Energy” Calculation with the PWscf Package of QE: The SCF Loop 11 Shobhana Narasimhan, JNCASR The Kohn-Sham problem Want to solve the Kohn-Sham equations: 1 2 V (r) V [n(r)] V [n(r)] (r) (r) 2 nuc H XC i i i H Note that self-consistent solution necessary, as H depends on solution: { i} n(r) H Convention: e me 1 12 Shobhana Narasimhan, JNCASR Self-consistent Iterative Solution Vnuc known/constructed How to solve the Initial guess n(r) Kohn-Sham eqns. for a set of fixed Generate Calculate VH[n] & VXC[n] new nuclear (ionic) n(r) Veff(r)= Vnuc(r) + VH (r) + VXC (r) positions. 2 H i(r) = [-1/2 + Veff(r)] i(r) = i i(r) 2 Calculate new n(r) = i| i(r)| No Self-consistent? Yes Problem solved! Can now calculate energy, forces, etc. 13 Shobhana Narasimhan, JNCASR Plane Waves & Periodic Systems • For a periodic system: 1 where G = reciprocal (r) c ei(k G) r k k,G lattice vector G • The plane waves that appear in this expansion can be represented as a grid in k-space: k y • Only true for periodic systems that grid is discrete. kx • In principle, still need infinite number of plane waves. 14 Shobhana Narasimhan, JNCASR Truncating the Plane Wave Expansion • In practice, the contribution from higher Fourier components (large |k+G|) is small. • So truncate the expansion at some value of |k+G|. • Traditional to express this cut-off in energy units: ky E=Ecut 2 | k G |2 E 2m cut kx Input parameter ecutwfc 15 Shobhana Narasimhan, JNCASR Checking Convergence wrt ecutwfc • Must always check. • Monotonic (variational). 16 Shobhana Narasimhan, JNCASR Step 0: Defining the (periodic) system Namelist ‘SYSTEM’ Shobhana Narasimhan, JNCASR How to Specify the System • All periodic systems can be specified by a Bravais Lattice and an atomic basis. + = 18 Shobhana Narasimhan, JNCASR How to Specify the Bravais Lattice / Unit Cell Input parameter ibrav - Gives the type of Bravais lattice (SC, BCC, Hex, etc.) Input parameters {celldm(i)} a - Give the lengths [& 2 directions, if necessary] of a1 the lattice vectors a1, a2, a3 • Note that one can choose a non-primitive unit cell (e.g., 4 atom SC cell for FCC structure). 19 Shobhana Narasimhan, JNCASR Atoms Within Unit Cell – How many, where? Input parameter nat - Number of atoms in the unit cell Input parameter ntyp - Number of types of atoms FIELD ATOMIC_POSITIONS - Initial positions of atoms (may vary when “relax” done). -Can choose to give in units of lattice vectors (“crystal”) or in Cartesian units (“alat” or “bohr” or “angstrom”) 20 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 1: Want to study properties of a system with a surface. Surface atom • Presence of surface No periodicity along z. Bulk atom z x 21 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 1: Want to study properties of a system with a surface. • Presence of surface No periodicity along z. • Use a supercell: artificial periodicity along z by repeating slabs separated by vacuum. • Have to check convergence z w.r.t. slab thickness & vacuum thickness. x 22 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 2: Want to study properties of a nanowire. z y • Example 3: Want to study properties of a cluster 23 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 2: Want to study properties of a nanowire introduce artificial periodicity along y & z. • Example 3: Want to study properties of a cluster introduce artificial periodicity along x, y & z. z 24 Shobhana Narasimhan, JNCASR y What if the system is not periodic? • Example 4: Want to study a system with a defect, e.g., a vacancy or impurity: 25 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 4: Want to study a system with a defect, e.g., a vacancy or impurity: 26 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 5: Want to study an amorphous or quasicrystalline system. 27 Shobhana Narasimhan, JNCASR What if the system is not periodic? • Example 5: Want to study an amorphous or quasicrystalline system: approximate by a periodic system (with large unit cell). 28 Shobhana Narasimhan, JNCASR Artificially Periodic Systems Large Unit Cells • Note: In all these cases, to minimize the effects of the artificially introduced periodicity, need a large unit cell. • Long a1, a2, a3 (primitive lattice vectors) • Short b1, b2, b3 (primitive reciprocal lattice vectors) • Many G‟s will fall within Ecut sphere! 29 Shobhana Narasimhan, JNCASR Step 1: Obtaining Vnuc Vnuc known/constructed Initial guess n(r) Generate Calculate VH[n] & VXC[n] new n(r) Veff(r)= Vnuc(r) + VH (r) + VXC (r) 2 H i(r) = [-1/2 + Veff(r)] i(r) = i i(r) 2 Calculate new n(r) = i| i(r)| No Self-consistent? Yes Problem solved! Can now calculate energy, forces, etc. 30 Shobhana Narasimhan, JNCASR Nuclear Potential • Electrons experience a Coulomb potential due to the nuclei. • This has a known and simple form: Z V nuc r • But this leads to computational problems! 31 Shobhana Narasimhan, JNCASR Problem for Plane-Wave Basis Core wavefunctions: Valence wavefunctions: sharply peaked near lots of wiggles near nucleus. nucleus. High Fourier components present i.e., need large Ecut 32 Shobhana Narasimhan, JNCASR Solutions for Plane-Wave Basis Core wavefunctions: Valence wavefunctions: sharply peaked near lots of wiggles near nucleus. nucleus. High Fourier components present i.e., need large Ecut Don‟t solve for the Remove wiggles from core electrons! valence electrons. 33 Shobhana Narasimhan, JNCASR Pseudopotentials • Replace nuclear potential by pseudopotential • This is a numerical trick that solves these problems • There are different kinds of pseudopotentials (Norm conserving pseudopotentials, ultrasoft pseudopotentials, etc.) • Which kind you use depends on the element. 34 Shobhana Narasimhan, JNCASR Pseudopotentials for Quantum Espresso - 1 • Go to http://www.quantum-espresso.org; Click on “PSEUDO” 35 Shobhana Narasimhan, JNCASR Pseudopotentials for Quantum Espresso - 2 • Click on element for which pseudopotential wanted. 36 Shobhana Narasimhan, JNCASR Pseudopotentials for Quantum-ESPRESSO Pseudopotential‟s name gives information about : • type of exchange- correlation functional • type of pseudopotential • e.g.: 37 Shobhana Narasimhan, JNCASR Element & Vion for Quantum-ESPRESSO e.g, for calculation on BaTiO3: ATOMIC_SPECIES Ba 137.327 Ba.pbe-nsp-van.UPF Ti 47.867 Ti.pbe-sp-van_ak.UPF O 15.999 O.pbe-van_ak.UPF • ecutwfc, ecutrho depend on type of pseudopotentials used (should test). • When using ultrasoft pseudopotentials, set ecutrho = 8-12 ecutwfc !! 38 Shobhana Narasimhan, JNCASR Element & Vion for Quantum-ESPRESSO • Should have same exchange-correlation functional for all pseudopotentials. oops! input output 39 Shobhana Narasimhan, JNCASR Step 2: Initial Guess for n(r) Vion known/constructed Initial guess n(r) Generate Calculate VH[n] & VXC[n] new n(r) Veff(r)= Vion(r) + VH (r) + VXC (r) 2 H i(r) = [-1/2 + Veff(r)] i(r) = i i(r) 2 Calculate new n(r) = i| i(r)| No Self-consistent? Yes Problem solved! Can now calculate energy, forces, etc. 40 Shobhana Narasimhan, JNCASR Starting Wavefunctions The closer your starting wavefunction is to the true wavefunction (which, of course, is something you don‟t necessarily know to start with!), the fewer the scf iterations needed. startingwfc ‘atomic’ Superposition of atomic orbitals ‘random’ ‘file’ “The beginning is the most important part of the work” - Plato 41 Shobhana Narasimhan, JNCASR Steps 3 & 4: Effective Potential Vion known/constructed Initial guess n(r) or i(r) Note that type of exchange- Generate Calculate VH[n] & VXC[n] correlation chosen new while specifying n(r) V (r)= V (r) + V (r) + V (r) eff nuc H XC pseudopotential 2 H i(r) = [-1/2 + Veff(r)] i(r) = i i(r) 2 Calculate new n(r) = i| i(r)| No Self-consistent? Yes Problem solved! Can now calculate energy, forces, etc. 42 Shobhana Narasimhan, JNCASR Exchange-Correlation Potential • VXC EXC/ n contains all the many-body information. • Known [numerically, from Quantum Monte Carlo ; various analytical approximations] for homogeneous electron gas. • Local Density Approximation: HOM Exc[n] = n(r) Vxc [n(r)] dr -surprisingly successful! Replace pz (in name of pseudopotential) • Generalized Gradient Approximation(s): Include terms involving gradients of n(r) pw91, pbe (in name of pseudopotential) 43 Shobhana Narasimhan, JNCASR Step 5: Diagonalization Vion known/constructed Initial guess n(r) Generate Calculate VH[n] & VXC[n] new n(r) Veff(r)= Vion(r) + VH (r) + VXC (r) Expensive! 2 H i(r) = [-1/2 + Veff(r)] i(r) = i i(r) 2 Calculate new n(r) = i| i(r)| No Self-consistent? Yes Problem solved! Can now calculate energy, forces, etc.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages69 Page
-
File Size-