2 ! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
13 ! Reads in the input parameters from the file {\tt exciting.in} as well as
14 ! from the species files. Also sets default values for the input parameters.
17 ! Created September 2002 (JKD)
22 integer is
,js
,ia
,ja
,ias
24 integer ist
,io
,nlx
,ilx
,lx
,ilo
25 real(8) sc
,sc1
,sc2
,sc3
26 real(8) vacuum
,v(3),t1
,t2
32 !------------------------!
34 !------------------------!
83 if (allocated(vvlp1d
)) deallocate(vvlp1d
)
84 allocate(vvlp1d(3,nvp1d
))
125 if (allocated(vqlwrt
)) deallocate(vqlwrt
)
126 allocate(vqlwrt(3,nphwrt
))
157 !-------------------------------!
158 ! read from exciting.in !
159 !-------------------------------!
161 !----- uncomment for command line input filename (M. Rajagopalan) --------------
164 ! write(*,'("Usage: exciting [INPUT FILE]")')
168 !if (iargc().eq.1) then
169 ! call getarg(1,fname)
171 !-------------------------------------------------------------------------------
172 open(50,file
=trim(fname
),action
='READ',status
='OLD',form
='FORMATTED', &
174 if (iostat
.ne
.0) then
176 write(*,'("Error(readinput): error opening ",A)') trim(fname
)
181 read(50,*,end=30) bname
182 ! check for a comment
183 if ((scan(trim(bname
),'!').eq
.1).or
.(scan(trim(bname
),'#').eq
.1)) goto 10
184 select
case(trim(bname
))
188 if (trim(str
).eq
.'') then
191 write(*,'("Error(readinput): no tasks to perform")')
198 read(str
,*,iostat
=iostat
) tasks(i
)
199 if (iostat
.ne
.0) then
201 write(*,'("Error(readinput): error reading tasks")')
202 write(*,'("(blank line required after tasks block)")')
208 write(*,'("Error(readinput): too many tasks")')
212 read(50,*,err
=20) avec(1,1),avec(2,1),avec(3,1)
213 read(50,*,err
=20) avec(1,2),avec(2,2),avec(3,2)
214 read(50,*,err
=20) avec(1,3),avec(2,3),avec(3,3)
218 read(50,*,err
=20) sc1
220 read(50,*,err
=20) sc2
222 read(50,*,err
=20) sc3
224 read(50,*,err
=20) epslat
225 if (epslat
.le
.0.d0
) then
227 write(*,'("Error(readinput): epslat <= 0 : ",G18.10)') epslat
232 read(50,*,err
=20) primcell
234 read(50,*,err
=20) tshift
236 read(50,*,err
=20) rlambda
237 if (rlambda
.le
.0.d0
) then
239 write(*,'("Error(readinput): rlambda <= 0 : ",G18.10)') rlambda
244 read(50,*,err
=20) autokpt
246 read(50,*,err
=20) ngridk(1),ngridk(2),ngridk(3)
247 if ((ngridk(1).le
.0).or
.(ngridk(2).le
.0).or
.(ngridk(3).le
.0)) then
249 write(*,'("Error(readinput): invalid ngridk : ",3I8)') ngridk
254 read(50,*,err
=20) vkloff(1),vkloff(2),vkloff(3)
256 read(50,*,err
=20) reducek
258 read(50,*,err
=20) ngridq(1),ngridq(2),ngridq(3)
259 if ((ngridq(1).le
.0).or
.(ngridq(2).le
.0).or
.(ngridq(3).le
.0)) then
261 write(*,'("Error(readinput): invalid ngridq : ",3I8)') ngridq
266 read(50,*,err
=20) reduceq
268 read(50,*,err
=20) rgkmax
269 if (rgkmax
.le
.0.d0
) then
271 write(*,'("Error(readinput): rgkmax <= 0 : ",G18.10)') rgkmax
276 read(50,*,err
=20) gmaxvr
278 read(50,*,err
=20) lmaxapw
279 if (lmaxapw
.lt
.0) then
281 write(*,'("Error(readinput): lmaxapw < 0 : ",I8)') lmaxapw
285 if (lmaxapw
.ge
.maxlapw
) then
287 write(*,'("Error(readinput): lmaxapw too large : ",I8)') lmaxapw
288 write(*,'("Adjust maxlapw in modmain and recompile code")')
293 read(50,*,err
=20) lmaxvr
294 if (lmaxvr
.lt
.3) then
296 write(*,'("Error(readinput): lmaxvr < 3 : ",I8)') lmaxvr
301 read(50,*,err
=20) lmaxmat
302 if (lmaxmat
.lt
.0) then
304 write(*,'("Error(readinput): lmaxmat < 0 : ",I8)') lmaxmat
309 read(50,*,err
=20) lmaxinr
310 if (lmaxinr
.lt
.0) then
312 write(*,'("Error(readinput): lmaxinr < 0 : ",I8)') lmaxinr
317 read(50,*,err
=20) fracinr
319 read(50,*,err
=20) npsden
320 if (npsden
.lt
.2) then
322 write(*,'("Error(readinput): npsden < 2 : ",I8)') npsden
327 read(50,*,err
=20) spinpol
329 read(50,*,err
=20) spinorb
331 read(50,*,err
=20) xctype
333 read(50,*,err
=20) stype
335 read(50,*,err
=20) swidth
336 if (swidth
.lt
.1.d
-9) then
338 write(*,'("Error(readinput): swidth too small or negative : ",G18.10)') &
344 read(50,*,err
=20) epsocc
345 if (epsocc
.le
.0.d0
) then
347 write(*,'("Error(readinput): epsocc <= 0 : ",G18.10)') epsocc
352 read(50,*,err
=20) epschg
353 if (epschg
.le
.0.d0
) then
355 write(*,'("Error(readinput): epschg <= 0 : ",G18.10)') epschg
360 read(50,*,err
=20) nempty
361 if (nempty
.le
.0) then
363 write(*,'("Error(readinput): nempty <= 0 : ",I8)') nempty
368 read(50,*,err
=20) beta0
369 if (beta0
.lt
.0.d0
) then
371 write(*,'("Error(readinput): beta0 < 0 : ",G18.10)') beta0
376 read(50,*,err
=20) betamax
377 if (betamax
.lt
.0.d0
) then
379 write(*,'("Error(readinput): betamax < 0 : ",G18.10)') betamax
384 read(50,*,err
=20) maxscl
385 if (maxscl
.lt
.0) then
387 write(*,'("Error(readinput): maxscl < 0 : ",I8)') maxscl
392 read(50,*,err
=20) epspot
394 read(50,*,err
=20) epsengy
396 read(50,*,err
=20) epsforce
398 read(50,*,err
=20) cfdamp
399 if (cfdamp
.lt
.0.d0
) then
401 write(*,'("Error(readinput): cfdamp < 0 : ",G18.10)') cfdamp
406 read(50,*,err
=20) sppath
407 sppath
=adjustl(sppath
)
409 read(50,*,err
=20) scrpath
411 read(50,*,err
=20) molecule
413 read(50,*,err
=20) vacuum
414 if (vacuum
.lt
.0.d0
) then
416 write(*,'("Error(readinput): vacuum < 0 : ",G18.10)') vacuum
421 read(50,*,err
=20) nspecies
422 if (nspecies
.le
.0) then
424 write(*,'("Error(readinput): nspecies <= 0 : ",I8)') nspecies
428 if (nspecies
.gt
.maxspecies
) then
430 write(*,'("Error(readinput): nspecies too large : ",I8)') nspecies
431 write(*,'("Adjust maxspecies in modmain and recompile code")')
436 read(50,*,err
=20) spfname(is
)
437 spfname(is
)=adjustl(spfname(is
))
438 read(50,*,err
=20) natoms(is
)
439 if (natoms(is
).le
.0) then
441 write(*,'("Error(readinput): natoms <= 0 : ",I8)') natoms(is
)
442 write(*,'(" for species ",I4)') is
446 if (natoms(is
).gt
.maxatoms
) then
448 write(*,'("Error(readinput): natoms too large : ",I8)') natoms(is
)
449 write(*,'(" for species ",I4)') is
450 write(*,'("Adjust maxatoms in modmain and recompile code")')
455 read(50,*,err
=20) atposl(1,ia
,is
),atposl(2,ia
,is
),atposl(3,ia
,is
), &
456 bfcmt(1,ia
,is
),bfcmt(2,ia
,is
),bfcmt(3,ia
,is
)
460 read(50,*,err
=20) nvp1d
,npp1d
463 write(*,'("Error(readinput): nvp1d < 1 : ",I8)') nvp1d
467 if (npp1d
.lt
.nvp1d
) then
469 write(*,'("Error(readinput): npp1d < nvp1d : ",2I8)') npp1d
,nvp1d
473 if (allocated(vvlp1d
)) deallocate(vvlp1d
)
474 allocate(vvlp1d(3,nvp1d
))
476 read(50,*,err
=20) vvlp1d(1,iv
),vvlp1d(2,iv
),vvlp1d(3,iv
)
479 read(50,*,err
=20) vclp2d(1,1),vclp2d(2,1),vclp2d(3,1)
480 read(50,*,err
=20) vclp2d(1,2),vclp2d(2,2),vclp2d(3,2)
481 read(50,*,err
=20) vclp2d(1,3),vclp2d(2,3),vclp2d(3,3)
482 read(50,*,err
=20) np2d(1),np2d(2)
483 if ((np2d(1).lt
.1).or
.(np2d(2).lt
.1)) then
485 write(*,'("Error(readinput): np2d < 1 : ",2I8)') np2d
490 read(50,*,err
=20) nup3d(1),nup3d(2),nup3d(3)
491 if ((nup3d(1).lt
.1).or
.(nup3d(2).lt
.1).or
.(nup3d(3).lt
.1)) then
493 write(*,'("Error(readinput): nup3d < 1 : ",3I8)') nup3d
497 read(50,*,err
=20) np3d(1),np3d(2),np3d(3)
498 if ((np3d(1).lt
.1).or
.(np3d(2).lt
.1).or
.(np3d(3).lt
.1)) then
500 write(*,'("Error(readinput): np3d < 1 : ",3I8)') np3d
505 read(50,*,err
=20) nwdos
,ngrdos
,nsmdos
508 write(*,'("Error(readinput): nwdos < 2 : ",I8)') nwdos
512 if (ngrdos
.lt
.1) then
514 write(*,'("Error(readinput): ngrdos < 1 : ",I8)') ngrdos
518 if (nsmdos
.lt
.0) then
520 write(*,'("Error(readinput): nsmdos < 0 : ",I8)') nsmdos
524 read(50,*,err
=20) wdos(1),wdos(2)
525 if (wdos(1).ge
.wdos(2)) then
527 write(*,'("Error(readinput): wdos(1) >= wdos(2) : ",2G18.10)') wdos
532 read(50,*,err
=20) bcsym
534 read(50,*,err
=20) tau0atm
536 read(50,*,err
=20) nstfsp
537 if (nstfsp
.le
.0) then
539 write(*,'("Error(readinput): nstfsp <= 0 : ",I8)') nstfsp
544 read(50,*,err
=20) lradstp
545 if (lradstp
.le
.0) then
547 write(*,'("Error(readinput): lradstp <= 0 : ",I8)') lradstp
552 read(50,*,err
=20) chgexs
554 read(50,*,err
=20) nprad
557 write(*,'("Error(readinput): nprad < 2 : ",I8)') nprad
562 read(50,*,err
=20) scissor
566 if (trim(str
).eq
.'') then
569 write(*,'("Error(readinput): empty optical component list")')
576 read(str
,*,iostat
=iostat
) optcomp(:,i
)
577 if (iostat
.ne
.0) then
579 write(*,'("Error(readinput): error reading optical component list")')
580 write(*,'("(blank line required after optcomp block)")')
584 if ((optcomp(1,i
).lt
.1).or
.(optcomp(1,i
).gt
.3).or
. &
585 (optcomp(2,i
).lt
.1).or
.(optcomp(2,i
).gt
.3).or
. &
586 (optcomp(3,i
).lt
.1).or
.(optcomp(3,i
).gt
.3)) then
588 write(*,'("Error(readinput): invalid optcomp : ",3I8)') optcomp
594 write(*,'("Error(readinput): optical component list too long")')
598 read(50,*,err
=20) usegdft
600 read(50,*,err
=20) intraband
602 read(50,*,err
=20) evalmin
604 read(50,*,err
=20) deband
605 if (deband
.lt
.0.d0
) then
607 write(*,'("Error(readinput): deband < 0 : ",G18.10)') deband
612 read(50,*,err
=20) bfieldc
614 read(50,*,err
=20) fixspin
616 read(50,*,err
=20) momfix
618 do ias
=1,maxspecies
*maxatoms
620 if (trim(str
).eq
.'') goto 10
621 read(str
,*,iostat
=iostat
) is
,ia
,mommtfix(:,ia
,is
)
622 if (iostat
.ne
.0) then
624 write(*,'("Error(readinput): error reading muffin-tin fixed spin &
626 write(*,'("(blank line required after mommtfix block")')
632 read(50,*,err
=20) taufsm
633 if (taufsm
.lt
.0.d0
) then
635 write(*,'("Error(readinput): taufsm < 0 : ",G18.10)') taufsm
640 read(50,*,err
=20) autormt
642 read(50,*,err
=20) rmtapm
643 if (rmtapm(1).lt
.0.d0
) then
645 write(*,'("Error(readinput): rmtapm(1) < 0 : ",G18.10)') rmtapm(1)
649 if ((rmtapm(2).le
.0.d0
).or
.(rmtapm(2).gt
.1.d0
)) then
651 write(*,'("Error(readinput): rmtapm(2) not in (0,1] : ",G18.10)') rmtapm(2)
656 read(50,*,err
=20) nosym
658 read(50,*,err
=20) deltaph
660 read(50,*,err
=20) nphwrt
661 if (nphwrt
.le
.0) then
663 write(*,'("Error(readinput): nphwrt <= 0 : ",I8)') nphwrt
667 if (allocated(vqlwrt
)) deallocate(vqlwrt
)
668 allocate(vqlwrt(3,nphwrt
))
670 read(50,*,err
=20) vqlwrt(:,i
)
674 read(50,'(A80)') notes(i
)
675 if (trim(notes(i
)).eq
.'') then
681 write(*,'("Error(readinput): too many note lines")')
685 read(50,*,err
=20) tforce
687 read(50,*,err
=20) tfibs
689 read(50,*,err
=20) maxitoep
690 if (maxitoep
.lt
.1) then
692 write(*,'("Error(readinput): maxitoep < 1 : ",I8)') maxitoep
697 read(50,*,err
=20) tauoep(:)
698 if ((tauoep(1).lt
.0.d0
).or
.(tauoep(2).lt
.0.d0
).or
.(tauoep(3).lt
.0.d0
)) then
700 write(*,'("Error(readinput): tauoep < 0 : ",3G18.10)') tauoep
707 if (trim(str
).eq
.'') then
710 write(*,'("Error(readinput): empty k-point and state list")')
717 read(str
,*,iostat
=iostat
) kstlist(:,i
)
718 if (iostat
.ne
.0) then
720 write(*,'("Error(readinput): error reading k-point and state list")')
721 write(*,'("(blank line required after kstlist block)")')
727 write(*,'("Error(readinput): k-point and state list too long")')
731 read(50,*,err
=20) vklem
733 read(50,*,err
=20) deltaem
735 read(50,*,err
=20) ndspem
736 if ((ndspem
.lt
.1).or
.(ndspem
.gt
.3)) then
738 write(*,'("Error(readinput): ndspem out of range : ",I8)') ndspem
743 read(50,*,err
=20) nosource
745 read(50,*,err
=20) spinsprl
747 read(50,*,err
=20) vqlss
749 read(50,*,err
=20) nwrite
751 read(50,*,err
=20) tevecsv
756 if (trim(str
).eq
.'') goto 10
757 read(str
,*,iostat
=iostat
) js
,l
,t1
,t2
758 if (iostat
.ne
.0) then
760 write(*,'("Error(readinput): error reading LDA+U parameters")')
761 write(*,'("(blank line required after lda+u block)")')
765 if ((js
.le
.0).or
.(js
.ge
.maxspecies
)) then
767 write(*,'("Error(readinput): invalid species number in lda+u block : ",&
772 if (l
.gt
.lmaxlu
) then
774 write(*,'("Error(readinput): l > lmaxlu in lda+u block : ",2I8)') l
,lmaxlu
783 read(50,*,err
=20) rdmxctype
785 read(50,*,err
=20) rdmmaxscl
786 if (rdmmaxscl
.lt
.0) then
788 write(*,'("Error(readinput): rdmmaxscl < 0 : ",I8)') rdmmaxscl
792 read(50,*,err
=20) maxitn
794 read(50,*,err
=20) maxitc
796 read(50,*,err
=20) taurdmn
797 if (taurdmn
.lt
.0.d0
) then
799 write(*,'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
804 read(50,*,err
=20) taurdmc
805 if (taurdmc
.lt
.0.d0
) then
807 write(*,'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
812 read(50,*,err
=20) rdmalpha
813 if ((rdmalpha
.le
.0.d0
).or
.(rdmalpha
.ge
.1.d0
)) then
815 write(*,'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
820 read(50,*,err
=20) reducebf
821 if ((reducebf
.lt
.0.d0
).or
.(reducebf
.gt
.1.d0
)) then
823 write(*,'("Error(readinput): reducebf not in [0,1] : ",G18.10)') reducebf
831 write(*,'("Error(readinput): invalid block name : ",A)') trim(bname
)
838 write(*,'("Error(readinput): error reading from exciting.in")')
839 write(*,'("Problem occurred in ''",A,"'' block")') trim(bname
)
844 ! scale the lattice vectors (scaling not referenced again in code)
845 avec(:,1)=sc1
*avec(:,1)
846 avec(:,2)=sc2
*avec(:,2)
847 avec(:,3)=sc3
*avec(:,3)
848 avec(:,:)=sc
*avec(:,:)
849 ! check if system is an isolated molecule
851 ! set up cubic unit cell with vacuum region around molecule
858 t1
=abs(atposl(i
,ia
,is
)-atposl(i
,ja
,js
))
859 if (t1
.gt
.avec(i
,i
)) avec(i
,i
)=t1
866 avec(i
,i
)=avec(i
,i
)+vacuum
868 ! convert atomic positions from Cartesian to lattice coordinates
869 call r3minv(avec
,ainv
)
872 call r3mv(ainv
,atposl(1,ia
,is
),v
)
878 !---------------------------------------------!
879 ! read from atomic species data files !
880 !---------------------------------------------!
882 open(50,file
=trim(sppath
)//trim(spfname(is
)),action
='READ',status
='OLD', &
883 form
='FORMATTED',iostat
=iostat
)
884 if (iostat
.ne
.0) then
886 write(*,'("Error(readinput): error opening species file ",A)') &
887 trim(sppath
)//trim(spfname(is
))
891 read(50,*) spsymb(is
)
892 read(50,*) spname(is
)
894 read(50,*) spmass(is
)
895 read(50,*) sprmin(is
),rmt(is
),sprmax(is
),nrmt(is
)
896 if (sprmin(is
).le
.0.d0
) then
898 write(*,'("Error(readinput): sprmin <= 0 : ",G18.10)') sprmin(is
)
899 write(*,'(" for species ",I4)') is
903 if (rmt(is
).le
.sprmin(is
)) then
905 write(*,'("Error(readinput): rmt <= sprmin : ",2G18.10)') rmt(is
),sprmin(is
)
906 write(*,'(" for species ",I4)') is
910 if (sprmax(is
).lt
.rmt(is
)) then
912 write(*,'("Error(readinput): sprmax < rmt : ",2G18.10)') sprmax(is
),rmt(is
)
916 if (nrmt(is
).lt
.20) then
918 write(*,'("Error(readinput): nrmt too small : ",I8)') nrmt(is
)
919 write(*,'(" for species ",I4)') is
924 if (spnst(is
).le
.0) then
926 write(*,'("Error(readinput): invalid spnst : ",I8)') spnst(is
)
927 write(*,'(" for species ",I4)') is
931 if (spnst(is
).gt
.maxspst
) then
933 write(*,'("Error(readinput): too many states for species ",I8)') is
938 read(50,*) spn(ist
,is
),spl(ist
,is
),spk(ist
,is
),spocc(ist
,is
),spcore(ist
,is
)
939 if (spn(ist
,is
).lt
.1) then
941 write(*,'("Error(readinput): spn < 1 : ",I8)') spn(ist
,is
)
942 write(*,'(" for species ",I4)') is
943 write(*,'(" and state ",I4)') ist
947 if (spl(ist
,is
).lt
.0) then
949 write(*,'("Error(readinput): spl < 0 : ",I8)') spl(ist
,is
)
950 write(*,'(" for species ",I4)') is
951 write(*,'(" and state ",I4)') ist
955 if (spk(ist
,is
).lt
.1) then
957 write(*,'("Error(readinput): spk < 1 : ",I8)') spk(ist
,is
)
958 write(*,'(" for species ",I4)') is
959 write(*,'(" and state ",I4)') ist
963 if (spocc(ist
,is
).lt
.0.d0
) then
965 write(*,'("Error(readinput): spocc < 0 : ",G18.10)') spocc(ist
,is
)
966 write(*,'(" for species ",I4)') is
967 write(*,'(" and state ",I4)') ist
972 read(50,*) apword(0,is
)
973 if (apword(0,is
).le
.0) then
975 write(*,'("Error(readinput): apword <= 0 : ",I8)') apword(0,is
)
976 write(*,'(" for species ",I4)') is
980 if (apword(0,is
).gt
.maxapword
) then
982 write(*,'("Error(readinput): apword too large : ",I8)') apword(0,is
)
983 write(*,'(" for species ",I4)') is
984 write(*,'("Adjust maxapword in modmain and recompile code")')
988 ! set the APW orders for l>0
989 apword(1:lmaxapw
,is
)=apword(0,is
)
991 read(50,*) apwe0(io
,0,is
),apwdm(io
,0,is
),apwve(io
,0,is
)
992 if (apwdm(io
,0,is
).lt
.0) then
994 write(*,'("Error(readinput): apwdm < 0 : ",I8)') apwdm(io
,0,is
)
995 write(*,'(" for species ",I4)') is
996 write(*,'(" and order ",I4)') io
1000 ! set the APW linearisation energies, derivative orders and variability for l>0
1001 apwe0(io
,1:lmaxapw
,is
)=apwe0(io
,0,is
)
1002 apwdm(io
,1:lmaxapw
,is
)=apwdm(io
,0,is
)
1003 apwve(io
,1:lmaxapw
,is
)=apwve(io
,0,is
)
1008 write(*,'("Error(readinput): nlx < 0 : ",I8)') nlx
1009 write(*,'(" for species ",I4)') is
1017 write(*,'("Error(readinput): lx < 0 : ",I8)') lx
1018 write(*,'(" for species ",I4)') is
1019 write(*,'(" and exception number ",I4)') ilx
1023 if (lx
.gt
.lmaxapw
) then
1025 write(*,'("Error(readinput): lx > lmaxapw : ",I8)') lx
1026 write(*,'(" for species ",I4)') is
1027 write(*,'(" and exception number ",I4)') ilx
1032 if (apword(lx
,is
).le
.0) then
1034 write(*,'("Error(readinput): apword <= 0 : ",I8)') apword(lx
,is
)
1035 write(*,'(" for species ",I4)') is
1036 write(*,'(" and exception number ",I4)') ilx
1040 if (apword(lx
,is
).gt
.maxapword
) then
1042 write(*,'("Error(readinput): apword too large : ",I8)') apword(lx
,is
)
1043 write(*,'(" for species ",I4)') is
1044 write(*,'(" and exception number ",I4)') ilx
1045 write(*,'("Adjust maxapword in modmain and recompile code")')
1049 do io
=1,apword(lx
,is
)
1050 read(50,*) apwe0(io
,lx
,is
),apwdm(io
,lx
,is
),apwve(io
,lx
,is
)
1051 if (apwdm(io
,lx
,is
).lt
.0) then
1053 write(*,'("Error(readinput): apwdm < 0 : ",I8)') apwdm(io
,lx
,is
)
1054 write(*,'(" for species ",I4)') is
1055 write(*,'(" exception number ",I4)') ilx
1056 write(*,'(" and order ",I4)') io
1062 read(50,*) nlorb(is
)
1063 if (nlorb(is
).lt
.0) then
1065 write(*,'("Error(readinput): nlorb < 0 : ",I8)') nlorb(is
)
1066 write(*,'(" for species ",I4)') is
1070 if (nlorb(is
).gt
.maxlorb
) then
1072 write(*,'("Error(readinput): nlorb too large : ",I8)') nlorb(is
)
1073 write(*,'(" for species ",I4)') is
1074 write(*,'("Adjust maxlorb in modmain and recompile code")')
1079 read(50,*) lorbl(ilo
,is
),lorbord(ilo
,is
)
1080 if (lorbl(ilo
,is
).lt
.0) then
1082 write(*,'("Error(readinput): lorbl < 0 : ",I8)') lorbl(ilo
,is
)
1083 write(*,'(" for species ",I4)') is
1084 write(*,'(" and local-orbital ",I4)') ilo
1088 if (lorbl(ilo
,is
).gt
.lmaxmat
) then
1090 write(*,'("Error(readinput): lorbl > lmaxmat : ",2I8)') lorbl(ilo
,is
), &
1092 write(*,'(" for species ",I4)') is
1093 write(*,'(" and local-orbital ",I4)') ilo
1097 if (lorbord(ilo
,is
).lt
.2) then
1099 write(*,'("Error(readinput): lorbord < 2 : ",I8)') lorbord(ilo
,is
)
1100 write(*,'(" for species ",I4)') is
1101 write(*,'(" and local-orbital ",I4)') ilo
1105 if (lorbord(ilo
,is
).gt
.maxlorbord
) then
1107 write(*,'("Error(readinput): lorbord too large : ",I8)') lorbord(ilo
,is
)
1108 write(*,'(" for species ",I4)') is
1109 write(*,'(" and local-orbital ",I4)') ilo
1110 write(*,'("Adjust maxlorbord in modmain and recompile code")')
1114 do io
=1,lorbord(ilo
,is
)
1115 read(50,*) lorbe0(io
,ilo
,is
),lorbdm(io
,ilo
,is
),lorbve(io
,ilo
,is
)
1116 if (lorbdm(io
,ilo
,is
).lt
.0) then
1118 write(*,'("Error(readinput): lorbdm < 0 : ",I8)') lorbdm(io
,ilo
,is
)
1119 write(*,'(" for species ",I4)') is
1120 write(*,'(" local-orbital ",I4)') ilo
1121 write(*,'(" and order ",I4)') io