Nb(110)/Ni/Nb(110) Metallic Trilayers, Landauer-Buttiker Transport and Andreev levels
Note: this tutorial is under construction.
This tutorial’s ultimate objective is to compute the Andreev levels induced by a thin ferromagnetic Ni layer sandwiched between superconducting Nb leads. It uses electronic structure codes that make the Atomic Spheres Approximation. It uses a Landauer-Buttiker technique to compute the scattering matrix SN in the normal state, for Nb/Ni/Nb trilayers with Nb stacked along the [110] direction. Fron SN it computes the Andreev levels which appear when Nb makes a transition to the superconducting state.
There is a related tutorial concerning Landauer-Buttiker transmission through a Nb(001)/Fe/Nb(001) trilayer; the setup of the trilayer is a bit simpler to manage in this case since we handle the lattice mismatch between Nb and Ni in a less elaborate manner than was done for the Nb/Fe case.
This tutorial demonstrates transport for two crystal orientations: the first part deals with Nb(110)/Ni(110)/Nb(110) trilayers, the latter with more complex Nb(110)/Ni(111)/Nb(110) trilayer (the orientation corresponding to growth conditions of actual trilayers).
The first part this tutorial builds a relaxed Nb(2)/Ni(4n)/Nb(2) superlattice, where the atoms were relaxed in a constrained manner, allowing only the Ni and Nb frontier atoms to move. In Section 5 the superlattice is converted to a stacked trilayer, for which transmission calculations are performed.
The second part is similar in spirit to the first, but it starts from a Nb(2)/Ni(3)/Nb(2) superlattice where the Nb and Ni stacking directions are [110] and [111], respectively. Requiring that the planes of Nb normal to [110] be coincident with Ni planes normal to [111] significantly complicates the matter. Finally the superlattice is converted to a stacked trilayer, for which transmission calculations are performed.
For both orientations the relaxed positions are taken as an input. Supercells were relaxed in each case, using the full-potential code lmf. It supplies lattice displacements relative to the ideal geometry, which is taken as input in this tutorial. How the relaxation is accomplished for the Nb(110)/Ni(111)/Nb(110) supercell is explained in this tutorial.
Table of Contents
- Preliminaries
- Introduction and Basic Strategy
- 1. Self-consistent ASA-LDA energy bands for Nb and Ni with [110] rotated to the z axis
- 2. Setup for for even-Ni-plane superlattices
- 3. Site files for even-plane superlattice of variable length
- 4. Self-consistent ASA band calculation of the Nb(6)/Ni(20)/Nb(6) superlattice
- 5. Self-consistent Green’s function calculation of the Nb(6)/Ni(20)/Nb(6) trilayer
- 6. Self-consistent layer Green’s function calculation of the Nb(6)/Ni(24)/Nb(6) trilayer
- 7. Setup for for odd-Ni-plane superlattices
- 8. Site files for odd-plane superlattices
- 9. Self-consistent ASA band calculation of the Nb(6)/Ni(10)/Nb(6) superlattice
- 10. Setup for the Nb(110)/Ni(111)/Nb(110) trilayer
- Footnotes and references
Sections build on prior sections, though any section can be treated independently by copying all the files indicated in the instructions at the beginning of the section.
Section 1. Nb and Ni reoriented along the [110] direction and self-consistent ASA calculation
Creates files related to elemental Nb site20.nb, rsta20.nb, site[ab].nb, and and files related to elemental Ni: site42.ni, rsta42.ni, site[abc].ni.
Requires files init.nb and init.ni. Setup:
touch init.ni; rm -f *.nb *.ni; cp ~/lmf/pgf/test/nbni/init.{nb,ni} .
Create site4.nb, rsta4.nb, site2a.nb and site2b.nb
blm --nfile -va=6.643 --nl=3 --nk=12,12,12 --asa nb > out.blm
cat actrl.nb | sed 's/LMX=2/LMX=2 GRP2=1/' | awk '{ if ($1 == "OPTIONS") {print "HAM PMIN=-1"}; print}' > ctrl.nb
lmchk ctrl.nb --wspec > out.lmchk.nb
lmstr nb >/dev/null
lm ctrl.nb -vnit=0 > /dev/null
mpix -n 8 lm -vmet=3 ctrl.nb > out.lm.nb
lmscell --rot~x:-pi/4 --plx~m~0,1,1,0,-1,1,2,1,1 nb --wsite~short~fn=site4 --sort:'x3 x2' > out.lmscell.nb
lmstr nb -vfile=4 >/dev/null
mpix -n 8 lm ctrl.nb -vmet=3 -vfile=4 -vnk1=12 -vnk2=8 -vnk3=8 --rs=0,1 > out.lm.nb
lmscell ctrl.nb -vfile=4 --stack~rsasa~wsite@nosite@rsasa=rsta4.nb >> out.lmscell.nb
lmscell -vfile=4 ctrl.nb '--stack~rmsite@targ=3,4~pad@0,0,-1/sqrt(2)~wsite@fn=site2a' >> out.lmscell.nb
lmscell -vfile=4 ctrl.nb '--stack~rmsite@targ=1,2~addpos@dx=0,0,-1/sqrt(2)~pad@0,0,-1/sqrt(2)~wsite@fn=site2b' >> out.lmscell.nb
Create site4.ni, rsta4.ni; create site2a.ni and site2b.ni.
blm --nfile --nl=3 --nk=12,12,12 --asa --mag ni > out.blm.ni
cat actrl.ni | sed 's/\(MMOM.*\)/\1 GRP2=1/' | awk '{ if ($1 == "OPTIONS") {print "HAM PMIN=-1"; print "BZ INVIT=F"}; print}' > ctrl.ni
lmchk ctrl.ni --wspec > out.lmchk.ni
lmscell --rot~x:-pi/4 --plx~m~1,1,-1,2,-2,0,0,0,1 ni --wsite~short~fn=site4 --sort:'x3 x2' > out.lmscell.ni
lmstr ni -vfile=4 >/dev/null
mpix -n 8 lm ctrl.ni -vbeta=.1 -vmet=3 -vfile=4 -vnit=-30 -vnk1=12 -vnk2=8 -vnk3=17 --rs=0,1 > out.lm.ni
lmscell ctrl.ni -vfile=4 --stack~rsasa~wsite@nosite@rsasa=rsta4.ni >> out.lmscell.ni
lmscell -vfile=4 ctrl.ni '--stack~rmsite@targ=3,4~pad@0,0,-1/2/sqrt(2)~wsite@fn=site2a' >> out.lmscell.ni
lmscell -vfile=4 ctrl.ni '--stack~rmsite@targ=1,2~addpos@dx=0,0,-1/2/sqrt(2)~pad@0,0,-1/2/sqrt(2)~wsite@fn=site2b' >> out.lmscell.ni
Section 2. ctrl and template site files for (Nb(6)/Ni(8)/Nb(6) superlattice, and ES insertion files
Make ctrl.nbni and site4.nbni, and ES site files esitee1.nbni and esitee2.nbni needed for the two frontier layers.
Requires files site8.fp, dposx.6+8+6, spec.nb and spec.ni. Setup:
cp ~/lmf/pgf/test/nbni/site8.fp site1.nbni; cp ~/lmf/pgf/test/nbni/dposx.6+8+6 dposx.nbni
cp ~/lmf/pgf/test/nbni/spec.{nb,ni} .
Make ctrl.nbni and site4.nbni; extract ES sites at interfaces 1 and 2 to make esitee1.nbni and esitee2.nbni
rm -f out.blm out.lmchk out.lmscell
blm --nl=3 --nfile --ewald=1d-12 --rdsite=site1 --rdpos=dposx --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2 >> out.blm
cp actrl.nbni ctrl.nbni
lmscell nbni --omax=.18,.24,.26 --stack~resize@shorten=0,0,1@lock=1:4@mino~omax=.185,.26,.26~resize@lock=1,4@mino@dup=1~wspec~wsite@fn=site4 >> out.lmscell
blm --nfile --ewald=1d-12 --rdsite=site4 --rdspec~fn=spec --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni omax=.185,.26,.26 --asa~pfree~rmaxs=7.2 --wsite~none --ctrl=ctrl --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2' >> out.blm
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3<1.4~wsite@fn=esitee1' >> out.lmscell
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3>1.4~wsite@fn=esitee2' >> out.lmscell
Section 3. Site files for even-Ni-plane superlattices and trilayers
Makes ASA site files site{n}.nbni for n=8,12,16,…32.
Requires files ctrl.6+8+6, site8.fp, dposx.6+8+6, spec.{nb,ni}, esitee[12].nbni, site4.ni Setup:
cp ~/lmf/pgf/test/nbni/site8.fp site1.nbni
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni
cp ~/lmf/pgf/test/nbni/dposx.6+8+6 dposx.nbni
cp ~/lmf/pgf/test/nbni/{spec.{nb,ni},esitee[12].nbni,site4.ni} .
Make first in series, site8.nbni; make series induction (tcsh shell); find and add principal layer indices (tcsh shell)
lmscell -vfile=1 '-vdy=1/2/sqrt(2)' ctrl.nbni --rdpos=dposx --stack~file@esitee2@insert=15@scale3=0~file@esitee1@insert=7@scale3=0~initpl@left=1:2@right=nbas-1:nbas~wsite@fn=site8 >> out.lmscell
foreach j ( 8 12 16 20 24 28)
@ i = $j + 4
lmscell -vdy='1/2/sqrt(2)' -vfile=$j ctrl.nbni --stack~file@site4.ni@dpos=0,dy,'5.5*dy'@xinsert=13~setrlx@targ=13:16@rlx=0~initpl@left=1:2@right=nbas-1:nbas~show@planes~wsite@fn=site$i >> out.lmscell
end
foreach j ( 8 12 16 20 24 28)
lmscell -vpgf=1 -vfile=$j ctrl.nbni --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site$j >> out.lmscell
end
Section 4. Self-consistent ASA band calculation of the Nb(6)/Ni(20)/Nb(6) superlattice
Requires files ctrl.6+8+6 site20.nbni, nb.nb, ni.ni. Setup:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni; cp ~/lmf/pgf/test/nbni/site20.nbni .
touch nb.nbni ni.nbni; rm -f nb*.nbni ni*.nbni e*.nbni mixm.nbni psta.nbni sv.nbni
cp ~/lmf/pgf/test/nbni/nb.nb nb.nbni; cp ~/lmf/pgf/test/nbni/nb.nb nbx.nbni
cp ~/lmf/pgf/test/nbni/ni.ni ni.nbni; cp ~/lmf/pgf/test/nbni/ni.ni nix.nbni
Make psta.nbni; make the superlattice self-consistent and remake psta with the self-consistent density
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
rm -f mixm.nbni psta.nbni sv.nbni
lmstr -vfile=20 nbni > /dev/null
lm -vfile=20 nbni -vnit=0 --rs=0,1 >> out.lm
lm -vfile=20 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f >> out.lm
mpix -n 8 lm -vbeta=.1 -vconvc=1e-6 -vmet=3 -vfile=20 nbni -vccor=f -vnit=50 -vscr=2 --zerq~all~qout --pr40,21 --rs=0,1 >> out.lm
lm -vfile=20 nbni --rsedit~rs~save@fn=rsta20~q >> out.lm
lm -vfile=20 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f >> out.lm
mcx -f12f12.6 -r:open psta.nbni psta.nbni -+ -s1/2 > psta.avg
Section 5. Self-consistent Green’s function calculation of the Nb(6)/Ni(20)/Nb(6) trilayer
Requires files ctrl.6+8+6 site20.nbni, psta.20, rsta20.lm. Setup:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni; cp ~/lmf/pgf/test/nbni/psta.20 psta.nbni
cp ~/lmf/pgf/test/nbni/{site20.nbni,rsta20.lm} .
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
touch nb.nbni
rm -f nb*.nbni ni*.nbni e*.nbni *bc*.nbni* mixm.nbni vshft.nbni sv.nbni
lmstr -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t > /dev/null
Convert rsta20.lm to trilayer form suitable for lmpg; make initial potential parameters; make end layers and active region each self-consistent.
rm -f out.lmpg
lmpg -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rsedit~rs@3d@fn=rsta20.lm~save~q >> out.lmpg
lmpg -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rs=1,0 >> out.lmpg
lmpg -vpgf=2 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=30 -vscr=0 --pr40,21 -vgamma=t >> out.lmpg
mpix -n 8 lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=50 -vscr=2 --pr40,21 -vgamma=t --rs=0,1 >> out.lmpg
lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=2 --pr40,21 -vgamma=t --rsedit~rs~save@fn=rsta20~q >> out.lmpg
mpix -n 8 lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=-1 -vscr=14 --pr40,21 -vgamma=t --rs=1,0 >> out.lmpg
Section 6. Self-consistent layer Green’s function calculation of the Nb(6)/Ni(24)/Nb(6) trilayer
Requires files ctrl.6+8+6,site24.nbni,psta.20,rsta20.lmpg,rsta4.ni, vshft.20, batch20. Setup:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni; cp ~/lmf/pgf/test/nbni/rsta20.lmpg rsta.nbni
cp ~/lmf/pgf/test/nbni/{site24.nbni,rsta4.ni,psta.20,batch20} .
cp ~/lmf/pgf/test/nbni/vshft.20 vshft.nbni
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
set nni=20
mcx -f12f12.6 -vnni=20 -vm=nni/2+10 '-vn=66+3*nni' psta.20 -a p0 p0 -sub n/2+1,n/2+12,1,n/2 -a i1 p0 -sub 1,n/2,n/2+1,n/2+12 -a i2 p0 -sub n/2+1,n/2+12,n/2+1,n -a i3 p0 -sub n/2+1,n,n/2+1,n/2+12 -a i4 p0 -sub n/2+1,n/2+12,n/2+1,n/2+12 -a i5 p0 -split p 1,n/2+1,n+1 1,n/2+1,n+1 p11 i2 p12 i1 i5 i3 p21 i4 p22 '-sarray[3,3]' > psta.24
cp psta.24 psta.nbni
Estimate psta.nbni from psta.20; Estimate rsta.nbni from rsta20.lmpg; further initialization.
lmscell -vpgf=1 ctrl.nbni -vfile=24 -vnb=file+18 --stack~batch=batch20 >> out.lmscell
cp rsta2 rsta.nbni
touch nb.nbni ; rm -f nb*.nbni ni*.nbni e*.nbni *bc*.nbni* mixm.nbni sv.nbni
lmstr -vpgf=1 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t > /dev/null
Make end layers and active region self-consistent; make a compact form of the rsta file
lmpg -vpgf=1 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rs=1,0 >> out.lmpg
lmpg -vpgf=2 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=30 -vscr=0 --pr40,21 -vgamma=t >> out.lmpg
mpix -n 8 lmpg -vbeta=.1 -vpgf=1 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=100 -vscr=2 --pr40,21 -vgamma=t --rs=0,1 >> out.lmpg
lmpg -vpgf=1 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=2 --pr40,21 -vgamma=t --rsedit~rs~save@fn=rsta24~q
Section 7. Setup for for odd-Ni-plane superlattices
Requires files ctrl.6+8+6,site24.nbni,psta.20,rsta20.lmpg,rsta4.ni, vshft.20, batch20. Setup:
cp ~/lmf/pgf/test/nbni/site6.fp site1.nbni; cp ~/lmf/pgf/test/nbni/dposx.6+6+6 dposx.nbni
cp ~/lmf/pgf/test/nbni/spec.{nb,ni} .
Make ctrl.nbni and site4.nbni, and ES site files esiteo1.nbni and esiteo2.nbni needed for the two frontier layers.
blm --nl=3 --nfile --ewald=1d-12 --rdsite=site1 --rdpos=dposx --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag --mixs=B4,b=\{beta\},k=4 nbni --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2 >> out.blm
cp actrl.nbni ctrl.nbni
lmscell nbni --stack~resize@shorten=0,0,1@lock=1:4@mino~omax=.18,.24,.25~resize@lock=1:4@mino~resize@lock=1:4@mino~wspec~wsite@short@fn=site4 --omax=.18,.24,.26 --asa~pfree~rmaxs=7.2 >> out.lmscell
blm --nfile --ewald=1d-12 --rdsite=site4 --rdspec~fn=spec --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni --asa~pfree~rmaxs=7.2 --convp --wsite~none --ctrl=ctrl --omax=.18,.24,.26 --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2' >> out.blm
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3<1.4~wsite@fn=esiteo1' >> out.lmscell
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3>1.4~wsite@fn=esiteo2' >> out.lmscell
Section 8. Site files for odd-plane superlattices
Requires files ctrl.6+6+6, site6.fp, dposx.6+6+6, spec.{nb,ni}, esiteo[12].nbni, site4.ni
cp ~/lmf/b/./pgf/test/nbni/site6.fp site1.nbni
cp ~/lmf/b/./pgf/test/nbni/ctrl.6+6+6 ctrl.nbni
cp ~/lmf/b/./pgf/test/nbni/dposx.6+6+6 dposx.nbni
cp ~/lmf/b/./pgf/test/nbni/{spec.{nb,ni},esiteo[12].nbni,site4.ni} .
Make site6.nbni, then site{10,14,18} (tcsh shell)
rm -r out.lmscell
lmscell -vfile=1 '-vdy=1/2/sqrt(2)' ctrl.nbni --rdpos=dposx --stack~file@esiteo2@insert=13@scale3=0~file@esiteo1@insert=7@scale3=0~initpl@left=1:2@right=nbas-1:nbas~wsite@fn=site6 >> out.lmscell
foreach j (6 10 14)
@ i = $j + 4
lmscell -vdy='1/2/sqrt(2)' -vfile=$j ctrl.nbni --stack~file@site4.ni@dpos=0,dy,'5.5*dy'@xinsert=14~setrlx@targ=14:17@rlx=0~initpl@left=1:2@right=nbas-1:nbas~show@planes~wsite@fn=site$i >> out.lmscell
end
foreach j ( 6 10 14)
lmscell -vpgf=1 -vfile=$j ctrl.nbni --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site$j >> out.lmscell
end
Section 9. Self-consistent ASA band calculation of the Nb(6)/Ni(10)/Nb(6) superlattice
Setup:
cp ~/lmf/b/./pgf/test/nbni/ctrl.6+6+6 ctrl.nbni
cp ~/lmf/b/./pgf/test/nbni/site10.nbni .
touch nb.nbni
rm -f nb*.nbni ni*.nbni e*.nbni mixm.nbni
cp ~/lmf/pgf/test/nbni/nb.nb nb.nbni; cp ~/lmf/pgf/test/nbni/nb.nb nbx.nbni; cp ~/lmf/pgf/test/nbni/ni.ni ni.nbni; cp ~/lmf/pgf/test/nbni/ni.ni nix.nbni
First guess at density from elemental Nb and Ni atom files
lm -vfile=10 nbni -vnit=0 --rs=0,1
lmstr -vfile=10 nbni > /dev/null
lm -vfile=10 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f >> out.lm
mpix -n 16 lm -vconvc=1e-6 -vmet=3 -vfile=10 nbni -vccor=f -vnit=50 -vscr=2 --zerq~all~qout --pr40,21 --rs=0,1 > out.lm
lm -vfile=10 nbni --rsedit~rs~save@fn=rsta10~q
{::comment}
Sanity checks
mcx -cmpf:fn1=rsta10.nbni:fn2=~/lmf/pgf/test/nbni/rsta10.lm
{:/comment}
Sanity check: compare _rsta10.nbni_{:.path} file against the distribution file:
Section 10 (Start of Nb(110)/Ni(111)/Nb(110) trilayer) : Nb [110] and [111] rotated to [001]
Creates files ctrl.asa3, site2.asa3, site3.asa3, sitea.nb, sitea.ni.
Setup
cp ~/lmf/pgf/test/nbni-111/{pos6.nbni,site0.nbni,spec.nb,spec.ni} .
Make an initial template ctrl file, expand species and find E sites; contract species and add PL indices
blm nbni --nl=3 --nfile --rdsite=site0 --rpos=pos6 --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=9,4,2 --mag --mixs=B4,b=beta,k=4 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2 --wsite~ib=1:10,35:48,73:82~rlx=000~long --ssort --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2' >> out.blm
cp actrl.nbni ctrl.nbni
lmchk ctrl.nbni --rpos=pos6 '--findes~shorten=0,0,1~rmin=.80~spec=3,4~lock=1,2~omaxi=0.12~includep=x3>.7&x3<1.3|x3>2.5&x3<3.1~nesmx=12~mino~resize=20' --wspec --wsite=site1 --omax=.20,.24,.30 >> out.lmchk
awk '/SPEC/{while(getline line<"spec.nbni"){print line}} //' ctrl.nbni > ctrl.asa3
cp site1.nbni site1.asa3
lmscell --pr20 ctrl.asa3 --omax=.20,.24,.30 -vfile=1 '--stack~resize@lock=1,2@resize=20@mino@dup=3@sren@gran^tol=.015^lst=3:12@gran^lst=13:22@gran^lst=23:36@gran^lst=37:50@gran^lst=51:62~omax=.20,.25,.30~resize@lock=1,2~wspec@fn=spec3~wsite@fn=site2' >> out.lmscell
awk '/SPEC/{while(getline line<"spec3.asa3"){print line}} //' ctrl.nbni > ctrl.asa3
lmscell ctrl.asa3 -vfile=2 --stack~sort@x3~shorten=1,1,1~file@site20.nb~ring@off=10~shorten@targ=1:10@mode=0,0,2~initpl@left=1:10@right=nbas-10+1:nbas~wsite@fn=site >> out.lmscell
lmscell -vpgf=1 ctrl.asa3 --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site3 >> out.lmscell
lmchk -vfile=3 ctrl.asa3 --pr20
Section 11. ctrl and template site files for (Nb(4)/Ni(3)/Nb(4) superlattice, and ES insertion files
This section requires the files site20.nb, spec.nb, site42.ni, spec.ni.
Set initial conditions with
touch spec.nb; rm *.nb *.ni
OLD
cp ~/lmf/pgf/test/nbni-111/{ctrl.nb,site20.nb,spec.nb,site42.ni,spec.ni,pos.2+3+2} .
NEW
cp ~/lmf/pgf/test/nbni-111/{ctrl.nb,site20.nb,spec.nb,site42.ni,spec.ni,pos6.nbni} .
Build an ideal Nb(2)/Ni(3)/Nb(2) superlattice (82 atoms); confirm Ni/Nb have equal spacing; create site shifts dpos.2+3+2 and dpos.4+3+4; Build a Nb(4)/Ni(3)/Nb(4) superlattice (122 atoms)
lmscell -vfile=20 ctrl.nb -vdz='1/2/sqrt(2)-.61/2' --stack~file@site42.ni@dpos=0,0,-dz~file@site20.nb~setlbl@spid=Nbx@targ=11:20,nbas-19:nbas-10~setlbl@spid=Nix@targ=21:34,nbas-33:nbas-20~wsite@fn=sitex
cp sitex.nb sitein.nbni
blm nbni --nfile --rdsite=sitein --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no > out.blm
cp actrl.nbni ctrl.nbni
lmplan nbni --pledit~q
lmchk nbni --wpos=pos0 > out.lmchk
mcx pos.2+3+2 pos0.nbni -- > dpos.2+3+2
New
mcx pos6.nbni pos0.nbni -- > dpos.2+3+2
mcx posx.nbni pos0.nbni -- > dpos.2+3+2
Try this (one interface only) … doesn’t work; forget it.
lmscell -vfile=20 ctrl.nb -vdz='1/2/sqrt(2)-.61/2' --stack~file@site42.ni@dpos=0,0,-dz~setlbl@spid=Nbx@targ=11:20~setlbl@spid=Nix@targ=21:34~pad@0,0,1~wsite@fn=sitex
cp sitex.nb sitein.nbni
blm nbni --nfile --rdsite=sitein --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no > out.blm
xx
blm nbni --nl=3 --nfile --rdsite=sitein --rdpos=dpos.2+3+2 --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=9,4,2 --mag --mixs=B4,b={beta},k=4 --omax=.18,.26,.26 --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 -asa~pfree~rmaxs=7.2
blm nbni --nl=3 --nfile --rdsite=sitein --rdpos=dpos.2+3+2 --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=9,4,2 --mag --mixs=B4,b={beta},k=4 --omax=.18,.26,.26 --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 -asa~pfree~rmaxs=7.2
cp actrl.nbni ctrl.nbni
lmchk nbni -vfile=0 --mino~z --wsite~short~fn=site2 >> out.lmchk
a sequence that works, but too many ES!
cp ../dpos.2+3+2 ../sitein.nbni ../spec.nb ../spec.ni .
blm nbni --nl=3 --nfile --rdsite=sitein --rdpos=dpos.2+3+2 --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=9,4,2 --mag --mixs=B4,b=beta,k=4 --omax=.18,.26,.26 --findes~rmin=.9~rmax=1.5~shorten=0,0,1~omaxi=0.00~resize=20~spec~nspmx=20~nesmx=36 -asa~pfree~rmaxs=7.2
cp actrl.nbni ctrl.nbni
lmchk nbni --findes~rmin=.9~rmax=1.5~shorten=0,0,1~lock=1,4~omaxi=0.00~resize=20~spec~nspmx=40~nesmx=36 -vfile=0 --omax~.19,.26~lock=4,1 --mino~z --wsite~short~fn=site3 --wspec
Build a Nb(4)/Ni(3)/Nb(4) superlattice (122 atoms) and confim Ni/Nb have equal spacing
mcx dpos.2+3+2 -sub 1-20,nr+20,1,nc > dpos.4+3+4
lmscell -vfile=20 ctrl.nb -vdz='1/2/sqrt(2)-.61/2' --stack~file@site42.ni@dpos=0,0,-dz~file@site20.nb@dup=2~wsite@fn=sitex
Preliminaries
The tutorial has several sections. Intermediate sections may be skipped: you can start the tutorial at any one of them provided you copy the necessary starting files from your Questaal source directory (where you cloned the Questaal package). For purposes of this tutorial we will assume it is ~/lmf. A condensed form of the entire tutorial has been bundled into a standard test case. You can invoke ~/lmf/pgf/test/test.nbni from any empty directory and let the script perform the steps for you. It’s an easy way to check what you should produce in following this tutorial.
This tutorial makes extensive use of many parts of Questaal, including lmscell, lmplan, lm, lmgf, lmpg, and miscellaneous utilities such as vextract. They are assumed to be in your path.
Questaal invokes mpix to execute MPI jobs. mpix is a proxy for mpirun, the default command that launches MPI jobs. We assume your system has 16 processors on a core, but you can use any number, or run in serial.
For drawing postscript files, this tutorial assumes you will use the Apple open, which of course you can substitute a postscript viewer of choice.
Required Input files
This tutorial uses the following files that can be found in directory ~/lmf/pgf/test/nbni.
init.ni : an init file for fcc Ni, with its equilibrium lattice constant a = ALAT = 6.643 a.u.
init.nb : an init file for bcc Nb, with the lattice constant matched to Ni, ALAT=6.643 a.u. Nb is a larger atom than Ni, but because it forms in the bcc structure (2 atoms/a3) while Ni forms in the fcc (4 atoms/a3), Nb’s equilibrium lattice constant is a = ALAT = 6.226 a.u. – about 6.7% smaller than Ni’s. A more careful calculation would build a complex interface to account for the lattice mismatch, as was done in the Nb/Fe/Nb trilayer tutorial. Here we just stretch the Nb lattice constant to match that of Ni.
site8.fp : a site file for an unrelaxed Nb(2)/Ni(8)/Nb(2) superlattice, taken from a full-potential calculation of this superlattice where interfacial atoms were relaxed.
dposx.6+8+6 the displacements of frontier planes obtained by relaxing the structure using the lmf code. A separate tutorial will explain how to make this relaxation using lmf.
Modifications for [part 2]:
The second part of the tutorial addressing the Nb(110)/Ni(111)/Nb(110) superlattice, there is minimal lattice mismatch and the lattice constant of bulk Nb is used.
The positions file is site8.fp : a site file for an unrelaxed Nb(2)/Ni(8)/Nb(2) superlattice, taken from a full-potential calculation of this superlattice where interfacial atoms were relaxed.
The displacements file is dposx.6+8+6 the displacements of frontier planes obtained by relaxing the structure using the lmf code.
Introduction and Basic Strategy
This tutorial’s final objective is to compute the Andreev levels induced by a thin ferromagnetic Ni layer sandwiched between superconducting Nb leads. We will use electronic structure codes that make the Atomic Spheres Approximation: the the band programs lm and the principal layer Green’s function code lmpg, which can calculate Landauer-Buttiker transport; in this case the scattering matrix S.
The final result is reached through the following steps:
The electronic structure of elemental Nb and Ni are computed in small supercells of 4 atoms oriented along the [110] direction. It is convenient to build stacks of Nb and Ni planes out of these supercells because the coordinate system becomes orthogonal. Self-consistency is accomplished with the ASA band code, lm.
An Nb(6)/Ni(8)/Nb(6) superlattice is built from the cells of elemental Nb and Ni. Such stacks are unrealistic in pristine form because stacking the bcc and fcc crystal structures of Nb and Ni result in unrealistically small Nb-Ni bond lengths. To accomodate this, the superlattice has relaxed using the lmf code, where only the frontier Nb and Ni atoms are allowed to move. That relaxation is not performed here; instead the displacements obtained by the relaxing the frontier layers is taken as input.
At the Nb/Ni interface, sphere packing become poor, even with relaxation of the atoms there. the ASA becomes problematic when the sphere packing is not good, as is also seen in the Nb/Ni/Nb trilayer. The solution is to add empty spheres at the interface between Nb and Ni where the bcc and fcc lattice mismatch gives rise to large interstitial spaces. This step of the tutorial explains how to add empty spheres to restore a reasonably close packed geometry at the Nb/Ni boundary.
A self-consistent calculation for a Nb(2)/Ni(20)/Nb(2) superlattice is made with the ASA band program lm to obtain the electronic structure.
The periodic structure is converted to a trilayer geometry (··· Nb(2) ¦ Nb(2) ¦ Ni(4n) ¦ Nb(2) ¦ Nb(2) ¦ ···), which is related to but distinct from the Nb/Ni superlattice, as it is not periodic along the stacking axis. Self-consistency and transmission calculations through the trilayer are performed using lmpg.
1. Self-consistent ASA-LDA energy bands for Nb and Ni with [110] rotated to the z axis
Since we will be working with superlattices and trilayers oriented along the [110] direction, it is convenient to rotate the crystal lattices of elemental Nb and ni, orienting the [110] direction along z. Doing this makes the stacking of Nb and Ni planes easier. A 90° rotation around x orients the [110] becomes along z axis and the [110] along y. We will use that rotation in building up site files below. It is convenient to work in these orthogonal coordinates, but we pay a price in that the unit cell contains two atoms/plane, and moreover it has two planes, staggered in a AB pattern. Thus the basic unit cell of both Ni and Nb have 4 atoms, each with 2 planes. Smaller “half-cells” with one plane are built using the lmscell utility; these will form the basic building blocks of Nb/Ni/Nb stacks with any number of planes.
The instructions below copy the Nb init file from a test directory in the git repository (where all steps of this tutorial are packaged into a shell script), builds the input files bcc Nb, rotates the bcc lattice to a 4-atom cell as noted above.
Files generated for elemental Nb
Use the blm utility to make template ctrl and site files for elemental Nb with one atom/cell.
touch init.nb; rm *.nb *.ni
cp ~/lmf/pgf/test/nbni/init.{nb,ni} .
blm -va=6.643 --nfile --nl=3 --nk=12,12,12 --asa nb > out.blm
cat actrl.nb | sed 's/LMX=2/LMX=2 GRP2=1/' | awk '{ if ($1 == "OPTIONS") {print "HAM PMIN=-1"}; print}' > ctrl.nb
Command line arguments to blm are documented here. In particular --nfile
tells blm to add lines to the ctrl file so a particular site file can be specified via a command-line argument, a feature we will use extensively here.
The last step modifies the template input file by adding tags HAM_PMIN and SPEC_GRP2. HAM_PMIN tells the ASA codes not to allow the linearization energy of any partial wave to float below the free-electronic value, by constraining the continuous principal quantum number P. SPEC_GRP2 tells it to average P and moments Q for different classes of the same species in the self-consistency cycle (see here, footnote 2). We use it because but the 4-atom cell loses some symmetry, so that different sites belong to different classes. and ths tag will force all the Nb to be equivalent. This isn’t necessary, and the effect is small, but we do it for consistency so the different nb classes are identical in this artificial supercell.
This next instruction creates a special file spec containing the SPEC category for Nb.
lmchk ctrl.nb --wspec > out.lmchk.nb
spec.nb is not needed in this step, but it will be used in Section 3, when blm is used to construct ctrl file for the trilayer.
Run lm to make the Nb density self-consistent
lmstr nb >/dev/null
lm ctrl.nb -vnit=0 > /dev/null
lm -vmet=3 ctrl.nb > out.lm.nb
The second line creates an initial atom file, nb.nb, with a (crude) starting guess for P and Q. The last step runs through the self-consistency cycle; after completion nb.nb contains the self-consistent values for P and Q.
Next, generate the the 4-atom supercell with z along [110] as noted at the beginning of this section.
lmscell --rot~x:-pi/4 --plx~m~0,1,1,0,-1,1,2,1,1 nb --wsite~short~fn=site4 --sort:'x3 x2' > out.lmscell.nb
The supercell utility in lmscell is documented on this page Make the 4-atom supercell self-consistent (noter that it reads nb.nb created earlier so that it is already essentially self-consistent. It is not exactly so, because of incomplete k convergence. The finite k mesh corresponds to a different grid in the supercell.
lmstr nb -vfile=4 >/dev/null
lm ctrl.nb -vmet=3 -vfile=4 -vnk1=12 -vnk2=8 -vnk3=8 --rs=0,1 > out.lm.nb
Switch -vfile=4
tells lmstr and lm to read structural data from site4.nb. This is because blm inserted extra lines into ctrl.nb (which you can see by inspecting the file).
The second step makes a self-consistent density and writes it to a restart file, which contains P and Q for each site. The next step rewrites the data in condensed form, in a file rsta4.nb.
lmscell ctrl.nb -vfile=4 --stack~rsasa~wsite@nosite@rsasa=rsta4.nb >> out.lmscell.nb
This will be used in Section 3 to assemble trial P and Q for superlattices from self-consistent densities of elements Nb and Ni.
Finally, for stacking planes Nb and Ni planes on top of each other, we need single planes “half cells” of the Nb. The first two atoms in site4.nb comprise the first plane and the second two the second. Create site2a.nb and site2b.nb, each containing a single plane.
lmscell -vfile=4 ctrl.nb '--stack~rmsite@targ=3,4~pad@0,0,-1/sqrt(2)~wsite@fn=site2a' >> out.lmscell.nb
lmscell -vfile=4 ctrl.nb '--stack~rmsite@targ=1,2~addpos@dx=0,0,-1/sqrt(2)~pad@0,0,-1/sqrt(2)~wsite@fn=site2b' >> out.lmscell.nb
See this page for a description of superlattice utility in lmscell. Sites are removed from the 4-atom cell and the 3rd lattice vector is scaled by 1/2. Note that these are pseudo-site files, as essential information about the AB stacking is lost. Note also the positions in site2b.nb are shifted so that the plane passes through z=0.
Sanity checks: the following files should be nearly identical to those in the distribution, ~/lmf/pgf/test/nbni :
site2b.nb site2a.nb ctrl.nb site4.nb rsta4.nb .
Files generated for elemental Ni
The commands for Ni are very similar to those for Nb. A couple of extra tags are needed, notably a trial magnetic moment must be specified. Also the superlattice vectors (in units of multiples of the primitive vectors) are different for the fcc case.
touch init.ni; rm -f *.ni ; cp ~/lmf/pgf/test/nbni/{init.ni} .
blm --nfile --nl=3 --nk=12,12,12 --asa --mag ni > out.blm.ni
cat actrl.ni | sed 's/\(MMOM.*\)/\1 GRP2=1/' | awk '{ if ($1 == "OPTIONS") {print "HAM PMIN=-1"; print "BZ INVIT=F"}; print}' > ctrl.ni
Create spec.ni :
lmchk ctrl.ni --wspec > out.lmchk.ni
Create 4 atom cell and make self-consistent calculation for it:
lmscell --rot~x:-pi/4 --plx~m~1,1,-1,2,-2,0,0,0,1 ni --wsite~short~fn=site4 --sort:'x3 x2' > out.lmscell.ni
lmstr ni -vfile=4 >/dev/null
mpix -n 8 lm ctrl.ni -vbeta=.1 -vmet=3 -vfile=4 -vnit=-30 -vnk1=12 -vnk2=8 -vnk3=17 --rs=0,1 > out.lm.ni
lmscell ctrl.ni -vfile=4 --stack~rsasa~wsite@nosite@rsasa=rsta4.ni >> out.lmscell.ni
We also need the half-cells. Note that the spacing beween planes is half as large as for Nb.
lmscell -vfile=4 ctrl.ni '--stack~rmsite@targ=3,4~pad@0,0,-1/2/sqrt(2)~wsite@fn=site2a' >> out.lmscell.ni
lmscell -vfile=4 ctrl.ni '--stack~rmsite@targ=1,2~addpos@dx=0,0,-1/2/sqrt(2)~pad@0,0,-1/2/sqrt(2)~wsite@fn=site2b' >> out.lmscell.ni
Sanity checks: the following files should be nearly identical to those in the distribution, ~/lmf/pgf/test/nbni :
ctrl.ni site4.ni rsta4.ni site2a.ni site2b.ni ni.ni
2. Setup for for even-Ni-plane superlattices
Note: If you do not want to follow this step in detail, you can run the script ~/lmf/pgf/test/test.nbni 5
and the steps outlined here are performed automatically.
Required inputs for Section 2:
- site8.fp: a site file for the unrelaxed structure, taken from the FP setup
- dposx.6+8+6 : the displacements obtained by relaxing the structure using lmf
- spec.{nb,ni} (these were generated in Section 1)
In this section, a ctrl file for a 6(Nb)/8(Ni)/6(Nb) superlattice is made, i.e. one with 3 (Nb), 4(Ni), 3(Nb) layers, respectively. It also serves as a template to made 6(Nb)/4n(Ni)/6(Nb) superlattices and trilayers for any n. Note that we must treat superlattices with odd numbers of Ni planes differently from those with even numbers, because of the AB stacking of the Ni planes. The even numbered case is simpler; the odd-numbered case has been worked out in Sec 7..
We would like to build a ctrl file that is suitable for any Nb/Ni(4n)/Nb, modifying only the site file. Further we would like to build the site in a lego-like fashion, layer by layer, so that construction is automatic. We can do this (it is the reason why single-layer site files were made in Section 1), but but there are several factors we must take into account.
- We must incorporate relaxation the frontier atoms
- As always, the tricky step with the ASA is to manage the interfaces where the sphere packing is poor. We must add empty spheres there since frontier sphere radii must be reduced from their bulk value.
- Sphere radii must satisfy the constraints.
These steps make the procedure a bit complicated, but blm and lmchk have been designed to accomplish them in a semi-automated way. Copy the following files from the git repository:
cp ~/lmf/pgf/test/nbni/site8.fp site1.nbni ← site file for an unreconstructed superlattice (from the NbNi superlattice tutorial)
cp ~/lmf/pgf/test/nbni/dposx.6+8+6 dposx.nbni ← Lattice relaxation computed by lmf (from the superlattice tutorial)
cp ~/lmf/pgf/test/nbni/spec.{nb,ni} . ← species information for bulk Nb and Ni (from Section 1)
Inspect site2.nbni. Site positions are ordered by with the 4 Nb atoms (2 layers) at both top and bottom ends. Adjacent to them are a pair of (Nbx, Nix) atoms on each frontier layer, and finally 4 Ni atoms in the middle. The frontier atoms are rendered as different species because they get squeezed by atoms across the frontier. We must allow their sphere radii to be smaller than the bulk to meet the “hard” constraint in the ASA, namely that sum of sphere radii must equal the volume of the unit cell. We have to consider the following:
- The sum of sphere volumes must match the volume of the unit cell;
- Overlaps cannot be too large even while the sum of sphere radii must reach the cell volume;
- We want both end layers and Ni atoms in the middle region to be defined in the same way as elemental Nb and Ni, respectively, as these regions are bulk like.
To accomplish these conditions we must do two things: define the frontier atoms as different species than the bulk. This allows their radii be made smaller, which is necessary since the lattice relaxation (and mismatch of lattice planes) pushes atoms closer together. To make up for this and still satisfy the space-filling constraint, we add some empty spheres. blm will allow you to impose constraints like those needed for (2) and (3) when making the ctrl file. blm and lmscell together make this very cumbersome procedure more or less automatic, as we show next.
dposx.6+8+6.nbni contains the lattice relaxation of the frontier atoms for this particular cell. Note that only frontier atoms have any displacement. This is an approximation, but it is a reasonable one. In any case the real material will be highly non-ideal, which is very difficult to model, so there is little point in trying to allow more general relaxations. The main thing is that the frontier atoms are not pressed too close together or kept too far apart. The fact that the displacements are limited only to the interface greatly simplifies the adoption the lego-like, layer-by-layer construction, since each layer is essentially independent of the others.
The tricky part is identifying placements and radii of the fictitous empty spheres. blm will do this automatically; but the algorithm is not that sophisticated. Some iteration is needed, and lmscell gives us the means to improve on blm’s guess at ES placement without requiring an excessive number of (very small) spheres.
- Use blm to make a first cut at a ctrl file, with sphere radii chosen for the relaxed superlattice. At this stage empty spheres are automatically added. From now on the ctrl will from now on have the nbni extension.
As will be seen, constraints are too strict to enable blm to entirely fulfill the “hard” space-filling constraint. - Use lmscell to optimize their placements, by minimizing overlap between ES and other sites. This allows them to be made slightly larger.
- Use blm once again, reading a new (species, site) information lmscell generated.
This provides a working ctrl file for the 6,8,6 superlattice, and by simple extension 6,4n,6 superlattices and trilayers.
Command-line arguments to blm are documented on this page and more details are provided there.
--nl=3
limits the basis L cutoff to LMX=2. (blm may by default assign LMX=3 to larger spheres).--nfile
tells blm to insert the following lines into the ctrl file:
%ifdef file>=1 file= site{file} %endif
This makes it easy to use a single ctrl file for different lattices.
--ewald=1d-12
Sets a very tight Ewald tolerance. It can be needed for electrostatics in long, pencil-like cells.--rdsite=site1
tells blm to read structural data from site1.nbni.--rdpos=dposx
Shift site positions using data taken from this file (site1 is for the unreconstructed geometry).--rdspec~fn=spec.nb~fn=spec.ni
supplies blm with species-specific information gleaned from spec.nb and spec.ni, notably in this case sphere radii.--usefiler
tells blm to accept without change the muffin-tin radius (R) it read from spec.nb and spec.ni.--nosort
suppresses re-ordering of site positions--shorten=no
suppresses automatic shortening of site positions by adding multiples of lattice translation vectors.--nit=20
Sets the number of iterations in the self-consistency cycle--nk=12,8,2
Assigns the k mesh--mag
tells blm to set up for a magnetic ssytem'--mixs=B4,b={beta},k=4'
String that defines mixing in convergence to self-consistency--findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36~mino
Invoke the empty sphere finder. The modifiers are documented on this page and more details are provided there.--omax=.18,.24,.26
Override contents of SPEC_OMAX1 in the ctrl file, which limits sphere overlaps when the sphere resizer is invoked.--asa~pfree~rmaxs=7.2
tells blm to set up for an ASA calculation. rmaxs=7.2 sets the range of the real-space structure constants (and thus the range of the hamiltonian). pfree adds PMIN=-−1 to the input file.---
--wsite~none
Suppress writing a site file.--ctrl=ctrl
output the template ctrl file directly to ctrl.nbni--convp
Assign variables to tags ITER_CONV ITER_CONVC, ITER_DHFTOL--gf
Tells blm to set up the GF category required by lmgf'--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2'
Tells blm to set up the PGF category required by lmpg, and sets up tags PGF_PLATL and PGF_PLATR. so that they can be controlled from the command line.
blm --nl=3 --nfile --ewald=1d-12 --rdsite=site1 --rdpos=dposx --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2
cp actrl.nbni ctrl.nbni
The sphere packing is 98.6% as can be seen from this part of the output:
SCLWSR: mode = 21 vol = 2345.22 a.u. Initial sphere packing = 96.7% scaled to 98.6%
constr omax1= 18.0 26.0 26.0 % omax2= 100.0 100.0 100.0 %
actual omax1= 18.0 22.6 26.0 % omax2= 33.7 48.2 47.2 %
lmscell can improve on this by making small adjustments to the E positions and resizing spheres.
lmscell’s stack editor is documented in the superlattice editor manual. Here it operates in noninteractive (“batch”) mode, accepting instructions resize, omax, wspec and wsite from the command line. Elements to each instruction are separated by @. For the latter three instructions, refer to the manual.
The resize instruction entails a series of operations as described here. In summary:
shorten=0,0,1
shifts third vector of all sites to fall in the first quadrant (has no effect in this case)lock=1:4
Locks radii of species 1-4 (the remake species are the empty spheres in this case)mino
Move E sites to minimize overlaps wth other nucleii---
@dup=1
duplicates the (resize, ovmin) loop one time
lmscell nbni --omax=.18,.24,.26 --stack~resize@shorten=0,0,1@lock=1:4@mino~omax=.185,.26,.26~resize@lock=1,4@mino@dup=1~wspec~wsite@fn=site4
Now the sphere volume satisfies the space-filling condition as can be seen by this line of output:
Cell volume= 2345.21543 Sum of sphere volumes= 2345.21543 (1)
Note the resize instructions in lmscell. They alternately resize spheres and adjust empty site positions to minimize overlap between them and other sites. This a nonlinear operation so the (resize, omin) sequence is repeated, to iteratively improve the sphere packing. It was found that the even with the iterative sequence constraints omax=.18,.24,.26 slightly miss the space-filling condition. In the last step the constraint was relaxed slightly to omax=.185,.26,.26.
Run blm again, taking refined species and site data from lmscell:
blm --nfile --ewald=1d-12 --rdsite=site4 --rdspec~fn=spec --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni omax=.185,.26,.26 --asa~pfree~rmaxs=7.2 --wsite~none --ctrl=ctrl --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2'
Flags --gf and --pgf are included at this stage here in preparation for the Green’s function codes lmgf and lmpg, used in Section 5 and in Section 6. Finally, to prepare for assembling general Ni(4n) site files, we extract the ES sites in the left and right frontier layers and park them in respective site files.
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3<1.4~wsite@fn=esitee1'
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3>1.4~wsite@fn=esitee2'
esitee1 and esitee2 enable lmscell to seamlessly fold E sites into a superlattice site file.
Sanity checks: the following files should be nearly identical to those in the distribution ~/lmf/pgf/test/nbni :
ctrl.ni should compare to ~/lmf/pgf/test/nbni/ctrl.6+8+6;
site4.ni should compare to ~/lmf/pgf/test/nbni/site.6+8+6.
esitee1.nbni and esitee2.nbni should match those in ~/lmf/pgf/test/nbni.
3. Site files for even-plane superlattice of variable length
Note: If you do not want to follow this Section in detail, you can run the script ~/lmf/pgf/test/test.nbni 6
and the steps outlined here are performed automatically.
Required inputs to be copied from ~/lmf/pgf/test/nbni/dposx.6+8+6, or generated by a prior step:
- ctrl.6+8+6 the ctrl.nbni file generated in Section 2
- site8.fp a site file for the unrelaxed structure, taken from an intial FP calculation using lmf.
- dposx.6+8+6 the displacements obtained by relaxing the structure using lmf
- spec.{nb,ni} these files were generated in Section 1
- esitee[12] site files at the ES first and second frontier planes, generated in Section 2
- site4.ni site files of a 4-atom Ni supercell, generated in Section 1.
Setup:
cp ~/lmf/pgf/test/nbni/site8.fp site1.nbni
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni
cp ~/lmf/pgf/test/nbni/dposx.6+8+6 dposx.nbni
cp ~/lmf/pgf/test/nbni/{spec.{nb,ni},esitee[12].nbni,site4.ni} .
Make initial site8 file:
lmscell -vfile=1 '-vdy=1/2/sqrt(2)' ctrl.nbni --rdpos=dposx --stack~file@esitee2@insert=15@scale3=0~file@esitee1@insert=7@scale3=0~initpl@left=1:2@right=nbas-1:nbas~wsite@fn=site8
Make sequence site8, site12, site16, … site28 :
foreach j ( 8 12 16 20 24 28)
@ i = $j + 4
lmscell -vdy='1/2/sqrt(2)' -vfile=$j ctrl.nbni --stack~file@site4.ni@dpos=0,dy,'5.5*dy'@xinsert=13~setrlx@targ=13:16@rlx=0~initpl@left=1:2@right=nbas-1:nbas~show@planes~wsite@fn=site$i
end
lmscell’s stack editor is documented in the superlattice editor manual. Here it operates in noninteractive (“batch”) mode, accepting instructions file, setrlx, initpl, show, wsite from the command line. Elements within each instruction are separated by @. For the latter three instructions, refer to the manual.
file@esitee2@insert=15@scale3=0
inserts the contents of E sites at the right Ni/Nb interface before site 13. These were abstracted file esitee2 in Section 2. (To verify the boundary likes between sites 12 and 13, tryshow planes
in the stack editor.)file@esitee1@insert=7@scale3=0
inserts the contents of E sites at the left Ni/Nb interface before site 7.initpl@left=1:2@right=nbas-1:nbas
Uses lmscell’s ability to automatically set the principal layer indices. This step simply defines the end regions, necessary for the setpl instruction to function.wsite@fn=site8
Writes updated site structure to file site8.---
~file@site4.ni@dpos=0,dy,'5.5*dy'@xinsert=13
inserts two Ni layers (4 sites) after site 13.setrlx@targ=16:20@rlx=0
sets the relax column to 000 for the added sites. It is not necessary, but it makes the site files consistent.setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site$j
(used in the instruction below) assigns to each site a principal layer index. This is a somewhat involved operation; for details refer to the superlattice editor manual.show@planes~wsite@fn=site$i
for informational purposes.
Autogenerate principal layer indices to files site8, site12, site16, … site28 :
foreach j ( 8 12 16 20 24 28)
lmscell -vpgf=1 -vfile=$j ctrl.nbni --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site$j
end
Sanity checks: the following files should be nearly identical to those in the distribution, ~/lmf/pgf/test/nbni :
site8.nbni site12.nbni, site20.nbni
4. Self-consistent ASA band calculation of the Nb(6)/Ni(20)/Nb(6) superlattice
This Section starts uses the ASA band program lm to make a self-consistent calculation of the Nb(6)/Ni(20)/Nb(6) superlattice. Required inputs to be copied from ~/lmf/pgf/test/nbni, or generated by a prior step:
- ctrl.6+8+6 the ctrl.nbni file generated in Section 2
- site20.nbni generated in Section 3
- nb.nb, ni.ni atom files for Nb and Ni bulk crystal, used to make trial density for supercell, made in Section 1.
Note: If you do not want to follow this Section in detail, you can run the script ~/lmf/pgf/test/test.nbni 7
and the steps outlined here are performed automatically.
Remarks on self-consistency with ASA band program lm for long unit cells
Because of the long unit cell, care must be taken to converge to self-consistency. If the input and output density are mixed in a simple, linear manner, i.e. , convergence to self-consistency is very slow. (Mixing parameter b={beta}) in the ctrl file corresponds to .) This is for two reasons. First, the density-of states of this system is very high, allowing density changes by many small, low-energy fluctuations in state occupations near the Fermi level. Second, and very important, the cell is long and it is necessary to damp out against low-energy, long-wave charge fluctuations along the long axis. That can readily be seen from Poisson’s equation of a periodic cell in Fourier space:
Away from self-consistency there will be a deviation . This generates a change in the potential . Long cells have vectors with small G, and changes to the potential from get greatly amplified. The solution is to screen out these low Fourier components with the static dielectric function ε(q=0). This quantity it is not given by the standard self-consistency procedure; however a model ε may be used. The full potential code lmf uses the Lindhard function, but the ASA has no plane-wave representation of the density, so constructing a model dielectric function is not so simple. A model construction is nevertheless implemented (it acts when OPTIONS_SCR=4), and it protects against these fluctuations, but at the same time it conceals true physical changes in the moments, and convergence is still slow.
It is better to calculate ε(q=0) explicitly in the ASA. lm (and lmgf) have this ability in an ASA sense; it can make a discretized form, expressed as a matrix that reflects the induced charge in channel from a disturbance in channel . Setting OPTIONS_SCR=11 turns on this mode; it causes a file psta.ext to be created. With lm, execution stops after this file is written. With psta.ext in hand, we have a good estimate for ε(q=0) and we can converge the density to self-consistency with ease.
Step 4 performs the self-consistent ASA calculation of the superlattice in three stages:
- Sets up an initial estimate for the density (stored in compact form as moments P and Q) using values taken from bulk Nb and Ni calculations in Section 1.
- Runs lm with scr=11 to make the static ASA response function (file psta.nbni).
- Runs lm with scr=2 to converge to self-consistency, using psta.nbni.
Set up initial conditions:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni
cp ~/lmf/pgf/test/nbni/site20.nbni .
touch nb.nbni ni.nbni
rm -f nb*.nbni ni*.nbni e*.nbni mixm.nbni psta.nbni sv.nbni
cp ~/lmf/pgf/test/nbni/nb.nb nb.nbni; cp ~/lmf/pgf/test/nbni/nb.nb nbx.nbni; cp ~/lmf/pgf/test/nbni/ni.ni ni.nbni; cp ~/lmf/pgf/test/nbni/ni.ni nix.nbni
The last step copies the nb atom file calculated for bulk Nb to the two inequivalent species in the superlattice; similarly for ni.
To make the convergence a more stable, change the mixing string a little:
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
Stage 1: make an initial guess at the density using P, Q calculated for elemental Nb and Ni :
lm -vfile=20 nbni -vnit=0 --rs=0,1
Stage 2: estimate the bare response function using this density (file psta):
lmstr -vfile=20 nbni > /dev/null
lm -vfile=20 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f > out.lm
This makes the ASA polarizability, psta.nbni. Note that the command uses -vnit=-1 --rs=1,0
which causes lm to read rsta.nbni and to create the sphere potentials. It does this because ctrl.nbni contains this line:
START CNTROL={nit<=0} BEGMOM={nit<=0}
Since «nit» is negative, BEGMOM evaluates to nonzero, which tells lm to start with P, Q and make potential parameters. The absolute value of «nit» tells lm how many cycles to run (observe how «nit» is used in ctrl.nbni).
-vscr=11
causes token SCR to evaluate to 11, which tells lm to generate psta.nbni. The 10s digit creates an on-site contribution, which is calculated from the second derivative of the total energy with respect to the moments (related to the Hubbard U).
Stage 3: make self-consistent using the psta file:
mpix -n 8 lm -vbeta=.1 -vconvc=1e-6 -vmet=3 -vfile=20 nbni -vccor=f -vnit=50 -vscr=2 --zerq~all~qout --pr40,21 --rs=0,1 >> out.lm
To see the effect of the screening, look at the first time the screened density is constructed. You should see something like
SCRMOM: unscreened dv=4.93e2 screened dv=1.79e-1 SCRMOM: unscreened dq=4.82e-1 screened dq=1.53e-1 ... a table follows
You can see that screening strongly damps out the change in potential (dv), while the change in density is much less so.
To see how lm converges with iteration, do grep DQ out.lm
and you should see something similar to
PQMIX: read 0 iter from file mixm. RMS DQ=4.00e-2 PQMIX: read 1 iter from file mixm. RMS DQ=3.72e-2 last it=4.00e-2 PQMIX: read 2 iter from file mixm. RMS DQ=3.39e-2 last it=3.72e-2 PQMIX: read 3 iter from file mixm. RMS DQ=2.57e-2 last it=3.39e-2 PQMIX: read 4 iter from file mixm. RMS DQ=2.33e-2 last it=2.57e-2 ... PQMIX: read 7 iter from file mixm. RMS DQ=1.29e-6 last it=1.58e-6 PQMIX: read 0 iter from file mixm. RMS DQ=9.41e-7 last it=1.29e-6 Jolly good show ! You converged to rms DQ= 0.000000
Make compact form of the rsta file
lm -vfile=20 nbni --rsedit~rs~save@fn=rsta20~q
The output provides interesting formation about sphere charges and moments.
site 9 z=28 q=9.614806 mom=0.126176 site 10 z=28 q=9.647015 mom=0.144092 site 11 z=28 q=9.809626 mom=0.513034 site 12 z=28 q=10.007131 mom=0.446052 site 13 z=28 q=10.046064 mom=0.558013 site 14 z=28 q=10.057521 mom=0.563235 site 15 z=28 q=10.006777 mom=0.624068 ... site 22 z=28 q=10.006777 mom=0.624068 site 23 z=28 q=10.057521 mom=0.563235 site 24 z=28 q=10.046064 mom=0.558013 site 25 z=28 q=10.007131 mom=0.446052 site 26 z=28 q=9.809626 mom=0.513034 site 27 z=28 q=9.647015 mom=0.144092 site 28 z=28 q=9.614806 mom=0.126176
Ni magnetic moments on the frontier layer (sites 9, 10, 27, 28) are strongly quenched.
Remake psta with the self-consistent density. Note that spin up and spin down are averaged:
lm -vfile=20 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f
mcx -f12f12.6 -r:open psta.nbni psta.nbni -+ -s1/2 > psta.avg
Sanity checks: the following files should be nearly match those in the distribution ~/lmf/pgf/test/nbni :
mcx -cmpf:fn1=rsta20.nbni:fn2=~/lmf/pgf/test/nbni/rsta20.lm
mcx -cmpf:fn1=psta.avg:fn2=~/lmf/pgf/test/nbni/psta.20
5. Self-consistent Green’s function calculation of the Nb(6)/Ni(20)/Nb(6) trilayer
This Section makes a self-consistent calculation of the Nb/Ni(20)/Nb trilayer starting from a restart file made in the previous Section (Section 4). That Section made the self-consistent density for the superlattice, where the atoms repeat in an infinitely periodic arrangement
··· Nb(2) ¦ Ni(4n) ¦ Nb(2) ¦ Nb(2) ¦ Ni(4n) ¦ Nb(2) ¦ ···
That calculation used the band code lm. The ASA suite also has two Green’s function codes, lmgf and lmpg. lmgf is similar to lm and Section 4 could have been carried out with it: both lm and lmgf operate with periodic boundary conditions and the program flow of the two are similar; only the “crystal” branch is replaced by a branch that obtains multipole moments through Green’s functions. Multipole moments provide a compact way to represent the charge density in the ASA: the ability to generate them enables lmgf to perform self-consistent calculations. If the Hamiltonians generated by lm and lmgf were identical, they should produce identical charge densities. This is only approximately true: the third order parameterization of the potential function P are not identical; see Sec 2.13.4. in Ref. 1 for details. This page has a basic tutorial describing lmgf and its operation; see also the Nb-Fe tutorial for a context similar to this one where lmgf was used as an alternative to lm.
lmpg is like lmgf but it is designed for a trilayer (stacked) geometry where the left and right leads clad an active region, and repeat to −∞ and +∞ respectively:
··· Left ¦ Left ¦ Left ¦ Active ¦ Right ¦ Right ¦ Right ¦ ···
In the present setup both left and right layers consist of Nb(2). The active region constists of a frontier with a Nb(2) layer each on left and right; thney sandwich 4n Ni atoms (2n layers of Ni(2)).
Step 5 is worked out for 4n=20. It does the following:
- Converts restart file rsta20.lm (generated by lm) to form suitable for lmpg
- Create a starting potential from the restart file.
- Runs lmpg for the end leads (mode 2)
- Runs lmpg for the active region (mode 1) using scr=2 to facilitate convergence to self-consistency. This requires psta.nbni, which was generated by lm in (Section 4).
Note: If you do not want to follow this step in detail, you can run the script ~/lmf/pgf/test/test.nbni 8
and the steps outlined here are performed automatically.
Required inputs to be copied from ~/lmf/pgf/test/nbni or generated by a prior step:
- ctrl.6+8+6 the ctrl.nbni file generated in Section 2
- site20.nbni generated in Section 3
- psta.20 intersite response function (polarizability) generated in Section 4
- rsta20.lm restart file for the periodic case, generated in Section 4
As in step 4, the response function is used to stabilize convergence. We can use the same function for lmpg as we used for lm.
Set up initial conditions:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni; cp ~/lmf/pgf/test/nbni/psta.20 psta.nbni
cp ~/lmf/pgf/test/nbni/{site20.nbni,rsta20.lm} .
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
touch nb.nbni
rm -f nb*.nbni ni*.nbni e*.nbni *bc*.nbni* mixm.nbni vshft.nbni sv.nbni
lmstr -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t > /dev/null
1.Convert rsta20.lm to rsta.nbni suitable for the trilayer geometry handled by lmpg
lmpg -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rsedit~rs@3d@fn=rsta20.lm~save~q
The rs@3d
instruction in the restart file editor tells lmpg to read a restart file made for periodic boundary conditions. lmpg needs a file suitable for the trilayer. It is converted internally, then saved in file rsta.nbni.
- Create a starting potential for both end leads and the active region. Note -vnit=0 –rs=1,0 causes lmpg to read P, Q from the restart file, make potential parameters needed to make G, and exit. Note also that it makes the onsite contribution to polarizability (scr=11)
lmpg -vpgf=1 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rs=1,0
- Make end layers self-consistent :
lmpg -vpgf=2 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=30 -vscr=0 --pr40,21 -vgamma=t > out.lmpg
Note -vpgf=2, which assigns PGF_MODE to 2 (see the ctrl file). The function of that tag can be found in the documentation for lmpg, or use the on-line help:
lmpg --input | grep -A 10 PGF_MODE
- Make active region self-consistent. Note switch -vscr=2 makes use of psta.nbni.
mpix -n 8 lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=50 -vscr=2 --pr40,21 -vgamma=t --rs=0,1 >> out.lmpg
Make a compact form of the rsta file
lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=0 -vscr=2 --pr40,21 -vgamma=t --rsedit~rs~save@fn=rsta20~q
… check self-consistency without psta
mpix -n 8 lmpg -vpgf=1 -vconvc=1e-6 -vfile=20 ctrl.nbni -vccor=f -vnit=-1 -vscr=14 --pr40,21 -vgamma=t --rs=1,0 >> out.lmpg
Sanity checks: the following files should be nearly match those in the distribution ~/lmf/pgf/test/nbni :
mcx -cmpf:fn1=rsta20.nbni:fn2=~/lmf/pgf/test/nbni/rsta20.lmpg
mcx -cmpf:fn1=vshft.nbni:fn2=~/lmf/pgf/test/nbni/vshft.20
6. Self-consistent layer Green’s function calculation of the Nb(6)/Ni(24)/Nb(6) trilayer
This Section makes a self-consistent calculation of the Nb/Ni(24)/Nb trilayer building on a restart file made for Nb/Ni(20)/Nb trilayer (Section 5). It exploits the fact that the additional Ni atoms are bulk-like. Thus inserting bulk-like density into the the center of the Ni(20) active region should already be nearly self-consistent. This section also shows how to enlarge the psta file to the larger system. This scheme can be repeated for still larger systems, Ni(28), Ni(32), Ni(36), etc.
Section 6 does the following:
- Estimate psta.nbni from psta.20
- Estimate rsta.nbni from rsta.20
- Make end layer self-consistent
- Make active region self-consistent
Required inputs to be copied from ~/lmf/pgf/test/nbni or generated by a prior step:
- ctrl.6+8+6 the ctrl.nbni file generated in Section 2
- site24.nbni generated in Section 3
- psta.20 intersite response function (polarizability) generated in Section 4
- rsta20.lmpg restart file for the Nb(2)/Ni(20)/Nb(2) case, generated in Section 5
- rsta4.ni ASA restart for elemental Ni, in 4 atom cell (see Section 1)
- vshft.20 Not essential, but gives a good starting guess for vshft.nbni
- batch20 Batch file for lmscell: instructions to assemble a restart file from rsta20.lmpg and rsta4.ni.
Setup:
cp ~/lmf/pgf/test/nbni/ctrl.6+8+6 ctrl.nbni; cp ~/lmf/pgf/test/nbni/rsta20.lmpg rsta.nbni
cp ~/lmf/pgf/test/nbni/{site24.nbni,rsta4.ni,psta.20,batch20} .
cp ~/lmf/pgf/test/nbni/vshft.20 vshft.nbni
sed -i.bak -e 's/B4,b={beta},k=4/B8,b={beta},k=8/' ctrl.nbni
As in step 5, the response function is used to stabilize convergence. We have to enlarge it to account for 24 Ni atoms instead of 20. To estimate psta.nbni from psta.20 we use the fact that the polarizability between pairs of sites is very similar when extra Ni layer are added. We can slice psta.nbni into a central region with 4 Ni layers, and a region to the left and one to the right. psta.nbni is a 2D array, so this means it gets sliced into 9 parts. We then pull out the center part and use it to enlarge psta.nbni, based on the assumption that the outer blocks are unaffected. The procedure is rather messy, and we use the mcx utility to do it.
site24.nbni has 20 Ni atoms and 36 atoms all together (nbas). mcx needs needs information about the matrix rank. psta is a 2D array with a row for every site and l (information about the m quantum number is contracted, in the spirit of the ASA). If every lmax were 2, psta would have rank 3×nbas. In this case one of the E spheres has lmax=1; there are two instances of it. Therefore the rank of psta is reduced from 3×nbas to n=3×nbas−nl1 where nl1 is the number of sites with lmax=1.
In the following instruction, mcx splits the array into 9 sections enlarges 5 of the 9 parts, and puts it back together again. We write it for the general extension of psta.4n to psta.4n+4. If the target is psta.4n+4, the following yield the number of Ni atoms (nni) and number of sites (tcsh) for psta.4n{:.path}_and __site4n.
@ nni = `cat site24.nbni | grep -c Ni` - 4; @ nbas = `head site24.nbni | vextract . nbas` - 4
set nl1 = 2
Then do
mcx -f12f12.6 -vnni=$nni -vnbas=$nbas -vnl1=2 '-vn=3*nbas-nl1' psta.$nni -a p0 p0 -sub n/2+1,n/2+12,1,n/2 -a i1 p0 -sub 1,n/2,n/2+1,n/2+12 -a i2 p0 -sub n/2+1,n/2+12,n/2+1,n -a i3 p0 -sub n/2+1,n,n/2+1,n/2+12 -a i4 p0 -sub n/2+1,n/2+12,n/2+1,n/2+12 -a i5 p0 -split p 1,n/2+1,n+1 1,n/2+1,n+1 p11 i2 p12 i1 i5 i3 p21 i4 p22 '-sarray[3,3]' > psta.`dval $nni+4`
cp psta.24 psta.nbni
The top line of psta.24 should confirm that it has a rank 3×40−2 = 118.
Estimate rsta.nbni from rsta20.lmpg
lmscell -vpgf=1 ctrl.nbni -vfile=24 -vnb=$nbas --stack~batch=batch20 >> out.lmscell
cp rsta2 rsta.nbni
Note that --stack~batch=batch20
reads instructions from a batch file.
In the ASA, the density is made from moments P and Q. The instructions in batch20 take data either from rsta.nbni, which is the restart file with P, Q for Nb/Ni(20)/Nb, or from rsta4.ni, which contains P, Q for bulk Ni. P and Q are assembled by reading P, Q from their respective files and inserting them into positions proper to the Nb/Ni(24)/Nb trilayer. Essentially the “right” half sites have to be shifted by 4 layers, and 4 bulk Ni inserted in the middle.
rsasa@src=1:nb/2@ib=1
reads rsta.nbni, takes P, Q for sites 1:nb/2 (1:18 in this case) and stores them in sites 1: (1:18 → 1:18)
rsasa@src=1:4@ib=nb/2+1@fn=rsta4.ni
reads P, Q for bulk ni (rsta4.ni) and stores them in sites nb/2+1:nb/2+4 (1:4 → 19:22)
rsasa@src=nb/2+1:nb@ib=nb/2+5
reads rsta.nbni, takes P, Q for sites nb/2+1:nb and copies them to sites nb/2+5: (19:36 → 23:40)
rsasa@src=nb+1:nb+2@ib=nb+5
reads rsta.nbni, takes P, Q for sites nb+1:nb+2 and copies them to sites nb+5: (37:38 → 41:42). These are the left padding layers.
rsasa@src=nb+3:nb+4@ib=nb+7
reads rsta.nbni, takes P, Q for sites nb+3:nb+4 and copies them to sites nb+8: (39:40 → 43:44). These are the right padding layers.
wsite@nosite@rsasa=rsta2
writes P, Q into file rsta2
Further initialization
touch nb.nbni ; rm -f nb*.nbni ni*.nbni e*.nbni *bc*.nbni* mixm.nbni sv.nbni
lmstr -vpgf=1 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t > /dev/null
Make end layers and active region self-consistent
lmpg -vpgf=1 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=11 --pr40,21 -vgamma=t --rs=1,0 >> out.lmpg
lmpg -vpgf=2 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=30 -vscr=0 --pr40,21 -vgamma=t >> out.lmpg
mpix -n 8 lmpg -vbeta=.1 -vpgf=1 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=100 -vscr=2 --pr40,21 -vgamma=t --rs=0,1 >> out.lmpg
Make a compact form of the rsta file
lmpg -vpgf=1 -vconvc=1e-6 -vfile=24 ctrl.nbni -vccor=f -vnit=0 -vscr=2 --pr40,21 -vgamma=t --rsedit~rs~save@fn=rsta24~q
Sanity checks: the following files should be nearly match those in the distribution ~/lmf/pgf/test/nbni :
mcx -cmpf:fn1=rsta24.nbni:fn2=~/lmf/pgf/test/nbni/rsta24.lmpg
mcx -cmpf:fn1=vshft.nbni:fn2=~/lmf/pgf/test/nbni/vshft.24
7. Setup for for odd-Ni-plane superlattices
This Section is similar to Section 2, but it is written for odd-numbered superlattices.
Note: If you do not want to follow this step in detail, you can run the script ~/lmf/pgf/test/test.nbni 2
and the steps outlined here are performed automatically.
Required inputs for Section 7:
- site6.fp: a site file for the unrelaxed structure, taken from the FP setup
- dposx.6+6+6 : the displacements obtained by relaxing the structure using lmf
- spec.{nb,ni} (these were generated in Section 1)
Copy required files from the distribution:
cp ~/lmf/pgf/test/nbni/site6.fp site1.nbni; cp ~/lmf/pgf/test/nbni/dposx.6+6+6 dposx.nbni
cp ~/lmf/pgf/test/nbni/spec.{nb,ni} .
As in the even-numbered case, we want to construct a ctrl file that applies to 6(Nb)/4n+2(Ni)/6(Nb) superlattices and trilayers for any n. The odd numbers must be treated differently because of number number of stacking of the Ni AB planes induces must have an extra A plane, which introduces an additional translation on the right side. As always, the tricky business with the ASA is to manage the interfaces where the sphere packing is poor. blm and lmscell do all the hard work for us.
As in step 2, we use blm to construct and initial ctrl file, including locating empty sites, and lmscell to refine the input to satisfy the space-filling constraint, and blm once more, taking refined species and site data from lmscell, to make the final ctrl file. Switches for blm and lmscell are explained in Section 2.
blm --nl=3 --nfile --ewald=1d-12 --rdsite=site1 --rdpos=dposx --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni --findes~rmin=.9~shorten=0,0,1~omaxi=0.12~resize=20~spec~nspmx=4~nesmx=36 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2
cp actrl.nbni ctrl.nbni
Adjust E radii and positions to fulfill space filling condition. This creates files site4.nbni and spec.nbni:
lmscell nbni --stack~resize@shorten=0,0,1@lock=1:4@mino~omax=.18,.24,.25~resize@lock=1:4@mino~resize@lock=1:4@mino~wspec~wsite@short@fn=site4 --omax=.18,.24,.26 --asa~pfree~rmaxs=7.2
… Make a ctrl file that meets the space-filling condition :
blm --nfile --ewald=1d-12 --rdsite=site4 --rdspec~fn=spec --usefiler --nosort --shorten=no --nit=20 --nk=12,8,2 --mag '--mixs=B4,b={beta},k=4' nbni --asa~pfree~rmaxs=7.2 --convp --wsite~none --ctrl=ctrl --omax=.18,.24,.26 --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2'
Confirm that space filling condition is met:
lmchk ctrl.nbni -vfile=4 --pr20
You should see these lines:
Cell volume= 2198.63947 Sum of sphere volumes= 2198.63947 (1)
OVMIN, 472 pairs: fovl = 2.64161e-5 <ovlp> = 17.3% max ovlp = 18,23.6,24%
As a last step, extract ES blocks from left and right frontier region, to prepare for construction of general 4n+2 Ni stacks.
... Extract ES blocks 1 and 2
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3<1.4~wsite@fn=esiteo1'
lmscell ctrl.nbni -vfile=4 '--stack~rmsite@incl@z==0&x3>1.4~wsite@fn=esiteo2'
The resulting ctrl.nbni should match ~/lmf/pgf/test/nbni/ctrl.6+6+6, and file site4.nbni should match ~/lmf/pgf/test/nbni/site.6+6+6. Files esiteo1.nbni and esiteo2.nbni should compare to files of the same name in ~/lmf/pgf/test/nbni
8. Site files for odd-plane superlattices
This Section makes ASA site files for a sequence of 6(Nb)/4n+2(Ni)/6(Nb) superlattices starting from a site file created for the 6(Nb)/6(Ni)/6(Nb) created in Section 7. It does the following:
- Makes the ASA file site6 from the FP site file for the 6Nb/6(Ni)/6(Nb) case
- Makes ASA file site10 from site6, site14 from site10. The sequence can be extended indefinitely.
Required inputs for Section 8:
- ctrl.6+6+6 ASA ctrl file (made in Section 7)
- site6.fp site file for the unrelaxed structure, taken from the FP setup
- dposx.6+6+6 the displacements obtained by relaxing the structure
- spec.{nb,ni} ASA species categories for Nb and Ni made in Section 1.
- esiteo[12].nbni site files at the ES first and second frontier planes (made Section 7)
- site4.ni site files of a 4-atom Ni supercell (made in Section 1)
Note: If you do not want to follow this step in detail, you can run the script ~/lmf/pgf/test/test.nbni 3
and the steps outlined here are performed automatically.
If you are starting from scratch, copy the needed input files to your working directory:
cp ~/lmf/b/./pgf/test/nbni/site6.fp site1.nbni
cp ~/lmf/b/./pgf/test/nbni/ctrl.6+6+6 ctrl.nbni
cp ~/lmf/b/./pgf/test/nbni/dposx.6+6+6 dposx.nbni
cp ~/lmf/b/./pgf/test/nbni/{spec.{nb,ni},esiteo[12].nbni,site4.ni} .
If you are starting from Section 7, all the files should be present except possibly site4.ni (made in Section 1).
Make site6.nbni. site6.nbni is essentially similar to site4.nbni of Section 8, but sites are ordered according to their position in the stack (suitable for the layer code lmpg).
lmscell -vfile=1 '-vdy=1/2/sqrt(2)' ctrl.nbni --rdpos=dposx --stack~file@esiteo2@insert=13@scale3=0~file@esiteo1@insert=7@scale3=0~initpl@left=1:2@right=nbas-1:nbas~wsite@fn=site6
Make the sequence site6, site10 site14. It can be extended to any site4n+2. rm -f out.lmscell
rm -f out.lmscell
foreach j (6 10 14)
@ i = $j + 4
lmscell -vdy='1/2/sqrt(2)' -vfile=$j ctrl.nbni --stack~file@site4.ni@dpos=0,dy,'5.5*dy'@xinsert=14~setrlx@targ=14:17@rlx=0~initpl@left=1:2@right=nbas-1:nbas~show@planes~wsite@fn=site$i >> out.lmscell
end
Find PL for site6, site10, etc
foreach j ( 6 10 14)
lmscell -vpgf=1 -vfile=$j ctrl.nbni --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site$j >> out.lmscell
end
Sanity check: files site6.nbni, site10.nbni, site14.nbni should match those in ~/lmf/pgf/test/nbni.
9. Self-consistent ASA band calculation of the Nb(6)/Ni(10)/Nb(6) superlattice
This Section is the analog of (Section 1 for the Nb(110)/Ni(111)/Nb(110) superlattice.
Required inputs for Section 9:
- ctrl.6+6+6 ASA ctrl file (made in Section 7)
- site10.nbni site file (made in Section 8)
- nb.nb, ni.ni atom files for Nb and Ni bulk crystal, used to make trial density for supercell (made in Section 1)
The ctrl and site files were created in the previous step. If you are starting from scratch, copy all the needed input files to your working directory.
Setup:
cp ~/lmf/b/./pgf/test/nbni/ctrl.6+6+6 ctrl.nbni
cp ~/lmf/b/./pgf/test/nbni/site10.nbni .
touch nb.nbni
rm -f nb*.nbni ni*.nbni e*.nbni mixm.nbni
cp ~/lmf/pgf/test/nbni/nb.nb nb.nbni; cp ~/lmf/pgf/test/nbni/nb.nb nbx.nbni; cp ~/lmf/pgf/test/nbni/ni.ni ni.nbni; cp ~/lmf/pgf/test/nbni/ni.ni nix.nbni
First guess at density from elemental Nb and Ni atom files
lm -vfile=10 nbni -vnit=0 --rs=0,1
Estimate psta using this density (construction of psta has not been parallelized yet)
lmstr -vfile=10 nbni > /dev/null
lm -vfile=10 nbni -vnit=-1 --pr30,20 --rs=1,0 -vscr=11 -vccor=f >> out.lm
Make self-consistent:
mpix -n 16 lm -vconvc=1e-6 -vmet=3 -vfile=10 nbni -vccor=f -vnit=50 -vscr=2 --zerq~all~qout --pr40,21 --rs=0,1 > out.lm
Create a compact form of the restart file (a convenient and compact way to preserve the self-consistent density)
lm -vfile=10 nbni --rsedit~rs~save@fn=rsta10~q
Sanity check: compare rsta10.nbni file against the distribution file:
mcx -cmpf:fn1=rsta10.nbni:fn2=~/lmf/pgf/test/nbni/rsta10.lm
The maximum difference should be small.
It is useful to look at the local Ni moments:
lm -vfile=10 ctrl.nbni --rsedit~rs~a
10. Setup for the Nb(110)/Ni(111)/Nb(110) trilayer
Typical JRMAM multilayers consist of Nb(110)/Ni(111)/Nb(110) trilayers. Ni is fcc, with a lattice constant 6.643 a.u. while Nb is bcc with 6.226 a.u. . The crystallographic and lattice mismatch severely complicate treatment of the interface requiring rather large supercells in the plane normal to the interface. One fairly interface with good matching was presented in this tutorial. We will use the relaxed structure obtained there and proceed with the ASA.
Make an initial template ctrl file
cp ~/lmf/pgf/test/nbni-111/{pos6.nbni,site0.nbni,spec.nb,spec.ni} .
blm nbni --nl=3 --nfile --rdsite=site0 --rpos=pos6 --rdspec~fn=spec.nb~fn=spec.ni --usefiler --nosort --shorten=no --nit=20 --nk=9,4,2 --mag --mixs=B4,b=beta,k=4 --omax=.18,.26,.26 --asa~pfree~rmaxs=7.2 --wsite~ib=1:10,35:48,73:82~rlx=000~long --ssort --convp --gf '--pgf~platl=0,0,sqrt(2)/2~platr=0,0,sqrt(2)/2' >> out.blm
cp actrl.nbni ctrl.nbni
site0.nbni and pos6.nbni were generated in the Nb/Ni superlattice tutorial. Structural information is contained in these two files; species information to be carried into the ASA is contained in spec.nb and spec.ni.
blm makes an operational ctrl file, but it does not meet the space-filling condition. The constraints discussed in Section 2 apply here as well, only they are more difficult to meet because the present interface is much more complicated. To do so we expand frontier species, assigning for now one species per site — a step not needed in the Ni[110] trilayer. Frontier atoms relax quite a bit, and the good packing the ASA requires is not compatible with keeping each frontier atom fixed. The steps below do this, and also locate empty sites needed to reach 100% packing without excessive sphere overlaps.
lmchk ctrl.nbni --rpos=pos6 '--findes~shorten=0,0,1~rmin=.80~spec=3,4~lock=1,2~omaxi=0.12~includep=x3>.7&x3<1.3|x3>2.5&x3<3.1~nesmx=12~mino~resize=20' --wspec --wsite=site1 --omax=.20,.24,.30 >> out.lmchk
lmchk writes a new SPEC category with species Nix and Nbx split into 20 and 28 different species respectively. E sites (and species) are also added.
We will use extension asa3 from here on to avoid overwriting files.
awk '/SPEC/{while(getline line<"spec.nbni"){print line}} //' ctrl.nbni > ctrl.asa3
cp site1.nbni site1.asa3
awk copies ctrl.asa3 from ctrl.nbni, but slots in the SPEC category lmchk generated.
The next step groups species with the same Z and similar radii into one species, to limit the proliferation of species. It also adjusts E radii and positions. WSPEC must be updated again:
lmscell --pr20 ctrl.asa3 --omax=.20,.24,.30 -vfile=1 '--stack~resize@lock=1,2@resize=20@mino@dup=3@sren@gran^tol=.015^lst=3:12@gran^lst=13:22@gran^lst=23:36@gran^lst=37:50@gran^lst=51:62~omax=.20,.25,.30~resize@lock=1,2~wspec@fn=spec3~wsite@fn=site2' >> out.lmscell
awk '/SPEC/{while(getline line<"spec3.asa3"){print line}} //' ctrl.nbni > ctrl.asa3
ctrl.asa3 and site2.asa are sufficient to do a band calculation, but we also want to prepare for lmpg, which needs principal layer indices. Also, because lmpg requires it, we add an Nb plane below stack and another above it, so that two bulk-like Nb planes clad each end.
lmscell ctrl.asa3 -vfile=2 --stack~sort@x3~shorten=1,1,1~file@site20.nb~ring@off=10~shorten@targ=1:10@mode=0,0,2~initpl@left=1:10@right=nbas-10+1:nbas~wsite@fn=site >> out.lmscell
Now we can let lmscell assign the principal layer indices. Note that the prior step performed an initialization step marking which sites belong to the end leads
lmscell -vpgf=1 ctrl.asa3 --stack~setpl:sort:unsort:withinit:rangea=1.1~wsite@fn=site3 >> out.lmscell
ctrl.asa3 and site3.asa can be used with any of the executables lm, lmgf, lmpg.
Confirm that the input file meets “hard” constraint in the ASA, namely that sphere volumes must sum to the unit cell volume.
lmchk -vfile=3 ctrl.asa3 --pr20
Footnotes and references
1 Dimitar Pashov, Swagata Acharya, Walter R. L. Lambrecht, Jerome Jackson, Kirill D. Belashchenko, Athanasios Chantis, Francois Jamet, Mark van Schilfgaarde, Questaal: a package of electronic structure methods based on the linear muffin-tin orbital technique, Comp. Phys. Comm. 249, 107065 (2020).