Skip to content

Part 2: Mobility of Al

In the last example, we learnt the basic process of a KG calculation. In this example, we will briefly introduce the ab initio KG workflow by calculating the DC electron mobility \(\mu (\omega \to 0)\) of simple 16-atom metallic Al supercell with ensemble average.

By definition, the conductivity \(\sigma\) and mobility \(\mu\) are connected by the carrier density \(n\):

\[\sigma = qn \mu\]

The advantage of calculating mobility instead of conductivity alone will be discussed in detail in the next example Part 3.

Warning

This is a very simple showcase with no careful parameter convergence, designed to complete within tens of minutes. Therefore, the results should not be compared with any experimental data! For a more realistic example, please refer to Part 3.

Prepare input files

Geometries

In a first step, it is necessary to obtain representative geometric configurations, so-called samples that cover the phase-space at the thermodynamic conditions of interest. These samples can be generated by stochastic methods at deseired temperature \(T\) such as harmonic sampling, ab initio molecular dynamics (aiMD), etc. In FHI-aims, the harmonic sampling can be performed via FHI-vibes; aiMD simulation can be performed via FHI-vibes or i-PI. Please refer to those tutorials if you are interested.

In this example, we simply picked 10 samples from harmonic sampling at \(T=1000\) K. For details of harmonic sampling with FHI-aims, please refer to: FHI-vibes tutorial. These 10 geometries are under the folder 2solutions-16atom-Al\calculation\samples_1000K\ in this tutorial repository and also displayed below, for convinience.

