[Pw_forum] nscf & LDA+U & poormanwannier

Malgorzata Wierzbowska (Peressi Maria) wierzbom at ts.infn.it
Wed Nov 9 16:44:29 CET 2005


On Wed, 9 Nov 2005, Stefano de Gironcoli wrote:


I followed the 6-step procedure which Stefano suggested.
I attached run_ex25_nscf file
-- maybe usefull for those who like to do such nscf.

I have some questions, which are general for LDA+U with nscf
(not only LDA+U with wannier projectors):

1) which potential is exactly in *.pot file and whether it
   contains "Hubbard-U" contribution

2) shouldn't we run nscf without "+U" to avoid double counting?
   or maybe no matter whether it is there, because the program
   does not call "+U" subroutines

3) If *.pot does not contain "+U" contribution,
    we need maybe the occupation numbers also,
    not only the projectors,
    maybe the potential is calculated from
    the scf-density and scf-Bloch-functions and not from *.pot

4) If *.pot does contain "+U", we should run nscf like it was
    LDA only, but with "+U".pot from scf and we do not need
    to worry about the projectors and the occupation numbers

5) for those who like to put their hands in codes:
    which subroutine is the most essential for nscf?
    I grep on "switch=-1" and do not see much from this.

Gosia



> to set up the scf calculation do the following:
>
> run the scf calculation w/o LDA+U, save the potential
> run poormanwanier, this will build the WF
> run again scf calculation, with projections from file this build the scf 
> potential with LDA+U and pmwf, save it
>
> now
> run non-selfconsistent calculculation with the desired k-points from the scf 
> potential w/o LDA+U, this generate wavefunctions needed to build the WF
> run poormanwannier to get the corresponding WF
> run  non-selfconsistent calculculation  reading projectors from file and scf 
> potential from the calculation WITH LDA+U and pmwf....
>
> not very straighforward but it should work.
>
> stefano
>
>
> Malgorzata Wierzbowska (Peressi Maria) wrote:
>
>> 
>> 
>> How to perform nscf calculation for LDA+U
>> with poormanwannier projectors?
>> 
>> Anybody has already written a routine for the
>> generation of the projectors for each k-point
>> on the desired line with a proper whole-BZ sampling
>> for the wannier transformation?
>> 
>>  Gosia
>> 
>> 
>> 
>> _______________________________________________
>> Pw_forum mailing list
>> Pw_forum at pwscf.org
>> http://www.democritos.it/mailman/listinfo/pw_forum
>
>
>
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
-------------- next part --------------
#!/bin/sh

. ../env
#
# clean TMP_DIR
#
# output in results/
#
if [ ! -d nscf ]; then
   mkdir  nscf
fi
cd nscf


# LDA calculations

cat > feo_lda.in << EOF
FeO 
FeO Wustite whithin LDA+U using standard initial ns matrices
 &control
    calculation = 'scf'
    restart_mode='from_scratch',
    prefix='feo_lda',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS {automatic}
 2 2 2 0 0 0
EOF
$ECHO "  running scf for FeO in LDA+U using standard ns initial matrices...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_lda.in > feo_lda.out
$ECHO " done"


