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
203 if (
allocated(vqlwrt))
deallocate(vqlwrt)
204 allocate(vqlwrt(3,nphwrt))
352 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 : ",3I8)')
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 : ",3I8)')
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 : ",I8)')
lmaxapw 578 write(*,
'("Error(readinput): lmaxapw too large : ",I8)')
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 : ",I8)')
lmaxo 593 case(
'lmaxi',
'lmaxinr')
594 read(50,*,err=20)
lmaxi 597 write(*,
'("Error(readinput): lmaxi < 1 : ",I8)')
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 : ",I8)')
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 : ",I8)')
mixsdb 727 write(*,
'("Error(readinput): invalid Broyden mixing parameters : ",& 738 write(*,
'("Error(readinput): maxscl < 0 : ",I8)')
maxscl 761 write(*,
'("Error(readinput): nspecies < 1 : ",I8)')
nspecies 767 write(*,
'("Error(readinput): nspecies too large : ",I8)')
nspecies 768 write(*,
'("Adjust maxspecies in modmain and recompile code")')
775 read(50,*,err=20)
natoms(is)
778 write(*,
'("Error(readinput): natoms < 1 : ",I8)')
natoms(is)
779 write(*,
'(" for species ",I4)') is
785 write(*,
'("Error(readinput): natoms too large : ",I8)')
natoms(is)
786 write(*,
'(" for species ",I4)') 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 : ",I8)')
nvp1d 807 write(*,
'("Error(readinput): npp1d < nvp1d : ",2I8)')
npp1d,
nvp1d 814 read(50,*,err=20)
vvlp1d(:,i)
817 read(50,*,err=20)
ip01d 820 write(*,
'("Error(readinput): ip01d < 1 : ",I8)')
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 : ",2I8)')
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 : ",3I8)')
np3d 851 write(*,
'("Error(readinput): nwplot < 2 : ",I8)')
nwplot 857 write(*,
'("Error(readinput): ngrkf < 1 : ",I8)')
ngrkf 863 write(*,
'("Error(readinput): nswplot < 0 : ",I8)')
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 : ",I8)')
maxatpstp 894 case(
'tau0atp',
'tau0atm')
900 write(*,
'("Error(readinput): deltast <= 0 : ",G18.10)')
deltast 914 write(*,
'("Error(readinput): maxlatvstp < 1 : ",I8)')
maxlatvstp 922 write(*,
'("Info(readinput): variable ''nstfsp'' is no longer used")')
927 write(*,
'("Error(readinput): lradstp < 1 : ",I8)')
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 : ",I8)') &
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 : ",3I8)')
optcomp(:,i)
979 write(*,
'("Error(readinput): optical component list too long")')
988 write(*,
'("Info(readinput): variable ''deband'' is no longer used")')
993 write(*,
'("Error(readinput): epsband <= 0 : ",G18.10)')
epsband 1001 write(*,
'("Error(readinput): demaxbnd <= 0 : ",G18.10)')
demaxbnd 1008 read(50,*,err=20)
dlefe 1012 read(50,*,err=20)
deapw 1013 if (abs(
deapw) < 1.d-8)
then 1015 write(*,
'("Error(readinput): invalid deapw : ",G18.10)')
deapw 1021 if (abs(
delorb) < 1.d-8)
then 1023 write(*,
'("Error(readinput): invalid delorb : ",G18.10)')
delorb 1028 read(50,
'(A)',err=20) str
1037 write(*,
'("Error(readinput): dmaxefc < 0 : ",G18.10)')
dmaxefc 1042 read(50,
'(A)',err=20) str
1047 read(50,
'(A)',err=20) str
1048 read(str,*,err=20)
afspc(i,:)
1051 case(
'fsmtype',
'fixspin')
1054 read(50,
'(A)',err=20) str
1055 read(str,*,err=20)
momfix(:)
1061 write(*,
'("Error(readinput): momfixm < 0 : ",G18.10)')
momfixm 1067 read(50,
'(A)',err=20) str
1068 if (trim(str) ==
'')
goto 10
1069 read(str,*,iostat=ios) is,ia,
mommtfix(:,ia,is)
1072 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1074 write(*,
'("(blank line required after mommtfix block)")')
1081 read(50,
'(A)',err=20) str
1082 if (trim(str) ==
'')
goto 10
1083 read(str,*,iostat=ios) is,ia,
mommtfixm(ia,is)
1086 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1087 &moment magnitudes")')
1088 write(*,
'("(blank line required after mommtfixm block)")')
1097 write(*,
'("Error(readinput): taufsm < 0 : ",G18.10)')
taufsm 1103 write(*,
'("Info(readinput): variable ''autormt'' is no longer used")')
1108 write(*,
'("Warning(readinput): rmtdelta < 0 : ",G18.10)')
rmtdelta 1113 read(50,*,err=20) lv
1119 write(*,
'("Error(readinput): symtype not defined : ",I8)')
symtype 1124 read(50,*,err=20) deltaph
1125 if (deltaph <= 0.d0)
then 1127 write(*,
'("Error(readinput): deltaph <= 0 : ",G18.10)') deltaph
1132 read(50,*,err=20) nphwrt
1133 if (nphwrt < 1)
then 1135 write(*,
'("Error(readinput): nphwrt < 1 : ",I8)') nphwrt
1139 if (
allocated(vqlwrt))
deallocate(vqlwrt)
1140 allocate(vqlwrt(3,nphwrt))
1142 read(50,*,err=20) vqlwrt(:,i)
1150 if (trim(str) ==
'')
goto 10
1158 write(*,
'("Info(readinput): variable ''tfibs'' is no longer used")')
1163 write(*,
'("Error(readinput): maxitoep < 1 : ",I8)')
maxitoep 1169 write(*,
'("Info(readinput): variable ''tauoep'' is no longer used")')
1174 write(*,
'("Error(readinput): tau0oep < 0 : ",G18.10)')
tau0oep 1180 read(50,
'(A)',err=20) str
1181 if (trim(str) ==
'')
then 1184 write(*,
'("Error(readinput): empty k-point and state list")')
1192 read(str,*,iostat=ios)
kstlist(:,i)
1195 write(*,
'("Error(readinput): error reading k-point and state list")')
1196 write(*,
'("(blank line required after kstlist block)")')
1202 write(*,
'("Error(readinput): k-point and state list too long")')
1206 read(50,*,err=20)
vklem 1211 write(*,
'("Error(readinput): deltaem <= 0 : ",G18.10)')
deltaem 1219 write(*,
'("Error(readinput): ndspem out of range : ",I8)')
ndspem 1228 read(50,*,err=20)
ssdph 1230 read(50,
'(A)',err=20) str
1231 read(str,*,err=20)
vqlss 1235 case(
'DFT+U',
'dft+u',
'lda+u')
1236 read(50,*,err=20) dftu,inpdftu
1238 read(50,
'(A)',err=20) str
1239 if (trim(str) ==
'')
then 1243 select case(inpdftu)
1245 read(str,*,iostat=ios) is,l,ujdu(1:2,i)
1247 read(str,*,iostat=ios) is,l,(fdu(k,i),k=0,2*l,2)
1249 read(str,*,iostat=ios) is,l,(edu(k,i),k=0,l)
1251 read(str,*,iostat=ios) is,l,lamdu(i)
1253 read(str,*,iostat=ios) is,l,udufix(i),dudufix(i)
1254 read(str,*,iostat=ios) is,l,udufix(i)
1257 write(*,
'("Error(readinput): invalid inpdftu : ",I8)') inpdftu
1263 write(*,
'("Error(readinput): error reading DFT+U parameters")')
1264 write(*,
'("(blank line required after dft+u block)")')
1270 write(*,
'("Error(readinput): invalid species number in dft+u block : ", & 1277 write(*,
'("Error(readinput): l < 0 in dft+u block : ",I8)') l
1281 if (l > lmaxdm)
then 1283 write(*,
'("Error(readinput): l > lmaxdm in dft+u block : ",2I8)') l,lmaxdm
1289 if ((is == isldu(1,j)).and.(l == isldu(2,j)))
then 1291 write(*,
'("Error(readinput): repeated entry in DFT+U block")')
1300 write(*,
'("Error(readinput): too many DFT+U entries")')
1301 write(*,
'("Adjust maxdftu in modmain and recompile code")')
1304 case(
'tmwrite',
'tmomlu')
1305 read(50,*,err=20) tmwrite
1306 case(
'readadu',
'readalu')
1308 write(*,
'("Info(readinput): variable ''readadu'' is no longer used")')
1310 read(50,*,err=20) rdmxctype
1312 read(50,*,err=20) rdmmaxscl
1313 if (rdmmaxscl < 0)
then 1315 write(*,
'("Error(readinput): rdmmaxscl < 0 : ",I8)') rdmmaxscl
1319 read(50,*,err=20) maxitn
1321 read(50,*,err=20) maxitc
1323 read(50,*,err=20) taurdmn
1324 if (taurdmn < 0.d0)
then 1326 write(*,
'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
1331 read(50,*,err=20) taurdmc
1332 if (taurdmc < 0.d0)
then 1334 write(*,
'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
1339 read(50,*,err=20) rdmalpha
1340 if ((rdmalpha <= 0.d0).or.(rdmalpha >= 1.d0))
then 1342 write(*,
'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
1347 read(50,*,err=20) rdmtemp
1348 if (rdmtemp < 0.d0)
then 1350 write(*,
'("Error(readinput): rdmtemp < 0 : ",G18.10)') rdmtemp
1358 write(*,
'("Error(readinput): reducebf not in [0.5,1] : ",G18.10)')
reducebf 1364 case(
'tefvr',
'tseqr')
1365 read(50,*,err=20)
tefvr 1366 case(
'tefvit',
'tseqit')
1368 case(
'minitefv',
'minseqit')
1370 write(*,
'("Info(readinput): variable ''minitefv'' is no longer used")')
1371 case(
'nefvit',
'maxitefv',
'maxseqit',
'nseqit')
1375 write(*,
'("Error(readinput): nefvit < 1 : ",I8)')
nefvit 1379 case(
'befvit',
'bseqit')
1383 write(*,
'("Error(readinput): befvit <= 0 : ",G18.10)')
befvit 1387 case(
'epsefvit',
'epsseqit')
1389 write(*,
'("Info(readinput): variable ''epsefvit'' is no longer used")')
1392 write(*,
'("Info(readinput): variable ''tauseq'' is no longer used")')
1394 read(50,*,err=20)
vecql(:)
1396 read(50,*,err=20) mustar
1397 case(
'sqaxis',
'sqados')
1398 read(50,*,err=20)
sqaxis(:)
1400 read(50,*,err=20) test
1403 write(*,
'("Info(readinput): variable ''frozencr'' is no longer used")')
1407 read(50,*,err=20) solscf
1408 if (solscf < 0.d0)
then 1410 write(*,
'("Error(readinput): solscf < 0 : ",G18.10)') solscf
1417 read(50,*,err=20)
wsfac(:)
1419 read(50,*,err=20) vhmat(1,:)
1420 read(50,*,err=20) vhmat(2,:)
1421 read(50,*,err=20) vhmat(3,:)
1423 read(50,*,err=20) reduceh
1426 case(
'hybridc',
'hybmix')
1430 write(*,
'("Error(readinput): invalid hybridc : ",G18.10)')
hybridc 1442 write(*,
'("Error(readinput): nvbse < 0 : ",I8)')
nvbse0 1450 write(*,
'("Error(readinput): ncbse < 0 : ",I8)')
ncbse0 1456 read(50,
'(A)',err=20) str
1457 if (trim(str) ==
'')
then 1460 write(*,
'("Error(readinput): empty BSE extra valence state list")')
1467 read(str,*,iostat=ios)
istxbse(i)
1470 write(*,
'("Error(readinput): error reading BSE valence state list")')
1471 write(*,
'("(blank line required after istxbse block)")')
1477 write(*,
'("Error(readinput): BSE extra valence state list too long")')
1482 read(50,
'(A)',err=20) str
1483 if (trim(str) ==
'')
then 1486 write(*,
'("Error(readinput): empty BSE extra conduction state list")')
1493 read(str,*,iostat=ios)
jstxbse(i)
1496 write(*,
'("Error(readinput): error reading BSE conduction state list")')
1497 write(*,
'("(blank line required after jstxbse block)")')
1503 write(*,
'("Error(readinput): BSE extra conduction state list too long")')
1509 read(50,*,err=20)
hxbse 1511 read(50,*,err=20)
hdbse 1512 case(
'gmaxrf',
'gmaxrpa')
1516 write(*,
'("Error(readinput): gmaxrf < 0 : ",G18.10)')
gmaxrf 1526 write(*,
'("Error(readinput): emaxrf < 0 : ",G18.10)')
emaxrf 1531 read(50,
'(A)',err=20) str
1532 str=trim(str)//
' 0 0' 1533 read(str,*,err=20) fxctype
1535 read(50,
'(A)',err=20) str
1536 str=trim(str)//
' 0.0' 1537 read(str,*,err=20) fxclrc(:)
1539 read(50,*,err=20) ntemp
1542 write(*,
'("Error(readinput): ntemp < 1 : ",I8)') ntemp
1547 write(*,
'("Info(readinput): variable ''trimvg'' is no longer used")')
1549 case(
'rndstate',
'rndseed')
1550 read(50,*,err=20) rndstate(0)
1551 rndstate(0)=abs(rndstate(0))
1557 read(50,*,err=20) rndavec
1562 case(
'lowq',
'highq',
'vhighq',
'uhighq')
1563 read(50,*,err=20) lv
1565 if (trim(block) ==
'lowq')
then 1583 else if (trim(block) ==
'highq')
then 1602 else if (trim(block) ==
'vhighq')
then 1643 write(*,
'("Info(readinput): parameters set by ",A," option")') trim(block)
1644 write(*,
'(" rgkmax : ",G18.10)')
rgkmax 1645 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 1646 write(*,
'(" lmaxapw : ",I4)')
lmaxapw 1647 write(*,
'(" lmaxo : ",I4)')
lmaxo 1648 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 1649 write(*,
'(" nxlo : ",I4)')
nxlo 1650 write(*,
'(" lorbcnd : ",L1)')
lorbcnd 1651 write(*,
'(" radkpt : ",G18.10)')
radkpt 1652 write(*,
'(" autokpt : ",L1)')
autokpt 1653 write(*,
'(" vkloff : ",3G18.10)')
vkloff 1654 write(*,
'(" nempty0 : ",G18.10)')
nempty0 1655 write(*,
'(" epspot : ",G18.10)')
epspot 1656 write(*,
'(" epsengy : ",G18.10)')
epsengy 1657 write(*,
'(" epsforce : ",G18.10)')
epsforce 1658 write(*,
'(" epsstress : ",G18.10)')
epsstress 1660 write(*,
'(" gmaxrf : ",G18.10)')
gmaxrf 1661 if (trim(block) ==
'lowq')
then 1662 write(*,
'(" lradstp : ",I4)')
lradstp 1667 read(50,*,err=20) hmaxvr
1668 if (hmaxvr < 0.d0)
then 1670 write(*,
'("Error(readinput): hmaxvr < 0 : ",G18.10)') hmaxvr
1675 read(50,*,err=20) hkmax
1676 if (hkmax <= 0.d0)
then 1678 write(*,
'("Error(readinput): hkmax <= 0 : ",G18.10)') hkmax
1688 write(*,
'("Error(readinput): lorbordc < 2 : ",I8)')
lorbordc 1694 write(*,
'("Error(readinput): lorbordc too large : ",I8)')
lorbordc 1695 write(*,
'("Adjust maxlorbord in modmain and recompile code")')
1700 read(50,
'(A)',err=20) str
1705 write(*,
'("Error(readinput): nrmtscf < 0.5 : ",G18.10)')
nrmtscf 1709 case(
'lmaxdb',
'lmaxdos')
1713 write(*,
'("Error(readinput): lmaxdb < 0 : ",I8)')
lmaxdb 1718 read(50,*,err=20) epsdev
1719 if (epsdev <= 0.d0)
then 1721 write(*,
'("Error(readinput): epsdev <= 0 : ",G18.10)') epsdev
1727 write(*,
'("Info(readinput): variable ''msmooth'' is no longer used")')
1731 read(50,*,err=20) wrtvars
1733 read(50,*,err=20) ftmtype
1736 write(*,
'("Error(readinput): variable ''tmomfix'' is no longer used")')
1737 write(*,
'(" use tm3fix instead")')
1741 read(50,*,err=20) ntmfix
1742 if (ntmfix < 1)
then 1744 write(*,
'("Error(readinput): ntmfix < 1 : ",I8)') ntmfix
1748 if (
allocated(itmfix))
deallocate(itmfix)
1749 allocate(itmfix(7,ntmfix))
1750 if (
allocated(wkprfix))
deallocate(wkprfix)
1751 allocate(wkprfix(ntmfix))
1753 read(50,*,err=20) is,ia,l
1754 if ((is < 1).or.(ia < 1).or.(l < 0))
then 1756 write(*,
'("Error(readinput): invalid is, ia or l in tm3fix block : ",& 1765 read(50,*,err=20) itmfix(4:7,i)
1767 read(50,*,err=20) wkprfix(i)
1770 read(50,*,err=20) tauftm
1771 if (tauftm < 0.d0)
then 1773 write(*,
'("Error(readinput): tauftm < 0 : ",G18.10)') tauftm
1779 write(*,
'("Info(readinput): variable ''ftmstep'' is no longer used")')
1780 case(
'cmagz',
'forcecmag')
1781 read(50,*,err=20)
cmagz 1783 read(50,*,err=20) axang(:)
1785 read(50,*,err=20) tstime
1786 if (tstime <= 0.d0)
then 1788 write(*,
'("Error(readinput): tstime <= 0 : ",G18.10)') tstime
1793 read(50,*,err=20) dtimes
1794 if (dtimes <= 0.d0)
then 1796 write(*,
'("Error(readinput): dtimes <= 0 : ",G18.10)') dtimes
1801 read(50,*,err=20) npulse
1802 if (npulse < 1)
then 1804 write(*,
'("Error(readinput): npulse < 1 : ",I8)') npulse
1808 if (
allocated(pulse))
deallocate(pulse)
1809 allocate(pulse(12,npulse))
1811 read(50,
'(A)',err=20) str
1812 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1813 read(str,*,err=20) pulse(:,i)
1816 read(50,*,err=20) nramp
1819 write(*,
'("Error(readinput): nramp < 1 : ",I8)') nramp
1823 if (
allocated(ramp))
deallocate(ramp)
1824 allocate(ramp(12,nramp))
1826 read(50,
'(A)',err=20) str
1827 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1828 read(str,*,err=20) ramp(:,i)
1831 read(50,*,err=20) nstep
1834 write(*,
'("Error(readinput): nstep < 1 : ",I8)') nstep
1838 if (
allocated(step))
deallocate(step)
1839 allocate(step(9,nstep))
1841 read(50,
'(A)',err=20) str
1842 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1843 read(str,*,err=20) step(:,i)
1847 write(*,
'("Info(readinput): variable ''ncgga'' is no longer used")')
1852 write(*,
'("Error(readinput): dncgga < 0 : ",G18.10)')
dncgga 1857 read(50,
'(A)',err=20) str
1859 read(str,*,err=20) ntswrite(:)
1860 case(
'nxoapwlo',
'nxapwlo')
1864 write(*,
'("Error(readinput): nxoapwlo < 0 : ",I8)')
nxoapwlo 1869 read(50,*,err=20)
nxlo 1872 write(*,
'("Error(readinput): nxlo < 0 : ",I8)')
nxlo 1877 read(50,*,err=20) tdrho1d
1879 read(50,*,err=20) tdrho2d
1881 read(50,*,err=20) tdrho3d
1883 read(50,*,err=20) tdmag1d
1885 read(50,*,err=20) tdmag2d
1887 read(50,*,err=20) tdmag3d
1888 case(
'tdjr1d',
'tdcd1d')
1889 read(50,*,err=20) tdjr1d
1890 case(
'tdjr2d',
'tdcd2d')
1891 read(50,*,err=20) tdjr2d
1892 case(
'tdjr3d',
'tdcd3d')
1893 read(50,*,err=20) tdjr3d
1895 read(50,*,err=20) tddos
1897 read(50,*,err=20) tdlsj
1899 read(50,*,err=20) tdjtk
1901 read(50,*,err=20) tdxrmk
1904 write(*,
'("Info(readinput): variable ''epseph'' is no longer used")')
1906 read(50,*,err=20) rndevt0
1907 case(
'sxcscf',
'ssxc',
'rstsf')
1908 read(50,
'(A)',err=20) str
1909 read(str,*,err=20)
sxcscf 1912 read(50,*,err=20)
tempk 1913 if (
tempk <= 0.d0)
then 1915 write(*,
'("Error(readinput): tempk <= 0 : ",G18.10)')
tempk 1924 read(50,*,err=20) avecu(:,1)
1925 read(50,*,err=20) avecu(:,2)
1926 read(50,*,err=20) avecu(:,3)
1928 read(50,*,err=20) scu
1930 read(50,*,err=20) scu1
1932 read(50,*,err=20) scu2
1934 read(50,*,err=20) scu3
1936 read(50,*,err=20) q0cut
1938 read(50,*,err=20) rndbfcu
1939 case(
'bfieldcu',
'bfielduc')
1940 read(50,*,err=20) bfieldcu
1941 case(
'efieldcu',
'efielduc')
1942 read(50,*,err=20) efieldcu
1944 read(50,*,err=20) tplotq0
1946 read(50,*,err=20) trdvclr
1948 read(50,*,err=20) trdbfcr
1951 write(*,
'("Info(readinput): variable ''evtype'' is no longer used")')
1953 read(50,*,err=20) wmaxgw
1956 write(*,
'("Info(readinput): variable ''twdiag'' is no longer used")')
1958 read(50,*,err=20) tsediag
1960 read(50,*,err=20) actype
1962 read(50,*,err=20) npole
1965 write(*,
'("Error(readinput): npole < 1 : ",I8)') npole
1970 read(50,*,err=20) nspade
1971 if (nspade < 1)
then 1973 write(*,
'("Error(readinput): nspade < 1 : ",I8)') nspade
1978 read(50,*,err=20)
tfav0 1983 write(*,
'("Error(readinput): rmtscf <= 0 : ",G18.10)')
rmtscf 1991 case(
'maxthd',
'omp_num_threads',
'OMP_NUM_THREADS')
1997 case(
'maxlvl',
'omp_max_active_levels',
'OMP_MAX_ACTIVE_LEVELS')
2001 write(*,
'("Error(readinput): maxlvl < 1 : ",I8)')
maxlvl 2006 read(50,*,err=20) lv
2015 write(*,
'("Info(readinput): parameters set by stable option")')
2017 write(*,
'(" mrmtav : ",I4)')
mrmtav 2018 write(*,
'(" lmaxapw : ",I4)')
lmaxapw 2019 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2020 write(*,
'(" msmgmt : ",I4)')
msmgmt 2024 read(50,*,err=20) lv
2034 write(*,
'("Info(readinput): parameters set by metagga option")')
2035 write(*,
'(" lmaxi : ",I4)')
lmaxi 2036 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2037 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 2038 write(*,
'(" msmgmt : ",I4)')
msmgmt 2039 write(*,
'(" epspot : ",G18.10)')
epspot 2040 write(*,
'(" epsengy : ",G18.10)')
epsengy 2045 write(*,
'("Info(readinput): variable ''t0tdlr'' is no longer used")')
2047 read(50,*,err=20) tdphi
2049 tdphi=tdphi*
pi/180.d0
2051 read(50,*,err=20) thetamld
2053 thetamld=thetamld*
pi/180.d0
2055 read(50,*,err=20) ntsbackup
2057 read(50,*,err=20) seedname
2058 seedname=adjustl(seedname)
2060 read(50,*,err=20) num_wann
2061 case(
'idxw90',
'wann_bands')
2062 read(50,
'(A)',err=20) str
2064 if (
allocated(idxw90))
deallocate(idxw90)
2065 allocate(idxw90(num_bands))
2066 call numlist(str,num_bands,idxw90)
2068 read(50,*,err=20) num_iter
2069 case(
'dis_num_iter')
2070 read(50,*,err=20) dis_num_iter
2072 read(50,*,err=20) trial_step
2073 case(
'xlwin',
'wannierExtra')
2074 if (
allocated(xlwin))
deallocate(xlwin)
2078 read(50,
'(A)',err=20) str
2079 if (trim(str) ==
'')
goto 10
2080 xlwin=[xlwin(1:nxlwin),str]
2084 read(50,*,err=20) wrtunk
2086 read(50,*,err=20)
tbdip 2088 read(50,*,err=20)
tjr 2090 read(50,*,err=20) tauefm
2092 read(50,*,err=20) epsefm
2094 read(50,*,err=20) ehfb
2098 read(50,*,err=20) tafindt
2101 write(*,
'("Info(readinput): variable ''afindscf'' is no longer used")')
2103 read(50,*,err=20) afindpm(:)
2104 if (afindpm(2) == 0.d0)
then 2106 write(*,
'("Error(readinput): afindpm(2) = 0")')
2114 write(*,
'("Error(readinput): nkspolar < 1 : ",I8)')
nkspolar 2119 read(50,*,err=20) ntsforce
2120 if (ntsforce < 1)
then 2122 write(*,
'("Error(readinput): ntsforce < 1 : ",I8)') ntsforce
2127 read(50,*,err=20) wphcut
2128 if (wphcut <= 0.d0)
then 2130 write(*,
'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2135 read(50,*,err=20) ephscf(:)
2137 read(50,*,err=20) anomalous
2139 read(50,*,err=20) tephde
2141 read(50,*,err=20) bdiag
2143 read(50,*,err=20) ecutb
2144 if (ecutb <= 0.d0)
then 2146 write(*,
'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2151 read(50,*,err=20) ediag
2153 read(50,*,err=20) pwxpsn
2154 if (pwxpsn < 1)
then 2156 write(*,
'("Error(readinput): pwxpsn < 1 : ",I8)') pwxpsn
2161 read(50,*,err=20) ramdisk
2163 read(50,*,err=20) wrtdsk
2165 read(50,*,err=20) epsdmat
2166 case(
'tm3vdl',
'tm3old')
2167 read(50,*,err=20) tm3vdl
2169 read(50,*,err=20) batch
2171 read(50,*,err=20) tafspt
2173 read(50,*,err=20) tbaspat
2177 read(50,*,err=20)
atdfc 2178 if (
atdfc < 0.d0)
then 2180 write(*,
'("Error(readinput): atdfc < 0 : ",G18.10)')
atdfc 2186 case(
'msmgmt',
'msmg2mt')
2189 read(50,*,err=20) ntsorth
2194 write(*,
'("Error(readinput): deltabf <= 0 : ",G18.10)')
deltabf 2199 read(50,*,err=20) jtconst0
2201 read(50,*,err=20)
trmt0 2203 read(50,*,err=20) ksgwrho
2211 read(50,*,err=20) npfftw
2213 read(50,*,err=20) tphnat
2215 read(50,*,err=20) ecutthc
2216 if (ecutthc <= 0.d0)
then 2218 write(*,
'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2223 read(50,*,err=20) tbdipu
2230 write(*,
'("Error(readinput): invalid block name : ",A)') trim(block)
2237 write(*,
'("Error(readinput): error reading from elk.in")')
2238 write(*,
'("Problem occurred in ''",A,"'' block")') trim(block)
2239 write(*,
'("Check input convention in manual")')
2255 if (t1 /= 0.d0)
then 2264 if (rndavec > 0.d0)
then 2267 t1=rndavec*(randomu()-0.5d0)
2311 if (fxctype(1) == -1) fxctype(:)=
xctype(:)
2315 avecu(:,1)=scu1*avecu(:,1)
2316 avecu(:,2)=scu2*avecu(:,2)
2317 avecu(:,3)=scu3*avecu(:,3)
2318 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