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))
350 thetamld=45.d0*
pi/180.d0
409 open(50,file=
'elk.in',status=
'OLD',form=
'FORMATTED',iostat=ios)
412 write(*,
'("Error(readinput): error opening elk.in")')
417 read(50,*,end=30) block
419 if ((block(1:1) ==
'!').or.(block(1:1) ==
'#'))
goto 10
420 select case(trim(block))
423 read(50,
'(A)',err=20) str
424 if (trim(str) ==
'')
then 427 write(*,
'("Error(readinput): no tasks to perform")')
434 read(str,*,iostat=ios)
tasks(i)
437 write(*,
'("Error(readinput): error reading tasks")')
438 write(*,
'("(blank line required after tasks block)")')
444 write(*,
'("Error(readinput): too many tasks")')
445 write(*,
'("Adjust maxtasks in modmain and recompile code")')
454 read(50,
'(A)',err=20) str
455 if (trim(str) ==
'')
goto 10
456 read(str,*,iostat=ios) zn,symb
459 write(*,
'("Error(readinput): error reading fractional species")')
460 write(*,
'("(blank line required after fspecies block)")')
466 write(*,
'("Error(readinput): fractional nuclear Z > 0 : ",G18.10)') zn
473 write(*,
'("Error(readinput): too many fractional nucleus species")')
478 read(50,
'(A)',err=20) str
479 read(str,*,err=20)
avec(:,i)
480 read(str,*,iostat=ios)
avec(:,i),
davec(:,i)
485 read(50,*,err=20) sc1
487 read(50,*,err=20) sc2
489 read(50,*,err=20) sc3
491 read(50,*,err=20) scx
493 read(50,*,err=20) scy
495 read(50,*,err=20) scz
500 write(*,
'("Error(readinput): epslat <= 0 : ",G18.10)')
epslat 514 write(*,
'("Error(readinput): radkpt <= 0 : ",G18.10)')
radkpt 519 read(50,
'(A)',err=20) str
520 read(str,*,err=20)
ngridk(:)
522 if (any(
ngridk(:) < 1))
then 524 write(*,
'("Error(readinput): invalid ngridk :",3(X,I0))')
ngridk 530 read(50,*,err=20)
vkloff(:)
531 if (any(
vkloff(:) < 0.d0).or.any(
vkloff(:) >= 1.d0))
then 533 write(*,
'("Error(readinput): vkloff components should be in [0,1) : ",& 541 read(50,*,err=20)
ngridq(:)
542 if (any(
ngridq(:) < 1))
then 544 write(*,
'("Error(readinput): invalid ngridq :",3(X,I0))')
ngridq 551 read(50,
'(A)',err=20) str
556 write(*,
'("Error(readinput): rgkmax <= 0 : ",G18.10)')
rgkmax 561 read(50,
'(A)',err=20) str
565 read(50,
'(A)',err=20) str
570 write(*,
'("Error(readinput): lmaxapw < 0 : ",I0)')
lmaxapw 576 write(*,
'("Error(readinput): lmaxapw too large : ",I0)')
lmaxapw 577 write(*,
'("Adjust maxlapw in modmain and recompile code")')
581 case(
'lmaxo',
'lmaxvr')
582 read(50,
'(A)',err=20) str
583 read(str,*,err=20)
lmaxo 587 write(*,
'("Error(readinput): lmaxo < 3 : ",I0)')
lmaxo 591 case(
'lmaxi',
'lmaxinr')
592 read(50,*,err=20)
lmaxi 595 write(*,
'("Error(readinput): lmaxi < 1 : ",I0)')
lmaxi 601 write(*,
'("Info(readinput): variable ''lmaxmat'' is no longer used")')
614 write(*,
'("Error(readinput): socscf < 0 : ",G18.10)')
socscf 619 read(50,*,err=20)
bforb 623 read(50,
'(A)',err=20) str
624 str=trim(str)//
' 0 0' 625 read(str,*,err=20)
xctype(:)
627 read(50,
'(A)',err=20) str
628 str=trim(str)//
' 0 0' 629 read(str,*,err=20)
xctsp(:)
631 read(50,
'(A)',err=20) str
632 str=trim(str)//
' 0 0' 633 read(str,*,err=20)
ktype(:)
634 if (
ktype(3) /= 0)
then 636 write(*,
'("Error(readinput): ktype(3) should be zero : ",I0)')
ktype(3)
641 read(50,*,err=20)
stype 646 write(*,
'("Error(readinput): swidth too small or negative : ",G18.10)') &
654 read(50,*,err=20)
mstar 655 if (
mstar <= 0.d0)
then 657 write(*,
'("Error(readinput): mstar <= 0 : ",G18.10)')
mstar 665 write(*,
'("Error(readinput): epsocc <= 0 : ",G18.10)')
epsocc 673 write(*,
'("Error(readinput): epschg <= 0 : ",G18.10)')
epschg 677 case(
'nempty',
'nempty0')
678 read(50,
'(A)',err=20) str
683 write(*,
'("Error(readinput): nempty <= 0 : ",G18.10)')
nempty0 691 case(
'amixpm',
'beta0',
'betamax')
692 if (trim(block) ==
'amixpm')
then 693 read(50,*,err=20)
amixpm(:)
694 else if (trim(block) ==
'beta0')
then 695 read(50,*,err=20)
amixpm(1)
697 read(50,*,err=20)
amixpm(2)
699 if (
amixpm(1) < 0.d0)
then 701 write(*,
'("Error(readinput): beta0 [amixpm(1)] < 0 : ",G18.10)')
amixpm(1)
707 write(*,
'("Error(readinput): betamax [amixpm(2)] not in [0,1] : ",G18.10)')&
716 write(*,
'("Error(readinput): mixsdb < 2 : ",I0)')
mixsdb 725 write(*,
'("Error(readinput): invalid Broyden mixing parameters : ",& 736 write(*,
'("Error(readinput): maxscl < 0 : ",I0)')
maxscl 759 write(*,
'("Error(readinput): nspecies < 1 : ",I0)')
nspecies 765 write(*,
'("Error(readinput): nspecies too large : ",I0)')
nspecies 766 write(*,
'("Adjust maxspecies in modmain and recompile code")')
773 read(50,*,err=20)
natoms(is)
776 write(*,
'("Error(readinput): natoms < 1 : ",I0)')
natoms(is)
777 write(*,
'(" for species ",I0)') is
783 write(*,
'("Error(readinput): natoms too large : ",I0)')
natoms(is)
784 write(*,
'(" for species ",I0)') is
785 write(*,
'("Adjust maxatoms in modmain and recompile code")')
790 read(50,
'(A)',err=20) str
791 read(str,*,err=20)
atposl(:,ia,is)
792 read(str,*,iostat=ios)
atposl(:,ia,is),
bfcmt0(:,ia,is),
datposl(:,ia,is)
799 write(*,
'("Error(readinput): nvp1d < 1 : ",I0)')
nvp1d 805 write(*,
'("Error(readinput): npp1d < nvp1d :",2(X,I0))')
npp1d,
nvp1d 812 read(50,*,err=20)
vvlp1d(:,i)
814 case(
'ip0gw',
'ip01d')
815 read(50,*,err=20) ip0gw
818 write(*,
'("Error(readinput): ip0gw < 1 : ",I0)') ip0gw
823 read(50,*,err=20)
vclp2d(:,0)
824 read(50,*,err=20)
vclp2d(:,1)
825 read(50,*,err=20)
vclp2d(:,2)
826 read(50,*,err=20)
np2d(:)
827 if ((
np2d(1) < 1).or.(
np2d(2) < 1))
then 829 write(*,
'("Error(readinput): np2d < 1 :",2(X,I0))')
np2d 834 read(50,*,err=20)
vclp3d(:,0)
835 read(50,*,err=20)
vclp3d(:,1)
836 read(50,*,err=20)
vclp3d(:,2)
837 read(50,*,err=20)
vclp3d(:,3)
838 read(50,*,err=20)
np3d(:)
839 if ((
np3d(1) < 1).or.(
np3d(2) < 1).or.(
np3d(3) < 1))
then 841 write(*,
'("Error(readinput): np3d < 1 :",3(X,I0))')
np3d 849 write(*,
'("Error(readinput): nwplot < 2 : ",I0)')
nwplot 855 write(*,
'("Error(readinput): ngrkf < 1 : ",I0)')
ngrkf 861 write(*,
'("Error(readinput): nswplot < 0 : ",I0)')
nswplot 865 read(50,*,err=20)
wplot(:)
868 write(*,
'("Error(readinput): wplot(1) > wplot(2) : ",2G18.10)')
wplot 875 read(50,*,err=20)
tpdos 884 case(
'maxatpstp',
'maxatmstp')
888 write(*,
'("Error(readinput): maxatpstp < 1 : ",I0)')
maxatpstp 892 case(
'tau0atp',
'tau0atm')
898 write(*,
'("Error(readinput): deltast <= 0 : ",G18.10)')
deltast 912 write(*,
'("Error(readinput): maxlatvstp < 1 : ",I0)')
maxlatvstp 920 write(*,
'("Info(readinput): variable ''nstfsp'' is no longer used")')
925 write(*,
'("Error(readinput): lradstp < 1 : ",I0)')
lradstp 930 read(50,
'(A)',err=20) str
935 write(*,
'("Info(readinput): variable ''nprad'' is no longer used")')
942 write(*,
'("Error(readinput): noptcomp should be from 1 to 27 : ",I0)') &
949 read(50,
'(A)',err=20) str
950 if (trim(str) ==
'')
then 953 write(*,
'("Error(readinput): empty optical component list")')
960 str=trim(str)//
' 1 1' 961 read(str,*,iostat=ios)
optcomp(:,i)
964 write(*,
'("Error(readinput): error reading optical component list")')
965 write(*,
'("(blank line required after optcomp block)")')
971 write(*,
'("Error(readinput): invalid optcomp :",3(X,I0))')
optcomp(:,i)
977 write(*,
'("Error(readinput): optical component list too long")')
984 write(*,
'("Info(readinput): variable ''evaltol'' is no longer used")')
987 write(*,
'("Info(readinput): variable ''deband'' is no longer used")')
992 write(*,
'("Error(readinput): epsband <= 0 : ",G18.10)')
epsband 1000 write(*,
'("Error(readinput): demaxbnd <= 0 : ",G18.10)')
demaxbnd 1007 read(50,*,err=20)
dlefe 1011 read(50,*,err=20)
deapw 1012 if (abs(
deapw) < 1.d-8)
then 1014 write(*,
'("Error(readinput): invalid deapw : ",G18.10)')
deapw 1020 if (abs(
delorb) < 1.d-8)
then 1022 write(*,
'("Error(readinput): invalid delorb : ",G18.10)')
delorb 1027 read(50,
'(A)',err=20) str
1036 write(*,
'("Error(readinput): dmaxefc < 0 : ",G18.10)')
dmaxefc 1041 read(50,
'(A)',err=20) str
1046 read(50,
'(A)',err=20) str
1047 read(str,*,err=20)
afspc(i,:)
1050 case(
'fsmtype',
'fixspin')
1053 read(50,
'(A)',err=20) str
1054 read(str,*,err=20)
momfix(:)
1060 write(*,
'("Error(readinput): momfixm < 0 : ",G18.10)')
momfixm 1066 read(50,
'(A)',err=20) str
1067 if (trim(str) ==
'')
goto 10
1068 read(str,*,iostat=ios) is,ia,
mommtfix(:,ia,is)
1071 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1073 write(*,
'("(blank line required after mommtfix block)")')
1080 read(50,
'(A)',err=20) str
1081 if (trim(str) ==
'')
goto 10
1082 read(str,*,iostat=ios) is,ia,
mommtfixm(ia,is)
1085 write(*,
'("Error(readinput): error reading muffin-tin fixed spin & 1086 &moment magnitudes")')
1087 write(*,
'("(blank line required after mommtfixm block)")')
1096 write(*,
'("Error(readinput): taufsm < 0 : ",G18.10)')
taufsm 1102 write(*,
'("Info(readinput): variable ''autormt'' is no longer used")')
1107 write(*,
'("Warning(readinput): rmtdelta < 0 : ",G18.10)')
rmtdelta 1112 read(50,*,err=20) lv
1118 write(*,
'("Error(readinput): symtype not defined : ",I0)')
symtype 1123 read(50,*,err=20) deltaph
1124 if (deltaph <= 0.d0)
then 1126 write(*,
'("Error(readinput): deltaph <= 0 : ",G18.10)') deltaph
1131 read(50,*,err=20) nphwrt
1132 if (nphwrt < 1)
then 1134 write(*,
'("Error(readinput): nphwrt < 1 : ",I0)') nphwrt
1138 if (
allocated(vqlwrt))
deallocate(vqlwrt)
1139 allocate(vqlwrt(3,nphwrt))
1141 read(50,*,err=20) vqlwrt(:,i)
1149 if (trim(str) ==
'')
goto 10
1157 write(*,
'("Info(readinput): variable ''tfibs'' is no longer used")')
1162 write(*,
'("Error(readinput): maxitoep < 1 : ",I0)')
maxitoep 1168 write(*,
'("Info(readinput): variable ''tauoep'' is no longer used")')
1173 write(*,
'("Error(readinput): tau0oep < 0 : ",G18.10)')
tau0oep 1179 read(50,
'(A)',err=20) str
1180 if (trim(str) ==
'')
then 1183 write(*,
'("Error(readinput): empty k-point and state list")')
1191 read(str,*,iostat=ios)
kstlist(:,i)
1194 write(*,
'("Error(readinput): error reading k-point and state list")')
1195 write(*,
'("(blank line required after kstlist block)")')
1201 write(*,
'("Error(readinput): k-point and state list too long")')
1205 read(50,*,err=20)
vklem 1210 write(*,
'("Error(readinput): deltaem <= 0 : ",G18.10)')
deltaem 1218 write(*,
'("Error(readinput): ndspem out of range : ",I0)')
ndspem 1227 read(50,*,err=20)
ssdph 1229 read(50,
'(A)',err=20) str
1230 read(str,*,err=20)
vqlss 1234 case(
'DFT+U',
'dft+u',
'lda+u')
1235 read(50,*,err=20) dftu,inpdftu
1237 read(50,
'(A)',err=20) str
1238 if (trim(str) ==
'')
then 1242 select case(inpdftu)
1244 read(str,*,iostat=ios) is,l,ujdu(1:2,i)
1246 read(str,*,iostat=ios) is,l,(fdu(k,i),k=0,2*l,2)
1248 read(str,*,iostat=ios) is,l,(edu(k,i),k=0,l)
1250 read(str,*,iostat=ios) is,l,lamdu(i)
1252 read(str,*,iostat=ios) is,l,udufix(i),dudufix(i)
1253 read(str,*,iostat=ios) is,l,udufix(i)
1256 write(*,
'("Error(readinput): invalid inpdftu : ",I0)') inpdftu
1262 write(*,
'("Error(readinput): error reading DFT+U parameters")')
1263 write(*,
'("(blank line required after dft+u block)")')
1269 write(*,
'("Error(readinput): invalid species number in dft+u block : ", & 1276 write(*,
'("Error(readinput): l < 0 in dft+u block : ",I0)') l
1280 if (l > lmaxdm)
then 1282 write(*,
'("Error(readinput): l > lmaxdm in dft+u block :",2(X,I0))') l, &
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 : ",I0)') 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 1368 write(*,
'("Info(readinput): variable ''tefvs'' is no longer used")')
1370 read(50,*,err=20)
mefvs 1371 case(
'tefvit',
'tseqit')
1373 write(*,
'("Info(readinput): variable ''tefvit'' is no longer used")')
1374 case(
'minitefv',
'minseqit')
1376 write(*,
'("Info(readinput): variable ''minitefv'' is no longer used")')
1377 case(
'nefvit',
'maxitefv',
'maxseqit',
'nseqit')
1379 write(*,
'("Info(readinput): variable ''nefvit'' is no longer used")')
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) projw90
2069 read(50,
'(A)',err=20) str
2070 if (trim(str) ==
'')
goto 10
2071 read(str,*,iostat=ios) is
2074 write(*,
'("Error(readinput): error reading lprojw90")')
2075 write(*,
'("(blank line required after lprojw90 block)")')
2081 write(*,
'("Error(readinput): invalid projection species : ",I0)') is
2085 read(str,*,iostat=ios) is,lprojw90(:,is)
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
2115 write(*,
'("Info(readinput): variable ''t0gclq0'' is no longer used")')
2117 read(50,*,err=20) tafindt
2120 write(*,
'("Info(readinput): variable ''afindscf'' is no longer used")')
2122 read(50,*,err=20) afindpm(:)
2123 if (afindpm(2) == 0.d0)
then 2125 write(*,
'("Error(readinput): afindpm(2) = 0")')
2133 write(*,
'("Error(readinput): nkspolar < 1 : ",I0)')
nkspolar 2138 read(50,*,err=20) ntsforce
2139 if (ntsforce < 1)
then 2141 write(*,
'("Error(readinput): ntsforce < 1 : ",I0)') ntsforce
2146 read(50,*,err=20) wphcut
2147 if (wphcut <= 0.d0)
then 2149 write(*,
'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2154 read(50,*,err=20) ephscf(:)
2156 read(50,*,err=20) anomalous
2158 read(50,*,err=20) tephde
2160 read(50,*,err=20) bdiag
2162 read(50,*,err=20) ecutb
2163 if (ecutb <= 0.d0)
then 2165 write(*,
'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2170 read(50,*,err=20) ediag
2172 read(50,*,err=20) pwxpsn
2173 if (pwxpsn < 1)
then 2175 write(*,
'("Error(readinput): pwxpsn < 1 : ",I0)') pwxpsn
2180 read(50,*,err=20) ramdisk
2181 case(
'wrtdisk',
'wrtdsk')
2182 read(50,*,err=20) wrtdisk
2184 read(50,*,err=20) epsdmat
2186 read(50,*,err=20) tm3type
2187 if ((tm3type < 0).or.(tm3type > 2))
then 2189 write(*,
'("Error(readinput): invalid tm3type : ",I0)') tm3type
2193 case(
'tm3vdl',
'tm3old')
2194 read(50,*,err=20) lv
2197 read(50,*,err=20) batch
2199 read(50,*,err=20) tafspt
2201 read(50,*,err=20) tbaspat
2205 read(50,*,err=20)
atdfc 2206 if (
atdfc < 0.d0)
then 2208 write(*,
'("Error(readinput): atdfc < 0 : ",G18.10)')
atdfc 2214 case(
'msmgmt',
'msmg2mt')
2217 read(50,*,err=20) ntsorth
2222 write(*,
'("Error(readinput): deltabf <= 0 : ",G18.10)')
deltabf 2227 read(50,*,err=20) jtconst0
2229 read(50,*,err=20)
trmt0 2231 read(50,*,err=20) ksgwrho
2239 read(50,*,err=20) npfftw
2241 read(50,*,err=20) tphnat
2243 read(50,*,err=20) ecutthc
2244 if (ecutthc <= 0.d0)
then 2246 write(*,
'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2251 read(50,*,err=20) tbdipu
2258 write(*,
'("Error(readinput): invalid block name : ",A)') trim(block)
2265 write(*,
'("Error(readinput): error reading from elk.in")')
2266 write(*,
'("Problem occurred in ''",A,"'' block")') trim(block)
2267 write(*,
'("Check input convention in manual")')
2283 if (t1 /= 0.d0)
then 2292 if (rndavec > 0.d0)
then 2295 t1=rndavec*(randomu()-0.5d0)
2339 if (fxctype(1) == -1) fxctype(:)=
xctype(:)
2343 avecu(:,1)=scu1*avecu(:,1)
2344 avecu(:,2)=scu2*avecu(:,2)
2345 avecu(:,3)=scu3*avecu(:,3)
2346 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