cat > feo_nscf.in << EOF
FeO
FeO Wustite whithin LDA+U with user defined ns + Wannier
 &control
    calculation = 'nscf'
    restart_mode='from_scratch',
    prefix='feo_lda',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS 
         35
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
        0.0000000000        0.1000000000        0.5000000000        1.0000000000
        0.0000000000        0.2000000000        0.5000000000        1.0000000000
        0.0000000000        0.3000000000        0.5000000000        1.0000000000
        0.0000000000        0.4000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.4000000000        1.0000000000
        0.0000000000        0.5000000000        0.3000000000        1.0000000000
        0.0000000000        0.5000000000        0.2000000000        1.0000000000
        0.0000000000        0.5000000000        0.1000000000        1.0000000000
        0.0000000000        0.5000000000        0.0000000000        1.0000000000
        0.0000000000        0.4000000000        0.0000000000        1.0000000000
        0.0000000000        0.3000000000        0.0000000000        1.0000000000
        0.0000000000        0.2000000000        0.0000000000        1.0000000000
        0.0000000000        0.1000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.1000000000        1.0000000000
        0.0000000000        0.0000000000        0.2000000000        1.0000000000
        0.0000000000        0.0000000000        0.3000000000        1.0000000000
        0.0000000000        0.0000000000        0.4000000000        1.0000000000
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
       -0.0666000000        0.1334000000        0.5000000000        1.0000000000
       -0.1332000000        0.2668000000        0.5000000000        1.0000000000
       -0.1998000000        0.4002000000        0.5000000000        1.0000000000
       -0.2664000000        0.5336000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.4000000000        1.0000000000
       -0.3330000000        0.6670000000        0.3000000000        1.0000000000
       -0.3330000000        0.6670000000        0.2000000000        1.0000000000
       -0.3330000000        0.6670000000        0.1000000000        1.0000000000
       -0.3330000000        0.6670000000        0.0000000000        1.0000000000
       -0.2664000000        0.5336000000        0.0000000000        1.0000000000
       -0.1998000000        0.4002000000        0.0000000000        1.0000000000
       -0.1332000000        0.2668000000        0.0000000000        1.0000000000
       -0.0666000000        0.1334000000        0.0000000000        1.0000000000
EOF
$ECHO "  3) running scf for FeO in LDA+U using Wannier projectors...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_nscf.in > feo_nscf.out
$ECHO " done"



#   LDA+U  scf  (atomic and wannier projectors)

cat > feo_standard.in << EOF
FeO 
FeO Wustite whithin LDA+U using standard initial ns matrices
 &control
    calculation = 'scf'
    restart_mode='from_scratch',
    prefix='feo_af',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
    lda_plus_u=.true.  Hubbard_U(2)=4.3, Hubbard_U(3)=4.3,
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
    mixing_fixed_ns = 0
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS {automatic}
 2 2 2 0 0 0
EOF
$ECHO "  running scf for FeO in LDA+U using standard ns initial matrices...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_standard.in > feo_standard.out
$ECHO " done"



cp ~/PWtemp/feo_af.wfc             ~/PWtemp/feo_scf.wfc
cp ~/PWtemp/feo_af.pot             ~/PWtemp/feo_scf.pot
cp ~/PWtemp/feo_af.save            ~/PWtemp/feo_scf.save
cp ~/PWtemp/feo_af.rho             ~/PWtemp/feo_scf.rho
cp ~/PWtemp/feo_af.occup           ~/PWtemp/feo_scf.occup





$ECHO "  2) running poormanwannier post-processing to build Wannier projectors ...\c"
cat > pmw.in << EOF
 &inputpp
    outdir='$TMP_DIR/', 
    prefix='feo_af',
    first_band=9, last_band=20, 
 /
EOF
$PARA_PREFIX $PW_ROOT/bin/pmw.x < pmw.in > pmw.out
$ECHO " done"


cat > feo_wannier.in << EOF
FeO
FeO Wustite whithin LDA+U with user defined ns + Wannier
 &control
    calculation = 'scf'
    restart_mode='from_scratch',
    prefix='feo_af',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
    lda_plus_u=.true., Hubbard_U(2)=4.3, Hubbard_U(3)=4.3,
    U_projection_type='file'
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
    mixing_fixed_ns = 0
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS {automatic}
2 2 2 0 0 0
EOF
$ECHO "  3) running scf for FeO in LDA+U using Wannier projectors...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_wannier.in > feo_wannier.out
$ECHO " done"