geometry.in files from 10 samples at \(T=1000\) K
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.000
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       1
#  Harmonic E_pot:        4.418eV (1068.07K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom 0.1710247280506230 -0.1553676056704334 0.1956006695395517 Al
atom 4.0107071024464620 0.0253001885918945 0.0995358227598746 Al
atom -0.0615212382479168 4.1863435789731023 0.0202517072667906 Al
atom 4.1542224366749316 3.7982616816797043 -0.1195686394411640 Al
atom -0.1102247424582610 0.3540950801591401 4.0656175370368519 Al
atom 3.8397688373601713 0.0651550233049078 4.2583051396391260 Al
atom 0.0241574671082227 3.9765321247429251 3.6255266525182783 Al
atom 3.7518895294142629 3.9499574028857567 3.7230299710756745 Al
atom -0.3289319001316083 2.0036498416450725 1.9459224983754695 Al
atom 3.9985413905598826 1.9992328981613594 2.1207293940764522 Al
atom 0.2320714589662372 6.0605888072353427 2.2919111547493967 Al
atom 3.6525920368003493 5.9472429851332231 1.9133466948340270 Al
atom 0.1975705299129615 2.4498455670460983 6.2533092374013934 Al
atom 4.1000517160580161 1.9431513327624750 5.8714409391161846 Al
atom 0.0832383302424066 6.1881281724310586 5.9935755537828186 Al
atom 4.2146013181594126 6.1996320435593395 6.2824614489935326 Al
atom 2.1935606731492938 0.2275510396469910 2.0386994899883351 Al
atom 6.0996400830639272 -0.3677849668293532 2.0413442010219134 Al
atom 1.8221923000486466 3.7732388970764781 1.9079499328877103 Al
atom 5.9529574132544036 4.3937348985663496 1.9503182804956969 Al
atom 2.0537949532150193 -0.1023537866044264 5.8745900826774475 Al
atom 6.4055523939293844 0.0217729292288491 6.2922054346582739 Al
atom 2.1192765549808579 4.0822386375903070 5.9857059951675327 Al
atom 5.9066002406942006 4.0703687403675666 5.8986819253669989 Al
atom 2.1289471112008607 1.9805194514106197 -0.1649748457797046 Al
atom 6.1798572948713257 1.9123623960506484 0.1266782881108243 Al
atom 1.9845695275215491 5.8883049172895188 0.0092884391698586 Al
atom 6.1122126047331768 6.0878093672414071 0.0386193130796654 Al
atom 1.9870777679163016 2.0478722187350749 3.9918186784800613 Al
atom 6.3087515701531869 1.9679555988146009 3.9263192136738279 Al
atom 1.8027982395884421 5.9997291328293940 4.3170615462239770 Al
atom 5.9467648307632661 5.9592439659450065 4.1590108030533148 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.001
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       2
#  Harmonic E_pot:        3.830eV (926.04K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.1732560146184347 0.0437294906692570 -0.1941522715243796 Al
atom 4.1506941808026472 -0.0378862237448510 0.0880670915801840 Al
atom -0.1002565854306791 4.0439899198290918 0.1109574933836211 Al
atom 4.0085679785290598 4.0712626796120182 0.0199708070467330 Al
atom -0.0303167366383767 -0.0264356133528056 3.9419020479965217 Al
atom 4.0885209265530404 -0.0760399156474995 4.2181388735064012 Al
atom -0.1052814086713131 4.0948481514282991 3.9769575307196119 Al
atom 4.0325020415654373 3.8899209859307384 4.2316025622787290 Al
atom 0.2853203155360007 1.9889477246429614 1.9718434063507448 Al
atom 4.2151100059288993 1.9402764403029773 1.6952088445568458 Al
atom 0.2204339313846529 6.2594940807860953 1.8175538563878892 Al
atom 4.1153926449553175 6.0334976603233734 2.2206582055790243 Al
atom -0.2303487079453811 2.1127522831812171 5.8453322670946948 Al
atom 4.0427655501968474 2.0993919297192716 6.1924280815592603 Al
atom 0.0972042996511102 5.7635149373933583 6.0798714629207060 Al
atom 4.1214169903923255 5.9780411220406302 5.9078621914503335 Al
atom 1.9831042583640361 -0.3280010846792964 2.3921863694356800 Al
atom 6.0569594428726976 0.0627530049847529 2.1560428336495399 Al
atom 2.0132471714168134 3.9953684222488359 2.0625012442929909 Al
atom 5.9414487667368689 4.1953119064912041 2.0356850198389416 Al
atom 1.8626190568734662 -0.0729952384468097 6.0687503020232070 Al
atom 6.0874401203992567 0.2819735828241570 6.0774392634920984 Al
atom 2.0436810155197249 4.0092593091199582 6.1091217091144312 Al
atom 6.1002563561944640 4.3139113083813507 5.8486613930110334 Al
atom 1.9132122301832459 1.8412029882959626 0.0633452384396642 Al
atom 6.2225738719688293 2.2248503303493647 -0.0035954498523557 Al
atom 1.9422812199203918 5.9839442754853929 -0.1109110445102985 Al
atom 6.0792186737126190 6.1671317671260502 -0.1210116603226929 Al
atom 2.1815406139381404 1.9215068601979008 4.1470003477159629 Al
atom 6.0784766561816577 1.9576066630765137 3.8084303425418708 Al
atom 1.8373363181523719 6.1369383962931696 4.0219204505290751 Al
atom 5.8524473753742559 6.0642444151373569 4.2545437497139247 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.002
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       3
#  Harmonic E_pot:        4.514eV (1091.31K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.1856073693528013 0.2092584488538300 0.1261816290182523 Al
atom 4.3235250693648437 0.0999031866397035 0.3458993343258011 Al
atom -0.0196831264444397 3.9515854934770269 0.1266018255611887 Al
atom 4.2232157060288662 4.0513181930858657 -0.3213416849788979 Al
atom -0.1607982876638388 -0.0374522374995900 3.9923370793244448 Al
atom 3.9351947804087439 -0.1621464085931482 4.0676339423824235 Al
atom -0.0499966554288243 4.0631659317597784 3.9252797957636214 Al
atom 4.2513506386882023 4.0516219217908578 4.1328399729585978 Al
atom -0.0429458922076322 2.0408264758068593 1.9898490332793195 Al
atom 4.1302972025791984 2.1607306655289769 2.2007052661487636 Al
atom -0.2937839552456957 6.3065778545096469 2.0326470785917232 Al
atom 4.2603498112204479 6.2183589948755973 1.9485461461360438 Al
atom -0.1204967637887013 2.1474307008550948 6.0171661116844941 Al
atom 3.8815139503288814 1.8640785318536448 6.1996383368959718 Al
atom -0.2067830528129621 6.1561882164330850 5.9977534007524271 Al
atom 4.1019464720149452 6.1868487157807861 5.7928435535689715 Al
atom 1.9807344528069406 -0.1139756820036317 1.9833231239865650 Al
atom 5.9928012169535005 0.0428714962670133 2.3174379434220320 Al
atom 2.1983408610808661 4.0682663536426391 1.9587517069768676 Al
atom 6.1229287458012829 3.9789482537269136 2.0783658527528202 Al
atom 2.1368652824872556 -0.1378328167703956 6.0021265793616125 Al
atom 6.0044708786868934 0.0925328478334165 6.2813327612487679 Al
atom 2.1611311259901651 4.0452706289285691 5.7842649677582552 Al
atom 6.0546983184420089 3.9657122082713654 5.7357139603302789 Al
atom 1.8994086626210154 2.0559892676190028 -0.0099998724991391 Al
atom 5.9331882068509438 2.1502453931369891 0.0751445409553335 Al
atom 1.8698184043114441 6.1515382111694112 -0.0836497050033320 Al
atom 6.3143822503786033 5.9945587748596783 0.1045106614908057 Al
atom 1.8908767544100824 2.0698226111718556 4.0397259043862785 Al
atom 6.1316546692432343 1.6034715301833860 3.8677688911419508 Al
atom 2.1891925932456453 5.8829408219812738 4.1004291518149989 Al
atom 6.0265216090008806 5.7756579748245001 4.1244852704627482 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.003
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       4
#  Harmonic E_pot:        4.550eV (1100.00K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom 0.0914784386064101 -0.1181818650801799 0.0442588213118539 Al
atom 3.8285151700647635 0.1185181285055630 0.0749140018566552 Al
atom -0.0561171454256481 3.8773491849249417 0.0865219658441344 Al
atom 4.2105523121213642 3.7616841875644651 0.1031196894463930 Al
atom 0.0059456872836229 -0.0312541167633582 4.1693961447486698 Al
atom 4.1034657972704567 -0.1751364208771371 4.0461202808232386 Al
atom 0.0015013330150505 3.9142803240258011 4.2997311657888897 Al
atom 4.1792157720194867 4.1427646348090761 4.1638077322368119 Al
atom -0.0330482594178882 1.9699689254885731 1.8510806408239808 Al
atom 4.0415646568167558 2.1302985449598335 2.4045437158131073 Al
atom -0.1057903087450685 6.0679029570880827 1.8580790125759110 Al
atom 4.3223613765447766 5.9294020212791034 1.9166308593332728 Al
atom -0.1221602129795963 1.7930631860708037 6.1053954625694100 Al
atom 3.8027847119488665 2.0248247218557860 6.0748527886379691 Al
atom -0.0991742441621579 6.4323773343192245 5.9701915621225821 Al
atom 3.9960952672801122 6.0376647768805158 6.0030278808344510 Al
atom 2.0939541262166181 -0.0891219938200165 2.1976690370684606 Al
atom 5.9877236095593576 0.1265716204067788 2.1010743558367779 Al
atom 1.9991327254459275 4.1163243256084936 2.1029741526860710 Al
atom 6.2542687360209204 4.1153622399412981 1.8289461059546883 Al
atom 2.1717079205350043 0.3504070260137533 6.2703631308161327 Al
atom 6.0057613615989318 0.0655572389864573 5.9442108608607587 Al
atom 1.9896692857076317 3.9496440460867497 5.9956990981434410 Al
atom 5.8551544435365388 4.0847725415686433 5.7328730066936116 Al
atom 2.1617051903738176 2.0410343268816611 0.1647249680137763 Al
atom 6.1606277189590983 2.1531385218559027 0.0237955655825626 Al
atom 2.1612028865248516 5.9876880468296907 -0.3377708335933656 Al
atom 5.8160462639957169 5.9981720260487625 -0.1521768230016206 Al
atom 1.7332838034480742 2.0242214304212056 3.9078444307307292 Al
atom 5.9169939341430284 2.1258222822582571 3.9538437939958992 Al
atom 2.1042977555893021 5.7666851699707600 4.1708935768911086 Al
atom 6.3555924461038700 6.2425071858905010 3.8576764085536381 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.004
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       5
#  Harmonic E_pot:        4.697eV (1135.47K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.0415654667113941 -0.0960467491900776 -0.0268598041821993 Al
atom 3.9423566014003288 -0.0385548622987191 -0.0604788776274898 Al
atom 0.2807847613424447 3.9574373015358657 0.2818895473612039 Al
atom 4.0985354811406225 4.1836134541828160 -0.1656986946854111 Al
atom -0.0912095422263777 0.1832275356068213 4.1866618977221464 Al
atom 4.2429678604712313 -0.2302868010638372 3.9373392894597350 Al
atom -0.3496369653600256 4.0336485588659396 4.1975538775796490 Al
atom 3.8945239218677221 4.2130003072001996 3.8587737939443860 Al
atom 0.3285591942306992 1.8699161315052262 2.0444952569252286 Al
atom 3.8557989391265348 1.8872419635172886 2.2112255152952200 Al
atom -0.0784549200452644 5.9371803372027587 2.2959498515984240 Al
atom 4.0247182933936916 5.9221720172466386 1.7999698428983844 Al
atom -0.0414785877552082 1.7925893180766526 6.0915455686407531 Al
atom 4.0553047138905391 2.0664367892657367 5.8882062107422311 Al
atom -0.1345661771300342 6.0157104352213997 6.2639905563026055 Al
atom 3.9365638329897252 6.0067412278065007 5.9842603020634995 Al
atom 2.1733273010085714 0.1755214810543347 2.1443115785126450 Al
atom 6.1511095237498781 -0.0804285631339536 1.8465312719302400 Al
atom 2.1133159099550731 4.1088802595429135 1.8600843870063939 Al
atom 6.1153438238487716 4.1788953770924824 2.0040143660253564 Al
atom 2.0542900568282954 -0.0684127417383046 5.9428147369344435 Al
atom 6.0288340014104449 -0.0246399243152995 6.1734784211715601 Al
atom 2.1010568261465346 4.2630042641595942 5.9104209924292670 Al
atom 6.0561083335647066 4.1999318933305485 6.5583263245997205 Al
atom 2.0159524003978575 2.0869837897076127 -0.3332719132108689 Al
atom 6.2227669320881507 2.0820616201703124 0.0041700317443035 Al
atom 2.1104206059309170 6.1045132492471925 0.0280928118421769 Al
atom 6.0250907457493366 5.9796395481131084 0.2628007372686660 Al
atom 2.0164682241425873 2.1702697018769954 4.3697162104091376 Al
atom 5.9267485402631586 2.0692341970046200 3.6557610469337729 Al
atom 1.9291452933789539 6.0029468648143762 3.6321444512270551 Al
atom 5.9711321009115208 5.9818845783922505 4.0860929711377612 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.005
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       6
#  Harmonic E_pot:        3.501eV (846.33K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom 0.0036591204800642 0.0066064940432141 -0.0041870890037537 Al
atom 3.9227822757668984 0.0966220576106383 0.1300657052412481 Al
atom 0.1892222503726273 4.1259405431249299 -0.0968407690507650 Al
atom 3.7926730579908274 3.9266376229790509 -0.0497989595516990 Al
atom 0.1952480469915436 0.0612582043953984 3.9516332718210667 Al
atom 3.9290290238089089 0.0559193677108263 4.2563756537059518 Al
atom -0.0082208059639567 4.1152291083165871 3.7329730860901118 Al
atom 3.9680375530304852 3.9120930931068192 4.0963476676775814 Al
atom -0.2421880449615243 2.2747882590881172 2.0255761012997406 Al
atom 4.0549229094947083 2.0578709418915508 2.2175748281685954 Al
atom -0.1063666206325557 6.1956256975459558 2.0609120539296426 Al
atom 4.3050587778990419 5.9089176475624798 1.9150510000386753 Al
atom 0.1187022306295421 2.0875810181767567 6.0291472648926510 Al
atom 3.9459673473431938 1.9807876852565269 5.8924024816319109 Al
atom 0.1203673408168359 6.1885278040342735 5.9707260797080961 Al
atom 3.9481928457663096 5.9108296803124221 5.9066297539944204 Al
atom 2.1033510949424041 0.0796938308968854 2.2670959129770702 Al
atom 5.8566621245373618 0.0657077311295029 2.2203396978689223 Al
atom 2.1375705904692985 4.1024350954615754 2.0267967407485359 Al
atom 6.2078739876322722 4.0892928600817520 1.8338955387527212 Al
atom 2.2896823766060441 -0.1465163168757354 6.2429057729353445 Al
atom 6.2186254192128834 -0.2903386565336483 5.9797309364856570 Al
atom 1.9889220022822309 3.8831123918742754 5.7945982299359988 Al
atom 6.2886124019930190 3.9988334719209480 6.3224092157530736 Al
atom 1.9403543377089876 2.0611932234206809 -0.0025722844876008 Al
atom 5.9238691346583083 2.1650223804981361 -0.0503607874410415 Al
atom 2.0569966569355160 6.0226447854567855 0.1835860027436216 Al
atom 5.9057136058533501 5.7649654926804832 -0.0186353121388578 Al
atom 1.7784017507193477 2.0801171464015207 3.9328740610564683 Al
atom 6.0756707768179101 2.1140523732213921 4.0740327831910621 Al
atom 2.0545126738505592 6.0319733823837032 3.9498215892684008 Al
atom 5.9704063169475505 6.0068881428261909 4.1432063317571437 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.006
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       7
#  Harmonic E_pot:        3.436eV (830.59K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.1129187178008400 0.0931792173456697 0.0611355669682156 Al
atom 3.8079673372186722 -0.1740771669912946 0.1850021830391034 Al
atom 0.0858656064108428 4.2612423840558300 -0.0606613711974565 Al
atom 3.9216544476926227 3.9109297225590360 0.0607109792773395 Al
atom -0.0824397601761201 0.3452199605980211 4.2399535586932267 Al
atom 4.0668333119896287 -0.0356320759835745 4.2808040841290786 Al
atom -0.0805893205549539 4.1111886330776120 4.1682606373721178 Al
atom 4.2012686788106031 3.9382720785108773 3.9655535550634835 Al
atom 0.0187985013137226 2.2487795881339867 1.8370744895370932 Al
atom 4.0029195826727797 1.8734308832281332 2.0388645943857497 Al
atom 0.2437848781220563 6.0701730196398893 2.1009843173829599 Al
atom 3.8359137020931051 6.0176410461789098 1.8148315116013334 Al
atom -0.0249047420482031 1.9152354787853081 6.3285901465300478 Al
atom 4.1628832597203251 1.9349079193744221 6.1292440012622151 Al
atom 0.0741633672640634 6.3386029295739652 6.0782264935871009 Al
atom 4.0914668181837373 6.0244378233793796 6.1469078154604668 Al
atom 1.8375630619558443 -0.1811933070529585 2.1719398658922495 Al
atom 5.9554112837729951 -0.1047264502399202 2.1643023993935326 Al
atom 2.3063962537092522 3.9441646166519977 2.1668455298907783 Al
atom 6.2817453891105739 4.1405436152473403 1.7504321457642806 Al
atom 2.1592445274750700 -0.0475972561135777 5.9645959032967717 Al
atom 6.0280685810044732 -0.0311747568143748 6.0271337679932468 Al
atom 2.0051100192014264 3.8690159986493859 5.9322389744746884 Al
atom 5.8232037669686791 4.0565969760910265 6.0751954048743544 Al
atom 1.9223451440471739 1.9124821068278137 -0.0216036213125823 Al
atom 5.7915721810480436 1.8778064396170522 -0.1739056359166399 Al
atom 2.0614968474105106 6.1024309853155767 -0.2258683443963419 Al
atom 6.3901965541314363 5.9962746865489809 -0.0857749001895369 Al
atom 1.9899597389652315 1.9857991945992610 3.8846446932706256 Al
atom 6.1919982615833860 2.2344314609081213 3.9768287413778589 Al
atom 1.9952184497790340 6.1509562232816215 4.1572936374801968 Al
atom 5.9821155489248223 6.1549705850164766 3.7945314350144383 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.007
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       8
#  Harmonic E_pot:        3.971eV (960.11K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.0790151093049761 0.1485794378222844 -0.1194832556529174 Al
atom 4.2112050023637373 -0.0074948038793868 -0.0219340207225650 Al
atom -0.0939036062477678 4.0305949632256501 -0.0715820743029821 Al
atom 3.9254383584948465 4.0126347364185388 0.2088150529396906 Al
atom 0.2804488670350581 -0.0461430904289928 4.1742594747157309 Al
atom 3.9466067614905262 0.1904544473758693 3.8372573685423914 Al
atom 0.1809629912345928 3.9806665129558398 3.7425908416481390 Al
atom 4.1095109974594726 4.0607964252949271 4.1028167606838348 Al
atom 0.2183818807824085 1.9577715849781023 1.8191147950501187 Al
atom 4.1553219079111994 2.0871344578067927 2.3578864198457410 Al
atom -0.0453737571592037 6.0228428575001693 1.8081803721364007 Al
atom 3.7036175257018016 6.2195187486809678 2.0266667131554765 Al
atom -0.0410576727083087 1.9508527752533056 6.1236059755136729 Al
atom 4.1692483568329992 1.9255751455951673 6.1411999228505385 Al
atom -0.2719088098289064 5.9675949769235821 6.1103628498467453 Al
atom 4.0435315889104082 5.9426705117542253 5.8453008902228589 Al
atom 2.0581061201362765 -0.1033694200845422 1.9781926937243948 Al
atom 6.1164718236530549 0.3040327192526390 2.0760656847150281 Al
atom 2.0429160405118263 3.8574238263694953 1.9966869899196540 Al
atom 5.9021868884276909 4.0348393023527587 1.8630072821222372 Al
atom 2.1837084647503038 -0.1045344644170794 6.2416374603581399 Al
atom 5.9820791955043919 -0.2054720133557299 5.9987636693115585 Al
atom 1.5127696075159580 4.3139813076076399 6.2465859042088763 Al
atom 6.0788336158804164 4.0041183474625379 6.0049178590540917 Al
atom 2.1019776363216138 1.9424316619869417 0.0582803432881564 Al
atom 6.0872154299735737 2.2187023557638175 -0.0366172213224339 Al
atom 2.0235396034754065 6.0067162539890786 0.0257109541451550 Al
atom 5.9326044657045118 6.2942858867510543 -0.0462796689458253 Al
atom 1.9974569430923537 2.0106882955902314 4.4188449561840368 Al
atom 6.3621670175655760 2.0208379998087014 4.2812728061012564 Al
atom 2.0951188681334729 5.7573454054199065 3.9636491103580909 Al
atom 6.0441455563856801 6.1382354082255040 3.7785356503046992 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.008
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       9
#  Harmonic E_pot:        4.124eV (997.14K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom 0.1257680518422207 0.0438648940679496 0.0914770179754121 Al
atom 4.0594809197237227 -0.0121701135873991 0.1226833213194142 Al
atom 0.0906769686829177 4.1316309138344653 0.1295065983648558 Al
atom 3.8357408336890586 3.9633522772924432 0.0186364616406736 Al
atom -0.2434770840437322 0.0295460109089710 4.0989907236936896 Al
atom 4.1919099853657826 -0.2357647749312366 4.3424517359047448 Al
atom 0.0341025975138814 3.9482266887343718 4.1461007631862863 Al
atom 3.9095787114182499 3.9316140800184280 3.8198952565753701 Al
atom -0.0247080638803107 2.0361396416425688 2.1143319276885144 Al
atom 3.9655105383425076 1.7684581324677078 2.1392729206315964 Al
atom -0.0911464532102688 6.3406990986062723 1.9543695490675472 Al
atom 3.7818576406093900 5.9690031705186266 2.0802476907402654 Al
atom -0.0447289648798957 2.2700191838596830 6.0685637064369207 Al
atom 4.3673372326114466 2.0283421957126975 5.8861855806971377 Al
atom -0.0231213111061314 5.8760374655195546 6.1150305833459049 Al
atom 4.0084967339159618 5.9626281660131939 6.0851807795501633 Al
atom 2.2588487660112806 0.0416825057666120 2.2249567575298674 Al
atom 5.8248867800455537 0.0936877368051197 1.9105031045951366 Al
atom 1.8393979994327121 4.2005660871294310 1.9637738138577567 Al
atom 6.1673043727910368 3.8047871888546565 1.8300070664059409 Al
atom 1.9428464600239428 0.1028054610918658 6.0633666983779353 Al
atom 6.2300221026977152 0.2448861953698706 5.9805875416579246 Al
atom 2.3198982162646513 4.0515224994977377 6.1035285867258349 Al
atom 5.9263924412833848 4.0215944147548202 6.1407620499308511 Al
atom 1.9114205091675649 2.0271178831500540 0.0944137882163270 Al
atom 6.0396536801806935 2.0204744675544433 -0.0619171013791860 Al
atom 1.9826897855214602 6.2585594123356998 -0.1830575065611489 Al
atom 6.2019630012020306 6.0159703946437597 -0.2162267806603223 Al
atom 2.4462091276586784 2.1957603386710334 3.9352600529504649 Al
atom 6.2668009954523800 2.0635825316880543 4.0723759036173188 Al
atom 1.7985813954757806 5.8703093543704172 3.9279380524398295 Al
atom 5.8341185901963293 5.8693790576381231 3.9351159154769721 Al
#=======================================================
# FHI-aims file: geometry.in.supercell.1000K.009
# Created using the Atomic Simulation Environment (ASE)
# Thu Nov 14 15:36:15 2024

