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
170 do k=1,3;
do j=1,3;
do i=1,3
173 end do; end do; end do
203 if (
allocated(vqlwrt))
deallocate(vqlwrt)
204 allocate(vqlwrt(3,nphwrt))
353 thetamld=45.d0*
pi/180.d0
414 open(50,file=
'elk.in',status=
'OLD',form=
'FORMATTED',iostat=ios)
417 write(*,
'("Error(readinput): error opening elk.in")')
422 read(50,*,end=30) block
424 if ((block(1:1) ==
'!').or.(block(1:1) ==
'#'))
goto 10
425 select case(trim(block))
428 read(50,
'(A)',err=20) str
429 if (trim(str) ==
'')
then 432 write(*,
'("Error(readinput): no tasks to perform")')
439 read(str,*,iostat=ios)
tasks(i)
442 write(*,
'("Error(readinput): error reading tasks")')
443 write(*,
'("(blank line required after tasks block)")')
449 write(*,
'("Error(readinput): too many tasks")')
450 write(*,
'("Adjust maxtasks in modmain and recompile code")')
459 read(50,
'(A)',err=20) str
460 if (trim(str) ==
'')
goto 10
461 read(str,*,iostat=ios) zn,symb
464 write(*,
'("Error(readinput): error reading fractional species")')
465 write(*,
'("(blank line required after fspecies block)")')
471 write(*,
'("Error(readinput): fractional nuclear Z > 0 : ",G18.10)') zn
478 write(*,
'("Error(readinput): too many fractional nucleus species")')
483 read(50,
'(A)',err=20) str
484 read(str,*,err=20)
avec(:,i)
485 read(str,*,iostat=ios)
avec(:,i),
davec(:,i)
490 read(50,*,err=20) sc1
492 read(50,*,err=20) sc2
494 read(50,*,err=20) sc3
496 read(50,*,err=20) scx
498 read(50,*,err=20) scy
500 read(50,*,err=20) scz
505 write(*,
'("Error(readinput): epslat <= 0 : ",G18.10)')
epslat 519 write(*,
'("Error(readinput): radkpt <= 0 : ",G18.10)')
radkpt 524 read(50,
'(A)',err=20) str
525 read(str,*,err=20)
ngridk(:)
527 if (any(
ngridk(:) < 1))
then 529 write(*,
'("Error(readinput): invalid ngridk :",3(X,I0))')
ngridk 535 read(50,*,err=20)
vkloff(:)
536 if (any(
vkloff(:) < 0.d0).or.any(
vkloff(:) >= 1.d0))
then 538 write(*,
'("Error(readinput): vkloff components should be in [0,1) : ",& 546 read(50,*,err=20)
ngridq(:)
547 if (any(
ngridq(:) < 1))
then 549 write(*,
'("Error(readinput): invalid ngridq :",3(X,I0))')
ngridq 556 read(50,
'(A)',err=20) str
561 write(*,
'("Error(readinput): rgkmax <= 0 : ",G18.10)')
rgkmax 566 read(50,
'(A)',err=20) str
570 read(50,
'(A)',err=20) str
575 write(*,
'("Error(readinput): lmaxapw < 0 : ",I0)')
lmaxapw 581 write(*,
'("Error(readinput): lmaxapw too large : ",I0)')
lmaxapw 582 write(*,
'("Adjust maxlapw in modmain and recompile code")')
586 case(
'lmaxo',
'lmaxvr')
587 read(50,
'(A)',err=20) str
588 read(str,*,err=20)
lmaxo 592 write(*,
'("Error(readinput): lmaxo < 3 : ",I0)')
lmaxo 596 case(
'lmaxi',
'lmaxinr')
597 read(50,*,err=20)
lmaxi 600 write(*,
'("Error(readinput): lmaxi < 1 : ",I0)')
lmaxi 606 write(*,
'("Info(readinput): variable ''lmaxmat'' is no longer used")')
619 write(*,
'("Error(readinput): socscf < 0 : ",G18.10)')
socscf 624 read(50,*,err=20)
bforb 628 read(50,
'(A)',err=20) str
629 str=trim(str)//
' 0 0' 630 read(str,*,err=20)
xctype(:)
632 read(50,
'(A)',err=20) str
633 str=trim(str)//
' 0 0' 634 read(str,*,err=20)
xctsp(:)
636 read(50,
'(A)',err=20) str
637 str=trim(str)//
' 0 0' 638 read(str,*,err=20)
ktype(:)
639 if (
ktype(3) /= 0)
then 641 write(*,
'("Error(readinput): ktype(3) should be zero : ",I0)')
ktype(3)
646 read(50,*,err=20)
stype 648 read(50,
'(A)',err=20) str
653 write(*,
'("Error(readinput): swidth too small or negative : ",G18.10)') &
661 read(50,*,err=20)
mstar 662 if (
mstar <= 0.d0)
then 664 write(*,
'("Error(readinput): mstar <= 0 : ",G18.10)')
mstar 672 write(*,
'("Error(readinput): epsocc <= 0 : ",G18.10)')
epsocc 680 write(*,
'("Error(readinput): epschg <= 0 : ",G18.10)')
epschg 684 case(
'nempty',
'nempty0')
685 read(50,
'(A)',err=20) str
690 write(*,
'("Error(readinput): nempty <= 0 : ",G18.10)')
nempty0 698 case(
'amixpm',
'beta0',
'betamax')
699 if (trim(block) ==
'amixpm')
then 700 read(50,*,err=20)
amixpm(:)
701 else if (trim(block) ==
'beta0')
then 702 read(50,*,err=20)
amixpm(1)
704 read(50,*,err=20)
amixpm(2)
706 if (
amixpm(1) < 0.d0)
then 708 write(*,
'("Error(readinput): beta0 [amixpm(1)] < 0 : ",G18.10)')
amixpm(1)
714 write(*,
'("Error(readinput): betamax [amixpm(2)] not in [0,1] : ",G18.10)')&
723 write(*,
'("Error(readinput): mixsdb < 2 : ",I0)')
mixsdb 732 write(*,
'("Error(readinput): invalid Broyden mixing parameters : ",& 743 write(*,
'("Error(readinput): maxscl < 0 : ",I0)')
maxscl 766 write(*,
'("Error(readinput): nspecies < 1 : ",I0)')
nspecies 772 write(*,
'("Error(readinput): nspecies too large : ",I0)')
nspecies 773 write(*,
'("Adjust maxspecies in modmain and recompile code")')
780 read(50,*,err=20)
natoms(is)
783 write(*,
'("Error(readinput): natoms < 1 : ",I0)')
natoms(is)
784 write(*,
'(" for species ",I0)') is
790 write(*,
'("Error(readinput): natoms too large : ",I0)')
natoms(is)
791 write(*,
'(" for species ",I0)') is
792 write(*,
'("Adjust maxatoms in modmain and recompile code")')
797 read(50,
'(A)',err=20) str
798 read(str,*,err=20)
atposl(:,ia,is)
799 read(str,*,iostat=ios)
atposl(:,ia,is),
bfcmt0(:,ia,is),
datposl(:,ia,is)
806 write(*,
'("Error(readinput): nvp1d < 1 : ",I0)')
nvp1d 812 write(*,
'("Error(readinput): npp1d < nvp1d :",2(X,I0))')
npp1d,
nvp1d 819 read(50,*,err=20)
vvlp1d(:,i)
821 case(
'ip0gw',
'ip01d')
822 read(50,*,err=20) ip0gw
825 write(*,
'("Error(readinput): ip0gw < 1 : ",I0)') ip0gw
830 read(50,*,err=20)
vclp2d(:,0)
831 read(50,*,err=20)
vclp2d(:,1)
832 read(50,*,err=20)
vclp2d(:,2)
833 read(50,*,err=20)
np2d(:)
834 if ((
np2d(1) < 1).or.(
np2d(2) < 1))
then 836 write(*,
'("Error(readinput): np2d < 1 :",2(X,I0))')
np2d 841 read(50,*,err=20)
vclp3d(:,0)
842 read(50,*,err=20)
vclp3d(:,1)
843 read(50,*,err=20)
vclp3d(:,2)
844 read(50,*,err=20)
vclp3d(:,3)
845 read(50,*,err=20)
np3d(:)
846 if ((
np3d(1) < 1).or.(
np3d(2) < 1).or.(
np3d(3) < 1))
then 848 write(*,
'("Error(readinput): np3d < 1 :",3(X,I0))')
np3d 856 write(*,
'("Error(readinput): nwplot < 2 : ",I0)')
nwplot 862 write(*,
'("Error(readinput): ngrkf < 1 : ",I0)')
ngrkf 868 write(*,
'("Error(readinput): nswplot < 0 : ",I0)')
nswplot 872 read(50,*,err=20)
wplot(:)
875 write(*,
'("Error(readinput): wplot(1) > wplot(2) : ",2G18.10)')
wplot 882 read(50,*,err=20)
tpdos 891 case(
'maxatpstp',
'maxatmstp')
895 write(*,
'("Error(readinput): maxatpstp < 1 : ",I0)')
maxatpstp 899 case(
'tau0atp',
'tau0atm')
905 write(*,
'("Error(readinput): deltast <= 0 : ",G18.10)')
deltast 919 write(*,
'("Error(readinput): maxlatvstp < 1 : ",I0)')
maxlatvstp 927 write(*,
'("Info(readinput): variable ''nstfsp'' is no longer used")')
932 write(*,
'("Error(readinput): lradstp < 1 : ",I0)')
lradstp 937 read(50,
'(A)',err=20) str
942 write(*,
'("Info(readinput): variable ''nprad'' is no longer used")')
949 write(*,
'("Error(readinput): noptcomp should be from 1 to 27 : ",I0)') &
956 read(50,
'(A)',err=20) str
957 if (trim(str) ==
'')
then 960 write(*,
'("Error(readinput): empty optical component list")')
967 str=trim(str)//
' 1 1' 968 read(str,*,iostat=ios)
optcomp(:,i)
971 write(*,
'("Error(readinput): error reading optical component list")')
972 write(*,
'("(blank line required after optcomp block)")')
978 write(*,
'("Error(readinput): invalid optcomp :",3(X,I0))')
optcomp(:,i)
984 write(*,
'("Error(readinput): optical component list too long")')
991 write(*,
'("Info(readinput): variable ''evaltol'' is no longer used")')
994 write(*,
'("Info(readinput): variable ''deband'' is no longer used")')
999 write(*,
'("Error(readinput): epsband <= 0 : ",G18.10)')
epsband 1007 write(*,
'("Error(readinput): demaxbnd <= 0 : ",G18.10)')
demaxbnd 1014 read(50,*,err=20)
dlefe 1018 read(50,*,err=20)
deapw 1019 if (abs(
deapw) < 1.d-8)
then 1021 write(*,
'("Error(readinput): invalid deapw : ",G18.10)')
deapw 1027 if (abs(
delorb) < 1.d-8)
then 1029 write(*,
'("Error(readinput): invalid delorb : ",G18.10)')
delorb 1034 read(50,
'(A)',err=20) str
1043 write(*,
'("Error(readinput): dmaxefc < 0 : ",G18.10)')
dmaxefc 1048 read(50,
'(A)',err=20) str
1053 read(50,
'(A)',err=20) str
1054 read(str,*,err=20)
afspc(i,:)
1057 case(
'fsmtype',
'fixspin')
1060 read(50,
'(A)',err=20) str
1061 read(str,*,err=20)
momfix(:)
1067 write(*,
'("Error(readinput): momfixm < 0 : ",G18.10)')
momfixm 1073 read(50,
'(A)',err=20) str
1074 if (trim(str) ==
'')
goto 10
1075 read(str,*,iostat=ios) is,ia,
mommtfix(:,ia,is)
1078 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1080 write(*,
'("(blank line required after mommtfix block)")')
1087 read(50,
'(A)',err=20) str
1088 if (trim(str) ==
'')
goto 10
1089 read(str,*,iostat=ios) is,ia,
mommtfixm(ia,is)
1092 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1093 &moment magnitudes")')
1094 write(*,
'("(blank line required after mommtfixm block)")')
1103 write(*,
'("Error(readinput): taufsm < 0 : ",G18.10)')
taufsm 1109 write(*,
'("Info(readinput): variable ''autormt'' is no longer used")')
1114 write(*,
'("Warning(readinput): rmtdelta < 0 : ",G18.10)')
rmtdelta 1119 read(50,*,err=20) lv
1125 write(*,
'("Error(readinput): symtype not defined : ",I0)')
symtype 1130 read(50,*,err=20) deltaph
1131 if (deltaph <= 0.d0)
then 1133 write(*,
'("Error(readinput): deltaph <= 0 : ",G18.10)') deltaph
1138 read(50,*,err=20) nphwrt
1139 if (nphwrt < 1)
then 1141 write(*,
'("Error(readinput): nphwrt < 1 : ",I0)') nphwrt
1145 if (
allocated(vqlwrt))
deallocate(vqlwrt)
1146 allocate(vqlwrt(3,nphwrt))
1148 read(50,*,err=20) vqlwrt(:,i)
1156 if (trim(str) ==
'')
goto 10
1164 write(*,
'("Info(readinput): variable ''tfibs'' is no longer used")')
1169 write(*,
'("Error(readinput): maxitoep < 1 : ",I0)')
maxitoep 1175 write(*,
'("Info(readinput): variable ''tauoep'' is no longer used")')
1180 write(*,
'("Error(readinput): tau0oep < 0 : ",G18.10)')
tau0oep 1186 read(50,
'(A)',err=20) str
1187 if (trim(str) ==
'')
then 1190 write(*,
'("Error(readinput): empty k-point and state list")')
1198 read(str,*,iostat=ios)
kstlist(:,i)
1201 write(*,
'("Error(readinput): error reading k-point and state list")')
1202 write(*,
'("(blank line required after kstlist block)")')
1208 write(*,
'("Error(readinput): k-point and state list too long")')
1212 read(50,*,err=20)
vklem 1217 write(*,
'("Error(readinput): deltaem <= 0 : ",G18.10)')
deltaem 1225 write(*,
'("Error(readinput): ndspem out of range : ",I0)')
ndspem 1234 read(50,*,err=20)
ssdph 1236 read(50,
'(A)',err=20) str
1237 read(str,*,err=20)
vqlss 1241 case(
'DFT+U',
'dft+u',
'lda+u')
1242 read(50,*,err=20) dftu,inpdftu
1244 read(50,
'(A)',err=20) str
1245 if (trim(str) ==
'')
then 1249 select case(inpdftu)
1251 read(str,*,iostat=ios) is,l,ujdu(1:2,i)
1253 read(str,*,iostat=ios) is,l,(fdu(k,i),k=0,2*l,2)
1255 read(str,*,iostat=ios) is,l,(edu(k,i),k=0,l)
1257 read(str,*,iostat=ios) is,l,lamdu(i)
1259 read(str,*,iostat=ios) is,l,udufix(i),dudufix(i)
1260 read(str,*,iostat=ios) is,l,udufix(i)
1263 write(*,
'("Error(readinput): invalid inpdftu : ",I0)') inpdftu
1269 write(*,
'("Error(readinput): error reading DFT+U parameters")')
1270 write(*,
'("(blank line required after dft+u block)")')
1276 write(*,
'("Error(readinput): invalid species number in dft+u block : ", & 1283 write(*,
'("Error(readinput): l < 0 in dft+u block : ",I0)') l
1287 if (l > lmaxdm)
then 1289 write(*,
'("Error(readinput): l > lmaxdm in dft+u block :",2(X,I0))') l, &
1296 if ((is == isldu(1,j)).and.(l == isldu(2,j)))
then 1298 write(*,
'("Error(readinput): repeated entry in DFT+U block")')
1307 write(*,
'("Error(readinput): too many DFT+U entries")')
1308 write(*,
'("Adjust maxdftu in modmain and recompile code")')
1311 case(
'tmwrite',
'tmomlu')
1312 read(50,*,err=20) tmwrite
1313 case(
'readadu',
'readalu')
1315 write(*,
'("Info(readinput): variable ''readadu'' is no longer used")')
1317 read(50,*,err=20) rdmxctype
1319 read(50,*,err=20) rdmmaxscl
1320 if (rdmmaxscl < 0)
then 1322 write(*,
'("Error(readinput): rdmmaxscl < 0 : ",I0)') rdmmaxscl
1326 read(50,*,err=20) maxitn
1328 read(50,*,err=20) maxitc
1330 read(50,*,err=20) taurdmn
1331 if (taurdmn < 0.d0)
then 1333 write(*,
'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
1338 read(50,*,err=20) taurdmc
1339 if (taurdmc < 0.d0)
then 1341 write(*,
'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
1346 read(50,*,err=20) rdmalpha
1347 if ((rdmalpha <= 0.d0).or.(rdmalpha >= 1.d0))
then 1349 write(*,
'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
1354 read(50,*,err=20) rdmtemp
1355 if (rdmtemp < 0.d0)
then 1357 write(*,
'("Error(readinput): rdmtemp < 0 : ",G18.10)') rdmtemp
1365 write(*,
'("Error(readinput): reducebf not in [0.5,1] : ",G18.10)')
reducebf 1371 case(
'tefvr',
'tseqr')
1372 read(50,*,err=20)
tefvr 1375 write(*,
'("Info(readinput): variable ''tefvs'' is no longer used")')
1377 read(50,*,err=20)
mefvs 1378 case(
'tefvit',
'tseqit')
1380 write(*,
'("Info(readinput): variable ''tefvit'' is no longer used")')
1381 case(
'minitefv',
'minseqit')
1383 write(*,
'("Info(readinput): variable ''minitefv'' is no longer used")')
1384 case(
'nefvit',
'maxitefv',
'maxseqit',
'nseqit')
1386 write(*,
'("Info(readinput): variable ''nefvit'' is no longer used")')
1387 case(
'befvit',
'bseqit')
1389 write(*,
'("Info(readinput): variable ''befvit'' is no longer used")')
1390 case(
'epsefvit',
'epsseqit')
1392 write(*,
'("Info(readinput): variable ''epsefvit'' is no longer used")')
1395 write(*,
'("Info(readinput): variable ''tauseq'' is no longer used")')
1397 read(50,*,err=20)
vecql(:)
1399 read(50,*,err=20) mustar
1400 case(
'sqaxis',
'sqados')
1401 read(50,*,err=20)
sqaxis(:)
1403 read(50,*,err=20) test
1406 case(
'frzncore',
'frozencr')
1409 read(50,*,err=20) solscf
1410 if (solscf < 0.d0)
then 1412 write(*,
'("Error(readinput): solscf < 0 : ",G18.10)') solscf
1419 read(50,*,err=20)
wsfac(:)
1421 read(50,*,err=20) vhmat(1,:)
1422 read(50,*,err=20) vhmat(2,:)
1423 read(50,*,err=20) vhmat(3,:)
1425 read(50,*,err=20) reduceh
1428 case(
'hybridc',
'hybmix')
1432 write(*,
'("Error(readinput): invalid hybridc : ",G18.10)')
hybridc 1444 write(*,
'("Error(readinput): nvbse < 0 : ",I0)')
nvbse0 1452 write(*,
'("Error(readinput): ncbse < 0 : ",I0)')
ncbse0 1458 read(50,
'(A)',err=20) str
1459 if (trim(str) ==
'')
then 1462 write(*,
'("Error(readinput): empty BSE extra valence state list")')
1469 read(str,*,iostat=ios)
istxbse(i)
1472 write(*,
'("Error(readinput): error reading BSE valence state list")')
1473 write(*,
'("(blank line required after istxbse block)")')
1479 write(*,
'("Error(readinput): BSE extra valence state list too long")')
1484 read(50,
'(A)',err=20) str
1485 if (trim(str) ==
'')
then 1488 write(*,
'("Error(readinput): empty BSE extra conduction state list")')
1495 read(str,*,iostat=ios)
jstxbse(i)
1498 write(*,
'("Error(readinput): error reading BSE conduction state list")')
1499 write(*,
'("(blank line required after jstxbse block)")')
1505 write(*,
'("Error(readinput): BSE extra conduction state list too long")')
1511 read(50,*,err=20)
hxbse 1513 read(50,*,err=20)
hdbse 1514 case(
'gmaxrf',
'gmaxrpa')
1518 write(*,
'("Error(readinput): gmaxrf < 0 : ",G18.10)')
gmaxrf 1528 write(*,
'("Error(readinput): emaxrf < 0 : ",G18.10)')
emaxrf 1533 read(50,
'(A)',err=20) str
1534 str=trim(str)//
' 0 0' 1535 read(str,*,err=20) fxctype
1537 read(50,
'(A)',err=20) str
1538 str=trim(str)//
' 0.0' 1539 read(str,*,err=20) fxclrc(:)
1541 read(50,*,err=20) ntemp
1544 write(*,
'("Error(readinput): ntemp < 1 : ",I0)') ntemp
1549 write(*,
'("Info(readinput): variable ''trimvg'' is no longer used")')
1551 case(
'rndstate',
'rndseed')
1552 read(50,*,err=20) rndstate(0)
1553 rndstate(0)=abs(rndstate(0))
1559 read(50,*,err=20) rndavec
1564 case(
'lowq',
'highq',
'vhighq',
'uhighq')
1565 read(50,*,err=20) lv
1567 if (trim(block) ==
'lowq')
then 1585 else if (trim(block) ==
'highq')
then 1604 else if (trim(block) ==
'vhighq')
then 1645 write(*,
'("Info(readinput): parameters set by ",A," option")') trim(block)
1646 write(*,
'(" rgkmax : ",G18.10)')
rgkmax 1647 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 1648 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 1649 write(*,
'(" lmaxo : ",I0)')
lmaxo 1650 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 1651 write(*,
'(" nxlo : ",I0)')
nxlo 1652 write(*,
'(" lorbcnd : ",L1)')
lorbcnd 1653 write(*,
'(" radkpt : ",G18.10)')
radkpt 1654 write(*,
'(" autokpt : ",L1)')
autokpt 1655 write(*,
'(" vkloff : ",3G18.10)')
vkloff 1656 write(*,
'(" nempty0 : ",G18.10)')
nempty0 1657 write(*,
'(" epspot : ",G18.10)')
epspot 1658 write(*,
'(" epsengy : ",G18.10)')
epsengy 1659 write(*,
'(" epsforce : ",G18.10)')
epsforce 1660 write(*,
'(" epsstress : ",G18.10)')
epsstress 1662 write(*,
'(" gmaxrf : ",G18.10)')
gmaxrf 1663 if (trim(block) ==
'lowq')
then 1664 write(*,
'(" lradstp : ",I0)')
lradstp 1669 read(50,*,err=20) hmaxvr
1670 if (hmaxvr < 0.d0)
then 1672 write(*,
'("Error(readinput): hmaxvr < 0 : ",G18.10)') hmaxvr
1677 read(50,*,err=20) hkmax
1678 if (hkmax <= 0.d0)
then 1680 write(*,
'("Error(readinput): hkmax <= 0 : ",G18.10)') hkmax
1690 write(*,
'("Error(readinput): lorbordc < 2 : ",I0)')
lorbordc 1696 write(*,
'("Error(readinput): lorbordc too large : ",I0)')
lorbordc 1697 write(*,
'("Adjust maxlorbord in modmain and recompile code")')
1702 read(50,
'(A)',err=20) str
1707 write(*,
'("Error(readinput): nrmtscf < 0.5 : ",G18.10)')
nrmtscf 1711 case(
'lmaxdb',
'lmaxdos')
1715 write(*,
'("Error(readinput): lmaxdb < 0 : ",I0)')
lmaxdb 1720 read(50,*,err=20) epsdev
1721 if (epsdev <= 0.d0)
then 1723 write(*,
'("Error(readinput): epsdev <= 0 : ",G18.10)') epsdev
1729 write(*,
'("Info(readinput): variable ''msmooth'' is no longer used")')
1733 read(50,*,err=20) wrtvars
1735 read(50,*,err=20) ftmtype
1738 write(*,
'("Error(readinput): variable ''tmomfix'' is no longer used")')
1739 write(*,
'(" use tm3fix instead")')
1743 read(50,*,err=20) ntmfix
1744 if (ntmfix < 1)
then 1746 write(*,
'("Error(readinput): ntmfix < 1 : ",I0)') ntmfix
1750 if (
allocated(itmfix))
deallocate(itmfix)
1751 allocate(itmfix(7,ntmfix))
1752 if (
allocated(wkprfix))
deallocate(wkprfix)
1753 allocate(wkprfix(ntmfix))
1755 read(50,*,err=20) is,ia,l
1756 if ((is < 1).or.(ia < 1).or.(l < 0))
then 1758 write(*,
'("Error(readinput): invalid is, ia or l in tm3fix block :",& 1767 read(50,*,err=20) itmfix(4:7,i)
1769 read(50,*,err=20) wkprfix(i)
1772 read(50,*,err=20) tauftm
1773 if (tauftm < 0.d0)
then 1775 write(*,
'("Error(readinput): tauftm < 0 : ",G18.10)') tauftm
1781 write(*,
'("Info(readinput): variable ''ftmstep'' is no longer used")')
1782 case(
'cmagz',
'forcecmag')
1783 read(50,*,err=20)
cmagz 1785 read(50,*,err=20) axang(:)
1787 read(50,*,err=20) tstime
1788 if (tstime <= 0.d0)
then 1790 write(*,
'("Error(readinput): tstime <= 0 : ",G18.10)') tstime
1795 read(50,*,err=20) dtimes
1796 if (dtimes <= 0.d0)
then 1798 write(*,
'("Error(readinput): dtimes <= 0 : ",G18.10)') dtimes
1803 read(50,*,err=20) npulse
1804 if (npulse < 1)
then 1806 write(*,
'("Error(readinput): npulse < 1 : ",I0)') npulse
1810 if (
allocated(pulse))
deallocate(pulse)
1811 allocate(pulse(12,npulse))
1813 read(50,
'(A)',err=20) str
1814 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1815 read(str,*,err=20) pulse(:,i)
1818 read(50,*,err=20) nramp
1821 write(*,
'("Error(readinput): nramp < 1 : ",I0)') nramp
1825 if (
allocated(ramp))
deallocate(ramp)
1826 allocate(ramp(12,nramp))
1828 read(50,
'(A)',err=20) str
1829 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1830 read(str,*,err=20) ramp(:,i)
1833 read(50,*,err=20) nstep
1836 write(*,
'("Error(readinput): nstep < 1 : ",I0)') nstep
1840 if (
allocated(step))
deallocate(step)
1841 allocate(step(9,nstep))
1843 read(50,
'(A)',err=20) str
1844 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1845 read(str,*,err=20) step(:,i)
1849 write(*,
'("Info(readinput): variable ''ncgga'' is no longer used")')
1854 write(*,
'("Error(readinput): dncgga < 0 : ",G18.10)')
dncgga 1859 read(50,
'(A)',err=20) str
1861 read(str,*,err=20) ntswrite(:)
1862 case(
'nxoapwlo',
'nxapwlo')
1866 write(*,
'("Error(readinput): nxoapwlo < 0 : ",I0)')
nxoapwlo 1871 read(50,*,err=20)
nxlo 1874 write(*,
'("Error(readinput): nxlo < 0 : ",I0)')
nxlo 1879 read(50,*,err=20) tdrho1d
1881 read(50,*,err=20) tdrho2d
1883 read(50,*,err=20) tdrho3d
1885 read(50,*,err=20) tdmag1d
1887 read(50,*,err=20) tdmag2d
1889 read(50,*,err=20) tdmag3d
1890 case(
'tdjr1d',
'tdcd1d')
1891 read(50,*,err=20) tdjr1d
1892 case(
'tdjr2d',
'tdcd2d')
1893 read(50,*,err=20) tdjr2d
1894 case(
'tdjr3d',
'tdcd3d')
1895 read(50,*,err=20) tdjr3d
1897 read(50,*,err=20) tddos
1899 read(50,*,err=20) tdlsj
1901 read(50,*,err=20) tdjtk
1903 read(50,*,err=20) tdxrmk
1906 write(*,
'("Info(readinput): variable ''epseph'' is no longer used")')
1908 read(50,*,err=20) rndevt0
1909 case(
'sxcscf',
'ssxc',
'rstsf')
1910 read(50,
'(A)',err=20) str
1911 read(str,*,err=20)
sxcscf 1914 read(50,*,err=20)
tempk 1915 if (
tempk <= 0.d0)
then 1917 write(*,
'("Error(readinput): tempk <= 0 : ",G18.10)')
tempk 1926 read(50,*,err=20) avecu(:,1)
1927 read(50,*,err=20) avecu(:,2)
1928 read(50,*,err=20) avecu(:,3)
1930 read(50,*,err=20) scu
1932 read(50,*,err=20) scu1
1934 read(50,*,err=20) scu2
1936 read(50,*,err=20) scu3
1938 read(50,*,err=20) q0cut
1940 read(50,*,err=20) ngridkpa
1942 read(50,*,err=20) rndbfcu
1943 case(
'bfieldcu',
'bfielduc')
1944 read(50,*,err=20) bfieldcu
1945 case(
'efieldcu',
'efielduc')
1946 read(50,*,err=20) efieldcu
1948 read(50,*,err=20) tplotq0
1950 read(50,*,err=20) trdvclr
1952 read(50,*,err=20) trdbfcr
1955 write(*,
'("Info(readinput): variable ''evtype'' is no longer used")')
1957 read(50,*,err=20) wmaxgw
1960 write(*,
'("Info(readinput): variable ''twdiag'' is no longer used")')
1962 read(50,*,err=20) tsediag
1964 read(50,*,err=20) actype
1966 read(50,*,err=20) npole
1969 write(*,
'("Error(readinput): npole < 1 : ",I0)') npole
1974 read(50,*,err=20) nspade
1975 if (nspade < 1)
then 1977 write(*,
'("Error(readinput): nspade < 1 : ",I0)') nspade
1982 read(50,*,err=20)
tfav0 1987 write(*,
'("Error(readinput): rmtscf <= 0 : ",G18.10)')
rmtscf 1997 case(
'maxthd',
'omp_num_threads',
'OMP_NUM_THREADS')
2003 case(
'maxlvl',
'omp_max_active_levels',
'OMP_MAX_ACTIVE_LEVELS')
2007 write(*,
'("Error(readinput): maxlvl < 1 : ",I0)')
maxlvl 2012 read(50,*,err=20) lv
2022 write(*,
'("Info(readinput): parameters set by stable option")')
2024 write(*,
'(" mrmtav : ",I0)')
mrmtav 2025 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 2026 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2027 write(*,
'(" msmgmt : ",I0)')
msmgmt 2028 write(*,
'(" rminall : ",G18.10)')
rminall 2032 read(50,*,err=20) lv
2043 write(*,
'("Info(readinput): parameters set by metagga option")')
2044 write(*,
'(" lmaxi : ",I0)')
lmaxi 2045 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2046 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 2047 write(*,
'(" msmgmt : ",I0)')
msmgmt 2048 write(*,
'(" epspot : ",G18.10)')
epspot 2049 write(*,
'(" epsengy : ",G18.10)')
epsengy 2050 write(*,
'(" rminall : ",G18.10)')
rminall 2055 write(*,
'("Info(readinput): variable ''t0tdlr'' is no longer used")')
2057 read(50,*,err=20) tdphi
2059 tdphi=tdphi*
pi/180.d0
2061 read(50,*,err=20) thetamld
2063 thetamld=thetamld*
pi/180.d0
2065 read(50,*,err=20) ntsbackup
2067 read(50,*,err=20) seedname
2068 seedname=adjustl(seedname)
2070 read(50,*,err=20) num_wann
2071 case(
'idxw90',
'wann_bands')
2072 read(50,
'(A)',err=20) str
2074 if (
allocated(idxw90))
deallocate(idxw90)
2075 allocate(idxw90(num_bands))
2076 call numlist(str,num_bands,idxw90)
2078 read(50,*,err=20) projw90
2081 read(50,
'(A)',err=20) str
2082 if (trim(str) ==
'')
goto 10
2083 read(str,*,iostat=ios) is
2086 write(*,
'("Error(readinput): error reading lprojw90")')
2087 write(*,
'("(blank line required after lprojw90 block)")')
2093 write(*,
'("Error(readinput): invalid projection species : ",I0)') is
2097 read(str,*,iostat=ios) is,lprojw90(:,is)
2100 read(50,*,err=20) num_iter
2101 case(
'dis_num_iter')
2102 read(50,*,err=20) dis_num_iter
2104 read(50,*,err=20) trial_step
2105 case(
'xlwin',
'wannierExtra')
2106 if (
allocated(xlwin))
deallocate(xlwin)
2110 read(50,
'(A)',err=20) str
2111 if (trim(str) ==
'')
goto 10
2112 xlwin=[xlwin(1:nxlwin),str]
2116 read(50,*,err=20) wrtunk
2118 read(50,*,err=20)
tbdip 2120 read(50,*,err=20)
tjr 2122 read(50,*,err=20) tauefm
2124 read(50,*,err=20) epsefm
2127 write(*,
'("Info(readinput): variable ''t0gclq0'' is no longer used")')
2129 read(50,*,err=20) tafindt
2132 write(*,
'("Info(readinput): variable ''afindscf'' is no longer used")')
2134 read(50,*,err=20) afindpm(:)
2135 if (afindpm(2) == 0.d0)
then 2137 write(*,
'("Error(readinput): afindpm(2) = 0")')
2145 write(*,
'("Error(readinput): nkspolar < 1 : ",I0)')
nkspolar 2150 read(50,*,err=20) ntsforce
2151 if (ntsforce < 1)
then 2153 write(*,
'("Error(readinput): ntsforce < 1 : ",I0)') ntsforce
2158 read(50,*,err=20) wphcut
2159 if (wphcut <= 0.d0)
then 2161 write(*,
'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2166 read(50,*,err=20) ephscf(:)
2168 read(50,*,err=20) anomalous
2170 read(50,*,err=20) tephde
2172 read(50,*,err=20) bdiag
2174 read(50,*,err=20) ecutb
2175 if (ecutb <= 0.d0)
then 2177 write(*,
'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2182 read(50,*,err=20) ediag
2184 read(50,*,err=20) pwxpsn
2185 if (pwxpsn < 1)
then 2187 write(*,
'("Error(readinput): pwxpsn < 1 : ",I0)') pwxpsn
2192 read(50,*,err=20) ramdisk
2193 case(
'wrtdisk',
'wrtdsk')
2194 read(50,*,err=20) wrtdisk
2196 read(50,*,err=20) epsdmat
2198 read(50,*,err=20) tm3type
2199 if ((tm3type < 0).or.(tm3type > 2))
then 2201 write(*,
'("Error(readinput): invalid tm3type : ",I0)') tm3type
2205 case(
'tm3vdl',
'tm3old')
2206 read(50,*,err=20) lv
2209 read(50,*,err=20) batch
2211 read(50,*,err=20) tafspt
2213 read(50,*,err=20) tbaspat
2217 read(50,*,err=20)
atdfc 2218 if (
atdfc < 0.d0)
then 2220 write(*,
'("Error(readinput): atdfc < 0 : ",G18.10)')
atdfc 2226 case(
'msmgmt',
'msmg2mt')
2229 read(50,*,err=20) ntsorth
2234 write(*,
'("Error(readinput): deltabf <= 0 : ",G18.10)')
deltabf 2239 read(50,*,err=20) jtconst0
2241 read(50,*,err=20)
trmt0 2243 read(50,*,err=20) ksgwrho
2251 read(50,*,err=20) npfftw
2253 read(50,*,err=20) tphnat
2255 read(50,*,err=20) ecutthc
2256 if (ecutthc <= 0.d0)
then 2258 write(*,
'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2263 read(50,*,err=20) tbdipu
2265 read(50,
'(A)',err=20) str
2269 read(50,*,err=20)
tidle 2272 write(*,
'("Error(readinput): tidle < 1 : ",I0)')
tidle 2280 write(*,
'("Error(readinput): invalid block name : ",A)') trim(block)
2287 write(*,
'("Error(readinput): error reading from elk.in")')
2288 write(*,
'("Problem occurred in ''",A,"'' block")') trim(block)
2289 write(*,
'("Check input convention in manual")')
2305 if (t1 /= 0.d0)
then 2314 if (rndavec > 0.d0)
then 2317 t1=rndavec*(randomu()-0.5d0)
2361 if (fxctype(1) == -1) fxctype(:)=
xctype(:)
2365 avecu(:,1)=scu1*avecu(:,1)
2366 avecu(:,2)=scu2*avecu(:,2)
2367 avecu(:,3)=scu3*avecu(:,3)
2368 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