cp ~/PWtemp/feo_af.atwfc           ~/PWtemp/feo_scf_pmw.atwfc
cp ~/PWtemp/feo_af.wfc             ~/PWtemp/feo_scf_pmw.wfc
cp ~/PWtemp/feo_af.pot             ~/PWtemp/feo_scf_pmw.pot
cp ~/PWtemp/feo_af.save            ~/PWtemp/feo_scf_pmw.save
cp ~/PWtemp/feo_af.rho             ~/PWtemp/feo_scf_pmw.rho
cp ~/PWtemp/feo_af.occup           ~/PWtemp/feo_scf_pmw.occup


#   LDA+U    nscf  (atomic and wannier projectors)

cat > feo_nscfk.in << EOF
FeO 
FeO Wustite whithin LDA+U using standard initial ns matrices
 &control
    calculation = 'nscf'
    restart_mode='from_scratch',
    prefix='feo_scf',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
    lda_plus_u=.true.  Hubbard_U(2)=4.3, Hubbard_U(3)=4.3,
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
    mixing_fixed_ns = 0
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS 
         35
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
        0.0000000000        0.1000000000        0.5000000000        1.0000000000
        0.0000000000        0.2000000000        0.5000000000        1.0000000000
        0.0000000000        0.3000000000        0.5000000000        1.0000000000
        0.0000000000        0.4000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.4000000000        1.0000000000
        0.0000000000        0.5000000000        0.3000000000        1.0000000000
        0.0000000000        0.5000000000        0.2000000000        1.0000000000
        0.0000000000        0.5000000000        0.1000000000        1.0000000000
        0.0000000000        0.5000000000        0.0000000000        1.0000000000
        0.0000000000        0.4000000000        0.0000000000        1.0000000000
        0.0000000000        0.3000000000        0.0000000000        1.0000000000
        0.0000000000        0.2000000000        0.0000000000        1.0000000000
        0.0000000000        0.1000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.1000000000        1.0000000000
        0.0000000000        0.0000000000        0.2000000000        1.0000000000
        0.0000000000        0.0000000000        0.3000000000        1.0000000000
        0.0000000000        0.0000000000        0.4000000000        1.0000000000
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
       -0.0666000000        0.1334000000        0.5000000000        1.0000000000
       -0.1332000000        0.2668000000        0.5000000000        1.0000000000
       -0.1998000000        0.4002000000        0.5000000000        1.0000000000
       -0.2664000000        0.5336000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.4000000000        1.0000000000
       -0.3330000000        0.6670000000        0.3000000000        1.0000000000
       -0.3330000000        0.6670000000        0.2000000000        1.0000000000
       -0.3330000000        0.6670000000        0.1000000000        1.0000000000
       -0.3330000000        0.6670000000        0.0000000000        1.0000000000
       -0.2664000000        0.5336000000        0.0000000000        1.0000000000
       -0.1998000000        0.4002000000        0.0000000000        1.0000000000
       -0.1332000000        0.2668000000        0.0000000000        1.0000000000
       -0.0666000000        0.1334000000        0.0000000000        1.0000000000
EOF
$ECHO "  running scf for FeO in LDA+U using standard ns initial matrices...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_nscfk.in > feo_nscfk.out
$ECHO " done"



$ECHO "  2) running poormanwannier post-processing to build Wannier projectors ...\c"
cat > pmw_nscf.in << EOF
 &inputpp
    outdir='$TMP_DIR/', 
    prefix='feo_scf',
    first_band=9, last_band=20, 
 /
EOF
$PARA_PREFIX $PW_ROOT/bin/pmw.x < pmw_nscf.in > pmw_nscf.out
$ECHO " done"

cp ~/PWtemp/feo_scf.atwfc   ~/PWtemp/feo_scf_pmw.atwfc


