2221-5 hands-on tutorial on electronic structure...

45
2221-5 Hands-on Tutorial on Electronic Structure Computations Shobhana Narasimhan 17 - 21 January 2011 Jawaharlal Nehru Centre for Advanced Scientific Research Banglalore India The "Self Consistent Field" SCF) Loop and Some Relevant Input Parameters for Quantum--ESPRESSO

Upload: others

Post on 19-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

2221-5

Hands-on Tutorial on Electronic Structure Computations

Shobhana Narasimhan

17 - 21 January 2011

Jawaharlal Nehru Centre for Advanced Scientific Research Banglalore

India

The "Self Consistent Field" SCF) Loop and Some Relevant Input Parameters for Quantum--ESPRESSO

Page 2: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

����������� � ���������������������

������������ ����� ������ ��

�������� ����������

Shobhana NarasimhanTheoretical Sciences Unit

JNCASR, [email protected]

Page 3: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �8

!��� �����"�#������������ ����$$$

� Are you an experienced Quantum Espresso user?

Yes

� Are you an extraordinarily nice person?

No.

PLEASE GO AWAY!

Page 4: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �10

!��� �����"�#������������ ����$$$

� Are you an experienced Quantum Espresso user?

Yes

� Are you an extraordinarily nice person?

Yes

It would be really nice if you could stick around here andhelp with the hands-�����������

Page 5: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �11

!��� �����"�#������������ ����$$$

� Are you an experienced Quantum Espresso user?

No.

Then this session is aimed at YOU!(But we are assuming that you are familiar withelectronic structure calculations, linux commands, etc., etc.)

Page 6: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �12

%��&���������������

� Want to solve the Kohn-Sham equations:

� Note that self-consistent solution necessary, as Hdepends on solution:

� Convention:

)()()]([)]([)(21 2 rrrrr iiiX CHnuc nVnVV ��� ���

�� ����

H

Hrni �� )(}{�

1��� eme �

Page 7: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �13

����'����� � �� �� ������� ���

Vnuc �������������

�������������n(r)

���������VH[n] ��VXC[n]

Veff�r���Vnuc(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

How to solve theKohn-Sham eqns.for a set of fixednuclear (ionic)positions.

Page 8: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �14

�����(����)�������'��#� ���

� For a periodic system:

� The plane waves that appear in this expansion can be represented as a grid in k-space:

rGk

GGkk r �����

)(,

1)( iec�where G = reciprocallattice vector

kx

ky � Only true for periodic systems that grid is discrete.� In principle, still need

infinite number of plane waves.

Page 9: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �15

%���'� ��*� �������(����+�������

� 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:

cu tEm

��

2|| 22 Gk�

kx

E=Ecut

ky

Input parameter �������

Page 10: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �16

��',��*������*�'�-� �'� -�'�

� Must always check.� Monotonic (variational).

Page 11: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

� ��./�0�����*� ��1������'2��#� �

�������������

������������������������ �

Page 12: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �18

3�-� ����'��#� ���#� �

All periodic systems can be specified by a Bravais Lattice and an atomic basis.

+ =

Page 13: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �19

3�-� ����'��#� ��4�������5� �'�6�7�� ����

- Gives the type of Bravais lattice (SC, BCC, Hex, etc.)

Input parameter ����

Input parameters {������� �}- Give the lengths [& directions, if necessary] of 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).

a1

a2

Page 14: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �20

����(� ����7�� ������ 3�-����#��-��8

Input parameter ���

- ����� ��������������� ������� ��� ���������������������-� ������������������������������ ��������������������������������� ����� ����������������������������������������

- Number of atoms in the unit cell

Input parameter ����- Number of types of atoms

FIELD � �!"#$ �!! %�

Page 15: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �21

� ��9/��� �����*�Vnuc

Vnuc �������������

�������������n(r)

���������VH[n] ��VXC[n]

Veff�r���Vnuc(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Page 16: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �22

��'������ � ���

Electrons experience a Coulomb potential due to the nuclei.

This has a known and simple form:

But this leads to computational problems!

rZ

Vnuc �

Page 17: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �23

����������������(���4����

Core wavefunctions:sharply peaked near nucleus.

High Fourier components present

i.e., need large Ecut �

Valence wavefunctions:lots of wiggles near nucleus.

Page 18: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �24

���� ��������������(���4����

Core wavefunctions:sharply peaked near nucleus.

High Fourier components present

i.e., need large Ecut �

Valence wavefunctions:lots of wiggles near nucleus.

"��#����������������core electrons!

Remove wiggles from valence electrons.

Page 19: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �25

������� � ����

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.

Page 20: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �26

������� � ������������� ������������ 9

Go to http://www.quantum-�����������$�����%�����'*+0"1�

Page 21: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �27

������� � ������������� ������������ :

Click on element for which pseudopotential wanted.

Page 22: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �28

������� � ������������� ����������

'������������ �#��� ���gives information about :

� type of exchange-correlation functional

� type of pseudopotential

� e.g.:

Page 23: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �29

���� �)�Vion �������� ����������

� �!"#�$�"!��&�'()*+),*'&�+���-���-���+.$/ '0*+12*' +���-��-���#�3+.$/ ''(4+555' +���-���#�3+.$/

� ���������������� depend on type of pseudopotentials used (should test).

When using ultrasoft pseudopotentials, set ������� = 8-12 � ������� !!

e.g, for calculation on BaTiO3:

Page 24: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �30

���� �)�Vion �������� ����������

Should have same exchange-correlation functional for all pseudopotentials.

input

output

oops!

Page 25: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �31

� ��:/���� ����;��������n(r)

Vion �������������

�������������n(r)

���������VH[n] ��VXC[n]

Veff�r���Vion(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Page 26: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �32

� �� ��*�(�����' ����

���������'��� ��������� �������

Superposition of atomic orbitals

The closer your starting wavefunction is to the true � �����������������5����������5���������������������#��necessarily know to start with!), the fewer the scf iterations needed.

�6���7��������������������������� ���� �������������%��- Plato

Page 27: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �33

� ���<�)�=/����' ����� � ���

Vion �������������

�������������n(r) or �i(r)

���������VH[n] ��VXC[n]

Veff�r���Vnuc(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Note that typeof exchange-correlation chosen while specifying pseudopotential

Page 28: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �34

�+'���*������� ������ � ���

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:

Exc[n] = � n(r) VxcHOM[n(r)] dr

-surprisingly successful!

Generalized Gradient Approximation(s): Include terms involving gradients of n(r)

Replace

�6

��5(�����

(in name of pseudopotential)

(in name of pseudopotential)

Page 29: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �35

� ��>/�0��*�����?� ���

Vion �������������

�������������n(r)

���������VH[n] ��VXC[n]

Veff�r���Vion(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Expensive! �

Page 30: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �36

0��*�����?� ���

Need to diagonalize a matrix of size NPW � NPW

NPW >> Nb = number of bands required = Ne/2 or a little more (for metals).

OK to obtain lowest few eigenvalues. Exact diagonalization is expensive! Use iterative diagonalizers that recast

diagonalization as a minimization problem.Input parameter � ������ 6�� ��

Input parameter ����-which algorithm used for iterative diagonalization

-how many eigenvalues computedfor metals, choose depending on value of �������

Page 31: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �37

� ��@/��-�����*�0��� #

Vion �������������

�������������n(r)

���������VH[n] ��VXC[n]

Veff�r���Vion(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Page 32: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �38

04���������A�������

� Many quantities (e.g., n, E tot) involve sums over k .� In principle, need infinite number of k#�� In practice, sum over a finite number: 9<��* �������� Number needed depends on band structure.� Typically need more k#��������� ��� Need to test convergence wrt k-point sampling.

k

� �F ��

�BZ

wPN

Pk

kk

k )(1

Page 33: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �39

0

nk1, nk2, nk3, k1, k2, k3

K_POINTS { tpiba | automatic | crystal | gamma }

%#������,����� �����

� Special Points: [Chadi & Cohen]Points designed to give quick convergence for particular crystal structures.

� Monkhorst-Pack:Equally spaced mesh in reciprocal space.> ��7��������������������XZ���-�������#\��������XZ�������#\

b1

1st BZb2

���Z ���� ���#5�����>-P mesh:

nk1=nk2=4

shift

Page 34: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

40

�����*�'�-� �4A��������*

Note: Differences in energy usually converge faster than absolute value of total energy because of error cancellation (if supercells & k-points are identical or commensurate).

Madhura Marathe

������������������������ �

Page 35: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

41

��������-� ��B ���

Recall:

For metals, at T=0, this corresponds to (for highest band) an integral over all wave-vectors contained within the Fermi surface, i.e., for highest band, sharp discontinuity in k-space between occupied and unoccupied �� ���������many k-points to reproduce this accurately.

Also can lead to scf convergence problemsbecause of band-crossings above/below Fermi level.

� ��

�occn BZ

n kdPP 33 )(

)2(k

Fermi Surface of Cuiramis.cea.fr

������������������������ �

Page 36: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

42

������������*�C

Problems arise because of sharp discontinuity at Fermi surface / Fermi energy.

�*�� �� this out using a smooth operator!

Will now converge faster w.r.t. number of k-points (but not necessarily to the right answer!)

The larger the smearing, the quicker the convergence w.r.t. number of k-points, but the greater the error introduced.

The trick is to use a clever smearing function so that the error is small.

PhD Comics

������������������������ �

Page 37: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

43

������*�������� ����������

������� ��'����������

���������� ��������������������������������������������������

Instruction: use smearing

Type ofsmearing

������� Smearing width

Methfessel & Paxton, Phys. Rev. B 40, 3616 (1989).Marzari & Vanderbilt, Phys Rev. Lett. 82, 3296 (1999).

������������������������ �

Page 38: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

44

�����*�'�-� �*����)�������*

Gaussian: Methfessel-Paxton:

represents an energy difference of 1 mRy

Madhura Marathe

������������������������ �

Page 39: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

45

�����*�'�-� �,����� ��)�������*�-�� �

R. Gebauer

e.g., for bcc Fe, using 14 �14 � 14 grid:

������������������������ �

Page 40: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �46

� ��D/���',���������*�'� '����

Vion �������������

�������������n(r) or �i(r)

���������VH[n] ��VXC[n]

Veff�r���Vnuc(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Page 41: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �47

%� ��*������'��'����*�'

Compare nth and (n-1)th approximations for density, and see if they are close enough that self-consistency has been achieved.

Examine squared norm of difference between the �� ���������������������������������� �������������be close to zero.

Input parameter ����#���

Page 42: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �48

� ��E/�B�+��*

Vion �������������

�������������n(r) or �i(r)

���������VH[n] ��VXC[n]

Veff�r���Vnuc(r) + VH (r) + VXC (r)

H�i(r) = [-1/2�2 ��Veff(r)] �i(r) ���i �i(r)

�������������n(r) = �i|�i(r)|2

��������������

����� ����!� "����������������������#$������$���%

&����������n(r)

'���

(�

Can take a longtime to reachself-consistency!

Page 43: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �49

B�+��*

� Iterations n of self-consistent cycle:

� Successive approximations to density:

nin(n) � nout(n) � nin(n+1).

� nout(n) fed directly as nin(n+1) }}�~�5���� ���������#��converge.

� Need to mix, take some combination of input and output densities (may include information from several previous iterations).

� Goal is to achieve self consistency (nout = nin ) in as few iterations as possible.

Page 44: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �50

B�+��*�������� ����������

Input parameter � � ��#����

Input parameter � � ��#����

-How much of new density is used at each step-Typically use value between 0.1 & 0.7

-Prescription used for mixing.

Page 45: 2221-5 Hands-on Tutorial on Electronic Structure Computationsindico.ictp.it/event/a10125/session/1/contribution/1/... · 2014-05-05 · 2221-5 Hands-on Tutorial on Electronic Structure

������������������������ �51

�� �� ����� � ��/�%� ������*#

� Perhaps the most important output quantity is the TOTAL ENERGY

� Can use, e.g., to optimize structure

� e.g., for a cubic crystal, where the structure can be specified by a single parameter (side of cube):