# Additional information:
#  created from force constants
#  T = 1000.0 K
#  quantum:             False
#  deterministic:       False
#  plus_minus:          False
#  gauge_eigenvectors:  False
#  Random seed:         281513462
#  Sample number:       10
#  Harmonic E_pot:        4.628eV (1118.91K)
#=======================================================
lattice_vector 8.0778593799999996 0.0000000000000000 0.0000000000000000 
lattice_vector 0.0000000000000000 8.0778593799999996 0.0000000000000000 
lattice_vector 0.0000000000000000 0.0000000000000000 8.0778593799999996 
atom -0.0027401104817948 0.0278305384937239 -0.1530342201569881 Al
atom 3.8643780944331039 -0.0264461239000665 0.4572359839668849 Al
atom 0.1055461636700433 3.7254524393103483 -0.1543952926328211 Al
atom 4.1211932826953461 4.1040813109282324 -0.0965770902149376 Al
atom -0.0312308521788747 0.0030555979102012 4.1188988280786951 Al
atom 4.0488519481536853 -0.0164613243526246 3.9227023169139592 Al
atom -0.0080286462179765 4.0955468070501215 3.8753140702861262 Al
atom 4.0160057929493913 4.1222822940853456 4.1085532892760908 Al
atom 0.0075081091540319 2.2678070785163440 2.1048334433294547 Al
atom 3.7831098531267653 1.9083049979077213 2.1511043472615867 Al
atom 0.2247555222786947 6.0629543388093214 1.9703354409711744 Al
atom 3.9651744393971233 5.8371256117741295 1.9741069623522651 Al
atom -0.1212556488389646 2.0117591411382860 5.8993067179097167 Al
atom 3.9509368282557187 1.8906695534250502 6.1675297239148819 Al
atom -0.0061628964700797 6.1702260241033420 6.3530752075030525 Al
atom 3.7559410733885676 6.3214893155983081 6.0535304188305785 Al
atom 1.9482264210218176 -0.1119905178144168 2.0044773230390538 Al
atom 6.0494860092798577 -0.1269755611679731 2.0107984297654302 Al
atom 2.1717357251571858 4.1390760447369974 1.8173618593154763 Al
atom 6.0067767449674170 4.0433359854630995 2.1286264108243533 Al
atom 1.9465534156973678 0.4946958303542788 6.0344114210470750 Al
atom 6.0245254375366466 0.0598309818983070 6.1862163177464966 Al
atom 2.0126798529041952 3.8083806891972767 6.1565528554191484 Al
atom 6.1152043503684483 3.8692880554427296 6.1155194024073447 Al
atom 2.3040189354315670 2.0197456115608112 -0.1250302450633377 Al
atom 5.8363355190723176 1.8961664966754814 0.2623595501731578 Al
atom 2.0801730998440147 6.2171520746228905 -0.3603711039929702 Al
atom 6.3302562274300858 5.8566430481258385 0.0293666290040201 Al
atom 2.0605137702182184 2.2247033326849794 3.9154280085663271 Al
atom 6.0380008224223127 1.8620933534463613 4.1072094775938499 Al
atom 2.1603842994724194 6.3246648942258226 3.7525020650377510 Al
atom 6.1754589758613410 5.8518246397497302 4.1463640115270968 Al

