The Elk Code
readinput.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2002-2008 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.
5 
6 !BOP
7 ! !ROUTINE: readinput
8 ! !INTERFACE:
9 subroutine readinput
10 ! !USES:
11 use modmain
12 use moddftu
13 use modrdm
14 use modphonon
15 use modtest
16 use modrandom
17 use modpw
18 use modtddft
19 use modulr
20 use modvars
21 use modgw
22 use modbog
23 use modw90
24 use modtdhfc
25 use modmpi
26 use modomp
27 use modramdisk
28 ! !DESCRIPTION:
29 ! Reads in the input parameters from the file {\tt elk.in}. Also sets default
30 ! values for the input parameters.
31 !
32 ! !REVISION HISTORY:
33 ! Created September 2002 (JKD)
34 !EOP
35 !BOC
36 implicit none
37 ! local variables
38 logical lv
39 integer is,ia,ias,ios
40 integer i,j,k,l
41 real(8) sc,sc1,sc2,sc3
42 real(8) scx,scy,scz
43 real(8) scu,scu1,scu2,scu3
44 real(8) solscf,zn
45 real(8) axang(4),rot(3,3)
46 real(8) rndavec,v(3),t1
47 character(256) block,symb,str
48 
49 !------------------------!
50 ! default values !
51 !------------------------!
52 ntasks=0
53 avec(:,:)=0.d0
54 avec(1,1)=1.d0
55 avec(2,2)=1.d0
56 avec(3,3)=1.d0
57 davec(:,:)=0.d0
58 sc=1.d0
59 sc1=1.d0
60 sc2=1.d0
61 sc3=1.d0
62 scx=1.d0
63 scy=1.d0
64 scz=1.d0
65 epslat=1.d-6
66 primcell=.false.
67 tshift=.true.
68 ngridk(:)=1
69 dngridk(:)=0
70 vkloff(:)=0.d0
71 autokpt=.false.
72 radkpt=40.d0
73 reducek=1
74 ngridq(:)=-1
75 reduceq=1
76 rgkmax=7.d0
77 drgkmax=0.d0
78 gmaxvr=12.d0
79 dgmaxvr=0.d0
80 lmaxapw=8
81 dlmaxapw=0
82 lmaxo=6
83 dlmaxo=0
84 lmaxi=1
85 fracinr=0.01d0
86 trhonorm=.true.
87 xctype(1)=3
88 xctype(2:3)=0
89 xctsp(1)=3
90 xctsp(2:3)=0
91 ktype(1)=51
92 ktype(2:3)=0
93 stype=3
94 swidth=0.001d0
95 dswidth=0.d0
96 autoswidth=.false.
97 mstar=10.d0
98 epsocc=1.d-10
99 epschg=1.d-3
100 nempty0=4.d0
101 dnempty0=0.d0
102 maxscl=200
103 mixtype=3
104 mixsave=.false.
105 amixpm(1)=0.05d0
106 amixpm(2)=1.d0
107 ! Broyden parameters recommended by M. Meinert
108 mixsdb=5
109 broydpm(1)=0.4d0
110 broydpm(2)=0.15d0
111 mixrho=.false.
112 epspot=1.d-6
113 epsengy=1.d-4
114 epsforce=5.d-3
115 epsstress=2.d-3
116 molecule=.false.
117 nspecies=0
118 natoms(:)=0
119 atposl(:,:,:)=0.d0
120 datposl(:,:,:)=0.d0
121 atposc(:,:,:)=0.d0
122 bfcmt0(:,:,:)=0.d0
123 sppath=''
124 scrpath=''
125 nvp1d=2
126 if (allocated(vvlp1d)) deallocate(vvlp1d)
127 allocate(vvlp1d(3,nvp1d))
128 vvlp1d(:,1)=0.d0
129 vvlp1d(:,2)=1.d0
130 npp1d=200
131 ip0gw=1
132 vclp2d(:,:)=0.d0
133 vclp2d(1,1)=1.d0
134 vclp2d(2,2)=1.d0
135 np2d(:)=40
136 vclp3d(:,:)=0.d0
137 vclp3d(1,1)=1.d0
138 vclp3d(2,2)=1.d0
139 vclp3d(3,3)=1.d0
140 np3d(:)=20
141 nwplot=500
142 ngrkf=100
143 nswplot=1
144 wplot(1)=-0.5d0
145 wplot(2)=0.5d0
146 dosocc=.false.
147 tpdos=.true.
148 dosmsum=.false.
149 dosssum=.false.
150 lmirep=.true.
151 spinpol=.false.
152 spinorb=.false.
153 socscf=1.d0
154 bforb=.false.
155 bfdmag=.false.
156 atpopt=1
157 maxatpstp=200
158 tau0atp=0.2d0
159 deltast=0.005d0
160 avecref(:,:)=0.d0
161 latvopt=0
162 maxlatvstp=30
163 tau0latv=0.2d0
164 lradstp=4
165 chgexs=0.d0
166 dchgexs=0.d0
167 scissor=0.d0
168 noptcomp=1
169 ! list of all optical tensor components
170 do k=1,3; do j=1,3; do i=1,3
171  l=(k-1)*9+(j-1)*3+i
172  optcomp(:,l)=[i,j,k]
173 end do; end do; end do
174 optcomp(:,1)=1
175 intraband=.false.
176 epsband=1.d-12
177 demaxbnd=2.5d0
178 autolinengy=.false.
179 dlefe=-0.1d0
180 autodlefe=.true.
181 deapw=0.2d0
182 delorb=0.05d0
183 bfieldc0(:)=0.d0
184 dbfieldc0(:)=0.d0
185 efieldc(:)=0.d0
186 dmaxefc=1.d6
187 afieldc(:)=0.d0
188 dafieldc(:)=0.d0
189 afspc(:,:)=0.d0
190 dafspc(:,:)=0.d0
191 fsmtype=0
192 momfix(:)=0.d0
193 momfixm=0.d0
194 dmomfix(:)=0.d0
195 mommtfix(:,:,:)=1.d6
196 mommtfixm(:,:)=-1.d0
197 taufsm=0.01d0
198 rmtdelta=0.05d0
199 isgkmax=-1
200 symtype=1
201 deltaph=0.01d0
202 nphwrt=1
203 if (allocated(vqlwrt)) deallocate(vqlwrt)
204 allocate(vqlwrt(3,nphwrt))
205 vqlwrt(:,:)=0.d0
206 notelns=0
207 tforce=.false.
208 maxitoep=400
209 tau0oep=0.1d0
210 nkstlist=1
211 kstlist(:,1)=1
212 vklem(:)=0.d0
213 deltaem=0.025d0
214 ndspem=1
215 nosource=.false.
216 spinsprl=.false.
217 ssdph=.true.
218 vqlss(:)=0.d0
219 dvqlss(:)=0.d0
220 nwrite=0
221 dftu=0
222 inpdftu=1
223 ndftu=0
224 ujdu(:,:)=0.d0
225 fdu(:,:)=0.d0
226 edu(:,:)=0.d0
227 lamdu(:)=0.d0
228 udufix(:)=0.d0
229 dudufix(:)=0.d0
230 tmwrite=.false.
231 rdmxctype=2
232 rdmmaxscl=2
233 maxitn=200
234 maxitc=0
235 taurdmn=0.5d0
236 taurdmc=0.25d0
237 rdmalpha=0.656d0
238 rdmtemp=0.d0
239 reducebf=1.d0
240 ptnucl=.true.
241 tefvr=.true.
242 mefvs=-1
243 vecql(:)=0.d0
244 mustar=0.15d0
245 sqaxis(1:2)=0.d0
246 sqaxis(3)=1.d0
247 test=.false.
248 spincore=.false.
249 frzncore=.false.
250 solscf=1.d0
251 emaxelnes=-1.2d0
252 wsfac(1)=-1.1d6; wsfac(2)=1.1d6
253 vhmat(:,:)=0.d0
254 vhmat(1,1)=1.d0
255 vhmat(2,2)=1.d0
256 vhmat(3,3)=1.d0
257 reduceh=.true.
258 hybrid0=.false.
259 hybridc=1.d0
260 ecvcut=-3.5d0
261 esccut=-0.4d0
262 gmaxrf=3.d0
263 mbwgrf=-1
264 emaxrf=1.d6
265 ntemp=40
266 nvbse0=2
267 ncbse0=3
268 nvxbse=0
269 ncxbse=0
270 bsefull=.false.
271 hxbse=.true.
272 hdbse=.true.
273 fxctype=-1
274 fxclrc(1)=0.d0
275 fxclrc(2)=0.d0
276 rndatposc=0.d0
277 rndbfcmt=0.d0
278 rndavec=0.d0
279 c_tb09=0.d0
280 tc_tb09=.false.
281 hmaxvr=20.d0
282 hkmax=12.d0
283 lorbcnd=.false.
284 lorbordc=3
285 nrmtscf=1.d0
286 dnrmtscf=0.d0
287 lmaxdb=3
288 epsdev=0.0025d0
289 npmae0=-1
290 wrtvars=.false.
291 ftmtype=0
292 ntmfix=0
293 tauftm=0.1d0
294 cmagz=.false.
295 axang(:)=0.d0
296 dncgga=1.d-8
297 tstime=1000.d0
298 dtimes=0.1d0
299 npulse=0
300 nramp=0
301 nstep=0
302 ntswrite(1)=500
303 ntswrite(2)=1
304 nxoapwlo=0
305 nxlo=0
306 tdrho1d=.false.
307 tdrho2d=.false.
308 tdrho3d=.false.
309 tdmag1d=.false.
310 tdmag2d=.false.
311 tdmag3d=.false.
312 tdjr1d=.false.
313 tdjr2d=.false.
314 tdjr3d=.false.
315 tddos=.false.
316 tdlsj=.false.
317 tdjtk=.false.
318 tdxrmk=.false.
319 rndevt0=0.d0
320 sxcscf=1.d0
321 dsxcscf=0.d0
322 avecu(:,:)=0.d0
323 avecu(1,1)=1.d0
324 avecu(2,2)=1.d0
325 avecu(3,3)=1.d0
326 scu=1.d0
327 scu1=1.d0
328 scu2=1.d0
329 scu3=1.d0
330 q0cut=0.d0
331 ngridkpa(:)=-1
332 rndbfcu=0.d0
333 bfieldcu(:)=0.d0
334 efieldcu(:)=0.d0
335 tplotq0=.true.
336 trdvclr=.false.
337 trdbfcr=.false.
338 wmaxgw=-10.d0
339 tsediag=.false.
340 actype=10
341 npole=3
342 nspade=100
343 tfav0=.true.
344 rmtscf=1.d0
345 mrmtav=0
346 rminall=-1.d0
347 rmtall=-1.d0
348 maxthd=0
349 maxthd1=0
350 maxthdmkl=0
351 maxlvl=4
352 tdphi=0.d0
353 thetamld=45.d0*pi/180.d0
354 ntsbackup=0
355 ! Wannier90 variables
356 seedname='wannier'
357 num_wann=0
358 num_bands=0
359 projw90=.false.
360 lprojw90(:,:)=-100
361 num_iter=500
362 dis_num_iter=500
363 trial_step=1.d-3
364 nxlwin=0
365 wrtunk=.false.
366 tbdip=.false.
367 tjr=.false.
368 tauefm=0.01d0
369 epsefm=1.d-6
370 tafindt=.false.
371 afindpm(:)=0.d0
372 afindpm(2)=1.d0
373 nkspolar=4
374 ntsforce=100
375 wphcut=1.d-6
376 ephscf(1)=8.d0
377 ephscf(2)=0.02d0
378 anomalous=.false.
379 tephde=.false.
380 bdiag=.false.
381 ecutb=0.001d0
382 ediag=.false.
383 pwxpsn=2
384 ramdisk=.true.
385 wrtdisk=.true.
386 epsdmat=1.d-8
387 tm3type=0
388 batch=.false.
389 tafspt=.false.
390 tbaspat=.false.
391 trdatdv=.false.
392 atdfc=0.d0
393 maxforce=-1.d0
394 msmgmt=0
395 ntsorth=1000
396 deltabf=0.5d0
397 jtconst0=.false.
398 trmt0=.true.
399 ksgwrho=.false.
400 npfftg=4
401 npfftgc=4
402 npfftq=4
403 npfftw=4
404 tphnat=.false.
405 ecutthc=0.01d0
406 tbdipu=.false.
407 bdipscf=1.d0
408 dbdipscf=0.d0
409 tidle=3600
410 
411 !--------------------------!
412 ! read from elk.in !
413 !--------------------------!
414 open(50,file='elk.in',status='OLD',form='FORMATTED',iostat=ios)
415 if (ios /= 0) then
416  write(*,*)
417  write(*,'("Error(readinput): error opening elk.in")')
418  write(*,*)
419  stop
420 end if
421 10 continue
422 read(50,*,end=30) block
423 ! check for a comment
424 if ((block(1:1) == '!').or.(block(1:1) == '#')) goto 10
425 select case(trim(block))
426 case('tasks')
427  do i=1,maxtasks
428  read(50,'(A)',err=20) str
429  if (trim(str) == '') then
430  if (i == 1) then
431  write(*,*)
432  write(*,'("Error(readinput): no tasks to perform")')
433  write(*,*)
434  stop
435  end if
436  ntasks=i-1
437  goto 10
438  end if
439  read(str,*,iostat=ios) tasks(i)
440  if (ios /= 0) then
441  write(*,*)
442  write(*,'("Error(readinput): error reading tasks")')
443  write(*,'("(blank line required after tasks block)")')
444  write(*,*)
445  stop
446  end if
447  end do
448  write(*,*)
449  write(*,'("Error(readinput): too many tasks")')
450  write(*,'("Adjust maxtasks in modmain and recompile code")')
451  write(*,*)
452  stop
453 case('species')
454 ! generate a species file
455  call genspecies(50)
456 case('fspecies')
457 ! generate fractional species files
458  do is=1,maxspecies
459  read(50,'(A)',err=20) str
460  if (trim(str) == '') goto 10
461  read(str,*,iostat=ios) zn,symb
462  if (ios /= 0) then
463  write(*,*)
464  write(*,'("Error(readinput): error reading fractional species")')
465  write(*,'("(blank line required after fspecies block)")')
466  write(*,*)
467  stop
468  end if
469  if (zn > 0.d0) then
470  write(*,*)
471  write(*,'("Error(readinput): fractional nuclear Z > 0 : ",G18.10)') zn
472  write(*,*)
473  stop
474  end if
475  call genfspecies(zn,symb)
476  end do
477  write(*,*)
478  write(*,'("Error(readinput): too many fractional nucleus species")')
479  write(*,*)
480  stop
481 case('avec')
482  do i=1,3
483  read(50,'(A)',err=20) str
484  read(str,*,err=20) avec(:,i)
485  read(str,*,iostat=ios) avec(:,i),davec(:,i)
486  end do
487 case('scale')
488  read(50,*,err=20) sc
489 case('scale1')
490  read(50,*,err=20) sc1
491 case('scale2')
492  read(50,*,err=20) sc2
493 case('scale3')
494  read(50,*,err=20) sc3
495 case('scalex')
496  read(50,*,err=20) scx
497 case('scaley')
498  read(50,*,err=20) scy
499 case('scalez')
500  read(50,*,err=20) scz
501 case('epslat')
502  read(50,*,err=20) epslat
503  if (epslat <= 0.d0) then
504  write(*,*)
505  write(*,'("Error(readinput): epslat <= 0 : ",G18.10)') epslat
506  write(*,*)
507  stop
508  end if
509 case('primcell')
510  read(50,*,err=20) primcell
511 case('tshift')
512  read(50,*,err=20) tshift
513 case('autokpt')
514  read(50,*,err=20) autokpt
515 case('radkpt')
516  read(50,*,err=20) radkpt
517  if (radkpt <= 0.d0) then
518  write(*,*)
519  write(*,'("Error(readinput): radkpt <= 0 : ",G18.10)') radkpt
520  write(*,*)
521  stop
522  end if
523 case('ngridk')
524  read(50,'(A)',err=20) str
525  read(str,*,err=20) ngridk(:)
526  read(str,*,iostat=ios) ngridk(:),dngridk(:)
527  if (any(ngridk(:) < 1)) then
528  write(*,*)
529  write(*,'("Error(readinput): invalid ngridk :",3(X,I0))') ngridk
530  write(*,*)
531  stop
532  end if
533  autokpt=.false.
534 case('vkloff')
535  read(50,*,err=20) vkloff(:)
536  if (any(vkloff(:) < 0.d0).or.any(vkloff(:) >= 1.d0)) then
537  write(*,*)
538  write(*,'("Error(readinput): vkloff components should be in [0,1) : ",&
539  &3G18.10)') vkloff
540  write(*,*)
541  stop
542  end if
543 case('reducek')
544  read(50,*,err=20) reducek
545 case('ngridq')
546  read(50,*,err=20) ngridq(:)
547  if (any(ngridq(:) < 1)) then
548  write(*,*)
549  write(*,'("Error(readinput): invalid ngridq :",3(X,I0))') ngridq
550  write(*,*)
551  stop
552  end if
553 case('reduceq')
554  read(50,*,err=20) reduceq
555 case('rgkmax')
556  read(50,'(A)',err=20) str
557  read(str,*,err=20) rgkmax
558  read(str,*,iostat=ios) rgkmax,drgkmax
559  if (rgkmax <= 0.d0) then
560  write(*,*)
561  write(*,'("Error(readinput): rgkmax <= 0 : ",G18.10)') rgkmax
562  write(*,*)
563  stop
564  end if
565 case('gmaxvr')
566  read(50,'(A)',err=20) str
567  read(str,*,err=20) gmaxvr
568  read(str,*,iostat=ios) gmaxvr,dgmaxvr
569 case('lmaxapw')
570  read(50,'(A)',err=20) str
571  read(str,*,err=20) lmaxapw
572  read(str,*,iostat=ios) lmaxapw,dlmaxapw
573  if (lmaxapw < 0) then
574  write(*,*)
575  write(*,'("Error(readinput): lmaxapw < 0 : ",I0)') lmaxapw
576  write(*,*)
577  stop
578  end if
579  if (lmaxapw >= maxlapw) then
580  write(*,*)
581  write(*,'("Error(readinput): lmaxapw too large : ",I0)') lmaxapw
582  write(*,'("Adjust maxlapw in modmain and recompile code")')
583  write(*,*)
584  stop
585  end if
586 case('lmaxo','lmaxvr')
587  read(50,'(A)',err=20) str
588  read(str,*,err=20) lmaxo
589  read(str,*,iostat=ios) lmaxo,dlmaxo
590  if (lmaxo < 3) then
591  write(*,*)
592  write(*,'("Error(readinput): lmaxo < 3 : ",I0)') lmaxo
593  write(*,*)
594  stop
595  end if
596 case('lmaxi','lmaxinr')
597  read(50,*,err=20) lmaxi
598  if (lmaxi < 1) then
599  write(*,*)
600  write(*,'("Error(readinput): lmaxi < 1 : ",I0)') lmaxi
601  write(*,*)
602  stop
603  end if
604 case('lmaxmat')
605  read(50,*,err=20)
606  write(*,'("Info(readinput): variable ''lmaxmat'' is no longer used")')
607 case('fracinr')
608  read(50,*,err=20) fracinr
609 case('trhonorm')
610  read(50,*,err=20) trhonorm
611 case('spinpol')
612  read(50,*,err=20) spinpol
613 case('spinorb')
614  read(50,*,err=20) spinorb
615 case('socscf')
616  read(50,*,err=20) socscf
617  if (socscf < 0.d0) then
618  write(*,*)
619  write(*,'("Error(readinput): socscf < 0 : ",G18.10)') socscf
620  write(*,*)
621  stop
622  end if
623 case('bforb')
624  read(50,*,err=20) bforb
625 case('bfdmag')
626  read(50,*,err=20) bfdmag
627 case('xctype')
628  read(50,'(A)',err=20) str
629  str=trim(str)//' 0 0'
630  read(str,*,err=20) xctype(:)
631 case('xctsp')
632  read(50,'(A)',err=20) str
633  str=trim(str)//' 0 0'
634  read(str,*,err=20) xctsp(:)
635 case('ktype')
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
640  write(*,*)
641  write(*,'("Error(readinput): ktype(3) should be zero : ",I0)') ktype(3)
642  write(*,*)
643  stop
644  end if
645 case('stype')
646  read(50,*,err=20) stype
647 case('swidth')
648  read(50,'(A)',err=20) str
649  read(str,*,err=20) swidth
650  read(str,*,iostat=ios) swidth,dswidth
651  if (swidth < 1.d-9) then
652  write(*,*)
653  write(*,'("Error(readinput): swidth too small or negative : ",G18.10)') &
654  swidth
655  write(*,*)
656  stop
657  end if
658 case('autoswidth')
659  read(50,*,err=20) autoswidth
660 case('mstar')
661  read(50,*,err=20) mstar
662  if (mstar <= 0.d0) then
663  write(*,*)
664  write(*,'("Error(readinput): mstar <= 0 : ",G18.10)') mstar
665  write(*,*)
666  stop
667  end if
668 case('epsocc')
669  read(50,*,err=20) epsocc
670  if (epsocc <= 0.d0) then
671  write(*,*)
672  write(*,'("Error(readinput): epsocc <= 0 : ",G18.10)') epsocc
673  write(*,*)
674  stop
675  end if
676 case('epschg')
677  read(50,*,err=20) epschg
678  if (epschg <= 0.d0) then
679  write(*,*)
680  write(*,'("Error(readinput): epschg <= 0 : ",G18.10)') epschg
681  write(*,*)
682  stop
683  end if
684 case('nempty','nempty0')
685  read(50,'(A)',err=20) str
686  read(str,*,err=20) nempty0
687  read(str,*,iostat=ios) nempty0,dnempty0
688  if (nempty0 <= 0.d0) then
689  write(*,*)
690  write(*,'("Error(readinput): nempty <= 0 : ",G18.10)') nempty0
691  write(*,*)
692  stop
693  end if
694 case('mixtype')
695  read(50,*,err=20) mixtype
696 case('mixsave')
697  read(50,*,err=20) mixsave
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)
703  else
704  read(50,*,err=20) amixpm(2)
705  end if
706  if (amixpm(1) < 0.d0) then
707  write(*,*)
708  write(*,'("Error(readinput): beta0 [amixpm(1)] < 0 : ",G18.10)') amixpm(1)
709  write(*,*)
710  stop
711  end if
712  if ((amixpm(2) < 0.d0).or.(amixpm(2) > 1.d0)) then
713  write(*,*)
714  write(*,'("Error(readinput): betamax [amixpm(2)] not in [0,1] : ",G18.10)')&
715  amixpm(2)
716  write(*,*)
717  stop
718  end if
719 case('mixsdb')
720  read(50,*,err=20) mixsdb
721  if (mixsdb < 2) then
722  write(*,*)
723  write(*,'("Error(readinput): mixsdb < 2 : ",I0)') mixsdb
724  write(*,*)
725  stop
726  end if
727 case('broydpm')
728  read(50,*,err=20) broydpm(:)
729  if ((broydpm(1) < 0.d0).or.(broydpm(1) > 1.d0).or. &
730  (broydpm(2) < 0.d0).or.(broydpm(2) > 1.d0)) then
731  write(*,*)
732  write(*,'("Error(readinput): invalid Broyden mixing parameters : ",&
733  &2G18.10)') broydpm
734  write(*,*)
735  stop
736  end if
737 case('mixrho')
738  read(50,*,err=20) mixrho
739 case('maxscl')
740  read(50,*,err=20) maxscl
741  if (maxscl < 0) then
742  write(*,*)
743  write(*,'("Error(readinput): maxscl < 0 : ",I0)') maxscl
744  write(*,*)
745  stop
746  end if
747 case('epspot')
748  read(50,*,err=20) epspot
749 case('epsengy')
750  read(50,*,err=20) epsengy
751 case('epsforce')
752  read(50,*,err=20) epsforce
753 case('epsstress')
754  read(50,*,err=20) epsstress
755 case('sppath')
756  read(50,*,err=20) sppath
757  sppath=adjustl(sppath)
758 case('scrpath')
759  read(50,*,err=20) scrpath
760 case('molecule')
761  read(50,*,err=20) molecule
762 case('atoms')
763  read(50,*,err=20) nspecies
764  if (nspecies < 1) then
765  write(*,*)
766  write(*,'("Error(readinput): nspecies < 1 : ",I0)') nspecies
767  write(*,*)
768  stop
769  end if
770  if (nspecies > maxspecies) then
771  write(*,*)
772  write(*,'("Error(readinput): nspecies too large : ",I0)') nspecies
773  write(*,'("Adjust maxspecies in modmain and recompile code")')
774  write(*,*)
775  stop
776  end if
777  do is=1,nspecies
778  read(50,*,err=20) spfname(is)
779  spfname(is)=adjustl(spfname(is))
780  read(50,*,err=20) natoms(is)
781  if (natoms(is) < 1) then
782  write(*,*)
783  write(*,'("Error(readinput): natoms < 1 : ",I0)') natoms(is)
784  write(*,'(" for species ",I0)') is
785  write(*,*)
786  stop
787  end if
788  if (natoms(is) > maxatoms) then
789  write(*,*)
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")')
793  write(*,*)
794  stop
795  end if
796  do ia=1,natoms(is)
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)
800  end do
801  end do
802 case('plot1d')
803  read(50,*,err=20) nvp1d,npp1d
804  if (nvp1d < 1) then
805  write(*,*)
806  write(*,'("Error(readinput): nvp1d < 1 : ",I0)') nvp1d
807  write(*,*)
808  stop
809  end if
810  if (npp1d < nvp1d) then
811  write(*,*)
812  write(*,'("Error(readinput): npp1d < nvp1d :",2(X,I0))') npp1d,nvp1d
813  write(*,*)
814  stop
815  end if
816  if (allocated(vvlp1d)) deallocate(vvlp1d)
817  allocate(vvlp1d(3,nvp1d))
818  do i=1,nvp1d
819  read(50,*,err=20) vvlp1d(:,i)
820  end do
821 case('ip0gw','ip01d')
822  read(50,*,err=20) ip0gw
823  if (ip0gw < 1) then
824  write(*,*)
825  write(*,'("Error(readinput): ip0gw < 1 : ",I0)') ip0gw
826  write(*,*)
827  stop
828  end if
829 case('plot2d')
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
835  write(*,*)
836  write(*,'("Error(readinput): np2d < 1 :",2(X,I0))') np2d
837  write(*,*)
838  stop
839  end if
840 case('plot3d')
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
847  write(*,*)
848  write(*,'("Error(readinput): np3d < 1 :",3(X,I0))') np3d
849  write(*,*)
850  stop
851  end if
852 case('wplot','dos')
853  read(50,*,err=20) nwplot,ngrkf,nswplot
854  if (nwplot < 2) then
855  write(*,*)
856  write(*,'("Error(readinput): nwplot < 2 : ",I0)') nwplot
857  write(*,*)
858  stop
859  end if
860  if (ngrkf < 1) then
861  write(*,*)
862  write(*,'("Error(readinput): ngrkf < 1 : ",I0)') ngrkf
863  write(*,*)
864  stop
865  end if
866  if (nswplot < 0) then
867  write(*,*)
868  write(*,'("Error(readinput): nswplot < 0 : ",I0)') nswplot
869  write(*,*)
870  stop
871  end if
872  read(50,*,err=20) wplot(:)
873  if (wplot(1) > wplot(2)) then
874  write(*,*)
875  write(*,'("Error(readinput): wplot(1) > wplot(2) : ",2G18.10)') wplot
876  write(*,*)
877  stop
878  end if
879 case('dosocc')
880  read(50,*,err=20) dosocc
881 case('tpdos')
882  read(50,*,err=20) tpdos
883 case('dosmsum')
884  read(50,*,err=20) dosmsum
885 case('dosssum')
886  read(50,*,err=20) dosssum
887 case('lmirep')
888  read(50,*,err=20) lmirep
889 case('atpopt')
890  read(50,*,err=20) atpopt
891 case('maxatpstp','maxatmstp')
892  read(50,*,err=20) maxatpstp
893  if (maxatpstp < 1) then
894  write(*,*)
895  write(*,'("Error(readinput): maxatpstp < 1 : ",I0)') maxatpstp
896  write(*,*)
897  stop
898  end if
899 case('tau0atp','tau0atm')
900  read(50,*,err=20) tau0atp
901 case('deltast')
902  read(50,*,err=20) deltast
903  if (deltast <= 0.d0) then
904  write(*,*)
905  write(*,'("Error(readinput): deltast <= 0 : ",G18.10)') deltast
906  write(*,*)
907  stop
908  end if
909 case('avecref')
910  read(50,*,err=20) avecref(:,1)
911  read(50,*,err=20) avecref(:,2)
912  read(50,*,err=20) avecref(:,3)
913 case('latvopt')
914  read(50,*,err=20) latvopt
915 case('maxlatvstp')
916  read(50,*,err=20) maxlatvstp
917  if (maxlatvstp < 1) then
918  write(*,*)
919  write(*,'("Error(readinput): maxlatvstp < 1 : ",I0)') maxlatvstp
920  write(*,*)
921  stop
922  end if
923 case('tau0latv')
924  read(50,*,err=20) tau0latv
925 case('nstfsp')
926  read(50,*,err=20)
927  write(*,'("Info(readinput): variable ''nstfsp'' is no longer used")')
928 case('lradstp')
929  read(50,*,err=20) lradstp
930  if (lradstp < 1) then
931  write(*,*)
932  write(*,'("Error(readinput): lradstp < 1 : ",I0)') lradstp
933  write(*,*)
934  stop
935  end if
936 case('chgexs')
937  read(50,'(A)',err=20) str
938  read(str,*,err=20) chgexs
939  read(str,*,iostat=ios) chgexs,dchgexs
940 case('nprad')
941  read(50,*,err=20)
942  write(*,'("Info(readinput): variable ''nprad'' is no longer used")')
943 case('scissor')
944  read(50,*,err=20) scissor
945 case('noptcomp')
946  read(50,*,err=20) noptcomp
947  if ((noptcomp < 1).or.(noptcomp > 27)) then
948  write(*,*)
949  write(*,'("Error(readinput): noptcomp should be from 1 to 27 : ",I0)') &
950  noptcomp
951  write(*,*)
952  stop
953  end if
954 case('optcomp')
955  do i=1,27
956  read(50,'(A)',err=20) str
957  if (trim(str) == '') then
958  if (i == 1) then
959  write(*,*)
960  write(*,'("Error(readinput): empty optical component list")')
961  write(*,*)
962  stop
963  end if
964  noptcomp=i-1
965  goto 10
966  end if
967  str=trim(str)//' 1 1'
968  read(str,*,iostat=ios) optcomp(:,i)
969  if (ios /= 0) then
970  write(*,*)
971  write(*,'("Error(readinput): error reading optical component list")')
972  write(*,'("(blank line required after optcomp block)")')
973  write(*,*)
974  stop
975  end if
976  if (any(optcomp(:,i) < 1).or.any(optcomp(:,i) > 3)) then
977  write(*,*)
978  write(*,'("Error(readinput): invalid optcomp :",3(X,I0))') optcomp(:,i)
979  write(*,*)
980  stop
981  end if
982  end do
983  write(*,*)
984  write(*,'("Error(readinput): optical component list too long")')
985  write(*,*)
986  stop
987 case('intraband')
988  read(50,*,err=20) intraband
989 case('evaltol')
990  read(50,*,err=20)
991  write(*,'("Info(readinput): variable ''evaltol'' is no longer used")')
992 case('deband')
993  read(50,*,err=20)
994  write(*,'("Info(readinput): variable ''deband'' is no longer used")')
995 case('epsband')
996  read(50,*,err=20) epsband
997  if (epsband <= 0.d0) then
998  write(*,*)
999  write(*,'("Error(readinput): epsband <= 0 : ",G18.10)') epsband
1000  write(*,*)
1001  stop
1002  end if
1003 case('demaxbnd')
1004  read(50,*,err=20) demaxbnd
1005  if (demaxbnd <= 0.d0) then
1006  write(*,*)
1007  write(*,'("Error(readinput): demaxbnd <= 0 : ",G18.10)') demaxbnd
1008  write(*,*)
1009  stop
1010  end if
1011 case('autolinengy')
1012  read(50,*,err=20) autolinengy
1013 case('dlefe')
1014  read(50,*,err=20) dlefe
1015 case('autodlefe')
1016  read(50,*,err=20) autodlefe
1017 case('deapw')
1018  read(50,*,err=20) deapw
1019  if (abs(deapw) < 1.d-8) then
1020  write(*,*)
1021  write(*,'("Error(readinput): invalid deapw : ",G18.10)') deapw
1022  write(*,*)
1023  stop
1024  end if
1025 case('delorb')
1026  read(50,*,err=20) delorb
1027  if (abs(delorb) < 1.d-8) then
1028  write(*,*)
1029  write(*,'("Error(readinput): invalid delorb : ",G18.10)') delorb
1030  write(*,*)
1031  stop
1032  end if
1033 case('bfieldc')
1034  read(50,'(A)',err=20) str
1035  read(str,*,err=20) bfieldc0(:)
1036  read(str,*,iostat=ios) bfieldc0(:),dbfieldc0(:)
1037 case('efieldc')
1038  read(50,*,err=20) efieldc(:)
1039 case('dmaxefc')
1040  read(50,*,err=20) dmaxefc
1041  if (dmaxefc < 0) then
1042  write(*,*)
1043  write(*,'("Error(readinput): dmaxefc < 0 : ",G18.10)') dmaxefc
1044  write(*,*)
1045  stop
1046  end if
1047 case('afieldc')
1048  read(50,'(A)',err=20) str
1049  read(str,*,err=20) afieldc(:)
1050  read(str,*,iostat=ios) afieldc(:),dafieldc(:)
1051 case('afspc')
1052  do i=1,3
1053  read(50,'(A)',err=20) str
1054  read(str,*,err=20) afspc(i,:)
1055  read(str,*,iostat=ios) afspc(i,:),dafspc(i,:)
1056  end do
1057 case('fsmtype','fixspin')
1058  read(50,*,err=20) fsmtype
1059 case('momfix')
1060  read(50,'(A)',err=20) str
1061  read(str,*,err=20) momfix(:)
1062  read(str,*,iostat=ios) momfix(:),dmomfix(:)
1063 case('momfixm')
1064  read(50,*,err=20) momfixm
1065  if (momfixm < 0.d0) then
1066  write(*,*)
1067  write(*,'("Error(readinput): momfixm < 0 : ",G18.10)') momfixm
1068  write(*,*)
1069  stop
1070  end if
1071 case('mommtfix')
1072  do ias=1,maxspecies*maxatoms
1073  read(50,'(A)',err=20) str
1074  if (trim(str) == '') goto 10
1075  read(str,*,iostat=ios) is,ia,mommtfix(:,ia,is)
1076  if (ios /= 0) then
1077  write(*,*)
1078  write(*,'("Error(readinput): error reading muffin-tin fixed spin &
1079  &moments")')
1080  write(*,'("(blank line required after mommtfix block)")')
1081  write(*,*)
1082  stop
1083  end if
1084  end do
1085 case('mommtfixm')
1086  do ias=1,maxspecies*maxatoms
1087  read(50,'(A)',err=20) str
1088  if (trim(str) == '') goto 10
1089  read(str,*,iostat=ios) is,ia,mommtfixm(ia,is)
1090  if (ios /= 0) then
1091  write(*,*)
1092  write(*,'("Error(readinput): error reading muffin-tin fixed spin &
1093  &moment magnitudes")')
1094  write(*,'("(blank line required after mommtfixm block)")')
1095  write(*,*)
1096  stop
1097  end if
1098  end do
1099 case('taufsm')
1100  read(50,*,err=20) taufsm
1101  if (taufsm < 0.d0) then
1102  write(*,*)
1103  write(*,'("Error(readinput): taufsm < 0 : ",G18.10)') taufsm
1104  write(*,*)
1105  stop
1106  end if
1107 case('autormt')
1108  read(50,*,err=20)
1109  write(*,'("Info(readinput): variable ''autormt'' is no longer used")')
1110 case('rmtdelta')
1111  read(50,*,err=20) rmtdelta
1112  if (rmtdelta < 0.d0) then
1113  write(*,*)
1114  write(*,'("Warning(readinput): rmtdelta < 0 : ",G18.10)') rmtdelta
1115  end if
1116 case('isgkmax')
1117  read(50,*,err=20) isgkmax
1118 case('nosym')
1119  read(50,*,err=20) lv
1120  if (lv) symtype=0
1121 case('symtype')
1122  read(50,*,err=20) symtype
1123  if ((symtype < 0).or.(symtype > 2)) then
1124  write(*,*)
1125  write(*,'("Error(readinput): symtype not defined : ",I0)') symtype
1126  write(*,*)
1127  stop
1128  end if
1129 case('deltaph')
1130  read(50,*,err=20) deltaph
1131  if (deltaph <= 0.d0) then
1132  write(*,*)
1133  write(*,'("Error(readinput): deltaph <= 0 : ",G18.10)') deltaph
1134  write(*,*)
1135  stop
1136  end if
1137 case('phwrite')
1138  read(50,*,err=20) nphwrt
1139  if (nphwrt < 1) then
1140  write(*,*)
1141  write(*,'("Error(readinput): nphwrt < 1 : ",I0)') nphwrt
1142  write(*,*)
1143  stop
1144  end if
1145  if (allocated(vqlwrt)) deallocate(vqlwrt)
1146  allocate(vqlwrt(3,nphwrt))
1147  do i=1,nphwrt
1148  read(50,*,err=20) vqlwrt(:,i)
1149  end do
1150 case('notes')
1151  if (allocated(notes)) deallocate(notes)
1152  allocate(notes(0))
1153  notelns=0
1154  do
1155  read(50,'(A)') str
1156  if (trim(str) == '') goto 10
1157  notes=[notes(1:notelns),str]
1158  notelns=notelns+1
1159  end do
1160 case('tforce')
1161  read(50,*,err=20) tforce
1162 case('tfibs')
1163  read(50,*,err=20)
1164  write(*,'("Info(readinput): variable ''tfibs'' is no longer used")')
1165 case('maxitoep')
1166  read(50,*,err=20) maxitoep
1167  if (maxitoep < 1) then
1168  write(*,*)
1169  write(*,'("Error(readinput): maxitoep < 1 : ",I0)') maxitoep
1170  write(*,*)
1171  stop
1172  end if
1173 case('tauoep')
1174  read(50,*,err=20)
1175  write(*,'("Info(readinput): variable ''tauoep'' is no longer used")')
1176 case('tau0oep')
1177  read(50,*,err=20) tau0oep
1178  if (tau0oep < 0.d0) then
1179  write(*,*)
1180  write(*,'("Error(readinput): tau0oep < 0 : ",G18.10)') tau0oep
1181  write(*,*)
1182  stop
1183  end if
1184 case('kstlist')
1185  do i=1,maxkst
1186  read(50,'(A)',err=20) str
1187  if (trim(str) == '') then
1188  if (i == 1) then
1189  write(*,*)
1190  write(*,'("Error(readinput): empty k-point and state list")')
1191  write(*,*)
1192  stop
1193  end if
1194  nkstlist=i-1
1195  goto 10
1196  end if
1197  str=trim(str)//' 1'
1198  read(str,*,iostat=ios) kstlist(:,i)
1199  if (ios /= 0) then
1200  write(*,*)
1201  write(*,'("Error(readinput): error reading k-point and state list")')
1202  write(*,'("(blank line required after kstlist block)")')
1203  write(*,*)
1204  stop
1205  end if
1206  end do
1207  write(*,*)
1208  write(*,'("Error(readinput): k-point and state list too long")')
1209  write(*,*)
1210  stop
1211 case('vklem')
1212  read(50,*,err=20) vklem
1213 case('deltaem')
1214  read(50,*,err=20) deltaem
1215  if (deltaem <= 0.d0) then
1216  write(*,*)
1217  write(*,'("Error(readinput): deltaem <= 0 : ",G18.10)') deltaem
1218  write(*,*)
1219  stop
1220  end if
1221 case('ndspem')
1222  read(50,*,err=20) ndspem
1223  if ((ndspem < 1).or.(ndspem > 4)) then
1224  write(*,*)
1225  write(*,'("Error(readinput): ndspem out of range : ",I0)') ndspem
1226  write(*,*)
1227  stop
1228  end if
1229 case('nosource')
1230  read(50,*,err=20) nosource
1231 case('spinsprl')
1232  read(50,*,err=20) spinsprl
1233 case('ssdph')
1234  read(50,*,err=20) ssdph
1235 case('vqlss')
1236  read(50,'(A)',err=20) str
1237  read(str,*,err=20) vqlss
1238  read(str,*,iostat=ios) vqlss,dvqlss
1239 case('nwrite')
1240  read(50,*,err=20) nwrite
1241 case('DFT+U','dft+u','lda+u')
1242  read(50,*,err=20) dftu,inpdftu
1243  do i=1,maxdftu
1244  read(50,'(A)',err=20) str
1245  if (trim(str) == '') then
1246  ndftu=i-1
1247  goto 10
1248  end if
1249  select case(inpdftu)
1250  case(1)
1251  read(str,*,iostat=ios) is,l,ujdu(1:2,i)
1252  case(2)
1253  read(str,*,iostat=ios) is,l,(fdu(k,i),k=0,2*l,2)
1254  case(3)
1255  read(str,*,iostat=ios) is,l,(edu(k,i),k=0,l)
1256  case(4)
1257  read(str,*,iostat=ios) is,l,lamdu(i)
1258  case(5)
1259  read(str,*,iostat=ios) is,l,udufix(i),dudufix(i)
1260  read(str,*,iostat=ios) is,l,udufix(i)
1261  case default
1262  write(*,*)
1263  write(*,'("Error(readinput): invalid inpdftu : ",I0)') inpdftu
1264  write(*,*)
1265  stop
1266  end select
1267  if (ios /= 0) then
1268  write(*,*)
1269  write(*,'("Error(readinput): error reading DFT+U parameters")')
1270  write(*,'("(blank line required after dft+u block)")')
1271  write(*,*)
1272  stop
1273  end if
1274  if ((is < 1).or.(is >= maxspecies)) then
1275  write(*,*)
1276  write(*,'("Error(readinput): invalid species number in dft+u block : ", &
1277  &I0)') is
1278  write(*,*)
1279  stop
1280  end if
1281  if (l < 0) then
1282  write(*,*)
1283  write(*,'("Error(readinput): l < 0 in dft+u block : ",I0)') l
1284  write(*,*)
1285  stop
1286  end if
1287  if (l > lmaxdm) then
1288  write(*,*)
1289  write(*,'("Error(readinput): l > lmaxdm in dft+u block :",2(X,I0))') l, &
1290  lmaxdm
1291  write(*,*)
1292  stop
1293  end if
1294 ! check for repeated entries
1295  do j=1,i-1
1296  if ((is == isldu(1,j)).and.(l == isldu(2,j))) then
1297  write(*,*)
1298  write(*,'("Error(readinput): repeated entry in DFT+U block")')
1299  write(*,*)
1300  stop
1301  end if
1302  end do
1303  isldu(1,i)=is
1304  isldu(2,i)=l
1305  end do
1306  write(*,*)
1307  write(*,'("Error(readinput): too many DFT+U entries")')
1308  write(*,'("Adjust maxdftu in modmain and recompile code")')
1309  write(*,*)
1310  stop
1311 case('tmwrite','tmomlu')
1312  read(50,*,err=20) tmwrite
1313 case('readadu','readalu')
1314  read(50,*,err=20)
1315  write(*,'("Info(readinput): variable ''readadu'' is no longer used")')
1316 case('rdmxctype')
1317  read(50,*,err=20) rdmxctype
1318 case('rdmmaxscl')
1319  read(50,*,err=20) rdmmaxscl
1320  if (rdmmaxscl < 0) then
1321  write(*,*)
1322  write(*,'("Error(readinput): rdmmaxscl < 0 : ",I0)') rdmmaxscl
1323  write(*,*)
1324  end if
1325 case('maxitn')
1326  read(50,*,err=20) maxitn
1327 case('maxitc')
1328  read(50,*,err=20) maxitc
1329 case('taurdmn')
1330  read(50,*,err=20) taurdmn
1331  if (taurdmn < 0.d0) then
1332  write(*,*)
1333  write(*,'("Error(readinput): taurdmn < 0 : ",G18.10)') taurdmn
1334  write(*,*)
1335  stop
1336  end if
1337 case('taurdmc')
1338  read(50,*,err=20) taurdmc
1339  if (taurdmc < 0.d0) then
1340  write(*,*)
1341  write(*,'("Error(readinput): taurdmc < 0 : ",G18.10)') taurdmc
1342  write(*,*)
1343  stop
1344  end if
1345 case('rdmalpha')
1346  read(50,*,err=20) rdmalpha
1347  if ((rdmalpha <= 0.d0).or.(rdmalpha >= 1.d0)) then
1348  write(*,*)
1349  write(*,'("Error(readinput): rdmalpha not in (0,1) : ",G18.10)') rdmalpha
1350  write(*,*)
1351  stop
1352  end if
1353 case('rdmtemp')
1354  read(50,*,err=20) rdmtemp
1355  if (rdmtemp < 0.d0) then
1356  write(*,*)
1357  write(*,'("Error(readinput): rdmtemp < 0 : ",G18.10)') rdmtemp
1358  write(*,*)
1359  stop
1360  end if
1361 case('reducebf')
1362  read(50,*,err=20) reducebf
1363  if ((reducebf < 0.5d0).or.(reducebf > 1.d0)) then
1364  write(*,*)
1365  write(*,'("Error(readinput): reducebf not in [0.5,1] : ",G18.10)') reducebf
1366  write(*,*)
1367  stop
1368  end if
1369 case('ptnucl')
1370  read(50,*,err=20) ptnucl
1371 case('tefvr','tseqr')
1372  read(50,*,err=20) tefvr
1373 case('tefvs')
1374  read(50,*,err=20)
1375  write(*,'("Info(readinput): variable ''tefvs'' is no longer used")')
1376 case('mefvs')
1377  read(50,*,err=20) mefvs
1378 case('tefvit','tseqit')
1379  read(50,*,err=20)
1380  write(*,'("Info(readinput): variable ''tefvit'' is no longer used")')
1381 case('minitefv','minseqit')
1382  read(50,*,err=20)
1383  write(*,'("Info(readinput): variable ''minitefv'' is no longer used")')
1384 case('nefvit','maxitefv','maxseqit','nseqit')
1385  read(50,*,err=20)
1386  write(*,'("Info(readinput): variable ''nefvit'' is no longer used")')
1387 case('befvit','bseqit')
1388  read(50,*,err=20)
1389  write(*,'("Info(readinput): variable ''befvit'' is no longer used")')
1390 case('epsefvit','epsseqit')
1391  read(50,*,err=20)
1392  write(*,'("Info(readinput): variable ''epsefvit'' is no longer used")')
1393 case('tauseq')
1394  read(50,*,err=20)
1395  write(*,'("Info(readinput): variable ''tauseq'' is no longer used")')
1396 case('vecql')
1397  read(50,*,err=20) vecql(:)
1398 case('mustar')
1399  read(50,*,err=20) mustar
1400 case('sqaxis','sqados')
1401  read(50,*,err=20) sqaxis(:)
1402 case('test')
1403  read(50,*,err=20) test
1404 case('spincore')
1405  read(50,*,err=20) spincore
1406 case('frzncore','frozencr')
1407  read(50,*,err=20) frzncore
1408 case('solscf')
1409  read(50,*,err=20) solscf
1410  if (solscf < 0.d0) then
1411  write(*,*)
1412  write(*,'("Error(readinput): solscf < 0 : ",G18.10)') solscf
1413  write(*,*)
1414  stop
1415  end if
1416 case('emaxelnes')
1417  read(50,*,err=20) emaxelnes
1418 case('wsfac')
1419  read(50,*,err=20) wsfac(:)
1420 case('vhmat')
1421  read(50,*,err=20) vhmat(1,:)
1422  read(50,*,err=20) vhmat(2,:)
1423  read(50,*,err=20) vhmat(3,:)
1424 case('reduceh')
1425  read(50,*,err=20) reduceh
1426 case('hybrid')
1427  read(50,*,err=20) hybrid0
1428 case('hybridc','hybmix')
1429  read(50,*,err=20) hybridc
1430  if ((hybridc < 0.d0).or.(hybridc > 1.d0)) then
1431  write(*,*)
1432  write(*,'("Error(readinput): invalid hybridc : ",G18.10)') hybridc
1433  write(*,*)
1434  stop
1435  end if
1436 case('ecvcut')
1437  read(50,*,err=20) ecvcut
1438 case('esccut')
1439  read(50,*,err=20) esccut
1440 case('nvbse')
1441  read(50,*,err=20) nvbse0
1442  if (nvbse0 < 0) then
1443  write(*,*)
1444  write(*,'("Error(readinput): nvbse < 0 : ",I0)') nvbse0
1445  write(*,*)
1446  stop
1447  end if
1448 case('ncbse')
1449  read(50,*,err=20) ncbse0
1450  if (ncbse0 < 0) then
1451  write(*,*)
1452  write(*,'("Error(readinput): ncbse < 0 : ",I0)') ncbse0
1453  write(*,*)
1454  stop
1455  end if
1456 case('istxbse')
1457  do i=1,maxxbse
1458  read(50,'(A)',err=20) str
1459  if (trim(str) == '') then
1460  if (i == 1) then
1461  write(*,*)
1462  write(*,'("Error(readinput): empty BSE extra valence state list")')
1463  write(*,*)
1464  stop
1465  end if
1466  nvxbse=i-1
1467  goto 10
1468  end if
1469  read(str,*,iostat=ios) istxbse(i)
1470  if (ios /= 0) then
1471  write(*,*)
1472  write(*,'("Error(readinput): error reading BSE valence state list")')
1473  write(*,'("(blank line required after istxbse block)")')
1474  write(*,*)
1475  stop
1476  end if
1477  end do
1478  write(*,*)
1479  write(*,'("Error(readinput): BSE extra valence state list too long")')
1480  write(*,*)
1481  stop
1482 case('jstxbse')
1483  do i=1,maxxbse
1484  read(50,'(A)',err=20) str
1485  if (trim(str) == '') then
1486  if (i == 1) then
1487  write(*,*)
1488  write(*,'("Error(readinput): empty BSE extra conduction state list")')
1489  write(*,*)
1490  stop
1491  end if
1492  ncxbse=i-1
1493  goto 10
1494  end if
1495  read(str,*,iostat=ios) jstxbse(i)
1496  if (ios /= 0) then
1497  write(*,*)
1498  write(*,'("Error(readinput): error reading BSE conduction state list")')
1499  write(*,'("(blank line required after jstxbse block)")')
1500  write(*,*)
1501  stop
1502  end if
1503  end do
1504  write(*,*)
1505  write(*,'("Error(readinput): BSE extra conduction state list too long")')
1506  write(*,*)
1507  stop
1508 case('bsefull')
1509  read(50,*,err=20) bsefull
1510 case('hxbse')
1511  read(50,*,err=20) hxbse
1512 case('hdbse')
1513  read(50,*,err=20) hdbse
1514 case('gmaxrf','gmaxrpa')
1515  read(50,*,err=20) gmaxrf
1516  if (gmaxrf < 0.d0) then
1517  write(*,*)
1518  write(*,'("Error(readinput): gmaxrf < 0 : ",G18.10)') gmaxrf
1519  write(*,*)
1520  stop
1521  end if
1522 case('mbwgrf')
1523  read(50,*,err=20) mbwgrf
1524 case('emaxrf')
1525  read(50,*,err=20) emaxrf
1526  if (emaxrf < 0.d0) then
1527  write(*,*)
1528  write(*,'("Error(readinput): emaxrf < 0 : ",G18.10)') emaxrf
1529  write(*,*)
1530  stop
1531  end if
1532 case('fxctype')
1533  read(50,'(A)',err=20) str
1534  str=trim(str)//' 0 0'
1535  read(str,*,err=20) fxctype
1536 case('fxclrc')
1537  read(50,'(A)',err=20) str
1538  str=trim(str)//' 0.0'
1539  read(str,*,err=20) fxclrc(:)
1540 case('ntemp')
1541  read(50,*,err=20) ntemp
1542  if (ntemp < 1) then
1543  write(*,*)
1544  write(*,'("Error(readinput): ntemp < 1 : ",I0)') ntemp
1545  write(*,*)
1546  stop
1547  end if
1548 case('trimvg')
1549  write(*,'("Info(readinput): variable ''trimvg'' is no longer used")')
1550  read(50,*,err=20)
1551 case('rndstate','rndseed')
1552  read(50,*,err=20) rndstate(0)
1553  rndstate(0)=abs(rndstate(0))
1554 case('rndatposc')
1555  read(50,*,err=20) rndatposc
1556 case('rndbfcmt')
1557  read(50,*,err=20) rndbfcmt
1558 case('rndavec')
1559  read(50,*,err=20) rndavec
1560 case('c_tb09')
1561  read(50,*,err=20) c_tb09
1562 ! set flag to indicate Tran-Blaha constant has been read in
1563  tc_tb09=.true.
1564 case('lowq','highq','vhighq','uhighq')
1565  read(50,*,err=20) lv
1566  if (lv) then
1567  if (trim(block) == 'lowq') then
1568  rgkmax=6.5d0
1569  gmaxvr=10.d0
1570  lmaxapw=7
1571  lmaxo=5
1572  nxlo=2
1573  lorbcnd=.true.
1574  radkpt=25.d0
1575  autokpt=.true.
1576  vkloff(:)=0.5d0
1577  nempty0=4.d0
1578  epspot=1.d-5
1579  epsengy=5.d-4
1580  epsforce=1.d-2
1581  epsstress=3.d-3
1582  autolinengy=.true.
1583  gmaxrf=2.5d0
1584  lradstp=6
1585  else if (trim(block) == 'highq') then
1586 ! parameter set for high-quality calculation
1587  rgkmax=max(rgkmax,8.d0)
1588  gmaxvr=max(gmaxvr,16.d0)
1589  lmaxapw=max(lmaxapw,9)
1590  lmaxo=max(lmaxo,7)
1591  nrmtscf=max(nrmtscf,1.5d0)
1592  nxlo=max(nxlo,2)
1593  lorbcnd=.true.
1594  radkpt=max(radkpt,50.d0)
1595  autokpt=.true.
1596  vkloff(:)=0.d0
1597  nempty0=max(nempty0,10.d0)
1598  epspot=min(epspot,1.d-7)
1599  epsengy=min(epsengy,1.d-5)
1600  epsforce=min(epsforce,5.d-4)
1601  epsstress=min(epsstress,1.d-3)
1602  autolinengy=.true.
1603  gmaxrf=max(gmaxrf,4.d0)
1604  else if (trim(block) == 'vhighq') then
1605 ! parameter set for very high-quality calculation
1606  rgkmax=max(rgkmax,9.d0)
1607  gmaxvr=max(gmaxvr,18.d0)
1608  lmaxapw=max(lmaxapw,11)
1609  lmaxo=max(lmaxo,9)
1610  nrmtscf=max(nrmtscf,2.d0)
1611  nxlo=max(nxlo,3)
1612  lorbcnd=.true.
1613  radkpt=max(radkpt,90.d0)
1614  autokpt=.true.
1615  vkloff(:)=0.d0
1616  nempty0=max(nempty0,20.d0)
1617  epspot=min(epspot,1.d-7)
1618  epsengy=min(epsengy,1.d-6)
1619  epsforce=min(epsforce,2.d-4)
1620  epsstress=min(epsstress,5.d-4)
1621  autolinengy=.true.
1622  gmaxrf=max(gmaxrf,5.d0)
1623  else
1624 ! parameter set for ultra high-quality calculation
1625  rgkmax=max(rgkmax,10.d0)
1626  gmaxvr=max(gmaxvr,20.d0)
1627  lmaxapw=max(lmaxapw,12)
1628  lmaxo=max(lmaxo,9)
1629  nrmtscf=max(nrmtscf,4.d0)
1630  nxlo=max(nxlo,3)
1631  lorbcnd=.true.
1632  radkpt=max(radkpt,120.d0)
1633  autokpt=.true.
1634  vkloff(:)=0.d0
1635  nempty0=max(nempty0,40.d0)
1636  epspot=min(epspot,1.d-7)
1637  epsengy=min(epsengy,1.d-6)
1638  epsforce=min(epsforce,1.d-4)
1639  epsstress=min(epsstress,2.d-4)
1640  autolinengy=.true.
1641  gmaxrf=max(gmaxrf,6.d0)
1642  end if
1643  if (mp_mpi) then
1644  write(*,*)
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
1661  write(*,'(" autolinengy : ",L1)') autolinengy
1662  write(*,'(" gmaxrf : ",G18.10)') gmaxrf
1663  if (trim(block) == 'lowq') then
1664  write(*,'(" lradstp : ",I0)') lradstp
1665  end if
1666  end if
1667  end if
1668 case('hmaxvr')
1669  read(50,*,err=20) hmaxvr
1670  if (hmaxvr < 0.d0) then
1671  write(*,*)
1672  write(*,'("Error(readinput): hmaxvr < 0 : ",G18.10)') hmaxvr
1673  write(*,*)
1674  stop
1675  end if
1676 case('hkmax')
1677  read(50,*,err=20) hkmax
1678  if (hkmax <= 0.d0) then
1679  write(*,*)
1680  write(*,'("Error(readinput): hkmax <= 0 : ",G18.10)') hkmax
1681  write(*,*)
1682  stop
1683  end if
1684 case('lorbcnd')
1685  read(50,*,err=20) lorbcnd
1686 case('lorbordc')
1687  read(50,*,err=20) lorbordc
1688  if (lorbordc < 2) then
1689  write(*,*)
1690  write(*,'("Error(readinput): lorbordc < 2 : ",I0)') lorbordc
1691  write(*,*)
1692  stop
1693  end if
1694  if (lorbordc > maxlorbord) then
1695  write(*,*)
1696  write(*,'("Error(readinput): lorbordc too large : ",I0)') lorbordc
1697  write(*,'("Adjust maxlorbord in modmain and recompile code")')
1698  write(*,*)
1699  stop
1700  end if
1701 case('nrmtscf')
1702  read(50,'(A)',err=20) str
1703  read(str,*,err=20) nrmtscf
1704  read(str,*,iostat=ios) nrmtscf,dnrmtscf
1705  if (nrmtscf < 0.5d0) then
1706  write(*,*)
1707  write(*,'("Error(readinput): nrmtscf < 0.5 : ",G18.10)') nrmtscf
1708  write(*,*)
1709  stop
1710  end if
1711 case('lmaxdb','lmaxdos')
1712  read(50,*,err=20) lmaxdb
1713  if (lmaxdb < 0) then
1714  write(*,*)
1715  write(*,'("Error(readinput): lmaxdb < 0 : ",I0)') lmaxdb
1716  write(*,*)
1717  stop
1718  end if
1719 case('epsdev')
1720  read(50,*,err=20) epsdev
1721  if (epsdev <= 0.d0) then
1722  write(*,*)
1723  write(*,'("Error(readinput): epsdev <= 0 : ",G18.10)') epsdev
1724  write(*,*)
1725  stop
1726  end if
1727 case('msmooth')
1728  read(50,*,err=20)
1729  write(*,'("Info(readinput): variable ''msmooth'' is no longer used")')
1730 case('npmae')
1731  read(50,*,err=20) npmae0
1732 case('wrtvars')
1733  read(50,*,err=20) wrtvars
1734 case('ftmtype')
1735  read(50,*,err=20) ftmtype
1736 case('tmomfix')
1737  write(*,*)
1738  write(*,'("Error(readinput): variable ''tmomfix'' is no longer used")')
1739  write(*,'(" use tm3fix instead")')
1740  write(*,*)
1741  stop
1742 case('tm3fix')
1743  read(50,*,err=20) ntmfix
1744  if (ntmfix < 1) then
1745  write(*,*)
1746  write(*,'("Error(readinput): ntmfix < 1 : ",I0)') ntmfix
1747  write(*,*)
1748  stop
1749  end if
1750  if (allocated(itmfix)) deallocate(itmfix)
1751  allocate(itmfix(7,ntmfix))
1752  if (allocated(wkprfix)) deallocate(wkprfix)
1753  allocate(wkprfix(ntmfix))
1754  do i=1,ntmfix
1755  read(50,*,err=20) is,ia,l
1756  if ((is < 1).or.(ia < 1).or.(l < 0)) then
1757  write(*,*)
1758  write(*,'("Error(readinput): invalid is, ia or l in tm3fix block :",&
1759  &3(X,I0))') is,ia,l
1760  write(*,*)
1761  stop
1762  end if
1763  itmfix(1,i)=is
1764  itmfix(2,i)=ia
1765  itmfix(3,i)=l
1766 ! read k, p, r, t for the 3-index tensor
1767  read(50,*,err=20) itmfix(4:7,i)
1768 ! read 3-index tensor component with conventional normalisation
1769  read(50,*,err=20) wkprfix(i)
1770  end do
1771 case('tauftm')
1772  read(50,*,err=20) tauftm
1773  if (tauftm < 0.d0) then
1774  write(*,*)
1775  write(*,'("Error(readinput): tauftm < 0 : ",G18.10)') tauftm
1776  write(*,*)
1777  stop
1778  end if
1779 case('ftmstep')
1780  read(50,*,err=20)
1781  write(*,'("Info(readinput): variable ''ftmstep'' is no longer used")')
1782 case('cmagz','forcecmag')
1783  read(50,*,err=20) cmagz
1784 case('rotavec')
1785  read(50,*,err=20) axang(:)
1786 case('tstime')
1787  read(50,*,err=20) tstime
1788  if (tstime <= 0.d0) then
1789  write(*,*)
1790  write(*,'("Error(readinput): tstime <= 0 : ",G18.10)') tstime
1791  write(*,*)
1792  stop
1793  end if
1794 case('dtimes')
1795  read(50,*,err=20) dtimes
1796  if (dtimes <= 0.d0) then
1797  write(*,*)
1798  write(*,'("Error(readinput): dtimes <= 0 : ",G18.10)') dtimes
1799  write(*,*)
1800  stop
1801  end if
1802 case('pulse')
1803  read(50,*,err=20) npulse
1804  if (npulse < 1) then
1805  write(*,*)
1806  write(*,'("Error(readinput): npulse < 1 : ",I0)') npulse
1807  write(*,*)
1808  stop
1809  end if
1810  if (allocated(pulse)) deallocate(pulse)
1811  allocate(pulse(12,npulse))
1812  do i=1,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)
1816  end do
1817 case('ramp')
1818  read(50,*,err=20) nramp
1819  if (nramp < 1) then
1820  write(*,*)
1821  write(*,'("Error(readinput): nramp < 1 : ",I0)') nramp
1822  write(*,*)
1823  stop
1824  end if
1825  if (allocated(ramp)) deallocate(ramp)
1826  allocate(ramp(12,nramp))
1827  do i=1,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)
1831  end do
1832 case('step')
1833  read(50,*,err=20) nstep
1834  if (nstep < 1) then
1835  write(*,*)
1836  write(*,'("Error(readinput): nstep < 1 : ",I0)') nstep
1837  write(*,*)
1838  stop
1839  end if
1840  if (allocated(step)) deallocate(step)
1841  allocate(step(9,nstep))
1842  do i=1,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)
1846  end do
1847 case('ncgga')
1848  read(50,*,err=20)
1849  write(*,'("Info(readinput): variable ''ncgga'' is no longer used")')
1850 case('dncgga')
1851  read(50,*,err=20) dncgga
1852  if (dncgga < 0.d0) then
1853  write(*,*)
1854  write(*,'("Error(readinput): dncgga < 0 : ",G18.10)') dncgga
1855  write(*,*)
1856  stop
1857  end if
1858 case('ntswrite')
1859  read(50,'(A)',err=20) str
1860  str=trim(str)//' 1'
1861  read(str,*,err=20) ntswrite(:)
1862 case('nxoapwlo','nxapwlo')
1863  read(50,*,err=20) nxoapwlo
1864  if (nxoapwlo < 0) then
1865  write(*,*)
1866  write(*,'("Error(readinput): nxoapwlo < 0 : ",I0)') nxoapwlo
1867  write(*,*)
1868  stop
1869  end if
1870 case('nxlo')
1871  read(50,*,err=20) nxlo
1872  if (nxlo < 0) then
1873  write(*,*)
1874  write(*,'("Error(readinput): nxlo < 0 : ",I0)') nxlo
1875  write(*,*)
1876  stop
1877  end if
1878 case('tdrho1d')
1879  read(50,*,err=20) tdrho1d
1880 case('tdrho2d')
1881  read(50,*,err=20) tdrho2d
1882 case('tdrho3d')
1883  read(50,*,err=20) tdrho3d
1884 case('tdmag1d')
1885  read(50,*,err=20) tdmag1d
1886 case('tdmag2d')
1887  read(50,*,err=20) tdmag2d
1888 case('tdmag3d')
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
1896 case('tddos')
1897  read(50,*,err=20) tddos
1898 case('tdlsj')
1899  read(50,*,err=20) tdlsj
1900 case('tdjtk')
1901  read(50,*,err=20) tdjtk
1902 case('tdxrmk')
1903  read(50,*,err=20) tdxrmk
1904 case('epseph')
1905  read(50,*,err=20)
1906  write(*,'("Info(readinput): variable ''epseph'' is no longer used")')
1907 case('rndevt0')
1908  read(50,*,err=20) rndevt0
1909 case('sxcscf','ssxc','rstsf')
1910  read(50,'(A)',err=20) str
1911  read(str,*,err=20) sxcscf
1912  read(str,*,iostat=ios) sxcscf,dsxcscf
1913 case('tempk')
1914  read(50,*,err=20) tempk
1915  if (tempk <= 0.d0) then
1916  write(*,*)
1917  write(*,'("Error(readinput): tempk <= 0 : ",G18.10)') tempk
1918  write(*,*)
1919  stop
1920  end if
1921 ! set Fermi-Dirac smearing
1922  stype=3
1923 ! set the smearing width
1925 case('avecu')
1926  read(50,*,err=20) avecu(:,1)
1927  read(50,*,err=20) avecu(:,2)
1928  read(50,*,err=20) avecu(:,3)
1929 case('scaleu')
1930  read(50,*,err=20) scu
1931 case('scaleu1')
1932  read(50,*,err=20) scu1
1933 case('scaleu2')
1934  read(50,*,err=20) scu2
1935 case('scaleu3')
1936  read(50,*,err=20) scu3
1937 case('q0cut')
1938  read(50,*,err=20) q0cut
1939 case('ngridkpa')
1940  read(50,*,err=20) ngridkpa
1941 case('rndbfcu')
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
1947 case('tplotq0')
1948  read(50,*,err=20) tplotq0
1949 case('trdvclr')
1950  read(50,*,err=20) trdvclr
1951 case('trdbfcr')
1952  read(50,*,err=20) trdbfcr
1953 case('evtype')
1954  read(50,*,err=20)
1955  write(*,'("Info(readinput): variable ''evtype'' is no longer used")')
1956 case('wmaxgw')
1957  read(50,*,err=20) wmaxgw
1958 case('twdiag')
1959  read(50,*,err=20)
1960  write(*,'("Info(readinput): variable ''twdiag'' is no longer used")')
1961 case('tsediag')
1962  read(50,*,err=20) tsediag
1963 case('actype')
1964  read(50,*,err=20) actype
1965 case('npole')
1966  read(50,*,err=20) npole
1967  if (npole < 1) then
1968  write(*,*)
1969  write(*,'("Error(readinput): npole < 1 : ",I0)') npole
1970  write(*,*)
1971  stop
1972  end if
1973 case('nspade')
1974  read(50,*,err=20) nspade
1975  if (nspade < 1) then
1976  write(*,*)
1977  write(*,'("Error(readinput): nspade < 1 : ",I0)') nspade
1978  write(*,*)
1979  stop
1980  end if
1981 case('tfav0')
1982  read(50,*,err=20) tfav0
1983 case('rmtscf')
1984  read(50,*,err=20) rmtscf
1985  if (rmtscf <= 0.d0) then
1986  write(*,*)
1987  write(*,'("Error(readinput): rmtscf <= 0 : ",G18.10)') rmtscf
1988  write(*,*)
1989  stop
1990  end if
1991 case('mrmtav')
1992  read(50,*,err=20) mrmtav
1993 case('rminall')
1994  read(50,*,err=20) rminall
1995 case('rmtall')
1996  read(50,*,err=20) rmtall
1997 case('maxthd','omp_num_threads','OMP_NUM_THREADS')
1998  read(50,*,err=20) maxthd
1999 case('maxthd1')
2000  read(50,*,err=20) maxthd1
2001 case('maxthdmkl')
2002  read(50,*,err=20) maxthdmkl
2003 case('maxlvl','omp_max_active_levels','OMP_MAX_ACTIVE_LEVELS')
2004  read(50,*,err=20) maxlvl
2005  if (maxlvl < 1) then
2006  write(*,*)
2007  write(*,'("Error(readinput): maxlvl < 1 : ",I0)') maxlvl
2008  write(*,*)
2009  stop
2010  end if
2011 case('stable')
2012  read(50,*,err=20) lv
2013  if (lv) then
2014  autolinengy=.true.
2015  mrmtav=1
2016  lmaxapw=max(lmaxapw,10)
2017  gmaxvr=max(gmaxvr,24.d0)
2018  msmgmt=max(msmgmt,1)
2019  rminall=1.d-5
2020  if (mp_mpi) then
2021  write(*,*)
2022  write(*,'("Info(readinput): parameters set by stable option")')
2023  write(*,'(" autolinengy : ",L1)') autolinengy
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
2029  end if
2030  end if
2031 case('metagga')
2032  read(50,*,err=20) lv
2033  if (lv) then
2034  lmaxi=max(lmaxi,2)
2035  gmaxvr=max(gmaxvr,16.d0)
2036  nrmtscf=max(nrmtscf,3.d0)
2037  msmgmt=max(msmgmt,4)
2038  epspot=1.d6
2039  epsengy=min(epsengy,1.d-6)
2040  rminall=1.d-5
2041  if (mp_mpi) then
2042  write(*,*)
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
2051  end if
2052  end if
2053 case('t0tdlr')
2054  read(50,*,err=20)
2055  write(*,'("Info(readinput): variable ''t0tdlr'' is no longer used")')
2056 case('tdphi')
2057  read(50,*,err=20) tdphi
2058 ! convert phase from degrees to radians
2059  tdphi=tdphi*pi/180.d0
2060 case('thetamld')
2061  read(50,*,err=20) thetamld
2062 ! convert MLD angle from degrees to radians
2063  thetamld=thetamld*pi/180.d0
2064 case('ntsbackup')
2065  read(50,*,err=20) ntsbackup
2066 case('seedname')
2067  read(50,*,err=20) seedname
2068  seedname=adjustl(seedname)
2069 case('num_wann')
2070  read(50,*,err=20) num_wann
2071 case('idxw90','wann_bands')
2072  read(50,'(A)',err=20) str
2073  num_bands=1024
2074  if (allocated(idxw90)) deallocate(idxw90)
2075  allocate(idxw90(num_bands))
2076  call numlist(str,num_bands,idxw90)
2077 case('projw90')
2078  read(50,*,err=20) projw90
2079 case('lprojw90')
2080  do
2081  read(50,'(A)',err=20) str
2082  if (trim(str) == '') goto 10
2083  read(str,*,iostat=ios) is
2084  if (ios /= 0) then
2085  write(*,*)
2086  write(*,'("Error(readinput): error reading lprojw90")')
2087  write(*,'("(blank line required after lprojw90 block)")')
2088  write(*,*)
2089  stop
2090  end if
2091  if ((is < 1).or.(is > maxspecies)) then
2092  write(*,*)
2093  write(*,'("Error(readinput): invalid projection species : ",I0)') is
2094  write(*,*)
2095  stop
2096  end if
2097  read(str,*,iostat=ios) is,lprojw90(:,is)
2098  end do
2099 case('num_iter')
2100  read(50,*,err=20) num_iter
2101 case('dis_num_iter')
2102  read(50,*,err=20) dis_num_iter
2103 case('trial_step')
2104  read(50,*,err=20) trial_step
2105 case('xlwin','wannierExtra')
2106  if (allocated(xlwin)) deallocate(xlwin)
2107  allocate(xlwin(0))
2108  nxlwin=0
2109  do
2110  read(50,'(A)',err=20) str
2111  if (trim(str) == '') goto 10
2112  xlwin=[xlwin(1:nxlwin),str]
2113  nxlwin=nxlwin+1
2114  end do
2115 case('wrtunk')
2116  read(50,*,err=20) wrtunk
2117 case('tbdip')
2118  read(50,*,err=20) tbdip
2119 case('tjr','tcden')
2120  read(50,*,err=20) tjr
2121 case('tauefm')
2122  read(50,*,err=20) tauefm
2123 case('epsefm')
2124  read(50,*,err=20) epsefm
2125 case('t0gclq0')
2126  read(50,*,err=20)
2127  write(*,'("Info(readinput): variable ''t0gclq0'' is no longer used")')
2128 case('tafindt')
2129  read(50,*,err=20) tafindt
2130 case('afindscf')
2131  read(50,*,err=20)
2132  write(*,'("Info(readinput): variable ''afindscf'' is no longer used")')
2133 case('afindpm')
2134  read(50,*,err=20) afindpm(:)
2135  if (afindpm(2) == 0.d0) then
2136  write(*,*)
2137  write(*,'("Error(readinput): afindpm(2) = 0")')
2138  write(*,*)
2139  stop
2140  end if
2141 case('nkspolar')
2142  read(50,*,err=20) nkspolar
2143  if (nkspolar < 1) then
2144  write(*,*)
2145  write(*,'("Error(readinput): nkspolar < 1 : ",I0)') nkspolar
2146  write(*,*)
2147  stop
2148  end if
2149 case('ntsforce')
2150  read(50,*,err=20) ntsforce
2151  if (ntsforce < 1) then
2152  write(*,*)
2153  write(*,'("Error(readinput): ntsforce < 1 : ",I0)') ntsforce
2154  write(*,*)
2155  stop
2156  end if
2157 case('wphcut')
2158  read(50,*,err=20) wphcut
2159  if (wphcut <= 0.d0) then
2160  write(*,*)
2161  write(*,'("Error(readinput): wphcut <= 0 : ",G18.10)') wphcut
2162  write(*,*)
2163  stop
2164  end if
2165 case('ephscf')
2166  read(50,*,err=20) ephscf(:)
2167 case('anomalous')
2168  read(50,*,err=20) anomalous
2169 case('tephde')
2170  read(50,*,err=20) tephde
2171 case('bdiag')
2172  read(50,*,err=20) bdiag
2173 case('ecutb')
2174  read(50,*,err=20) ecutb
2175  if (ecutb <= 0.d0) then
2176  write(*,*)
2177  write(*,'("Error(readinput): ecutb <= 0 : ",G18.10)') ecutb
2178  write(*,*)
2179  stop
2180  end if
2181 case('ediag')
2182  read(50,*,err=20) ediag
2183 case('pwxpsn')
2184  read(50,*,err=20) pwxpsn
2185  if (pwxpsn < 1) then
2186  write(*,*)
2187  write(*,'("Error(readinput): pwxpsn < 1 : ",I0)') pwxpsn
2188  write(*,*)
2189  stop
2190  end if
2191 case('ramdisk')
2192  read(50,*,err=20) ramdisk
2193 case('wrtdisk','wrtdsk')
2194  read(50,*,err=20) wrtdisk
2195 case('epsdmat')
2196  read(50,*,err=20) epsdmat
2197 case('tm3type')
2198  read(50,*,err=20) tm3type
2199  if ((tm3type < 0).or.(tm3type > 2)) then
2200  write(*,*)
2201  write(*,'("Error(readinput): invalid tm3type : ",I0)') tm3type
2202  write(*,*)
2203  stop
2204  end if
2205 case('tm3vdl','tm3old')
2206  read(50,*,err=20) lv
2207  if (lv) tm3type=1
2208 case('batch')
2209  read(50,*,err=20) batch
2210 case('tafspt')
2211  read(50,*,err=20) tafspt
2212 case('tbaspat')
2213  read(50,*,err=20) tbaspat
2214 case('trdatdv')
2215  read(50,*,err=20) trdatdv
2216 case('atdfc')
2217  read(50,*,err=20) atdfc
2218  if (atdfc < 0.d0) then
2219  write(*,*)
2220  write(*,'("Error(readinput): atdfc < 0 : ",G18.10)') atdfc
2221  write(*,*)
2222  stop
2223  end if
2224 case('maxforce')
2225  read(50,*,err=20) maxforce
2226 case('msmgmt','msmg2mt')
2227  read(50,*,err=20) msmgmt
2228 case('ntsorth')
2229  read(50,*,err=20) ntsorth
2230 case('deltabf')
2231  read(50,*,err=20) deltabf
2232  if (deltabf <= 0.d0) then
2233  write(*,*)
2234  write(*,'("Error(readinput): deltabf <= 0 : ",G18.10)') deltabf
2235  write(*,*)
2236  stop
2237  end if
2238 case('jtconst0')
2239  read(50,*,err=20) jtconst0
2240 case('trmt0')
2241  read(50,*,err=20) trmt0
2242 case('ksgwrho')
2243  read(50,*,err=20) ksgwrho
2244 case('npfftg')
2245  read(50,*,err=20) npfftg
2246 case('npfftgc')
2247  read(50,*,err=20) npfftgc
2248 case('npfftq')
2249  read(50,*,err=20) npfftq
2250 case('npfftw')
2251  read(50,*,err=20) npfftw
2252 case('tphnat')
2253  read(50,*,err=20) tphnat
2254 case('ecutthc')
2255  read(50,*,err=20) ecutthc
2256  if (ecutthc <= 0.d0) then
2257  write(*,*)
2258  write(*,'("Error(readinput): ecutthc <= 0 : ",G18.10)') ecutthc
2259  write(*,*)
2260  stop
2261  end if
2262 case('tbdipu')
2263  read(50,*,err=20) tbdipu
2264 case('bdipscf')
2265  read(50,'(A)',err=20) str
2266  read(str,*,err=20) bdipscf
2267  read(str,*,iostat=ios) bdipscf,dbdipscf
2268 case('tidle')
2269  read(50,*,err=20) tidle
2270  if (tidle < 1) then
2271  write(*,*)
2272  write(*,'("Error(readinput): tidle < 1 : ",I0)') tidle
2273  write(*,*)
2274  stop
2275  end if
2276 case('')
2277  goto 10
2278 case default
2279  write(*,*)
2280  write(*,'("Error(readinput): invalid block name : ",A)') trim(block)
2281  write(*,*)
2282  stop
2283 end select
2284 goto 10
2285 20 continue
2286 write(*,*)
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")')
2290 write(*,*)
2291 stop
2292 30 continue
2293 close(50)
2294 ! scale the speed of light
2295 solsc=sol*solscf
2296 ! scale and rotate the lattice vectors (not referenced again in code)
2297 avec(:,:)=sc*avec(:,:)
2298 avec(:,1)=sc1*avec(:,1)
2299 avec(:,2)=sc2*avec(:,2)
2300 avec(:,3)=sc3*avec(:,3)
2301 avec(1,:)=scx*avec(1,:)
2302 avec(2,:)=scy*avec(2,:)
2303 avec(3,:)=scz*avec(3,:)
2304 t1=axang(4)
2305 if (t1 /= 0.d0) then
2306  t1=t1*pi/180.d0
2307  call axangrot(axang(:),t1,rot)
2308  do i=1,3
2309  v(:)=avec(:,i)
2310  call r3mv(rot,v,avec(:,i))
2311  end do
2312 end if
2313 ! randomise lattice vectors if required
2314 if (rndavec > 0.d0) then
2315  do i=1,3
2316  do j=1,3
2317  t1=rndavec*(randomu()-0.5d0)
2318  avec(i,j)=avec(i,j)+t1
2319  end do
2320  end do
2321 end if
2322 ! check if reference lattice vectors should be used
2323 tavref=(any(abs(avecref(:,:)) > epslat))
2324 ! case of isolated molecule
2325 if (molecule) then
2326 ! convert atomic positions from Cartesian to lattice coordinates
2327  call r3minv(avec,ainv)
2328  do is=1,nspecies
2329  do ia=1,natoms(is)
2330  call r3mv(ainv,atposl(:,ia,is),v)
2331  atposl(:,ia,is)=v(:)
2332  end do
2333  end do
2334 end if
2335 ! randomise atomic positions if required
2336 if (rndatposc > 0.d0) then
2337  call r3minv(avec,ainv)
2338  do is=1,nspecies
2339  do ia=1,natoms(is)
2340  call r3mv(avec,atposl(:,ia,is),v)
2341  do i=1,3
2342  t1=rndatposc*(randomu()-0.5d0)
2343  v(i)=v(i)+t1
2344  end do
2345  call r3mv(ainv,v,atposl(:,ia,is))
2346  end do
2347  end do
2348 end if
2349 ! randomise the muffin-tin magnetic fields if required
2350 if (rndbfcmt > 0.d0) then
2351  do is=1,nspecies
2352  do ia=1,natoms(is)
2353  do i=1,3
2354  t1=rndbfcmt*(randomu()-0.5d0)
2355  bfcmt0(i,ia,is)=bfcmt0(i,ia,is)+t1
2356  end do
2357  end do
2358  end do
2359 end if
2360 ! set fxctype to fxctype if required
2361 if (fxctype(1) == -1) fxctype(:)=xctype(:)
2362 ! find primitive cell if required
2363 if (primcell) call findprimcell
2364 ! scale the ultracell vectors if required
2365 avecu(:,1)=scu1*avecu(:,1)
2366 avecu(:,2)=scu2*avecu(:,2)
2367 avecu(:,3)=scu3*avecu(:,3)
2368 avecu(:,:)=scu*avecu(:,:)
2369 ! read in atomic species data
2370 call readspecies
2371 return
2372 
2373 end subroutine
2374 !EOC
2375 
real(8) socscf
Definition: modmain.f90:234
integer ngrkf
Definition: modmain.f90:1077
real(8) ecvcut
Definition: modmain.f90:117
integer maxlatvstp
Definition: modmain.f90:1041
real(8), dimension(3, 3) dafspc
Definition: modmain.f90:333
real(8) epsband
Definition: modmain.f90:823
subroutine genfspecies(zn, symb)
Definition: genfspecies.f90:7
character(256) scrpath
Definition: modmain.f90:1303
real(8) dchgexs
Definition: modmain.f90:727
real(8) rminall
Definition: modmain.f90:158
real(8), dimension(3, maxatoms, maxspecies) bfcmt0
Definition: modmain.f90:277
integer, parameter maxspecies
Definition: modmain.f90:30
integer ncxbse
Definition: modmain.f90:1185
real(8) scissor
Definition: modmain.f90:907
real(8), dimension(3, 3) afspc
Definition: modmain.f90:333
subroutine findprimcell
real(8) dmaxefc
Definition: modmain.f90:320
real(8) epsforce
Definition: modmain.f90:1067
logical tjr
Definition: modmain.f90:623
integer, dimension(maxxbse) jstxbse
Definition: modmain.f90:1187
integer lorbordc
Definition: modmain.f90:840
integer maxthd1
Definition: modomp.f90:13
integer mixtype
Definition: modmain.f90:698
integer, dimension(3) ktype
Definition: modmain.f90:609
real(8), dimension(3, 3) davec
Definition: modmain.f90:12
real(8), dimension(3, maxatoms, maxspecies) datposl
Definition: modmain.f90:52
integer maxthd
Definition: modomp.f90:11
integer, dimension(3) xctype
Definition: modmain.f90:591
logical spinpol
Definition: modmain.f90:230
integer, parameter maxlapw
Definition: modmain.f90:197
integer npfftg
Definition: modmain.f90:407
integer mbwgrf
Definition: modmain.f90:1166
integer, dimension(3) xctsp
Definition: modmain.f90:142
logical tshift
Definition: modmain.f90:355
character(256) sppath
Definition: modmain.f90:72
real(8) rmtall
Definition: modmain.f90:160
real(8) taufsm
Definition: modmain.f90:267
real(8) reducebf
Definition: modmain.f90:281
logical autokpt
Definition: modmain.f90:447
integer msmgmt
Definition: modmain.f90:224
logical tfav0
Definition: modmain.f90:1005
real(8) dnrmtscf
Definition: modmain.f90:148
real(8) sxcscf
Definition: modmain.f90:671
real(8), dimension(3, 3) ainv
Definition: modmain.f90:14
real(8), dimension(2) amixpm
Definition: modmain.f90:705
logical lorbcnd
Definition: modmain.f90:838
real(8) rmtscf
Definition: modmain.f90:154
subroutine r3minv(a, b)
Definition: r3minv.f90:10
logical spinsprl
Definition: modmain.f90:285
Definition: modomp.f90:6
real(8), parameter kboltz
Definition: modmain.f90:1263
real(8) swidth
Definition: modmain.f90:891
logical hybrid0
Definition: modmain.f90:1152
real(8) epsocc
Definition: modmain.f90:899
real(8) dncgga
Definition: modmain.f90:607
character(256), dimension(maxspecies) spfname
Definition: modmain.f90:74
real(8) dnempty0
Definition: modmain.f90:879
real(8), dimension(3, 0:3) vclp3d
Definition: modmain.f90:1132
integer, dimension(maxxbse) istxbse
Definition: modmain.f90:1187
integer nvxbse
Definition: modmain.f90:1185
integer notelns
Definition: modmain.f90:1305
integer, parameter maxxbse
Definition: modmain.f90:1183
subroutine numlist(str, n, list)
Definition: numlist.f90:10
logical mixrho
Definition: modmain.f90:690
logical nosource
Definition: modmain.f90:667
real(8), dimension(3) vkloff
Definition: modmain.f90:453
integer maxthdmkl
Definition: modomp.f90:15
integer lmaxo
Definition: modmain.f90:203
real(8), dimension(3) vqlss
Definition: modmain.f90:295
logical trhonorm
Definition: modmain.f90:621
integer, parameter maxkst
Definition: modmain.f90:919
real(8) c_tb09
Definition: modmain.f90:681
real(8), parameter pi
Definition: modmain.f90:1232
real(8), dimension(3) vecql
Definition: modmain.f90:1106
real(8) nempty0
Definition: modmain.f90:879
integer nkstlist
Definition: modmain.f90:921
logical dosmsum
Definition: modmain.f90:1089
integer nxlo
Definition: modmain.f90:844
logical tc_tb09
Definition: modmain.f90:683
integer dlmaxo
Definition: modmain.f90:203
integer ntasks
Definition: modmain.f90:1293
integer lmaxapw
Definition: modmain.f90:199
real(8) nrmtscf
Definition: modmain.f90:148
integer symtype
Definition: modmain.f90:343
real(8) epschg
Definition: modmain.f90:715
real(8), dimension(2) broydpm
Definition: modmain.f90:709
logical tefvr
Definition: modmain.f90:871
real(8), dimension(3) momfix
Definition: modmain.f90:255
integer mixsdb
Definition: modmain.f90:707
logical bforb
Definition: modmain.f90:236
logical tforce
Definition: modmain.f90:991
real(8) rmtdelta
Definition: modmain.f90:162
real(8), dimension(3, 3) avecref
Definition: modmain.f90:1032
Definition: modrdm.f90:6
integer ncbse0
Definition: modmain.f90:1181
integer maxlvl
Definition: modomp.f90:17
real(8), dimension(2) wplot
Definition: modmain.f90:1081
real(8), dimension(3, maxatoms, maxspecies) atposl
Definition: modmain.f90:51
real(8) emaxrf
Definition: modmain.f90:1162
real(8) gmaxrf
Definition: modmain.f90:1160
real(8) delorb
Definition: modmain.f90:805
logical lmirep
Definition: modmain.f90:1100
real(8) esccut
Definition: modmain.f90:119
Definition: modw90.f90:6
real(8), dimension(3) sqaxis
Definition: modmain.f90:1103
logical intraband
Definition: modmain.f90:1097
real(8) rndatposc
Definition: modmain.f90:56
real(8) radkpt
Definition: modmain.f90:449
integer, parameter maxlorbord
Definition: modmain.f90:785
integer nvbse0
Definition: modmain.f90:1181
Definition: modbog.f90:6
real(8) deltaem
Definition: modmain.f90:484
integer lmaxdb
Definition: modmain.f90:1083
real(8), dimension(3) dbfieldc0
Definition: modmain.f90:273
pure subroutine axangrot(v, th, rot)
Definition: axangrot.f90:10
real(8), dimension(3, 3) avec
Definition: modmain.f90:12
real(8) rndbfcmt
Definition: modmain.f90:279
real(8), dimension(2) wsfac
Definition: modmain.f90:1110
real(8) tempk
Definition: modmain.f90:687
integer, dimension(3, 27) optcomp
Definition: modmain.f90:1095
integer, dimension(2, maxkst) kstlist
Definition: modmain.f90:923
real(8) rgkmax
Definition: modmain.f90:496
integer, dimension(3) ngridk
Definition: modmain.f90:451
real(8) maxforce
Definition: modmain.f90:1002
logical cmagz
Definition: modmain.f90:244
integer lradstp
Definition: modmain.f90:173
integer, parameter maxatoms
Definition: modmain.f90:32
real(8), dimension(3) dafieldc
Definition: modmain.f90:327
integer, parameter maxtasks
Definition: modmain.f90:1291
real(8), parameter sol
Definition: modmain.f90:1251
logical tpdos
Definition: modmain.f90:1087
real(8), dimension(3) dvqlss
Definition: modmain.f90:295
real(8), dimension(3) afieldc
Definition: modmain.f90:327
integer mefvs
Definition: modmain.f90:873
integer latvopt
Definition: modmain.f90:1039
real(8), dimension(3, 0:2) vclp2d
Definition: modmain.f90:1128
logical frzncore
Definition: modmain.f90:939
real(8), dimension(3, maxatoms, maxspecies) mommtfix
Definition: modmain.f90:261
logical mixsave
Definition: modmain.f90:703
logical tavref
Definition: modmain.f90:1034
integer npfftq
Definition: modmain.f90:538
real(8) solsc
Definition: modmain.f90:1253
real(8) tau0atp
Definition: modmain.f90:1013
integer, dimension(3) ngridq
Definition: modmain.f90:518
real(8) momfixm
Definition: modmain.f90:257
real(8) drgkmax
Definition: modmain.f90:496
Definition: modgw.f90:6
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer nwrite
Definition: modmain.f90:1061
logical ssdph
Definition: modmain.f90:287
integer noptcomp
Definition: modmain.f90:1093
real(8) epslat
Definition: modmain.f90:24
integer maxitoep
Definition: modmain.f90:1142
real(8), dimension(maxatoms, maxspecies) mommtfixm
Definition: modmain.f90:263
integer ndspem
Definition: modmain.f90:486
integer stype
Definition: modmain.f90:887
logical hxbse
Definition: modmain.f90:1209
real(8) dswidth
Definition: modmain.f90:891
Definition: modmpi.f90:6
subroutine readspecies
Definition: readspecies.f90:7
integer ip0gw
Definition: modgw.f90:40
logical dosssum
Definition: modmain.f90:1091
real(8) mstar
Definition: modmain.f90:895
real(8) epspot
Definition: modmain.f90:1063
real(8) dsxcscf
Definition: modmain.f90:671
logical ptnucl
Definition: modmain.f90:83
Definition: modpw.f90:6
real(8), dimension(:,:), allocatable vvlp1d
Definition: modmain.f90:1120
real(8) dlefe
Definition: modmain.f90:833
logical autolinengy
Definition: modmain.f90:831
integer nswplot
Definition: modmain.f90:1079
logical tbdip
Definition: modmain.f90:646
real(8) deapw
Definition: modmain.f90:767
logical spinorb
Definition: modmain.f90:232
integer maxatpstp
Definition: modmain.f90:1011
real(8), dimension(3) bfieldc0
Definition: modmain.f90:273
real(8) tau0oep
Definition: modmain.f90:1144
integer, dimension(3) dngridk
Definition: modmain.f90:451
subroutine readinput
Definition: readinput.f90:10
integer nspecies
Definition: modmain.f90:34
integer, dimension(2) np2d
Definition: modmain.f90:1130
logical bsefull
Definition: modmain.f90:1206
real(8), dimension(3) dmomfix
Definition: modmain.f90:255
logical autodlefe
Definition: modmain.f90:836
integer, dimension(3) np3d
Definition: modmain.f90:1134
integer reducek
Definition: modmain.f90:458
real(8) emaxelnes
Definition: modmain.f90:1108
real(8) tau0latv
Definition: modmain.f90:1043
real(8) bdipscf
Definition: modmain.f90:648
logical autoswidth
Definition: modmain.f90:893
integer nkspolar
Definition: modmain.f90:488
integer reduceq
Definition: modmain.f90:522
character(256), dimension(:), allocatable notes
Definition: modmain.f90:1307
pure subroutine r3mv(a, x, y)
Definition: r3mv.f90:10
Definition: modulr.f90:6
integer nwplot
Definition: modmain.f90:1075
real(8) deltabf
Definition: modmain.f90:283
integer mrmtav
Definition: modmain.f90:156
real(8) epsstress
Definition: modmain.f90:1069
real(8) chgexs
Definition: modmain.f90:727
real(8) demaxbnd
Definition: modmain.f90:826
integer tidle
Definition: modmain.f90:1309
integer nvp1d
Definition: modmain.f90:1116
real(8), dimension(3, maxatoms, maxspecies) atposc
Definition: modmain.f90:54
subroutine genspecies(fnum)
Definition: genspecies.f90:7
logical hdbse
Definition: modmain.f90:1209
integer, dimension(maxtasks) tasks
Definition: modmain.f90:1297
integer npp1d
Definition: modmain.f90:1118
logical molecule
Definition: modmain.f90:47
real(8) epsengy
Definition: modmain.f90:1065
real(8), dimension(3) efieldc
Definition: modmain.f90:314
integer dlmaxapw
Definition: modmain.f90:199
integer npfftgc
Definition: modmain.f90:411
real(8) dbdipscf
Definition: modmain.f90:648
integer nxoapwlo
Definition: modmain.f90:842
real(8), dimension(3) vklem
Definition: modmain.f90:482
real(8) hybridc
Definition: modmain.f90:1154
logical dosocc
Definition: modmain.f90:1085
logical trmt0
Definition: modmain.f90:167
integer maxscl
Definition: modmain.f90:1051
real(8) dgmaxvr
Definition: modmain.f90:387
logical spincore
Definition: modmain.f90:937
integer npmae0
Definition: modmain.f90:304
integer isgkmax
Definition: modmain.f90:494
real(8) atdfc
Definition: modmain.f90:66
logical primcell
Definition: modmain.f90:49
integer atpopt
Definition: modmain.f90:1009
real(8) fracinr
Definition: modmain.f90:211
real(8) deltast
Definition: modmain.f90:1024
integer fsmtype
Definition: modmain.f90:253
logical trdatdv
Definition: modmain.f90:62
real(8) gmaxvr
Definition: modmain.f90:387
integer lmaxi
Definition: modmain.f90:207
logical bfdmag
Definition: modmain.f90:238