cat > feo_wannier_nscfk.in << EOF
FeO
FeO Wustite whithin LDA+U with user defined ns + Wannier
 &control
    calculation = 'nscf'
    restart_mode='from_scratch',
    prefix='feo_scf_pmw',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system
    ibrav=  0, celldm(1)=8.19, nat=  4, ntyp= 3,
    ecutwfc = 30.0, ecutrho = 240.0, nbnd=20,
    starting_magnetization(1)= 0.0,
    starting_magnetization(2)= 0.5, 
    starting_magnetization(3)=-0.5,
    occupations='smearing', smearing='gauss', degauss=0.01,
    nspin=2,
    lda_plus_u=.true., Hubbard_U(2)=4.3, Hubbard_U(3)=4.3,
    U_projection_type='file'
 /
 &electrons
    mixing_mode = 'plain'
    mixing_beta = 0.3 
    conv_thr =  1.0d-6
    mixing_fixed_ns = 0
 /
CELL_PARAMETERS
0.50 0.50 1.00
0.50 1.00 0.50
1.00 0.50 0.50
ATOMIC_SPECIES
 O1   1.  O.LDA.US.RRKJ3.UPF
 Fe1  1.  Fe.pz-nd-rrkjus.UPF
 Fe2  1.  Fe.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS {crystal}
 O1  0.25 0.25 0.25
 O1  0.75 0.75 0.75
 Fe1 0.0  0.0  0.0 
 Fe2 0.5  0.5  0.5
K_POINTS 
         35
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
        0.0000000000        0.1000000000        0.5000000000        1.0000000000
        0.0000000000        0.2000000000        0.5000000000        1.0000000000
        0.0000000000        0.3000000000        0.5000000000        1.0000000000
        0.0000000000        0.4000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.5000000000        1.0000000000
        0.0000000000        0.5000000000        0.4000000000        1.0000000000
        0.0000000000        0.5000000000        0.3000000000        1.0000000000
        0.0000000000        0.5000000000        0.2000000000        1.0000000000
        0.0000000000        0.5000000000        0.1000000000        1.0000000000
        0.0000000000        0.5000000000        0.0000000000        1.0000000000
        0.0000000000        0.4000000000        0.0000000000        1.0000000000
        0.0000000000        0.3000000000        0.0000000000        1.0000000000
        0.0000000000        0.2000000000        0.0000000000        1.0000000000
        0.0000000000        0.1000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.0000000000        1.0000000000
        0.0000000000        0.0000000000        0.1000000000        1.0000000000
        0.0000000000        0.0000000000        0.2000000000        1.0000000000
        0.0000000000        0.0000000000        0.3000000000        1.0000000000
        0.0000000000        0.0000000000        0.4000000000        1.0000000000
        0.0000000000        0.0000000000        0.5000000000        1.0000000000
       -0.0666000000        0.1334000000        0.5000000000        1.0000000000
       -0.1332000000        0.2668000000        0.5000000000        1.0000000000
       -0.1998000000        0.4002000000        0.5000000000        1.0000000000
       -0.2664000000        0.5336000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.5000000000        1.0000000000
       -0.3330000000        0.6670000000        0.4000000000        1.0000000000
       -0.3330000000        0.6670000000        0.3000000000        1.0000000000
       -0.3330000000        0.6670000000        0.2000000000        1.0000000000
       -0.3330000000        0.6670000000        0.1000000000        1.0000000000
       -0.3330000000        0.6670000000        0.0000000000        1.0000000000
       -0.2664000000        0.5336000000        0.0000000000        1.0000000000
       -0.1998000000        0.4002000000        0.0000000000        1.0000000000
       -0.1332000000        0.2668000000        0.0000000000        1.0000000000
       -0.0666000000        0.1334000000        0.0000000000        1.0000000000
EOF
$ECHO "  3) running scf for FeO in LDA+U using Wannier projectors...\c"
$PARA_PREFIX $PW_ROOT/bin/pw.x < feo_wannier_nscfk.in > feo_wannier_nscfk.out
$ECHO " done"







More information about the Pw_forum mailing list