In order to take into account electron-vibrational interaction in real sapce, we need to use large supercells to include the nuclei vibration. In this example, we use a \(2\times 2\times 2\) supercell with 16 atoms which is relatively small, in production calculation the supercell size should be significantly larger.

Control tags

For each geometry, we can use the same input file control.in from the first Part.

xc        pbe
k_grid    6 6 6
dos_kgrid_factors    1 1 1

#                 type[letter]   temperature[eV]
occupation_type   fermi          1

#                         kubo_broadening[eV] , Fermi-Temperature[eV] , E_min[eV] , E_max[eV] , w_min[eV] , w_max[eV] , n_w_points[1] , spatial directions[letter]
compute_kubo_greenwood    0.020                    1                  -20.57        9.44        0.0         5.0         2000           a a
kg_width 0.01 0.10 10

[Add light species defaults for Al]

Warning

Here, we use \(2\times 2\times 2\) supercell, but the same control.in file as for the 4-atom Al primitive cell in Part 1. Thus, the \(\bf k\)-grid is denser then for the primitive cell in part 1.

In general, to maintain the same \(\bf k\)-grid density between a primitive cell and an \(N \times N \times N\) supercell, the \(\bf k\)-grid in the supercell need to be \(\frac{1}{N} \times \frac{1}{N} \times \frac{1}{N}\) sparser. Keep this relation in mind when making fair comparisons of \(\bf k\)-grid convergence between different supercell sizes.

