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
410 open(50,file=
'elk.in',status=
'OLD',form=
'FORMATTED',iostat=ios)
413 write(*,
'("Error(readinput): error opening elk.in")')
418 read(50,*,end=30) block
420 if ((block(1:1) ==
'!').or.(block(1:1) ==
'#'))
goto 10
421 select case(trim(block))
424 read(50,
'(A)',err=20) str
425 if (trim(str) ==
'')
then 428 write(*,
'("Error(readinput): no tasks to perform")')
435 read(str,*,iostat=ios)
tasks(i)
438 write(*,
'("Error(readinput): error reading tasks")')
439 write(*,
'("(blank line required after tasks block)")')
445 write(*,
'("Error(readinput): too many tasks")')
446 write(*,
'("Adjust maxtasks in modmain and recompile code")')
455 read(50,
'(A)',err=20) str
456 if (trim(str) ==
'')
goto 10
457 read(str,*,iostat=ios) zn,symb
460 write(*,
'("Error(readinput): error reading fractional species")')
461 write(*,
'("(blank line required after fspecies block)")')
467 write(*,
'("Error(readinput): fractional nuclear Z > 0 : ",G18.10)') zn
474 write(*,
'("Error(readinput): too many fractional nucleus species")')
479 read(50,
'(A)',err=20) str
480 read(str,*,err=20)
avec(:,i)
481 read(str,*,iostat=ios)
avec(:,i),
davec(:,i)
486 read(50,*,err=20) sc1
488 read(50,*,err=20) sc2
490 read(50,*,err=20) sc3
492 read(50,*,err=20) scx
494 read(50,*,err=20) scy
496 read(50,*,err=20) scz
501 write(*,
'("Error(readinput): epslat <= 0 : ",G18.10)')
epslat 515 write(*,
'("Error(readinput): radkpt <= 0 : ",G18.10)')
radkpt 520 read(50,
'(A)',err=20) str
521 read(str,*,err=20)
ngridk(:)
523 if (any(
ngridk(:) < 1))
then 525 write(*,
'("Error(readinput): invalid ngridk :",3(X,I0))')
ngridk 531 read(50,*,err=20)
vkloff(:)
532 if (any(
vkloff(:) < 0.d0).or.any(
vkloff(:) >= 1.d0))
then 534 write(*,
'("Error(readinput): vkloff components should be in [0,1) : ",& 542 read(50,*,err=20)
ngridq(:)
543 if (any(
ngridq(:) < 1))
then 545 write(*,
'("Error(readinput): invalid ngridq :",3(X,I0))')
ngridq 552 read(50,
'(A)',err=20) str
557 write(*,
'("Error(readinput): rgkmax <= 0 : ",G18.10)')
rgkmax 562 read(50,
'(A)',err=20) str
566 read(50,
'(A)',err=20) str
571 write(*,
'("Error(readinput): lmaxapw < 0 : ",I0)')
lmaxapw 577 write(*,
'("Error(readinput): lmaxapw too large : ",I0)')
lmaxapw 578 write(*,
'("Adjust maxlapw in modmain and recompile code")')
582 case(
'lmaxo',
'lmaxvr')
583 read(50,
'(A)',err=20) str
584 read(str,*,err=20)
lmaxo 588 write(*,
'("Error(readinput): lmaxo < 3 : ",I0)')
lmaxo 592 case(
'lmaxi',
'lmaxinr')
593 read(50,*,err=20)
lmaxi 596 write(*,
'("Error(readinput): lmaxi < 1 : ",I0)')
lmaxi 602 write(*,
'("Info(readinput): variable ''lmaxmat'' is no longer used")')
615 write(*,
'("Error(readinput): socscf < 0 : ",G18.10)')
socscf 620 read(50,*,err=20)
bforb 624 read(50,
'(A)',err=20) str
625 str=trim(str)//
' 0 0' 626 read(str,*,err=20)
xctype(:)
628 read(50,
'(A)',err=20) str
629 str=trim(str)//
' 0 0' 630 read(str,*,err=20)
xctsp(:)
632 read(50,
'(A)',err=20) str
633 str=trim(str)//
' 0 0' 634 read(str,*,err=20)
ktype(:)
635 if (
ktype(3) /= 0)
then 637 write(*,
'("Error(readinput): ktype(3) should be zero : ",I0)')
ktype(3)
642 read(50,*,err=20)
stype 647 write(*,
'("Error(readinput): swidth too small or negative : ",G18.10)') &
655 read(50,*,err=20)
mstar 656 if (
mstar <= 0.d0)
then 658 write(*,
'("Error(readinput): mstar <= 0 : ",G18.10)')
mstar 666 write(*,
'("Error(readinput): epsocc <= 0 : ",G18.10)')
epsocc 674 write(*,
'("Error(readinput): epschg <= 0 : ",G18.10)')
epschg 678 case(
'nempty',
'nempty0')
679 read(50,
'(A)',err=20) str
684 write(*,
'("Error(readinput): nempty <= 0 : ",G18.10)')
nempty0 692 case(
'amixpm',
'beta0',
'betamax')
693 if (trim(block) ==
'amixpm')
then 694 read(50,*,err=20)
amixpm(:)
695 else if (trim(block) ==
'beta0')
then 696 read(50,*,err=20)
amixpm(1)
698 read(50,*,err=20)
amixpm(2)
700 if (
amixpm(1) < 0.d0)
then 702 write(*,
'("Error(readinput): beta0 [amixpm(1)] < 0 : ",G18.10)')
amixpm(1)
708 write(*,
'("Error(readinput): betamax [amixpm(2)] not in [0,1] : ",G18.10)')&
717 write(*,
'("Error(readinput): mixsdb < 2 : ",I0)')
mixsdb 726 write(*,
'("Error(readinput): invalid Broyden mixing parameters : ",& 737 write(*,
'("Error(readinput): maxscl < 0 : ",I0)')
maxscl 760 write(*,
'("Error(readinput): nspecies < 1 : ",I0)')
nspecies 766 write(*,
'("Error(readinput): nspecies too large : ",I0)')
nspecies 767 write(*,
'("Adjust maxspecies in modmain and recompile code")')
774 read(50,*,err=20)
natoms(is)
777 write(*,
'("Error(readinput): natoms < 1 : ",I0)')
natoms(is)
778 write(*,
'(" for species ",I0)') is
784 write(*,
'("Error(readinput): natoms too large : ",I0)')
natoms(is)
785 write(*,
'(" for species ",I0)') is
786 write(*,
'("Adjust maxatoms in modmain and recompile code")')
791 read(50,
'(A)',err=20) str
792 read(str,*,err=20)
atposl(:,ia,is)
793 read(str,*,iostat=ios)
atposl(:,ia,is),
bfcmt0(:,ia,is),
datposl(:,ia,is)
800 write(*,
'("Error(readinput): nvp1d < 1 : ",I0)')
nvp1d 806 write(*,
'("Error(readinput): npp1d < nvp1d :",2(X,I0))')
npp1d,
nvp1d 813 read(50,*,err=20)
vvlp1d(:,i)
816 read(50,*,err=20)
ip01d 819 write(*,
'("Error(readinput): ip01d < 1 : ",I0)')
ip01d 824 read(50,*,err=20)
vclp2d(:,0)
825 read(50,*,err=20)
vclp2d(:,1)
826 read(50,*,err=20)
vclp2d(:,2)
827 read(50,*,err=20)
np2d(:)
828 if ((
np2d(1) < 1).or.(
np2d(2) < 1))
then 830 write(*,
'("Error(readinput): np2d < 1 :",2(X,I0))')
np2d 835 read(50,*,err=20)
vclp3d(:,0)
836 read(50,*,err=20)
vclp3d(:,1)
837 read(50,*,err=20)
vclp3d(:,2)
838 read(50,*,err=20)
vclp3d(:,3)
839 read(50,*,err=20)
np3d(:)
840 if ((
np3d(1) < 1).or.(
np3d(2) < 1).or.(
np3d(3) < 1))
then 842 write(*,
'("Error(readinput): np3d < 1 :",3(X,I0))')
np3d 850 write(*,
'("Error(readinput): nwplot < 2 : ",I0)')
nwplot 856 write(*,
'("Error(readinput): ngrkf < 1 : ",I0)')
ngrkf 862 write(*,
'("Error(readinput): nswplot < 0 : ",I0)')
nswplot 866 read(50,*,err=20)
wplot(:)
869 write(*,
'("Error(readinput): wplot(1) > wplot(2) : ",2G18.10)')
wplot 876 read(50,*,err=20)
tpdos 885 case(
'maxatpstp',
'maxatmstp')
889 write(*,
'("Error(readinput): maxatpstp < 1 : ",I0)')
maxatpstp 893 case(
'tau0atp',
'tau0atm')
899 write(*,
'("Error(readinput): deltast <= 0 : ",G18.10)')
deltast 913 write(*,
'("Error(readinput): maxlatvstp < 1 : ",I0)')
maxlatvstp 921 write(*,
'("Info(readinput): variable ''nstfsp'' is no longer used")')
926 write(*,
'("Error(readinput): lradstp < 1 : ",I0)')
lradstp 931 read(50,
'(A)',err=20) str
936 write(*,
'("Info(readinput): variable ''nprad'' is no longer used")')
943 write(*,
'("Error(readinput): noptcomp should be from 1 to 27 : ",I0)') &
950 read(50,
'(A)',err=20) str
951 if (trim(str) ==
'')
then 954 write(*,
'("Error(readinput): empty optical component list")')
961 str=trim(str)//
' 1 1' 962 read(str,*,iostat=ios)
optcomp(:,i)
965 write(*,
'("Error(readinput): error reading optical component list")')
966 write(*,
'("(blank line required after optcomp block)")')
972 write(*,
'("Error(readinput): invalid optcomp :",3(X,I0))')
optcomp(:,i)
978 write(*,
'("Error(readinput): optical component list too long")')
985 write(*,
'("Info(readinput): variable ''evaltol'' is no longer used")')
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 : ",I0)')
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 : ",I0)') 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 : ",I0)')
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 : ",I0)')
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 : ",I0)') 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 : ",I0)') l
1281 if (l > lmaxdm)
then 1283 write(*,
'("Error(readinput): l > lmaxdm in dft+u block :",2(X,I0))') l, &
1290 if ((is == isldu(1,j)).and.(l == isldu(2,j)))
then 1292 write(*,
'("Error(readinput): repeated entry in DFT+U block")')
1301 write(*,
'("Error(readinput): too many DFT+U entries")')
1302 write(*,
'("Adjust maxdftu in modmain and recompile code")')
1305 case(
'tmwrite',
'tmomlu')
1306 read(50,*,err=20) tmwrite
1307 case(
'readadu',
'readalu')
1309 write(*,
'("Info(readinput): variable ''readadu'' is no longer used")')
1311 read(50,*,err=20) rdmxctype
1313 read(50,*,err=20) rdmmaxscl
1314 if (rdmmaxscl < 0)
then 1316 write(*,
'("Error(readinput): rdmmaxscl < 0 : ",I0)') rdmmaxscl
1320 read(50,*,err=20) maxitn
1322 read(50,*,err=20) maxitc
1324 read(50,*,err=20) taurdmn
1325 if (taurdmn < 0.d0)
then 1327 write(*,
'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
1332 read(50,*,err=20) taurdmc
1333 if (taurdmc < 0.d0)
then 1335 write(*,
'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
1340 read(50,*,err=20) rdmalpha
1341 if ((rdmalpha <= 0.d0).or.(rdmalpha >= 1.d0))
then 1343 write(*,
'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
1348 read(50,*,err=20) rdmtemp
1349 if (rdmtemp < 0.d0)
then 1351 write(*,
'("Error(readinput): rdmtemp < 0 : ",G18.10)') rdmtemp
1359 write(*,
'("Error(readinput): reducebf not in [0.5,1] : ",G18.10)')
reducebf 1365 case(
'tefvr',
'tseqr')
1366 read(50,*,err=20)
tefvr 1367 case(
'tefvit',
'tseqit')
1369 case(
'minitefv',
'minseqit')
1371 write(*,
'("Info(readinput): variable ''minitefv'' is no longer used")')
1372 case(
'nefvit',
'maxitefv',
'maxseqit',
'nseqit')
1376 write(*,
'("Error(readinput): nefvit = 0")')
1380 case(
'befvit',
'bseqit')
1382 write(*,
'("Info(readinput): variable ''befvit'' is no longer used")')
1383 case(
'epsefvit',
'epsseqit')
1385 write(*,
'("Info(readinput): variable ''epsefvit'' is no longer used")')
1388 write(*,
'("Info(readinput): variable ''tauseq'' is no longer used")')
1390 read(50,*,err=20)
vecql(:)
1392 read(50,*,err=20) mustar
1393 case(
'sqaxis',
'sqados')
1394 read(50,*,err=20)
sqaxis(:)
1396 read(50,*,err=20) test
1399 write(*,
'("Info(readinput): variable ''frozencr'' is no longer used")')
1403 read(50,*,err=20) solscf
1404 if (solscf < 0.d0)
then 1406 write(*,
'("Error(readinput): solscf < 0 : ",G18.10)') solscf
1413 read(50,*,err=20)
wsfac(:)
1415 read(50,*,err=20) vhmat(1,:)
1416 read(50,*,err=20) vhmat(2,:)
1417 read(50,*,err=20) vhmat(3,:)
1419 read(50,*,err=20) reduceh
1422 case(
'hybridc',
'hybmix')
1426 write(*,
'("Error(readinput): invalid hybridc : ",G18.10)')
hybridc 1438 write(*,
'("Error(readinput): nvbse < 0 : ",I0)')
nvbse0 1446 write(*,
'("Error(readinput): ncbse < 0 : ",I0)')
ncbse0 1452 read(50,
'(A)',err=20) str
1453 if (trim(str) ==
'')
then 1456 write(*,
'("Error(readinput): empty BSE extra valence state list")')
1463 read(str,*,iostat=ios)
istxbse(i)
1466 write(*,
'("Error(readinput): error reading BSE valence state list")')
1467 write(*,
'("(blank line required after istxbse block)")')
1473 write(*,
'("Error(readinput): BSE extra valence state list too long")')
1478 read(50,
'(A)',err=20) str
1479 if (trim(str) ==
'')
then 1482 write(*,
'("Error(readinput): empty BSE extra conduction state list")')
1489 read(str,*,iostat=ios)
jstxbse(i)
1492 write(*,
'("Error(readinput): error reading BSE conduction state list")')
1493 write(*,
'("(blank line required after jstxbse block)")')
1499 write(*,
'("Error(readinput): BSE extra conduction state list too long")')
1505 read(50,*,err=20)
hxbse 1507 read(50,*,err=20)
hdbse 1508 case(
'gmaxrf',
'gmaxrpa')
1512 write(*,
'("Error(readinput): gmaxrf < 0 : ",G18.10)')
gmaxrf 1522 write(*,
'("Error(readinput): emaxrf < 0 : ",G18.10)')
emaxrf 1527 read(50,
'(A)',err=20) str
1528 str=trim(str)//
' 0 0' 1529 read(str,*,err=20) fxctype
1531 read(50,
'(A)',err=20) str
1532 str=trim(str)//
' 0.0' 1533 read(str,*,err=20) fxclrc(:)
1535 read(50,*,err=20) ntemp
1538 write(*,
'("Error(readinput): ntemp < 1 : ",I0)') ntemp
1543 write(*,
'("Info(readinput): variable ''trimvg'' is no longer used")')
1545 case(
'rndstate',
'rndseed')
1546 read(50,*,err=20) rndstate(0)
1547 rndstate(0)=abs(rndstate(0))
1553 read(50,*,err=20) rndavec
1558 case(
'lowq',
'highq',
'vhighq',
'uhighq')
1559 read(50,*,err=20) lv
1561 if (trim(block) ==
'lowq')
then 1579 else if (trim(block) ==
'highq')
then 1598 else if (trim(block) ==
'vhighq')
then 1639 write(*,
'("Info(readinput): parameters set by ",A," option")') trim(block)
1640 write(*,
'(" rgkmax : ",G18.10)')
rgkmax 1641 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 1642 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 1643 write(*,
'(" lmaxo : ",I0)')
lmaxo 1644 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 1645 write(*,
'(" nxlo : ",I0)')
nxlo 1646 write(*,
'(" lorbcnd : ",L1)')
lorbcnd 1647 write(*,
'(" radkpt : ",G18.10)')
radkpt 1648 write(*,
'(" autokpt : ",L1)')
autokpt 1649 write(*,
'(" vkloff : ",3G18.10)')
vkloff 1650 write(*,
'(" nempty0 : ",G18.10)')
nempty0 1651 write(*,
'(" epspot : ",G18.10)')
epspot 1652 write(*,
'(" epsengy : ",G18.10)')
epsengy 1653 write(*,
'(" epsforce : ",G18.10)')
epsforce 1654 write(*,
'(" epsstress : ",G18.10)')
epsstress 1656 write(*,
'(" gmaxrf : ",G18.10)')
gmaxrf 1657 if (trim(block) ==
'lowq')
then 1658 write(*,
'(" lradstp : ",I0)')
lradstp 1663 read(50,*,err=20) hmaxvr
1664 if (hmaxvr < 0.d0)
then 1666 write(*,
'("Error(readinput): hmaxvr < 0 : ",G18.10)') hmaxvr
1671 read(50,*,err=20) hkmax
1672 if (hkmax <= 0.d0)
then 1674 write(*,
'("Error(readinput): hkmax <= 0 : ",G18.10)') hkmax
1684 write(*,
'("Error(readinput): lorbordc < 2 : ",I0)')
lorbordc 1690 write(*,
'("Error(readinput): lorbordc too large : ",I0)')
lorbordc 1691 write(*,
'("Adjust maxlorbord in modmain and recompile code")')
1696 read(50,
'(A)',err=20) str
1701 write(*,
'("Error(readinput): nrmtscf < 0.5 : ",G18.10)')
nrmtscf 1705 case(
'lmaxdb',
'lmaxdos')
1709 write(*,
'("Error(readinput): lmaxdb < 0 : ",I0)')
lmaxdb 1714 read(50,*,err=20) epsdev
1715 if (epsdev <= 0.d0)
then 1717 write(*,
'("Error(readinput): epsdev <= 0 : ",G18.10)') epsdev
1723 write(*,
'("Info(readinput): variable ''msmooth'' is no longer used")')
1727 read(50,*,err=20) wrtvars
1729 read(50,*,err=20) ftmtype
1732 write(*,
'("Error(readinput): variable ''tmomfix'' is no longer used")')
1733 write(*,
'(" use tm3fix instead")')
1737 read(50,*,err=20) ntmfix
1738 if (ntmfix < 1)
then 1740 write(*,
'("Error(readinput): ntmfix < 1 : ",I0)') ntmfix
1744 if (
allocated(itmfix))
deallocate(itmfix)
1745 allocate(itmfix(7,ntmfix))
1746 if (
allocated(wkprfix))
deallocate(wkprfix)
1747 allocate(wkprfix(ntmfix))
1749 read(50,*,err=20) is,ia,l
1750 if ((is < 1).or.(ia < 1).or.(l < 0))
then 1752 write(*,
'("Error(readinput): invalid is, ia or l in tm3fix block :",& 1761 read(50,*,err=20) itmfix(4:7,i)
1763 read(50,*,err=20) wkprfix(i)
1766 read(50,*,err=20) tauftm
1767 if (tauftm < 0.d0)
then 1769 write(*,
'("Error(readinput): tauftm < 0 : ",G18.10)') tauftm
1775 write(*,
'("Info(readinput): variable ''ftmstep'' is no longer used")')
1776 case(
'cmagz',
'forcecmag')
1777 read(50,*,err=20)
cmagz 1779 read(50,*,err=20) axang(:)
1781 read(50,*,err=20) tstime
1782 if (tstime <= 0.d0)
then 1784 write(*,
'("Error(readinput): tstime <= 0 : ",G18.10)') tstime
1789 read(50,*,err=20) dtimes
1790 if (dtimes <= 0.d0)
then 1792 write(*,
'("Error(readinput): dtimes <= 0 : ",G18.10)') dtimes
1797 read(50,*,err=20) npulse
1798 if (npulse < 1)
then 1800 write(*,
'("Error(readinput): npulse < 1 : ",I0)') npulse
1804 if (
allocated(pulse))
deallocate(pulse)
1805 allocate(pulse(12,npulse))
1807 read(50,
'(A)',err=20) str
1808 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1809 read(str,*,err=20) pulse(:,i)
1812 read(50,*,err=20) nramp
1815 write(*,
'("Error(readinput): nramp < 1 : ",I0)') nramp
1819 if (
allocated(ramp))
deallocate(ramp)
1820 allocate(ramp(12,nramp))
1822 read(50,
'(A)',err=20) str
1823 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1824 read(str,*,err=20) ramp(:,i)
1827 read(50,*,err=20) nstep
1830 write(*,
'("Error(readinput): nstep < 1 : ",I0)') nstep
1834 if (
allocated(step))
deallocate(step)
1835 allocate(step(9,nstep))
1837 read(50,
'(A)',err=20) str
1838 str=trim(str)//
' 1.0 0.0 0.0 0.0' 1839 read(str,*,err=20) step(:,i)
1843 write(*,
'("Info(readinput): variable ''ncgga'' is no longer used")')
1848 write(*,
'("Error(readinput): dncgga < 0 : ",G18.10)')
dncgga 1853 read(50,
'(A)',err=20) str
1855 read(str,*,err=20) ntswrite(:)
1856 case(
'nxoapwlo',
'nxapwlo')
1860 write(*,
'("Error(readinput): nxoapwlo < 0 : ",I0)')
nxoapwlo 1865 read(50,*,err=20)
nxlo 1868 write(*,
'("Error(readinput): nxlo < 0 : ",I0)')
nxlo 1873 read(50,*,err=20) tdrho1d
1875 read(50,*,err=20) tdrho2d
1877 read(50,*,err=20) tdrho3d
1879 read(50,*,err=20) tdmag1d
1881 read(50,*,err=20) tdmag2d
1883 read(50,*,err=20) tdmag3d
1884 case(
'tdjr1d',
'tdcd1d')
1885 read(50,*,err=20) tdjr1d
1886 case(
'tdjr2d',
'tdcd2d')
1887 read(50,*,err=20) tdjr2d
1888 case(
'tdjr3d',
'tdcd3d')
1889 read(50,*,err=20) tdjr3d
1891 read(50,*,err=20) tddos
1893 read(50,*,err=20) tdlsj
1895 read(50,*,err=20) tdjtk
1897 read(50,*,err=20) tdxrmk
1900 write(*,
'("Info(readinput): variable ''epseph'' is no longer used")')
1902 read(50,*,err=20) rndevt0
1903 case(
'sxcscf',
'ssxc',
'rstsf')
1904 read(50,
'(A)',err=20) str
1905 read(str,*,err=20)
sxcscf 1908 read(50,*,err=20)
tempk 1909 if (
tempk <= 0.d0)
then 1911 write(*,
'("Error(readinput): tempk <= 0 : ",G18.10)')
tempk 1920 read(50,*,err=20) avecu(:,1)
1921 read(50,*,err=20) avecu(:,2)
1922 read(50,*,err=20) avecu(:,3)
1924 read(50,*,err=20) scu
1926 read(50,*,err=20) scu1
1928 read(50,*,err=20) scu2
1930 read(50,*,err=20) scu3
1932 read(50,*,err=20) q0cut
1934 read(50,*,err=20) ngridkpa
1936 read(50,*,err=20) rndbfcu
1937 case(
'bfieldcu',
'bfielduc')
1938 read(50,*,err=20) bfieldcu
1939 case(
'efieldcu',
'efielduc')
1940 read(50,*,err=20) efieldcu
1942 read(50,*,err=20) tplotq0
1944 read(50,*,err=20) trdvclr
1946 read(50,*,err=20) trdbfcr
1949 write(*,
'("Info(readinput): variable ''evtype'' is no longer used")')
1951 read(50,*,err=20) wmaxgw
1954 write(*,
'("Info(readinput): variable ''twdiag'' is no longer used")')
1956 read(50,*,err=20) tsediag
1958 read(50,*,err=20) actype
1960 read(50,*,err=20) npole
1963 write(*,
'("Error(readinput): npole < 1 : ",I0)') npole
1968 read(50,*,err=20) nspade
1969 if (nspade < 1)
then 1971 write(*,
'("Error(readinput): nspade < 1 : ",I0)') nspade
1976 read(50,*,err=20)
tfav0 1981 write(*,
'("Error(readinput): rmtscf <= 0 : ",G18.10)')
rmtscf 1989 case(
'maxthd',
'omp_num_threads',
'OMP_NUM_THREADS')
1995 case(
'maxlvl',
'omp_max_active_levels',
'OMP_MAX_ACTIVE_LEVELS')
1999 write(*,
'("Error(readinput): maxlvl < 1 : ",I0)')
maxlvl 2004 read(50,*,err=20) lv
2013 write(*,
'("Info(readinput): parameters set by stable option")')
2015 write(*,
'(" mrmtav : ",I0)')
mrmtav 2016 write(*,
'(" lmaxapw : ",I0)')
lmaxapw 2017 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2018 write(*,
'(" msmgmt : ",I0)')
msmgmt 2022 read(50,*,err=20) lv
2032 write(*,
'("Info(readinput): parameters set by metagga option")')
2033 write(*,
'(" lmaxi : ",I0)')
lmaxi 2034 write(*,
'(" gmaxvr : ",G18.10)')
gmaxvr 2035 write(*,
'(" nrmtscf : ",G18.10)')
nrmtscf 2036 write(*,
'(" msmgmt : ",I0)')
msmgmt 2037 write(*,
'(" epspot : ",G18.10)')
epspot 2038 write(*,
'(" epsengy : ",G18.10)')
epsengy 2043 write(*,
'("Info(readinput): variable ''t0tdlr'' is no longer used")')
2045 read(50,*,err=20) tdphi
2047 tdphi=tdphi*
pi/180.d0
2049 read(50,*,err=20) thetamld
2051 thetamld=thetamld*
pi/180.d0
2053 read(50,*,err=20) ntsbackup
2055 read(50,*,err=20) seedname
2056 seedname=adjustl(seedname)
2058 read(50,*,err=20) num_wann
2059 case(
'idxw90',
'wann_bands')
2060 read(50,
'(A)',err=20) str
2062 if (
allocated(idxw90))
deallocate(idxw90)
2063 allocate(idxw90(num_bands))
2064 call numlist(str,num_bands,idxw90)
2066 read(50,*,err=20) num_iter
2067 case(
'dis_num_iter')
2068 read(50,*,err=20) dis_num_iter
2070 read(50,*,err=20) trial_step
2071 case(
'xlwin',
'wannierExtra')
2072 if (
allocated(xlwin))
deallocate(xlwin)
2076 read(50,
'(A)',err=20) str
2077 if (trim(str) ==
'')
goto 10
2078 xlwin=[xlwin(1:nxlwin),str]
2082 read(50,*,err=20) wrtunk
2084 read(50,*,err=20)
tbdip 2086 read(50,*,err=20)
tjr 2088 read(50,*,err=20) tauefm
2090 read(50,*,err=20) epsefm
2092 read(50,*,err=20) ehfb
2096 read(50,*,err=20) tafindt
2099 write(*,
'("Info(readinput): variable ''afindscf'' is no longer used")')
2101 read(50,*,err=20) afindpm(:)
2102 if (afindpm(2) == 0.d0)
then 2104 write(*,
'("Error(readinput): afindpm(2) = 0")')
2112 write(*,
'("Error(readinput): nkspolar < 1 : ",I0)')
nkspolar 2117 read(50,*,err=20) ntsforce
2118 if (ntsforce < 1)
then 2120 write(*,
'("Error(readinput): ntsforce < 1 : ",I0)') ntsforce
2125 read(50,*,err=20) wphcut
2126 if (wphcut <= 0.d0)
then 2128 write(*,
'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2133 read(50,*,err=20) ephscf(:)
2135 read(50,*,err=20) anomalous
2137 read(50,*,err=20) tephde
2139 read(50,*,err=20) bdiag
2141 read(50,*,err=20) ecutb
2142 if (ecutb <= 0.d0)
then 2144 write(*,
'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2149 read(50,*,err=20) ediag
2151 read(50,*,err=20) pwxpsn
2152 if (pwxpsn < 1)
then 2154 write(*,
'("Error(readinput): pwxpsn < 1 : ",I0)') pwxpsn
2159 read(50,*,err=20) ramdisk
2160 case(
'wrtdisk',
'wrtdsk')
2161 read(50,*,err=20) wrtdisk
2163 read(50,*,err=20) epsdmat
2164 case(
'tm3vdl',
'tm3old')
2165 read(50,*,err=20) tm3vdl
2167 read(50,*,err=20) batch
2169 read(50,*,err=20) tafspt
2171 read(50,*,err=20) tbaspat
2175 read(50,*,err=20)
atdfc 2176 if (
atdfc < 0.d0)
then 2178 write(*,
'("Error(readinput): atdfc < 0 : ",G18.10)')
atdfc 2184 case(
'msmgmt',
'msmg2mt')
2187 read(50,*,err=20) ntsorth
2192 write(*,
'("Error(readinput): deltabf <= 0 : ",G18.10)')
deltabf 2197 read(50,*,err=20) jtconst0
2199 read(50,*,err=20)
trmt0 2201 read(50,*,err=20) ksgwrho
2209 read(50,*,err=20) npfftw
2211 read(50,*,err=20) tphnat
2213 read(50,*,err=20) ecutthc
2214 if (ecutthc <= 0.d0)
then 2216 write(*,
'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2221 read(50,*,err=20) tbdipu
2228 write(*,
'("Error(readinput): invalid block name : ",A)') trim(block)
2235 write(*,
'("Error(readinput): error reading from elk.in")')
2236 write(*,
'("Problem occurred in ''",A,"'' block")') trim(block)
2237 write(*,
'("Check input convention in manual")')
2253 if (t1 /= 0.d0)
then 2262 if (rndavec > 0.d0)
then 2265 t1=rndavec*(randomu()-0.5d0)
2309 if (fxctype(1) == -1) fxctype(:)=
xctype(:)
2313 avecu(:,1)=scu1*avecu(:,1)
2314 avecu(:,2)=scu2*avecu(:,2)
2315 avecu(:,3)=scu3*avecu(:,3)
2316 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