41 real(8) sc,sc1,sc2,sc3
43 real(8) scu,scu1,scu2,scu3
45 real(8) axang(4),rot(3,3)
46 real(8) rndavec,v(3),t1
47 character(256) block,symb,str
169 do k=1,3;
do j=1,3;
do i=1,3
172 end do; end do; end do
202 if (
allocated(vqlwrt))
deallocate(vqlwrt)
203 allocate(vqlwrt(3,nphwrt))
351 thetamld=45.d0*
pi/180.d0
411 open(50,file=
'elk.in',status=
'OLD',form=
'FORMATTED',iostat=ios)
414 write(*,
'("Error(readinput): error opening elk.in")')
419 read(50,*,end=30) block
421 if ((block(1:1) ==
'!').or.(block(1:1) ==
'#'))
goto 10
422 select case(trim(block))
425 read(50,
'(A)',err=20) str
426 if (trim(str) ==
'')
then 429 write(*,
'("Error(readinput): no tasks to perform")')
436 read(str,*,iostat=ios)
tasks(i)
439 write(*,
'("Error(readinput): error reading tasks")')
440 write(*,
'("(blank line required after tasks block)")')
446 write(*,
'("Error(readinput): too many tasks")')
447 write(*,
'("Adjust maxtasks in modmain and recompile code")')
456 read(50,
'(A)',err=20) str
457 if (trim(str) ==
'')
goto 10
458 read(str,*,iostat=ios) zn,symb
461 write(*,
'("Error(readinput): error reading fractional species")')
462 write(*,
'("(blank line required after fspecies block)")')
468 write(*,
'("Error(readinput): fractional nuclear Z > 0 : ",G18.10)') zn
475 write(*,
'("Error(readinput): too many fractional nucleus species")')
480 read(50,
'(A)',err=20) str
481 read(str,*,err=20)
avec(:,i)
482 read(str,*,iostat=ios)
avec(:,i),
davec(:,i)
487 read(50,*,err=20) sc1
489 read(50,*,err=20) sc2
491 read(50,*,err=20) sc3
493 read(50,*,err=20) scx
495 read(50,*,err=20) scy
497 read(50,*,err=20) scz
502 write(*,
'("Error(readinput): epslat <= 0 : ",G18.10)')
epslat 516 write(*,
'("Error(readinput): radkpt <= 0 : ",G18.10)')
radkpt 521 read(50,
'(A)',err=20) str
522 read(str,*,err=20)
ngridk(:)
524 if (any(
ngridk(:) < 1))
then 526 write(*,
'("Error(readinput): invalid ngridk :",3(X,I0))')
ngridk 532 read(50,*,err=20)
vkloff(:)
533 if (any(
vkloff(:) < 0.d0).or.any(
vkloff(:) >= 1.d0))
then 535 write(*,
'("Error(readinput): vkloff components should be in [0,1) : ",& 543 read(50,*,err=20)
ngridq(:)
544 if (any(
ngridq(:) < 1))
then 546 write(*,
'("Error(readinput): invalid ngridq :",3(X,I0))')
ngridq 553 read(50,
'(A)',err=20) str
558 write(*,
'("Error(readinput): rgkmax <= 0 : ",G18.10)')
rgkmax 563 read(50,
'(A)',err=20) str
567 read(50,
'(A)',err=20) str
572 write(*,
'("Error(readinput): lmaxapw < 0 : ",I0)')
lmaxapw 578 write(*,
'("Error(readinput): lmaxapw too large : ",I0)')
lmaxapw 579 write(*,
'("Adjust maxlapw in modmain and recompile code")')
583 case(
'lmaxo',
'lmaxvr')
584 read(50,
'(A)',err=20) str
585 read(str,*,err=20)
lmaxo 589 write(*,
'("Error(readinput): lmaxo < 3 : ",I0)')
lmaxo 593 case(
'lmaxi',
'lmaxinr')
594 read(50,*,err=20)
lmaxi 597 write(*,
'("Error(readinput): lmaxi < 1 : ",I0)')
lmaxi 603 write(*,
'("Info(readinput): variable ''lmaxmat'' is no longer used")')
616 write(*,
'("Error(readinput): socscf < 0 : ",G18.10)')
socscf 621 read(50,*,err=20)
bforb 625 read(50,
'(A)',err=20) str
626 str=trim(str)//
' 0 0' 627 read(str,*,err=20)
xctype(:)
629 read(50,
'(A)',err=20) str
630 str=trim(str)//
' 0 0' 631 read(str,*,err=20)
xctsp(:)
633 read(50,
'(A)',err=20) str
634 str=trim(str)//
' 0 0' 635 read(str,*,err=20)
ktype(:)
636 if (
ktype(3) /= 0)
then 638 write(*,
'("Error(readinput): ktype(3) should be zero : ",I0)')
ktype(3)
643 read(50,*,err=20)
stype 648 write(*,
'("Error(readinput): swidth too small or negative : ",G18.10)') &
656 read(50,*,err=20)
mstar 657 if (
mstar <= 0.d0)
then 659 write(*,
'("Error(readinput): mstar <= 0 : ",G18.10)')
mstar 667 write(*,
'("Error(readinput): epsocc <= 0 : ",G18.10)')
epsocc 675 write(*,
'("Error(readinput): epschg <= 0 : ",G18.10)')
epschg 679 case(
'nempty',
'nempty0')
680 read(50,
'(A)',err=20) str
685 write(*,
'("Error(readinput): nempty <= 0 : ",G18.10)')
nempty0 693 case(
'amixpm',
'beta0',
'betamax')
694 if (trim(block) ==
'amixpm')
then 695 read(50,*,err=20)
amixpm(:)
696 else if (trim(block) ==
'beta0')
then 697 read(50,*,err=20)
amixpm(1)
699 read(50,*,err=20)
amixpm(2)
701 if (
amixpm(1) < 0.d0)
then 703 write(*,
'("Error(readinput): beta0 [amixpm(1)] < 0 : ",G18.10)')
amixpm(1)
709 write(*,
'("Error(readinput): betamax [amixpm(2)] not in [0,1] : ",G18.10)')&
718 write(*,
'("Error(readinput): mixsdb < 2 : ",I0)')
mixsdb 727 write(*,
'("Error(readinput): invalid Broyden mixing parameters : ",& 738 write(*,
'("Error(readinput): maxscl < 0 : ",I0)')
maxscl 761 write(*,
'("Error(readinput): nspecies < 1 : ",I0)')
nspecies 767 write(*,
'("Error(readinput): nspecies too large : ",I0)')
nspecies 768 write(*,
'("Adjust maxspecies in modmain and recompile code")')
775 read(50,*,err=20)
natoms(is)
778 write(*,
'("Error(readinput): natoms < 1 : ",I0)')
natoms(is)
779 write(*,
'(" for species ",I0)') is
785 write(*,
'("Error(readinput): natoms too large : ",I0)')
natoms(is)
786 write(*,
'(" for species ",I0)') is
787 write(*,
'("Adjust maxatoms in modmain and recompile code")')
792 read(50,
'(A)',err=20) str
793 read(str,*,err=20)
atposl(:,ia,is)
794 read(str,*,iostat=ios)
atposl(:,ia,is),
bfcmt0(:,ia,is),
datposl(:,ia,is)
801 write(*,
'("Error(readinput): nvp1d < 1 : ",I0)')
nvp1d 807 write(*,
'("Error(readinput): npp1d < nvp1d :",2(X,I0))')
npp1d,
nvp1d 814 read(50,*,err=20)
vvlp1d(:,i)
817 read(50,*,err=20)
ip01d 820 write(*,
'("Error(readinput): ip01d < 1 : ",I0)')
ip01d 825 read(50,*,err=20)
vclp2d(:,0)
826 read(50,*,err=20)
vclp2d(:,1)
827 read(50,*,err=20)
vclp2d(:,2)
828 read(50,*,err=20)
np2d(:)
829 if ((
np2d(1) < 1).or.(
np2d(2) < 1))
then 831 write(*,
'("Error(readinput): np2d < 1 :",2(X,I0))')
np2d 836 read(50,*,err=20)
vclp3d(:,0)
837 read(50,*,err=20)
vclp3d(:,1)
838 read(50,*,err=20)
vclp3d(:,2)
839 read(50,*,err=20)
vclp3d(:,3)
840 read(50,*,err=20)
np3d(:)
841 if ((
np3d(1) < 1).or.(
np3d(2) < 1).or.(
np3d(3) < 1))
then 843 write(*,
'("Error(readinput): np3d < 1 :",3(X,I0))')
np3d 851 write(*,
'("Error(readinput): nwplot < 2 : ",I0)')
nwplot 857 write(*,
'("Error(readinput): ngrkf < 1 : ",I0)')
ngrkf 863 write(*,
'("Error(readinput): nswplot < 0 : ",I0)')
nswplot 867 read(50,*,err=20)
wplot(:)
870 write(*,
'("Error(readinput): wplot(1) > wplot(2) : ",2G18.10)')
wplot 877 read(50,*,err=20)
tpdos 886 case(
'maxatpstp',
'maxatmstp')
890 write(*,
'("Error(readinput): maxatpstp < 1 : ",I0)')
maxatpstp 894 case(
'tau0atp',
'tau0atm')
900 write(*,
'("Error(readinput): deltast <= 0 : ",G18.10)')
deltast 914 write(*,
'("Error(readinput): maxlatvstp < 1 : ",I0)')
maxlatvstp 922 write(*,
'("Info(readinput): variable ''nstfsp'' is no longer used")')
927 write(*,
'("Error(readinput): lradstp < 1 : ",I0)')
lradstp 932 read(50,
'(A)',err=20) str
937 write(*,
'("Info(readinput): variable ''nprad'' is no longer used")')
944 write(*,
'("Error(readinput): noptcomp should be from 1 to 27 : ",I0)') &
951 read(50,
'(A)',err=20) str
952 if (trim(str) ==
'')
then 955 write(*,
'("Error(readinput): empty optical component list")')
962 str=trim(str)//
' 1 1' 963 read(str,*,iostat=ios)
optcomp(:,i)
966 write(*,
'("Error(readinput): error reading optical component list")')
967 write(*,
'("(blank line required after optcomp block)")')
973 write(*,
'("Error(readinput): invalid optcomp :",3(X,I0))')
optcomp(:,i)
979 write(*,
'("Error(readinput): optical component list too long")')
986 write(*,
'("Info(readinput): variable ''evaltol'' is no longer used")')
989 write(*,
'("Info(readinput): variable ''deband'' is no longer used")')
994 write(*,
'("Error(readinput): epsband <= 0 : ",G18.10)')
epsband 1002 write(*,
'("Error(readinput): demaxbnd <= 0 : ",G18.10)')
demaxbnd 1009 read(50,*,err=20)
dlefe 1013 read(50,*,err=20)
deapw 1014 if (abs(
deapw) < 1.d-8)
then 1016 write(*,
'("Error(readinput): invalid deapw : ",G18.10)')
deapw 1022 if (abs(
delorb) < 1.d-8)
then 1024 write(*,
'("Error(readinput): invalid delorb : ",G18.10)')
delorb 1029 read(50,
'(A)',err=20) str
1038 write(*,
'("Error(readinput): dmaxefc < 0 : ",G18.10)')
dmaxefc 1043 read(50,
'(A)',err=20) str
1048 read(50,
'(A)',err=20) str
1049 read(str,*,err=20)
afspc(i,:)
1052 case(
'fsmtype',
'fixspin')
1055 read(50,
'(A)',err=20) str
1056 read(str,*,err=20)
momfix(:)
1062 write(*,
'("Error(readinput): momfixm < 0 : ",G18.10)')
momfixm 1068 read(50,
'(A)',err=20) str
1069 if (trim(str) ==
'')
goto 10
1070 read(str,*,iostat=ios) is,ia,
mommtfix(:,ia,is)
1073 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1075 write(*,
'("(blank line required after mommtfix block)")')
1082 read(50,
'(A)',err=20) str
1083 if (trim(str) ==
'')
goto 10
1084 read(str,*,iostat=ios) is,ia,
mommtfixm(ia,is)
1087 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1088 &moment magnitudes")')
1089 write(*,
'("(blank line required after mommtfixm block)")')
1098 write(*,
'("Error(readinput): taufsm < 0 : ",G18.10)')
taufsm 1104 write(*,
'("Info(readinput): variable ''autormt'' is no longer used")')
1109 write(*,
'("Warning(readinput): rmtdelta < 0 : ",G18.10)')
rmtdelta 1114 read(50,*,err=20) lv
1120 write(*,
'("Error(readinput): symtype not defined : ",I0)')
symtype 1125 read(50,*,err=20) deltaph
1126 if (deltaph <= 0.d0)
then 1128 write(*,
'("Error(readinput): deltaph <= 0 : ",G18.10)') deltaph
1133 read(50,*,err=20) nphwrt
1134 if (nphwrt < 1)
then 1136 write(*,
'("Error(readinput): nphwrt < 1 : ",I0)') nphwrt
1140 if (
allocated(vqlwrt))
deallocate(vqlwrt)
1141 allocate(vqlwrt(3,nphwrt))
1143 read(50,*,err=20) vqlwrt(:,i)
1151 if (trim(str) ==
'')
goto 10
1159 write(*,
'("Info(readinput): variable ''tfibs'' is no longer used")')
1164 write(*,
'("Error(readinput): maxitoep < 1 : ",I0)')
maxitoep 1170 write(*,
'("Info(readinput): variable ''tauoep'' is no longer used")')
1175 write(*,
'("Error(readinput): tau0oep < 0 : ",G18.10)')
tau0oep 1181 read(50,
'(A)',err=20) str
1182 if (trim(str) ==
'')
then 1185 write(*,
'("Error(readinput): empty k-point and state list")')
1193 read(str,*,iostat=ios)
kstlist(:,i)
1196 write(*,
'("Error(readinput): error reading k-point and state list")')
1197 write(*,
'("(blank line required after kstlist block)")')
1203 write(*,
'("Error(readinput): k-point and state list too long")')
1207 read(50,*,err=20)
vklem 1212 write(*,
'("Error(readinput): deltaem <= 0 : ",G18.10)')
deltaem 1220 write(*,
'("Error(readinput): ndspem out of range : ",I0)')
ndspem 1229 read(50,*,err=20)
ssdph 1231 read(50,
'(A)',err=20) str
1232 read(str,*,err=20)
vqlss 1236 case(
'DFT+U',
'dft+u',
'lda+u')
1237 read(50,*,err=20) dftu,inpdftu
1239 read(50,
'(A)',err=20) str
1240 if (trim(str) ==
'')
then 1244 select case(inpdftu)
1246 read(str,*,iostat=ios) is,l,ujdu(1:2,i)
1248 read(str,*,iostat=ios) is,l,(fdu(k,i),k=0,2*l,2)
1250 read(str,*,iostat=ios) is,l,(edu(k,i),k=0,l)
1252 read(str,*,iostat=ios) is,l,lamdu(i)
1254 read(str,*,iostat=ios) is,l,udufix(i),dudufix(i)
1255 read(str,*,iostat=ios) is,l,udufix(i)
1258 write(*,
'("Error(readinput): invalid inpdftu : ",I0)') inpdftu
1264 write(*,
'("Error(readinput): error reading DFT+U parameters")')
1265 write(*,
'("(blank line required after dft+u block)")')
1271 write(*,
'("Error(readinput): invalid species number in dft+u block : ", & 1278 write(*,
'("Error(readinput): l < 0 in dft+u block : ",I0)') l
1282 if (l > lmaxdm)
then 1284 write(*,
'("Error(readinput): l > lmaxdm in dft+u block :",2(X,I0))') l, &
1291 if ((is == isldu(1,j)).and.(l == isldu(2,j)))
then 1293 write(*,
'("Error(readinput): repeated entry in DFT+U block")')
1302 write(*,
'("Error(readinput): too many DFT+U entries")')
1303 write(*,
'("Adjust maxdftu in modmain and recompile code")')
1306 case(
'tmwrite',
'tmomlu')
1307 read(50,*,err=20) tmwrite
1308 case(
'readadu',
'readalu')
1310 write(*,
'("Info(readinput): variable ''readadu'' is no longer used")')
1312 read(50,*,err=20) rdmxctype
1314 read(50,*,err=20) rdmmaxscl
1315 if (rdmmaxscl < 0)
then 1317 write(*,
'("Error(readinput): rdmmaxscl < 0 : ",I0)') rdmmaxscl
1321 read(50,*,err=20) maxitn
1323 read(50,*,err=20) maxitc
1325 read(50,*,err=20) taurdmn
1326 if (taurdmn < 0.d0)
then 1328 write(*,
'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
1333 read(50,*,err=20) taurdmc
1334 if (taurdmc < 0.d0)
then 1336 write(*,
'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
1341 read(50,*,err=20) rdmalpha
1342 if ((rdmalpha <= 0.d0).or.(rdmalpha >= 1.d0))
then 1344 write(*,
'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
1349 read(50,*,err=20) rdmtemp
1350 if (rdmtemp < 0.d0)
then 1352 write(*,
'("Error(readinput): rdmtemp < 0 : ",G18.10)') rdmtemp
1360 write(*,
'("Error(readinput): reducebf not in [0.5,1] : ",G18.10)')
reducebf 1366 case(
'tefvr',
'tseqr')
1367 read(50,*,err=20)
tefvr 1369 read(50,*,err=20)
tefvs 1371 read(50,*,err=20)
mefvs 1372 case(
'tefvit',
'tseqit')
1374 write(*,
'("Info(readinput): variable ''tefvit'' is no longer used")')
1375 case(
'minitefv',
'minseqit')
1377 write(*,
'("Info(readinput): variable ''minitefv'' is no longer used")')
1378 case(
'nefvit',
'maxitefv',
'maxseqit',
'nseqit')
1380 write(*,
'("Info(readinput): variable ''nefvit'' is no longer used")')
1381 case(
'befvit',
'bseqit')
1383 write(*,
'("Info(readinput): variable ''befvit'' is no longer used")')
1384 case(
'epsefvit',
'epsseqit')
1386 write(*,
'("Info(readinput): variable ''epsefvit'' is no longer used")')
1389 write(*,
'("Info(readinput): variable ''tauseq'' is no longer used")')
1391 read(50,*,err=20)
vecql(:)
1393 read(50,*,err=20) mustar
1394 case(
'sqaxis',
'sqados')
1395 read(50,*,err=20)
sqaxis(:)
1397 read(50,*,err=20) test
1400 write(*,
'("Info(readinput): variable ''frozencr'' is no longer used")')
1404 read(50,*,err=20) solscf
1405 if (solscf < 0.d0)
then 1407 write(*,
'("Error(readinput): solscf < 0 : ",G18.10)') solscf
1414 read(50,*,err=20)
wsfac(:)
1416 read(50,*,err=20) vhmat(1,:)
1417 read(50,*,err=20) vhmat(2,:)
1418 read(50,*,err=20) vhmat(3,:)
1420 read(50,*,err=20) reduceh
1423 case(
'hybridc',
'hybmix')
1427 write(*,
'("Error(readinput): invalid hybridc : ",G18.10)')
hybridc 1439 write(*,
'("Error(readinput): nvbse < 0 : ",I0)')
nvbse0 1447 write(*,
'("Error(readinput): ncbse < 0 : ",I0)')
ncbse0 1453 read(50,
'(A)',err=20) str
1454 if (trim(str) ==
'')
then 1457 write(*,
'("Error(readinput): empty BSE extra valence state list")')
1464 read(str,*,iostat=ios)
istxbse(i)
1467 write(*,
'("Error(readinput): error reading BSE valence state list")')
1468 write(*,
'("(blank line required after istxbse block)")')
1474 write(*,
'("Error(readinput): BSE extra valence state list too long")')
1479 read(50,
'(A)',err=20) str
1480 if (trim(str) ==
'')
then 1483 write(*,
'("Error(readinput): empty BSE extra conduction state list")')
1490 read(str,*,iostat=ios)
jstxbse(i)
1493 write(*,
'("Error(readinput): error reading BSE conduction state list")')
1494 write(*,
'("(blank line required after jstxbse block)")')
1500 write(*,
'("Error(readinput): BSE extra conduction state list too long")')
1506 read(50,*,err=20)
hxbse 1508 read(50,*,err=20)
hdbse 1509 case(
'gmaxrf',
'gmaxrpa')
1513 write(*,
'("Error(readinput): gmaxrf < 0 : ",G18.10)')
gmaxrf 1523 write(*,
'("Error(readinput): emaxrf < 0 : ",G18.10)')
emaxrf 1528 read(50,
'(A)',err=20) str
1529 str=trim(str)//
' 0 0' 1530 read(str,*,err=20) fxctype
1532 read(50,
'(A)',err=20) str
1533 str=trim(str)//
' 0.0' 1534 read(str,*,err=20) fxclrc(:)
1536 read(50,*,err=20) ntemp
1539 write(*,
'("Error(readinput): ntemp < 1 : ",I0)') ntemp
1544 write(*,
'("Info(readinput): variable ''trimvg'' is no longer used")')
1546 case(
'rndstate',
'rndseed')
1547 read(50,*,err=20) rndstate(0)
1548 rndstate(0)=abs(rndstate(0))
1554 read(50,*,err=20) rndavec
1559 case(
'lowq',
'highq',
'vhighq',
'uhighq')
1560 read(50,*,err=20) lv
1562 if (trim(block) ==
'lowq')
then 1580 else if (trim(block) ==
'highq')
then 1599 else if (trim(block) ==
'vhighq')
then 1640 write(*,
'("Info(readinput): parameters set by ",A," option")') trim(block)
1641 write(*,
'(" rgkmax : ",G18.10)')
rgkmax 1642 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 1643 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 1644 write(*,
'(" lmaxo : ",I0)')
lmaxo 1645 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 1646 write(*,
'(" nxlo : ",I0)')
nxlo 1647 write(*,
'(" lorbcnd : ",L1)')
lorbcnd 1648 write(*,
'(" radkpt : ",G18.10)')
radkpt 1649 write(*,
'(" autokpt : ",L1)')
autokpt 1650 write(*,
'(" vkloff : ",3G18.10)')
vkloff 1651 write(*,
'(" nempty0 : ",G18.10)')
nempty0 1652 write(*,
'(" epspot : ",G18.10)')
epspot 1653 write(*,
'(" epsengy : ",G18.10)')
epsengy 1654 write(*,
'(" epsforce : ",G18.10)')
epsforce 1655 write(*,
'(" epsstress : ",G18.10)')
epsstress 1657 write(*,
'(" gmaxrf : ",G18.10)')
gmaxrf 1658 if (trim(block) ==
'lowq')
then 1659 write(*,
'(" lradstp : ",I0)')
lradstp 1664 read(50,*,err=20) hmaxvr
1665 if (hmaxvr < 0.d0)
then 1667 write(*,
'("Error(readinput): hmaxvr < 0 : ",G18.10)') hmaxvr
1672 read(50,*,err=20) hkmax
1673 if (hkmax <= 0.d0)
then 1675 write(*,
'("Error(readinput): hkmax <= 0 : ",G18.10)') hkmax
1685 write(*,
'("Error(readinput): lorbordc < 2 : ",I0)')
lorbordc 1691 write(*,
'("Error(readinput): lorbordc too large : ",I0)')
lorbordc 1692 write(*,
'("Adjust maxlorbord in modmain and recompile code")')
1697 read(50,
'(A)',err=20) str
1702 write(*,
'("Error(readinput): nrmtscf < 0.5 : ",G18.10)')
nrmtscf 1706 case(
'lmaxdb',
'lmaxdos')
1710 write(*,
'("Error(readinput): lmaxdb < 0 : ",I0)')
lmaxdb 1715 read(50,*,err=20) epsdev
1716 if (epsdev <= 0.d0)
then 1718 write(*,
'("Error(readinput): epsdev <= 0 : ",G18.10)') epsdev
1724 write(*,
'("Info(readinput): variable ''msmooth'' is no longer used")')
1728 read(50,*,err=20) wrtvars
1730 read(50,*,err=20) ftmtype
1733 write(*,
'("Error(readinput): variable ''tmomfix'' is no longer used")')
1734 write(*,
'(" use tm3fix instead")')
1738 read(50,*,err=20) ntmfix
1739 if (ntmfix < 1)
then 1741 write(*,
'("Error(readinput): ntmfix < 1 : ",I0)') ntmfix
1745 if (
allocated(itmfix))
deallocate(itmfix)
1746 allocate(itmfix(7,ntmfix))
1747 if (
allocated(wkprfix))
deallocate(wkprfix)
1748 allocate(wkprfix(ntmfix))
1750 read(50,*,err=20) is,ia,l
1751 if ((is < 1).or.(ia < 1).or.(l < 0))
then 1753 write(*,
'("Error(readinput): invalid is, ia or l in tm3fix block :",& 1762 read(50,*,err=20) itmfix(4:7,i)
1764 read(50,*,err=20) wkprfix(i)
1767 read(50,*,err=20) tauftm
1768 if (tauftm < 0.d0)
then 1770 write(*,
'("Error(readinput): tauftm < 0 : ",G18.10)') tauftm
1776 write(*,
'("Info(readinput): variable ''ftmstep'' is no longer used")')
1777 case(
'cmagz',
'forcecmag')
1778 read(50,*,err=20)
cmagz 1780 read(50,*,err=20) axang(:)
1782 read(50,*,err=20) tstime
1783 if (tstime <= 0.d0)
then 1785 write(*,
'("Error(readinput): tstime <= 0 : ",G18.10)') tstime
1790 read(50,*,err=20) dtimes
1791 if (dtimes <= 0.d0)
then 1793 write(*,
'("Error(readinput): dtimes <= 0 : ",G18.10)') dtimes
1798 read(50,*,err=20) npulse
1799 if (npulse < 1)
then 1801 write(*,
'("Error(readinput): npulse < 1 : ",I0)') npulse
1805 if (
allocated(pulse))
deallocate(pulse)
1806 allocate(pulse(12,npulse))
1808 read(50,
'(A)',err=20) str
1809 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1810 read(str,*,err=20) pulse(:,i)
1813 read(50,*,err=20) nramp
1816 write(*,
'("Error(readinput): nramp < 1 : ",I0)') nramp
1820 if (
allocated(ramp))
deallocate(ramp)
1821 allocate(ramp(12,nramp))
1823 read(50,
'(A)',err=20) str
1824 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1825 read(str,*,err=20) ramp(:,i)
1828 read(50,*,err=20) nstep
1831 write(*,
'("Error(readinput): nstep < 1 : ",I0)') nstep
1835 if (
allocated(step))
deallocate(step)
1836 allocate(step(9,nstep))
1838 read(50,
'(A)',err=20) str
1839 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1840 read(str,*,err=20) step(:,i)
1844 write(*,
'("Info(readinput): variable ''ncgga'' is no longer used")')
1849 write(*,
'("Error(readinput): dncgga < 0 : ",G18.10)')
dncgga 1854 read(50,
'(A)',err=20) str
1856 read(str,*,err=20) ntswrite(:)
1857 case(
'nxoapwlo',
'nxapwlo')
1861 write(*,
'("Error(readinput): nxoapwlo < 0 : ",I0)')
nxoapwlo 1866 read(50,*,err=20)
nxlo 1869 write(*,
'("Error(readinput): nxlo < 0 : ",I0)')
nxlo 1874 read(50,*,err=20) tdrho1d
1876 read(50,*,err=20) tdrho2d
1878 read(50,*,err=20) tdrho3d
1880 read(50,*,err=20) tdmag1d
1882 read(50,*,err=20) tdmag2d
1884 read(50,*,err=20) tdmag3d
1885 case(
'tdjr1d',
'tdcd1d')
1886 read(50,*,err=20) tdjr1d
1887 case(
'tdjr2d',
'tdcd2d')
1888 read(50,*,err=20) tdjr2d
1889 case(
'tdjr3d',
'tdcd3d')
1890 read(50,*,err=20) tdjr3d
1892 read(50,*,err=20) tddos
1894 read(50,*,err=20) tdlsj
1896 read(50,*,err=20) tdjtk
1898 read(50,*,err=20) tdxrmk
1901 write(*,
'("Info(readinput): variable ''epseph'' is no longer used")')
1903 read(50,*,err=20) rndevt0
1904 case(
'sxcscf',
'ssxc',
'rstsf')
1905 read(50,
'(A)',err=20) str
1906 read(str,*,err=20)
sxcscf 1909 read(50,*,err=20)
tempk 1910 if (
tempk <= 0.d0)
then 1912 write(*,
'("Error(readinput): tempk <= 0 : ",G18.10)')
tempk 1921 read(50,*,err=20) avecu(:,1)
1922 read(50,*,err=20) avecu(:,2)
1923 read(50,*,err=20) avecu(:,3)
1925 read(50,*,err=20) scu
1927 read(50,*,err=20) scu1
1929 read(50,*,err=20) scu2
1931 read(50,*,err=20) scu3
1933 read(50,*,err=20) q0cut
1935 read(50,*,err=20) ngridkpa
1937 read(50,*,err=20) rndbfcu
1938 case(
'bfieldcu',
'bfielduc')
1939 read(50,*,err=20) bfieldcu
1940 case(
'efieldcu',
'efielduc')
1941 read(50,*,err=20) efieldcu
1943 read(50,*,err=20) tplotq0
1945 read(50,*,err=20) trdvclr
1947 read(50,*,err=20) trdbfcr
1950 write(*,
'("Info(readinput): variable ''evtype'' is no longer used")')
1952 read(50,*,err=20) wmaxgw
1955 write(*,
'("Info(readinput): variable ''twdiag'' is no longer used")')
1957 read(50,*,err=20) tsediag
1959 read(50,*,err=20) actype
1961 read(50,*,err=20) npole
1964 write(*,
'("Error(readinput): npole < 1 : ",I0)') npole
1969 read(50,*,err=20) nspade
1970 if (nspade < 1)
then 1972 write(*,
'("Error(readinput): nspade < 1 : ",I0)') nspade
1977 read(50,*,err=20)
tfav0 1982 write(*,
'("Error(readinput): rmtscf <= 0 : ",G18.10)')
rmtscf 1990 case(
'maxthd',
'omp_num_threads',
'OMP_NUM_THREADS')
1996 case(
'maxlvl',
'omp_max_active_levels',
'OMP_MAX_ACTIVE_LEVELS')
2000 write(*,
'("Error(readinput): maxlvl < 1 : ",I0)')
maxlvl 2005 read(50,*,err=20) lv
2014 write(*,
'("Info(readinput): parameters set by stable option")')
2016 write(*,
'(" mrmtav : ",I0)')
mrmtav 2017 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 2018 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2019 write(*,
'(" msmgmt : ",I0)')
msmgmt 2023 read(50,*,err=20) lv
2033 write(*,
'("Info(readinput): parameters set by metagga option")')
2034 write(*,
'(" lmaxi : ",I0)')
lmaxi 2035 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2036 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 2037 write(*,
'(" msmgmt : ",I0)')
msmgmt 2038 write(*,
'(" epspot : ",G18.10)')
epspot 2039 write(*,
'(" epsengy : ",G18.10)')
epsengy 2044 write(*,
'("Info(readinput): variable ''t0tdlr'' is no longer used")')
2046 read(50,*,err=20) tdphi
2048 tdphi=tdphi*
pi/180.d0
2050 read(50,*,err=20) thetamld
2052 thetamld=thetamld*
pi/180.d0
2054 read(50,*,err=20) ntsbackup
2056 read(50,*,err=20) seedname
2057 seedname=adjustl(seedname)
2059 read(50,*,err=20) num_wann
2060 case(
'idxw90',
'wann_bands')
2061 read(50,
'(A)',err=20) str
2063 if (
allocated(idxw90))
deallocate(idxw90)
2064 allocate(idxw90(num_bands))
2065 call numlist(str,num_bands,idxw90)
2067 read(50,*,err=20) projw90
2070 read(50,
'(A)',err=20) str
2071 if (trim(str) ==
'')
goto 10
2075 write(*,
'("Error(readinput): invalid projection species : ",I0)') is
2079 if ((l < 0).or.(l > 3))
then 2081 write(*,
'("Error(readinput): invalid projection l : ",I0)') l
2088 read(50,*,err=20) num_iter
2089 case(
'dis_num_iter')
2090 read(50,*,err=20) dis_num_iter
2092 read(50,*,err=20) trial_step
2093 case(
'xlwin',
'wannierExtra')
2094 if (
allocated(xlwin))
deallocate(xlwin)
2098 read(50,
'(A)',err=20) str
2099 if (trim(str) ==
'')
goto 10
2100 xlwin=[xlwin(1:nxlwin),str]
2104 read(50,*,err=20) wrtunk
2106 read(50,*,err=20)
tbdip 2108 read(50,*,err=20)
tjr 2110 read(50,*,err=20) tauefm
2112 read(50,*,err=20) epsefm
2114 read(50,*,err=20) ehfb
2117 write(*,
'("Info(readinput): variable ''t0gclq0'' is no longer used")')
2119 read(50,*,err=20) tafindt
2122 write(*,
'("Info(readinput): variable ''afindscf'' is no longer used")')
2124 read(50,*,err=20) afindpm(:)
2125 if (afindpm(2) == 0.d0)
then 2127 write(*,
'("Error(readinput): afindpm(2) = 0")')
2135 write(*,
'("Error(readinput): nkspolar < 1 : ",I0)')
nkspolar 2140 read(50,*,err=20) ntsforce
2141 if (ntsforce < 1)
then 2143 write(*,
'("Error(readinput): ntsforce < 1 : ",I0)') ntsforce
2148 read(50,*,err=20) wphcut
2149 if (wphcut <= 0.d0)
then 2151 write(*,
'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2156 read(50,*,err=20) ephscf(:)
2158 read(50,*,err=20) anomalous
2160 read(50,*,err=20) tephde
2162 read(50,*,err=20) bdiag
2164 read(50,*,err=20) ecutb
2165 if (ecutb <= 0.d0)
then 2167 write(*,
'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2172 read(50,*,err=20) ediag
2174 read(50,*,err=20) pwxpsn
2175 if (pwxpsn < 1)
then 2177 write(*,
'("Error(readinput): pwxpsn < 1 : ",I0)') pwxpsn
2182 read(50,*,err=20) ramdisk
2183 case(
'wrtdisk',
'wrtdsk')
2184 read(50,*,err=20) wrtdisk
2186 read(50,*,err=20) epsdmat
2187 case(
'tm3vdl',
'tm3old')
2188 read(50,*,err=20) tm3vdl
2190 read(50,*,err=20) batch
2192 read(50,*,err=20) tafspt
2194 read(50,*,err=20) tbaspat
2198 read(50,*,err=20)
atdfc 2199 if (
atdfc < 0.d0)
then 2201 write(*,
'("Error(readinput): atdfc < 0 : ",G18.10)')
atdfc 2207 case(
'msmgmt',
'msmg2mt')
2210 read(50,*,err=20) ntsorth
2215 write(*,
'("Error(readinput): deltabf <= 0 : ",G18.10)')
deltabf 2220 read(50,*,err=20) jtconst0
2222 read(50,*,err=20)
trmt0 2224 read(50,*,err=20) ksgwrho
2232 read(50,*,err=20) npfftw
2234 read(50,*,err=20) tphnat
2236 read(50,*,err=20) ecutthc
2237 if (ecutthc <= 0.d0)
then 2239 write(*,
'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2244 read(50,*,err=20) tbdipu
2251 write(*,
'("Error(readinput): invalid block name : ",A)') trim(block)
2258 write(*,
'("Error(readinput): error reading from elk.in")')
2259 write(*,
'("Problem occurred in ''",A,"'' block")') trim(block)
2260 write(*,
'("Check input convention in manual")')
2276 if (t1 /= 0.d0)
then 2285 if (rndavec > 0.d0)
then 2288 t1=rndavec*(randomu()-0.5d0)
2332 if (fxctype(1) == -1) fxctype(:)=
xctype(:)
2336 avecu(:,1)=scu1*avecu(:,1)
2337 avecu(:,2)=scu2*avecu(:,2)
2338 avecu(:,3)=scu3*avecu(:,3)
2339 avecu(:,:)=scu*avecu(:,:)
real(8), dimension(3, 3) dafspc
subroutine genfspecies(zn, symb)
real(8), dimension(3, maxatoms, maxspecies) bfcmt0
integer, parameter maxspecies
real(8), dimension(3, 3) afspc
integer, dimension(maxxbse) jstxbse
integer, dimension(3) ktype
real(8), dimension(3, 3) davec
real(8), dimension(3, maxatoms, maxspecies) datposl
integer, dimension(3) xctype
integer, parameter maxlapw
integer, dimension(3) xctsp
real(8), dimension(3, 3) ainv
real(8), dimension(2) amixpm
real(8), parameter kboltz
character(256), dimension(maxspecies) spfname
real(8), dimension(3, 0:3) vclp3d
integer, dimension(maxxbse) istxbse
integer, parameter maxxbse
subroutine numlist(str, n, list)
real(8), dimension(3) vkloff
real(8), dimension(3) vqlss
integer, parameter maxkst
real(8), dimension(3) vecql
real(8), dimension(2) broydpm
real(8), dimension(3) momfix
real(8), dimension(3, 3) avecref
real(8), dimension(2) wplot
real(8), dimension(3, maxatoms, maxspecies) atposl
real(8), dimension(3) sqaxis
integer, parameter maxlorbord
real(8), dimension(3) dbfieldc0
pure subroutine axangrot(v, th, rot)
real(8), dimension(3, 3) avec
real(8), dimension(2) wsfac
integer, dimension(3, 27) optcomp
integer, dimension(2, maxkst) kstlist
integer, dimension(3) ngridk
integer, parameter maxatoms
real(8), dimension(3) dafieldc
integer, parameter maxtasks
real(8), dimension(3) dvqlss
real(8), dimension(3) afieldc
real(8), dimension(3, 0:2) vclp2d
real(8), dimension(3, maxatoms, maxspecies) mommtfix
integer, dimension(3) ngridq
integer, dimension(maxspecies) natoms
real(8), dimension(maxatoms, maxspecies) mommtfixm
real(8), dimension(:,:), allocatable vvlp1d
real(8), dimension(3) bfieldc0
integer, dimension(3) dngridk
integer, dimension(2) np2d
real(8), dimension(3) dmomfix
integer, dimension(3) np3d
character(256), dimension(:), allocatable notes
pure subroutine r3mv(a, x, y)
real(8), dimension(3, maxatoms, maxspecies) atposc
subroutine genspecies(fnum)
integer, dimension(maxtasks) tasks
real(8), dimension(3) efieldc
real(8), dimension(3) vklem