For a more detailed discussion on the systematic convergence of the \(\bf k\)-grid density and supercell size, please refer to the next example in Part 3 and this paper.

Run the calculation

Create 10 separate directories for each of the samples, named from config_000 to config_009 and copy the relevant geometry.in file from above into them, as well as the control.in displayed above. Then run calculations from inside each of these folders. On your local PC, the each calculation with N processes can be launched by:

mpirun -n N your_aims.x > aims.out
The binary name your_aims.x should be replaced by your FHI-aims binary file.

Alternatively, if you are on a HPC system, then you can use a job submission script to perform each of the calculations within their respective folders.

The estimated runtime for one single calculation with 4 CPU cores is approximately 15 minutes. Using more cores can further speed up the calculation.

(If you don't want to wait for the calculations, we also provide all output files in the repository, you can use these results for the following analysis.)

Post-processing

Collect results

In the repository, we prepared a bash script called pp_all.sh to collect all output files. This is also shown below: Note that this script assumed the 10 calculation directories are named config_000 to config_009

startp=000
endp=009


startw=100
endw=1000
# Filename prefix of your structure:
kgresult='KG_full_L11_out_Gaussian_0.'


touch kg_result_e.txt kg_result_h.txt
for num in `seq -f "%03g" ${startp} 1 ${endp}` ; do
        echo ${num}

        cd "config_${num}"
        if test ! -e KG_full_Mobility_out_Gaussian_0.0700_a_a.out; then
                echo "skip ${num}"
                cd ..
                continue
        fi
        if [ ${num} = ${startp} ]; then
                for iwidth in `seq -f "%04g" ${startw} 100 ${endw}` ; do
            echo ${iwidth}
                        awk '{print $1,$5}' ./${kgresult}${iwidth}'_a_a.out' >> ../kg_result_tmp_h.txt
                        awk '{print $1,$8}' ./${kgresult}${iwidth}'_a_a.out' >> ../kg_result_tmp_e.txt
                done
        else
                for iwidth in `seq -f "%04g" ${startw} 100 ${endw}` ; do
                        awk '{print $5}' ./${kgresult}${iwidth}'_a_a.out' >> ../kg_result_tmp_h.txt
                        awk '{print $8}' ./${kgresult}${iwidth}'_a_a.out' >> ../kg_result_tmp_e.txt

                done
        fi
        cd ..
        paste kg_result_h.txt kg_result_tmp_h.txt >> kg_result_new_h.txt
        paste kg_result_e.txt kg_result_tmp_e.txt >> kg_result_new_e.txt
#
        mv kg_result_new_h.txt kg_result_h.txt
        mv kg_result_new_e.txt kg_result_e.txt
        rm kg_result_tmp_h.txt kg_result_tmp_e.txt

done

echo "Start add charge carrier density in kg_result_h.txt"
# remove the first 3 lines in kg_result_h.txt
sed -i '1,3d' kg_result_h.txt

# copy the first 3 lines from kg_result_e.txt
head -n 3 kg_result_e.txt > temp_charge.txt

# combine them to kg_result_h.txt
cat temp_charge.txt kg_result_h.txt > temp_kg_result_h.txt
mv temp_kg_result_h.txt kg_result_h.txt
rm temp_charge.txt

# trim unnecessary lines
#sed -i '4,5d' kg_result_h.txt
#sed -i '4,5d' kg_result_e.txt

sed -i -e '/# Full/d' -e '/# cm/d' kg_result_e.txt
sed -i -e '/# Intra/d' -e '/# (Ohm/d' kg_result_h.txt

Running

bash pp_all.sh
will generate the file kg_result_e.txt and kg_result_h.txt which contains carrier densities and electron/hole conductivities for all the 10 samples and 10 broadening parameters.

The resulting text file kg_result_e.txt has the following content:

    #                                   
    # 0.179505314282E+23    0.180362079085E+23  0.181043813377E+23  0.180027736242E+23  0.181852508509E+23  0.181445140065E+23  0.180577348314E+23  0.182572276313E+23  0.182107982559E+23  0.180805474730E+23
    # 0.159479405674E+23    0.158403845963E+23  0.157680253335E+23  0.158947832445E+23  0.157083621546E+23  0.157378916563E+23  0.158092117597E+23  0.156749394161E+23  0.156812098001E+23  0.158320244012E+23
    2.500000E-003 8.495217E+003 8.148546E+003   5.477885E+003   6.523649E+003   8.907962E+003   1.002064E+004   1.079687E+004   1.194417E+004   7.120126E+003   9.894707E+003
    5.000000E-003 6.438347E+003 6.216643E+003   4.246308E+003   5.056675E+003   6.687284E+003   7.604281E+003   7.964200E+003   9.010525E+003   5.473586E+003   7.124721E+003
    7.500000E-003 6.269923E+003 6.124878E+003   4.251543E+003   5.060463E+003   6.503440E+003   7.437250E+003   7.631502E+003   8.780709E+003   5.463632E+003   6.655162E+003
    1.000000E-002 6.642949E+003 6.582644E+003   4.648832E+003   5.520270E+003   6.926764E+003   7.917551E+003   8.036046E+003   9.344086E+003   5.975679E+003   6.824271E+003
    1.250000E-002 7.285391E+003 7.328216E+003   5.274650E+003   6.230062E+003   7.672778E+003   8.709798E+003   8.836728E+003   1.031304E+004   6.790578E+003   7.299702E+003
    1.500000E-002 8.102780E+003 8.268527E+003   6.076987E+003   7.113780E+003   8.641595E+003   9.684485E+003   9.925713E+003   1.154581E+004   7.832061E+003   7.965532E+003
    1.750000E-002 9.049047E+003 9.358129E+003   7.033583E+003   8.129578E+003   9.779089E+003   1.077039E+004   1.125458E+004   1.296343E+004   9.059736E+003   8.761529E+003
    2.000000E-002 1.009304E+004 1.057062E+004   8.131056E+003   9.247546E+003   1.104167E+004   1.192230E+004   1.278730E+004   1.450439E+004   1.044424E+004   9.643257E+003
    2.250000E-002 1.120693E+004 1.188978E+004   9.357430E+003   1.044367E+004   1.238555E+004   1.311395E+004   1.448353E+004   1.611133E+004   1.196129E+004   1.057158E+004
    2.500000E-002 1.236266E+004 1.330530E+004   1.069870E+004   1.169796E+004   1.376527E+004   1.433665E+004   1.629443E+004   1.772874E+004   1.359091E+004   1.151316E+004
    2.750000E-002 1.353291E+004 1.480857E+004   1.213720E+004   1.299298E+004   1.513734E+004   1.559706E+004   1.816669E+004   1.930572E+004   1.531696E+004   1.244566E+004
    3.000000E-002 1.469468E+004 1.638775E+004   1.365142E+004   1.431202E+004   1.646694E+004   1.691184E+004   2.005173E+004   2.080140E+004   1.712510E+004   1.336347E+004
        ......        ......        ......          ......          ......          ......          ......          ......          ......          ......          ......
    #                                   
    # 0.179505314282E+23    0.180362079085E+23  0.181043813377E+23  0.180027736242E+23  0.181852508509E+23  0.181445140065E+23  0.180577348314E+23  0.182572276313E+23  0.182107982559E+23  0.180805474730E+23
    # 0.159479405674E+23    0.158403845963E+23  0.157680253335E+23  0.158947832445E+23  0.157083621546E+23  0.157378916563E+23  0.158092117597E+23  0.156749394161E+23  0.156812098001E+23  0.158320244012E+23
    2.500000E-003 3.967877E+004 4.326409E+004   3.516766E+004   3.722001E+004   4.360884E+004   4.681503E+004   5.288660E+004   5.534676E+004   4.408378E+004   3.802817E+004
    5.000000E-003 2.421576E+004 2.656323E+004   2.180372E+004   2.286227E+004   2.665970E+004   2.857890E+004   3.245301E+004   3.365266E+004   2.723434E+004   2.311534E+004
    7.500000E-003 1.953317E+004 2.155115E+004   1.786369E+004   1.855277E+004   2.153858E+004   2.306288E+004   2.632272E+004   2.703186E+004   2.222660E+004   1.858925E+004
    1.000000E-002 1.757627E+004 1.949874E+004   1.632197E+004   1.678692E+004   1.940852E+004   2.076484E+004   2.381622E+004   2.421005E+004   2.022248E+004   1.669358E+004
    1.250000E-002 1.673281E+004 1.865796E+004   1.577270E+004   1.606199E+004   1.850035E+004   1.978296E+004   2.279533E+004   2.292873E+004   1.945142E+004   1.587761E+004
    1.500000E-002 1.646387E+004 1.844356E+004   1.574588E+004   1.587504E+004   1.822234E+004   1.948159E+004   2.254438E+004   2.243146E+004   1.931964E+004   1.562471E+004
    1.750000E-002 1.653688E+004 1.860195E+004   1.603829E+004   1.600841E+004   1.831879E+004   1.958631E+004   2.275336E+004   2.239064E+004   1.956857E+004   1.571356E+004
    2.000000E-002 1.683388E+004 1.900350E+004   1.654614E+004   1.635118E+004   1.865964E+004   1.995780E+004   2.326359E+004   2.263922E+004   2.006456E+004   1.603338E+004
    2.250000E-002 1.728763E+004 1.957337E+004   1.720931E+004   1.683967E+004   1.917046E+004   2.051637E+004   2.398306E+004   2.308140E+004   2.072881E+004   1.652230E+004
    2.500000E-002 1.785602E+004 2.026398E+004   1.798915E+004   1.743380E+004   1.980438E+004   2.121191E+004   2.485258E+004   2.365696E+004   2.150949E+004   1.714263E+004
    2.750000E-002 1.851048E+004 2.104257E+004   1.885831E+004   1.810633E+004   2.052939E+004   2.201016E+004   2.583042E+004   2.432510E+004   2.236923E+004   1.786957E+004
    3.000000E-002 1.923016E+004 2.188507E+004   1.979577E+004   1.883760E+004   2.132200E+004   2.288598E+004   2.688480E+004   2.505640E+004   2.327899E+004   1.868544E+004
        ......        ......        ......          ......          ......          ......          ......          ......          ......          ......          ......

This file is divided into blocks by the lines started with #, these commented lines are the electron and hole carrier density of the 10 samples. There are number of broadening width blocks in total, in this example 10. And each block is in shape (n_freqency, n_samples), in this example \((1999, 10)\) stored all electron conductivity data of 10 samples at 1999 frequency points for each broadening width. The file kg_result_h.txt have exactlly the same structure.

(P.S. we requested 2000 frequency points in the input tag but remember that we skipped the first frequency point \(\omega = 0\) to avoid potential numerical issues in the denominator.)

Ensemble average

The total mobility \(\mu(\omega)\) is calculated by:

\[\langle \mu(\omega) \rangle_T = \langle \frac{\sigma_e(\omega)}{ n_e q} \rangle_T + \langle \frac{\sigma_h(\omega)}{ n_h q} \rangle_T \]

where \(\langle \cdots \rangle = \frac{1}{N}\sum_{I}\) is averaging over all samples.

A simple post-processing and visualization script pp_mobility_Al.ipynb is available as a Jupyter Notebook in the solutions folder of the repository using kg_result_e.txt and kg_result_h.txt as input files. A standalone python plotting script, plot_Al_mobility.py is also shown below

import numpy as np
import matplotlib.pyplot as plt
import math
import matplotlib

def get_carrier(nsample, filename):
    ftxt = open(filename,"r")
    carrier = []
    for iline in range(0,3):
        line = ftxt.readline()
        if iline == 0:
            header1 = line.strip('#')
        elif iline == 1:
            for isample in range(1,nsample+1):
                carrier.append(float(line.split()[isample]))
        elif iline == 2:
            for isample in range(1,nsample+1):
                carrier.append(float(line.split()[isample]))
    carrier = np.asarray(carrier)
    carrier = carrier.reshape((2,nsample))
    return carrier


def pp_mobility(filename, n_width, n_freq, carrier):
    '''
    Return sample averaged data.
    '''
    charge = 1.60217663e-19
    eachk_raw = np.loadtxt(filename)
    eachk = eachk_raw[:,1:]
    freq = eachk_raw[:,0]
    eachk = eachk.reshape((n_width,n_freq,np.shape(eachk)[1]))
    np.shape(eachk)
    for isample in range(np.shape(eachk)[2]):
        eachk[:,:,isample] = eachk[:,:,isample] / charge / carrier[isample]
    avrg_mobility = np.mean(eachk,axis=2)
    std_mobility = np.std(eachk,axis=2)
    return avrg_mobility, std_mobility,freq

nn_width = 10 # 10 for 222, 7 for 555
nn_freq = 1999
nn_samples = 10  # 100samples for 222, 10samples for 555
charge = 1.60217663e-19

filename1 = f"kg_result_e.txt"
filename2 = f"kg_result_h.txt"
carrier_den = get_carrier(nn_samples, filename1)

avrg_mobility_e, std_mobility_e, freq = pp_mobility(filename1, nn_width, nn_freq, carrier_den[0,:])
avrg_mobility_h, std_mobility_h, freq = pp_mobility(filename2, nn_width, nn_freq, carrier_den[1,:])

avrg_mobility = avrg_mobility_e + avrg_mobility_h

j = 2
end_point = 200
start_point = 1
fig, ax = plt.subplots()

# plot figure
ax.plot(freq[start_point:end_point],avrg_mobility[j,start_point:end_point]
        , label=r"16 atom ")
plt.xlabel(r'$\hbar\omega$ (eV)',fontsize=12)
plt.ylabel(r'Mobility (${\rm cm^2/ (Vs)}$)',fontsize=12)
plt.legend()
plt.xlim(0,0.55)
plt.savefig('Al_16atom_mobility.png',dpi=250)

The averaged mobility \(\mu (\omega)\) with broadening \(\eta=0.03\) eV should look like the following figure:

Divergence can be observed in the DC limit \(\omega \to 0\), which arises from the \(1/\omega\) term in the Kubo-Greenwood formula. This divergence is eliminated only in the thermodynamics limit (infinitely large supercell), but will always exist in our finite-size simulation.

Drude fitting

From the averaged electron mobility spectra, we can also observe that in the low frequency region (before the numerical divergence), when the frequency decreases, the mobility shows a peak and then quickly drops down when \(\omega \to 0\), which is due to the finite-size effect of the simulation cell.

In practical calculations, the 'infinite supercell' limit cannot be reached, thus it is important to employ strategies to extrapolate to the DC limit. Here we use the Drude fitting approach. In the low-frequency limit, the mobility can be fitted by a Drude function:

\[ \mu(\omega \to 0) \approx \frac{\mu_0}{(\omega\tau)^2 + 1} \ ,\]

whereby \(\mu_0\) and \(\tau\) are two parameters to be fitted.

  • In practice, the Drude function should be fitted using frequency data from the first peak and usually extending through a small frequency window beyond it.

Please refer to this paper for more details about the finite size effect and Drude fitting.

Warning

The Drude fitting must be performed after ensemble average! The individual spectra of one sample may not look like a Drude function, but a converged ensemble will show a Drude-like behaviour.

A simple Drude fitting code is provided in the same Jupyter Notebook, by fitting with the electron mobility data between the first peak and 0.5 eV. This is also shown in an extended version of the standalone python plotting script below

import numpy as np
import matplotlib.pyplot as plt
import math
import matplotlib

def get_carrier(nsample, filename):
    ftxt = open(filename,"r")
    carrier = []
    for iline in range(0,3):
        line = ftxt.readline()
        if iline == 0:
            header1 = line.strip('#')
        elif iline == 1:
            for isample in range(1,nsample+1):
                carrier.append(float(line.split()[isample]))
        elif iline == 2:
            for isample in range(1,nsample+1):
                carrier.append(float(line.split()[isample]))
    carrier = np.asarray(carrier)
    carrier = carrier.reshape((2,nsample))
    return carrier


def pp_mobility(filename, n_width, n_freq, carrier):
    '''
    Return sample averaged data.
    '''
    charge = 1.60217663e-19
    eachk_raw = np.loadtxt(filename)
    eachk = eachk_raw[:,1:]
    freq = eachk_raw[:,0]
    eachk = eachk.reshape((n_width,n_freq,np.shape(eachk)[1]))
    np.shape(eachk)
    for isample in range(np.shape(eachk)[2]):
        eachk[:,:,isample] = eachk[:,:,isample] / charge / carrier[isample]
    avrg_mobility = np.mean(eachk,axis=2)
    std_mobility = np.std(eachk,axis=2)
    return avrg_mobility, std_mobility,freq

def drude_func(x, a, b):
    y = a / (1 + b * (x**2))
    return y

def drude_fit(x, y):
    from scipy.optimize import curve_fit
    popt, pcov = curve_fit(drude_func, x, y)
    print('drude fit coefficient: ', popt)
    return popt


nn_width = 10 # 10 for 222, 7 for 555
nn_freq = 1999
nn_samples = 10  # 100samples for 222, 10samples for 555
charge = 1.60217663e-19

filename1 = f"kg_result_e.txt"
filename2 = f"kg_result_h.txt"
carrier_den = get_carrier(nn_samples, filename1)

avrg_mobility_e, std_mobility_e, freq = pp_mobility(filename1, nn_width, nn_freq, carrier_den[0,:])
avrg_mobility_h, std_mobility_h, freq = pp_mobility(filename2, nn_width, nn_freq, carrier_den[1,:])

avrg_mobility = avrg_mobility_e + avrg_mobility_h

j = 2
end_point = 200
start_point = 10
fig, ax = plt.subplots()

# drude fit
freq_start = 10
freq_end = 200
print('max condcutivity index:', np.argmax(avrg_mobility[j, freq_start:]))
freq_start = np.argmax(avrg_mobility[j, freq_start:]) + freq_start
#freq_start = 15

freq_in = freq[freq_start: freq_end]
cond_in = avrg_mobility[j, freq_start:freq_end]
popt = drude_fit(freq_in, cond_in)

# plot figure
ax.plot(freq[start_point:end_point],avrg_mobility[j,start_point:end_point], label=r"16 atom ")
ax.plot(freq[0:freq_end], drude_func(freq[0:freq_end], *popt), color='tomato',label=f'Drude fit')
plt.xlabel(r'$\hbar\omega$ (eV)',fontsize=12)
plt.ylabel(r'Mobility (${\rm cm^2/ (Vs)}$)',fontsize=12)
plt.legend()
plt.xlim(0,0.55)
plt.savefig('Al_16atom_drude_fit.png',dpi=250)

The resulting fit is displayed in the figure below:

In this case, the extrapolated DC mobility is \(\mu_0 \sim 28\) \(cm^2/(Vs)\).

Warning

The above result is not converged. In production calculation, to get reliable vibrational-limited mobility one should carefully converge all parameters including:

  • supercell size

  • number of samples

  • k-grid density

  • broadening width.

Convergence test

In this example, we only use a small 16-atom supercell, sparse \(6\times 6\times 6\) k-grid and 10 samples for simplicity. These settings are insufficient for production calculations. A detailed discussion on convergence tests for all these parameters can be found in this paper.

The next example, which uses a 40-atom SrTiO\(_3\) supercell, also provides insights on the convergence behavior of these parameters.

Solutions

You find all the solution to all the above exercises by clicking on the button below.

Show solutions to Part 2