Recent Changes · Search:

Dispense


Condensed Matter

Chapters:

Appendices


PmWiki

pmwiki.org

edit SideBar

DFTTutorial

< Density Functional | Index | CondensedMatter.Superfluidity? >


QE Installation

Must run in a Unix or a Unix-like environment (a shell and the Make utility):any linux, Mac OS-X, Windows with "cygwin"

Go to the Quantum Espresso site. Download latest and open the archive in a local directory. Enter the directory and read the README file. Same info on the bottom of this GitHub page

Libraries: Quantum ESPRESSO uses and provides a copy of the following external libraries:

    BLAS (Basic Linear Algebra Subroutines): http://www.netlib.org/blas
    LAPACK (Linear Algebra Package): http://www.netlib.org/lapack
    FFTW (Fast Fourier-Transform package): http://www.fftw.org

Better alternative, use the Parma HPC cluster and follow this userguide

Index


Quantum Espresso resources

PWscf User Guide

PWscf is QE plane wave pseudopotential self consistent calculator. It means that the Kohn-Sham equations are developed in a plane waves basis. I.e. the KS wavefunctions are

{$$\psi_{\mathbf k}(\mathbf r) = \frac 1 \Omega \sum_{\mathbf G} c_{\mathbf k,\mathbf G}e^{i(\mathbf k+\mathbf G)\cdot \mathbf r}$$}

where {$\mathbf G$} are reciprocal lattice vectors. The expansion over {$\mathbf G$} grants that the Bloch theorem is valid. The use of pseudopotential guarantees that {$\psi_{\mathbf k}$} is a valence electron wavefunction, orthogonal to core, atomic-like wavefunctions. The result is a cancellation theorem: both {$\psi_{\mathbf k}$} and the effective potential of the KS equations are slowly varying and require only a limited number of {$\mathbf G$} reciprocal lattice wavevectors, up to an energy cutoff {$E_{ctf}$}

{$$\frac {\hbar^2|\mathbf k + \mathbf G|^2} {2m} \le E_{ctf}$$}

