Example: Main NEGF flavors¶
This example shows how to use the NEGF functionality.
It starts of with Method 1: the non-self consistent approach. Here, BAND merely serves to provide matrix elements, being unaware of the electrodes.
Then follows Method 2: here the NEGF density is really used to calculate the matrix elements.
Method 3 is a variation on Method 2, and includes an extra alignment run.
Setting up a NEGF calculation is quite hard without the GUI.
#! /bin/sh
# ===================================================================================================
# Method #1: non-self consistent NEGF (uses the conductance program, like DFTB)
# ===================================================================================================
# ====================================== Method #1. Run #1 ======================================
"$ADFBIN/band" <<eor
Title method_1_run_1
KSpace
Quality Good
End
NumericalQuality Basic
Units
length Angstrom
END
ATOMS
Cr.1 0.0 0.0 0.0
Cr.2 2.5 0.0 0.0
END
Lattice
5.0 0.0 0.0
End
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
StoreHamiltonian2
end input
eor
mv RUNKF lead.runkf
# ====================================== Method #1. Run #2 ======================================
"$ADFBIN/band" <<eor
Title method_1_run_2
NumericalQuality Basic
Units
length Angstrom
END
ATOMS
Cr.1L -10.0 0.0 0.0
Cr.2L -7.5 0.0 0.0
Cr.C -5.0 0.0 0.0
Cr.C -2.5 0.0 0.0
Cr.C 0.0 0.0 0.0
Cr.C 2.5 0.0 0.0
Cr.C 5.0 0.0 0.0
Cr.1R 7.5 0.0 0.0
Cr.2R 10.0 0.0 0.0
END
Lattice
22.5 0.0 0.0
End
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
StoreHamiltonian2
StoreHamAsMol
end input
eor
mv RUNKF scattering.runkf
# ====================================== Method #1. Run #3 ======================================
$ADFBIN/conductance <<EOF
EnergyGrid min=-5 max=5 num=200
Files
Leads lead.runkf
Scattering scattering.runkf
End
end input
EOF
mv scattering.runkf RUNKF
$ADFBIN/cpkf "ConductanceResults.kf" "RUNKF" "results --rename NEGF"
echo 'StartTestingMe'
echo "Method 1. Transmission"
$ADFBIN/adfreport RUNKF -r "NEGF%transmission#12.5f##1"
echo 'StopTestingMe'
rm RUNKF
# ===================================================================================================
# Method #2: self consistent NEGF without alignment
# ===================================================================================================
# ====================================== Method #2. Run #1 ======================================
"$ADFBIN/band" <<eor
Title method_2_run_1
KSpace
Quality Good
End
NumericalQuality Basic
UNITS
length Angstrom
END
ATOMS
Cr.1 0.0 0.0 0.0
Cr.2 2.5 0.0 0.0
END
Lattice
5.0 0.0 0.0
End
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
StoreHamiltonian2
end input
eor
# ====================================== Method #2. Run #2 ======================================
$ADFBIN/sgf << eor
TITLE Test for NEGF inputs
SAVE SIGMA
SURFACEGF
SCMCode
KT 0.001
ContourQuality normal
END
eor
mv RUNKF TB.runkf
mv SigmaSCM Sigma.runkf
# ====================================== Method #2. Run #3 ======================================
"$ADFBIN/band" <<eor
Title method_2_run_3
NumericalQuality Basic
UNITS
length Angstrom
END
ATOMS
Cr.1L -10.0 0.0 0.0
Cr.2L -7.5 0.0 0.0
Cr.C -5.0 0.0 0.0
Cr.C -2.5 0.0 0.0
Cr.C 0.0 0.0 0.0
Cr.C 2.5 0.0 0.0
Cr.C 5.0 0.0 0.0
Cr.1R 7.5 0.0 0.0
Cr.2R 10.0 0.0 0.0
END
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
NEGF
LeadFile TB.runkf
SGFFile Sigma.runkf
ApplyShift2 False
ContourQuality normal
EMin -0.1837465475
EMax 0.1837465475
NE 200
End
end input
eor
echo 'StartTestingMe'
echo "Method 2. Transmission"
$ADFBIN/adfreport RUNKF -r "NEGF%transmission#12.5f##1"
echo 'StopTestingMe'
rm RUNKF
# ===================================================================================================
# Method #3: self consistent NEGF with alignment run
# ===================================================================================================
# ====================================== Method #3. Run #1 ======================================
"$ADFBIN/band" <<eor
Title method_3_run_1
KSpace
Quality Good
End
NumericalQuality Basic
UNITS
length Angstrom
END
ATOMS
Cr.1 0.0 0.0 0.0
Cr.2 2.5 0.0 0.0
END
Lattice
5.0 0.0 0.0
End
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
StoreHamiltonian2
end input
eor
# ====================================== Method #3. Run #2 ======================================
$ADFBIN/sgf << eor
TITLE Test for NEGF inputs
SAVE SIGMA
SURFACEGF
SCMCode
KT 0.001
ContourQuality normal
END
eor
mv RUNKF TB.runkf
mv SigmaSCM Sigma.runkf
# ====================================== Method #3. Run #3 ======================================
"$ADFBIN/band" <<eor
Title method_3_run_3
NumericalQuality Basic
UNITS
length Angstrom
END
ATOMS
Cr.1L 0.0 0.0 0.0
Cr.2L 2.5 0.0 0.0
Cr.C 5.0 0.0 0.0
Cr.C 7.5 0.0 0.0
Cr.C 10.0 0.0 0.0
Cr.C 12.5 0.0 0.0
Cr.1R 15.0 0.0 0.0
Cr.2R 17.5 0.0 0.0
END
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
NEGF
DoAlignment True
LeadFile TB.runkf
SGFFile Sigma.runkf
ContourQuality normal
EMin -0.1837465475
EMax 0.1837465475
NE 200
AlignChargeTol 0.0001
End
end input
eor
mv RUNKF align.runkf
# ====================================== Method #3. Run #4 ======================================
"$ADFBIN/band" <<eor
Title method_3_run_4
NumericalQuality Basic
UNITS
length Angstrom
END
ATOMS
Cr.1L -10.0 0.0 0.0
Cr.2L -7.5 0.0 0.0
Cr.C -5.0 0.0 0.0
Cr.C -2.5 0.0 0.0
Cr.C 0.0 0.0 0.0
Cr.C 2.5 0.0 0.0
Cr.C 5.0 0.0 0.0
Cr.1R 7.5 0.0 0.0
Cr.2R 10.0 0.0 0.0
END
BasisDefaults
BasisType DZ
Core Large
End
Unrestricted
NEGF
LeadFile TB.runkf
SGFFile Sigma.runkf
AlignmentFile align.runkf
ContourQuality normal
EMin -0.1837465475
EMax 0.1837465475
NE 200
End
end input
eor
echo 'StartTestingMe'
echo "Method 3. Transmission"
$ADFBIN/adfreport RUNKF -r "NEGF%transmission#12.5f##1"
echo 'StopTestingMe'
rm RUNKF