TABLE OF CONTENTS


16-hp

DESCRIPTION

This examples demonstrates how PWTK facilitates the calculation of Hubbard U parameters with the hp.x code for the antiferomagnetic insulator. This example is adopted from HP/examples/exemple02 of Quantum ESPRESSO. The system considered is bulk NiO.

The calculation of Hubbard U parameters for the antiferomagnetic insulator is a three-step process:

1. Perform an SCF calculation by treating the system as a fake magnetic metal with occupations = 'smearing' and starting_magnetization. This way we obtain the total magnetization of the system.

2. Perform an SCF calculation by treating the system as a magnetic insulator using the total magnetization obtained in the 1st step. Set the number of bands to the number used in the 1st step.

3. Perform the linear-response calculation with hp.x to obtain the U parameters. In this example, the convergence of U parameters with respect to q-points is tested.

BEWARE

This example takes long time to finish particulalry for the q = (4 x 4 x 4) mesh.

EXAMPLE SOURCE FILE

hp.pwtk

SOURCE

# the pw.x input data for NiO bulk

CONTROL { pseudo_dir = '.'  outdir = '.'  prefix = 'NiO' }
SYSTEM {
    ibrav = 0  celldm(1) = 7.88  nat = 4  ntyp = 3
    ecutwfc = 50.0  ecutrho = 400.0
    occupations = 'smearing'  smearing = 'gauss'  degauss = 0.001
    nspin = 2
    starting_magnetization(Ni1) =  0.5
    starting_magnetization(Ni2) = -0.5
}
ELECTRONS { conv_thr = 1.d-10  mixing_beta = 0.7 }
ATOMIC_SPECIES {
    Ni1  58.693  Ni.pbesol-n-rrkjus_psl.0.1.UPF
    Ni2  58.693  Ni.pbesol-n-rrkjus_psl.0.1.UPF
    O    16.000  O.pbesol-n-rrkjus_psl.0.1.UPF
}
CELL_PARAMETERS {alat} {
    1.00000000  0.50000000  0.50000000
    0.50000000  1.00000000  0.50000000
    0.50000000  0.50000000  1.00000000
}
ATOMIC_POSITIONS {alat} {
    Ni1  0.0000000   0.0000000   0.0000000
    Ni2  0.5000000   0.5000000   0.0000000
    O    0.5000000   0.0000000   0.0000000
    O    1.0000000   0.5000000   0.0000000
}
K_POINTS {automatic} { 2 2 2  0 0 0 }
HUBBARD {ortho-atomic} {
    U Ni1-3d 0.0001
    U Ni2-3d 0.0001
}

# the hp.x input data

INPUTHP {
    nq1 = 2  nq2 = 2  nq3 = 2
    conv_thr_chi = 1.0d-8   iverbosity = 2
}    


# run the 1st SCF calculation: smearing

set pwo [runPW scf.smear.NiO]


# prepare the 2nd SCF calculation: no-smearing
#
# extract the number of Kohn-Sham states & total magnetization from
# the previous SCF run (N.B. pwo_nbnd & pwo_totmag are shortcuts to
# ::pwtk::pwo::nbnd & ::pwtk::pwo::totmag)

set nbnd   [pwo_nbnd $pwo]
set totmag [pwo_totmag $pwo]

SYSTEM "nbnd = $nbnd  tot_magnetization = round($totmag)"

# this is how namelist variables are deleted in PWTK

SYSTEM {
    occupations = 
    smearing = 
    degauss = 
    starting_magnetization(Ni1) = 
    starting_magnetization(Ni2) = 
}

# run the 2nd SCF calculation: no-smearing
# (i.e. rerun SCF with the new setup)

rerunPW scf.nosmear.NiO


# Perform the linear-response calculations
# (i.e. test the convergence of U parameters wrt q-points)

scanpar q {2 3 4} {
    INPUTHP " nq1 = $q  nq2 = $q  nq3 = $q "
    runHP hp.NiO.q${q}x${q}x${q}
}