The requirement is dictated again by how steep are le slopes of the functions. Explicitly, e.g. by the frequencies of oscillation of the density {$n(\mathbf r)$}, that DFT is calculating as {$\sum_i|\phi_i(\mathbf(\mathbf r)|^2$} with KS wavefunctions.

In principle the graining of {$\mathbf k$} vectors within the BZ is dictated by {$\Delta k = \frac {2\pi} {N_xa} = \frac G N_x$}, with {$L_x=N_x a$} the crystal dimension, i.e. one should use as many as the number of electrons in the lattice. This is computationally impossible. Practically, one must only correctly calculate BZ integrals of the above wavefunctions. Accurate integrals can be computed with a limited grid of {$\mathbf k$} reciprocal lattice points (discrete Fourier components). Crystal symmetry imposes that certain reciprocal lattice points are equivalent, hence the knowledge of symmetry reduced the number of Fourier components. Chadi, Cohen, and Monkhorst, Pack describe a way to guarantee that the integral of slowly varying functions can be calculated efficiently by summing over a small number of k points. To see an automatic generation of Monkhorst-Pack grid for Si run e.g. si.scf.in with k automatic 8 8 8 1 1 1 and look at si.scf.out.

Index


HPC resources

We suggest to use HPC from your own laptop (see the indented paragraph below).
This first section is the backup Aula Kirk alternative.

Students must be registered by the lecturer.

  • If you are not registered in Aula Kirk, register here in advance
  • Switch on the box (behind the screen)
  • connect to LABINFO using the username (normally numero di matricola) and your unipr password
  • Launch a WINDOWS session (user nome.cognome, same password)
  • START/Xming/Xming (to provide x tunneling for graphics, see the XMing icon at the bottom, left of the bar)
  • START/ssh secure shell/ssh
  • Profile, create a profile for login.hpc.unipr.it with your nome.cognome as user
  • Profile/Edit/Tunneling and tick the X graphic tunneling box
  • start a ssh connection (you can also use a file transfer GUI* )
  • from the ssh command line type xterm, an xterminal should appear (this checks that the X tunnel works for future plots and you can continue either form ssh secure shell or from the new xterm as you prefer)
  • issue the command newgrp T_2018_FISTACOND
  • you should now (as of May 2018) be able to read, edit and execute command in the common group directory
  • ~/tutorial/handson_pwscf/ contains the tutorial slides, open them with

evince handson_pwscf.pdf&

  • each creates her/his folder inside tutorial/handson_pwscf/, e.g.

makedir SiliconXY
cd SiliconXY
cp ../Silicon0/* ./

Attach:handson_pwscf.pdf Δ

The preferred alternative is running the ssh client with file transfer and graphics from your laptop, from anywhere (also from home).
  • Mac and linux both have native ssh, just open a terminal and runs ssh -X nome.cognome@login.hpc.unipr.it.
    ** Windows, install this client https://mobaxterm.mobatek.net/, that

includes both the X server (equivalent to XMing) and the file transfer GUI.


* GUI = Graphic User Interface

Index


Silicon

These instructions were tested on two parallel ssh sessions
ssh -X login.hpc.unipr.it, and ssh login.hpc.unipr.it
the first to run python scripts to generate plots, the second to submit batch jobs (or to run on the same login machine, not documented, fast enough!)

Enter handson_pwscf from the same folder in the distribution.
Open /hpc/home/roberto.derenzi/tutorial/handson_pwscf and follow it:
study the book, the slides and the wiki to understand the physics
look here for linux info and documentation, look at the tutorial for QE practicals


/hpc/home/roberto.derenzi/Pseudo contains already the first requested pseudo

  • Use vim ([vim tutorial) or nano (self explained) to edit files
  • In order to run batch jobs on the vrt queue, the fast access to a very small portion the supercomputer, you should read the hpc wiki, in particular you must execute the Password-less Access and the External Access
  • Run batch jobs in login with
    sbatch --partition=vrt -c1 jobserial.sh for single pw.x execution or

sbatch --partition=vrt -c1 run_si_job for convergence tests
where job = etot, k, ...

  • Run the first few scf as a single px execution


Here is the full description of the plane wave self consistent field PW.x input

  • Then use the run_si_... scripts that make use of a simple awk extraction of the parameters
  • essential syntax:
    • grep -e 'search pattern' file searches for the records (lines) in file that contain 'search pattern' and sends them to the output
    • | (pipe) sends output of previous command to input of following command
    • \ is newline
  • awk is a text manipulationprogram that reads and edits input, here the man page and below the features used
    • /pattern/ searches records containing the pattern
    • $NF is the content of the last word (space separated) in the record, $(NF-1) the one before
    • {myname=$NF} stores the last word in awk variable myname
    • {print myname, $(NF-1)} prints the content of the variable myname, (the last word of the previous record, a space and the content of the penultimante word of the last record
  • finally, >> filename redirects output to file filename

The fit to equations of state for solids (Keane, Birch, Murnaghan) is done by a simple progam bin/ev.x in the qe suite, linked to Silicon folder. The equation of state of a system is a relation of the form {$f(P,V,T)=0$}. The physics behind this may be exemplified by the Grüneisen constant, which may be fitted to harmonic energies (i.e. phonons) with the definition used in the quasi-harmonic approximation (see e.g. Khomski, p.43) to derive thermal solid expansion

{$$\gamma = - \frac \omega V \frac {d\omega}{dV}$$}

This constant has a corresponding thermodinamic definition, {$\gamma = V(dP/dE)_V$}. The quasi harmonic approximation is behind the Mie-Grüneisen equation of state. The Murnaghan and Birch-Murnaghan equations are other approximations, reasonably valid for geological conditions.

Index


Alluminum

No special script issue here.

Al is a fcc metal. Physically, the problem with a metal ground state is that we must sum wavefunctions up to a sharp cutoff {$k_F =|\mathbf k|$}. The sharpness of the cutoff produces fast oscillating components. To reduce this we use Fermi smearing (equivalent to finite temperature) at the cost of including an entropy term. Gaussian smearing corresponds to a Hermitte polynomial expansion, whose entropy term is known exactly.

The program handles a Gaussian width parameter in energy. Convergence becomes much slower.

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on May 17, 2019, at 09:08 AM