IffGit has a new shared runner for building Docker images in GitLab CI. Visit https://iffgit.fz-juelich.de/examples/ci-docker-in-docker for more details.

types.F90 24.1 KB
Newer Older
1
2
3
4
5
6
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------

7
8
9
10
       MODULE m_types
!*************************************************************
!     This module contains definitions for all kind of types
!*************************************************************
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
!
! Types for orbital moment calculation:
!
!
! Types for spin-off-diagonal charge density:
!
      TYPE t_mt21                          ! 'normal' contributions
        SEQUENCE
        REAL ::  uun,udn,dun,ddn           ! normes of radial overlaps
        COMPLEX :: uu,ud,du,dd             ! values
      END TYPE t_mt21

      TYPE t_lo21                          ! ocal orbitals & (u,d)
        SEQUENCE
        REAL ::  uulon,dulon,uloun,ulodn   ! normes of radial overlaps
        COMPLEX :: uulo,dulo,ulou,ulod     ! values
      END TYPE t_lo21

      TYPE t_orb                           ! 'normal' contributions
        SEQUENCE
        REAL :: uu,dd                      ! z   component
        COMPLEX :: uup,uum,ddp,ddm         ! +/- component
      END TYPE t_orb

      TYPE t_orbl                          ! local orbitals & (u,d)
        SEQUENCE
        REAL :: uulo,dulo
        COMPLEX :: uulop,uulom,dulop,dulom
      END TYPE t_orbl

      TYPE t_orblo                         ! lo,lo' contributions
        SEQUENCE
        REAL :: z
        COMPLEX :: p,m
      END TYPE t_orblo
   TYPE t_lapw
      INTEGER :: nv(2)
      INTEGER :: nv_tot
      INTEGER :: nmat
      INTEGER,ALLOCATABLE:: k1(:,:)
      INTEGER,ALLOCATABLE:: k2(:,:)
      INTEGER,ALLOCATABLE:: k3(:,:)
53
      INTEGER,ALLOCATABLE:: kp(:,:)
54
      REAL,ALLOCATABLE::rk(:,:)
55
   end type
56
57
58

   TYPE t_tlmplm
      COMPLEX,ALLOCATABLE :: tdd(:,:,:)
59
      COMPLEX,ALLOCATABLE :: tdu(:,:,:)
60
61
                                !(0:lmplmd,ntypd,tspin)
      COMPLEX,ALLOCATABLE :: tud(:,:,:)
62
      COMPLEX,ALLOCATABLE :: tuu(:,:,:)
63
                                !(0:lmplmd,ntypd,tspin)
64
      INTEGER,ALLOCATABLE :: ind(:,:,:,:)
65
                                !(0:lmd,0:lmd,ntypd,tspin)
66
      COMPLEX,ALLOCATABLE :: tdulo(:,:,:,:)
67
                                !(0:lmd,-llod:llod,mlotot,tspin)
68
      COMPLEX,ALLOCATABLE :: tuulo(:,:,:,:)
69
                                !(0:lmd,-llod:llod,mlotot,tspin)
70
      COMPLEX,ALLOCATABLE :: tuloulo(:,:,:,:)
71
                                !(-llod:llod,-llod:llod,mlolotot,tspin)
72
   END TYPE
73
74

   TYPE t_usdus
75
76
77
78
79
80
81
82
83
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: us
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: dus
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: uds
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: duds !(0:lmaxd,ntype,jspd)
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: ddn  !(0:lmaxd,ntype,jspd)
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: ulos
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: dulos
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: uulon
      REAL,ALLOCATABLE,DIMENSION(:,:,:)   :: dulon !(nlod,ntype,jspd)
84
      REAL,ALLOCATABLE,DIMENSION(:,:,:,:) :: uloulopn!  (nlod,nlod,ntypd,jspd)
85
   END TYPE
86
87
88
89
90
91
92
93
94
95
96



! types for 1D calculations
        TYPE od_dim
          LOGICAL :: d1
          INTEGER :: mb,M,k3,m_cyl
          INTEGER :: chi,rot
          LOGICAL :: invs,zrfs
          INTEGER :: n2d,nq2,nn2d
          INTEGER :: kimax2
97
          INTEGER :: nop,nat
98
99
100
101
102
103
        END TYPE od_dim

        TYPE od_inp
          LOGICAL :: d1
          INTEGER :: mb,M,k3,m_cyl
          INTEGER :: chi,rot
104
          LOGICAL :: invs,zrfs
105
106
107
          INTEGER :: n2d,nq2,nn2d
          INTEGER :: kimax2
          INTEGER, POINTER :: ig(:,:)  !(-k3:k3,-M:M)
108
          INTEGER, POINTER :: kv(:,:)        !(2,n2d)
109
110
111
112
113
114
115
116
117
118
          INTEGER, POINTER :: nst2(:)        !(n2d)
        END TYPE od_inp

        TYPE od_sym
          INTEGER :: nop,nat
          INTEGER, POINTER :: ngopr(:)     !(nat)
          REAL   , POINTER :: mrot(:,:,:)  !(3,3,nop)
          REAL   , POINTER :: tau(:,:)     !(3,nop)
          INTEGER, POINTER :: invtab(:)    !(nop)
          INTEGER, POINTER :: multab(:,:)  !(nop,nop)
119
        END TYPE od_sym
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

        TYPE od_lda
          INTEGER :: nn2d
          INTEGER, POINTER :: igf(:,:)  !(0:nn2d-1,2)
          REAL   , POINTER :: pgf(:)    !(0:nn2d-1)
        END TYPE od_lda

        TYPE od_gga
          INTEGER          :: nn2d
          REAL, POINTER    :: pgfx(:)  ! (0:nn2d-1)
          REAL, POINTER    :: pgfy(:)
          REAL, POINTER    :: pgfxx(:)
          REAL, POINTER    :: pgfyy(:)
          REAL, POINTER    :: pgfxy(:)
        END TYPE od_gga

136

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
!
! Type for LDA+U:
!
      TYPE t_utype
        SEQUENCE
        REAL u,j
        INTEGER l
        LOGICAL :: l_amf
      END TYPE t_utype

!
! Type for the HF total energy
!
      TYPE t_energy_hf
        REAL :: valence
        REAL :: core
      END TYPE t_energy_hf

!
! Type for the electric field
!
      TYPE t_efield
        REAL    :: zsigma  = 10.0  ! Distance to the charged plates
        REAL    :: sigma   =  0.0  ! charge at the plates
        REAL    :: sig_b(2)=  0.0  ! Extra charge for the top/bottom plate
        COMPLEX :: vslope  =  0.0  ! Dirichlet bnd. cond.: Slope
        REAL,    ALLOCATABLE :: sigEF(:,:,:) ! (nx, ny, nvac)
        COMPLEX, ALLOCATABLE :: rhoEF(:,:)   ! (g_||, nvac)
        COMPLEX, ALLOCATABLE :: C1(:), C2(:) ! Coeff. for Dirichlet bnd.cond.
        LOGICAL :: l_segmented = .false.
        LOGICAL :: plot_charge = .false. ! Plot charge as inputted
        LOGICAL :: plot_rho    = .false. ! Plot Fourier-transformed charge
        LOGICAL :: autocomp    = .true.  ! Auto-compensate film charge
        LOGICAL :: dirichlet = .false. ! Dirichlet vs. Neumann boundary cond.
        LOGICAL :: l_dirichlet_coeff = .false. ! For MPI, true if C1/C2 set
      END TYPE t_efield

174
175
176

      TYPE t_atoms
       !<no of types
177
       INTEGER :: ntype
178
179
180
       !<total-no of atoms
       INTEGER :: nat
       !<dimensions of LO's
181
182
183
184
       INTEGER ::nlod
       INTEGER ::llod
       INTEGER ::nlotot
       !lmaxd=maxval(lmax)
185
       INTEGER:: lmaxd
186
       ! no of lda+us
187
       INTEGER ::n_u
188
       ! dimensions
189
190
191
192
193
194
195
196
197
       INTEGER :: jmtd
       !No of element
       INTEGER,ALLOCATABLE ::nz(:)
       !atoms per type
       INTEGER,ALLOCATABLE::neq(:)
       !radial grid points
       INTEGER,ALLOCATABLE::jri(:)
       !core states
       INTEGER,ALLOCATABLE::ncst(:)
198
199
       !How many states are explicitely provided?
       INTEGER,ALLOCATABLE::numStatesProvided(:)
200
201
202
203
204
205
       !core state occupations
       REAL,ALLOCATABLE::coreStateOccs(:,:,:)
       !core state nprnc
       INTEGER,ALLOCATABLE::coreStateNprnc(:,:)
       !core state kappa
       INTEGER,ALLOCATABLE::coreStateKappa(:,:)
206
207
208
209
210
211
212
213
214
215
216
217
       !lmax
       INTEGER,ALLOCATABLE::lmax(:)
       !lmax non-spherical
       INTEGER,ALLOCATABLE::lnonsph(:)
       !expansion of pseudo-charge
       INTEGER,ALLOCATABLE::ncv(:)
       !no of LO
       INTEGER,ALLOCATABLE::nlo(:)
       !l of LO (nlo,ntype)
       INTEGER,ALLOCATABLE::llo(:,:)
       !lmax for lapw (ntype)
       INTEGER,ALLOCATABLE::lapw_l(:)
218
       !first LO with a given l (max(nlo
219
220
221
       INTEGER,ALLOCATABLE::lo1l(:,:)
       !??
       INTEGER,ALLOCATABLE::ulo_der(:,:)
222
       !no of LOs per l (max(nlo1),ntype
223
       INTEGER,ALLOCATABLE::nlol(:,:)
224
       !true if LO is formed by \dot u (
225
226
227
228
229
       LOGICAL,ALLOCATABLE::l_dulo(:,:)
       !no of op that maps atom into
       INTEGER,ALLOCATABLE::ngopr(:)
       !symetry of atom (nat)
       INTEGER,ALLOCATABLE::ntypsy(:)
230
       !no of sphhar for atom type(ntype
231
       INTEGER,ALLOCATABLE ::nlhtyp(:)
232
       !atom mapped to by inversion (nat
233
       INTEGER,ALLOCATABLE ::invsat(:)
234
235
       !Claculate forces for this atom?
       LOGICAL,ALLOCATABLE :: l_geo(:)
236
237
238
239
240
241
       !MT-Radius (ntype)
       REAL,ALLOCATABLE::rmt(:)
       !log increment(ntype)
       REAL,ALLOCATABLE::dx(:)
       !vol of MT(ntype)
       REAL,ALLOCATABLE::volmts(:)
242
       !radial grid points(max(jri),ntyp
243
244
245
246
247
248
249
250
251
252
253
       REAL,ALLOCATABLE::rmsh(:,:)
       !charge of nucleus(ntype)
       REAL,ALLOCATABLE::zatom(:)
       !initial mag moment(ntype)
       REAL,ALLOCATABLE::bmu(:)
       !pos of atom (absol) (3,nat)
       REAL,ALLOCATABLE::pos(:,:)
       !pos of atom (relat)(3,nat)
       REAL,ALLOCATABLE::taual(:,:)
       !lda_u information(ntype)
       TYPE(t_utype),ALLOCATABLE::lda_u(:)
254
       INTEGER,ALLOCATABLE :: relax(:,:) !<(3,ntype)
255
       INTEGER, ALLOCATABLE :: nflip(:) !<flip magnetisation of this atom
256
       REAL,ALLOCATABLE:: vr0(:) !< Average Coulomb potential for atoms
257
      END TYPE
258

259
260
      TYPE t_kpts
       !no
261
       INTEGER :: nkpt
262
       INTEGER :: ntet
263
       REAL    :: posScale
264
       LOGICAL :: l_gamma
265
       INTEGER :: nmop(3) !<number of k-points in 3 directions
266
267
268
269
       !(3,nkpts) k-vectors internal units
       REAL,ALLOCATABLE ::bk(:,:)
       !(nkpts) weights
       REAL,ALLOCATABLE ::wtkpt(:)
270
271
272
273
274
       INTEGER, ALLOCATABLE :: pntgptd(:)
       INTEGER, ALLOCATABLE :: pntgpt(:,:,:,:,:)
       INTEGER               ::  nkptf !<k-vectors in full BZ
       INTEGER               ::  nkpt3(3)
       REAL   ,ALLOCATABLE   ::  bkf(:,:)
275
       INTEGER,ALLOCATABLE   ::  bkp(:)
276
       INTEGER,ALLOCATABLE   ::  bksym(:)
277
278
279
       INTEGER                       :: numSpecialPoints
       CHARACTER(LEN=50),ALLOCATABLE :: specialPointNames(:)
       REAL   ,ALLOCATABLE           :: specialPoints(:,:)
280
281
       INTEGER,ALLOCATABLE           :: ntetra(:,:)
       REAL   ,ALLOCATABLE           :: voltet(:)
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
      ENDTYPE


      TYPE t_cell
       !name of 2D-lattice type
       CHARACTER*3::latnam
       !vol of dtilde box
       REAL::omtil
       !2D area
       REAL::area
       !bravais matrix
       REAL::amat(3,3)
       !rez. bravais matrx
       REAL::bmat(3,3)
       !square of bbmat
       REAL::bbmat(3,3)
       !d-value
       REAL::z1
       !volume of cell
       REAL::vol
       !volume of interstitial
       REAL::volint
304
       REAL:: c
305
306
307
308
      END TYPE

      !The stars
      TYPE t_stars
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
        !dimensions should be deleted later
        integer :: n3d
        integer :: n2d
        integer :: k1d
        integer :: k2d
        integer :: k3d
        integer :: kq1d
        integer :: kq2d
        integer :: kq3d
        integer :: kxc1d
        integer :: kxc2d
        integer :: kxc3d

        INTEGER :: nk1
        INTEGER :: nk2
        INTEGER :: nk3

326
327
        !max-length of star
        REAL :: gmax
328
        REAL :: gmaxInit
329
        !no of 3d-stars
330
        !INTEGER :: nq3
331
332
        INTEGER :: ng3
        !no of 2d-stars
333
        !INTEGER ::nq2
334
335
336
337
338
339
        INTEGER :: ng2
        !No of elements in FFT
        INTEGER ::kimax
        !No of elements in 2D-FFT
        INTEGER ::kimax2
        !dim of box
340
341
        INTEGER ::mx1
        INTEGER ::mx2
342
        INTEGER ::mx3
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
        !fft boxex
        integer :: kxc1_fft
        integer :: kxc2_fft
        integer :: kxc3_fft
        integer :: kq1_fft
        integer :: kq2_fft
        integer :: kq3_fft
        INTEGER :: ng2_fft
        !INTEGER :: nq2_fft
        INTEGER :: ng3_fft
        !INTEGER :: nq3_fft
        INTEGER :: kmxq_fft
        INTEGER :: kmxq2_fft
        INTEGER :: ncv3_fft
        INTEGER :: kmxxc_fft !<number of g-vectors forming the nxc3_fft stars in the charge density or xc-density sphere

        INTEGER :: nxc3_fft !< number of stars in the  charge density  fft-box


362
        !No of elements in z-direction
363
364
        INTEGER ::ngz
        INTEGER ::izmin
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
        INTEGER ::izmax
        !rep. g-vector of star
        INTEGER,ALLOCATABLE ::kv3(:,:)
        !length of star
        REAL,ALLOCATABLE    ::sk3(:)
        !mapping of g-vectors to stars
        INTEGER,ALLOCATABLE ::ig(:,:,:)
        !No of g-vectors in star
        INTEGER,ALLOCATABLE ::nstr(:)
        !rep. g-vector of 2D-star
        INTEGER,ALLOCATABLE ::kv2(:,:)
        !length of 2D-star
        REAL,ALLOCATABLE    ::sk2(:)
        !No of g-vecs in 2D-star
        INTEGER,ALLOCATABLE ::nstr2(:)
        !mapping of
        INTEGER,ALLOCATABLE ::ig2(:)
382
        !
383
384
385
386
387
388
389
390
391
392
393
394
        REAL,ALLOCATABLE:: phi2(:) !<(n2d)
        INTEGER,ALLOCATABLE ::igz(:)
        !phase phactor of g-vector
        COMPLEX,ALLOCATABLE    ::rgphs(:,:,:)
        !mapping of stars to FFT-box
        INTEGER, ALLOCATABLE :: igfft(:,:)
        !same for 2D
        INTEGER, ALLOCATABLE :: igfft2(:,:)
        !phasefactors for mapping
        COMPLEX,ALLOCATABLE  :: pgfft(:)
        !same of 2D
        COMPLEX,ALLOCATABLE  :: pgfft2(:)
395
        !
396
397
        REAL,ALLOCATABLE :: ft2_gfx(:),ft2_gfy(:)
        !REAL,   ALLOCATABLE  :: pgft2xy(:)
398
        !REAL,   ALLOCATABLE  :: pgft2x(:)
399
        !REAL,   ALLOCATABLE  :: pgft2y(:)
400
401
402
403
404
405
406
        !REAL,   ALLOCATABLE  :: pgft2xx(:)
        !REAL,   ALLOCATABLE  :: pgft2yy(:)
      COMPLEX, ALLOCATABLE :: ustep(:)
       REAL, ALLOCATABLE :: ufft(:)


     END TYPE
407

408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
     TYPE t_oneD
        TYPE (od_dim) :: odd
        TYPE (od_inp) :: odi
        TYPE (od_sym) :: ods
        TYPE (od_lda) :: odl
        TYPE (od_gga) :: odg
        INTEGER,  POINTER :: ig1(:,:)
        INTEGER,  POINTER :: kv1(:,:)
        INTEGER,  POINTER :: nstr1(:)
        INTEGER,  POINTER :: ngopr1(:)
        REAL,     POINTER :: mrot1(:,:,:)
        REAL,     POINTER :: tau1(:,:)
        INTEGER,  POINTER :: invtab1(:)
        INTEGER,  POINTER :: multab1(:,:)
        INTEGER,  POINTER :: igfft1(:,:)
        REAL,     POINTER :: pgfft1(:)
        REAL,     POINTER :: pgft1x(:)
        REAL,     POINTER :: pgft1y(:)
        REAL,     POINTER :: pgft1xx(:)
        REAL,     POINTER :: pgft1yy(:)
        REAL,     POINTER :: pgft1xy(:)
     END TYPE

     TYPE t_hybrid
      INTEGER               ::  ewaldlambda
      INTEGER               ::  lexp
      INTEGER               ::  bands1
      INTEGER               ::  bands2
      INTEGER(4)            ::  maxlcutm1
      INTEGER(4)            ::  maxindxm1
      INTEGER(4)            ::  maxbasm1
      INTEGER               ::  maxlcutm2
      INTEGER               ::  maxindxm2
      INTEGER               ::  maxbasm2
      INTEGER               ::  maxindxp1
      INTEGER               ::  maxindxp2
      INTEGER               ::  maxgptm
      INTEGER               ::  maxgptm1
      INTEGER               ::  maxgptm2
      INTEGER               ::  maxindx
      INTEGER               ::  maxlmindx
      INTEGER               ::  gptmd
      INTEGER,ALLOCATABLE   ::  nindx(:,:)
      INTEGER(4),ALLOCATABLE::  select1(:,:)
      INTEGER(4),ALLOCATABLE::  lcutm1(:)
      INTEGER(4),ALLOCATABLE::  select2(:,:)
      INTEGER,ALLOCATABLE   ::  lcutm2(:)
      INTEGER,ALLOCATABLE   ::  nindxm1(:,:)
      INTEGER,ALLOCATABLE   ::  nindxm2(:,:)
      INTEGER,ALLOCATABLE   ::  gptm(:,:)
      INTEGER,ALLOCATABLE   ::  ngptm1(:)
      INTEGER,ALLOCATABLE   ::  pgptm1(:,:)
      INTEGER,ALLOCATABLE   ::  ngptm2(:)
      INTEGER,ALLOCATABLE   ::  pgptm2(:,:)
      INTEGER,ALLOCATABLE   ::  ngptm (:)
      INTEGER,ALLOCATABLE   ::  pgptm (:,:)
      INTEGER,ALLOCATABLE   ::  nindxp1(:,:)
      INTEGER,ALLOCATABLE   ::  nindxp2(:,:)
      INTEGER,ALLOCATABLE   ::  lcutwf(:)
      INTEGER,ALLOCATABLE   ::  map(:,:)
      INTEGER,ALLOCATABLE   ::  tvec(:,:,:)
      REAL(8)               ::  radshmin
      REAL                  ::  gcutm1
      REAL                  ::  gcutm2
      REAL                  ::  tolerance1
      REAL                  ::  tolerance2
      REAL(8),ALLOCATABLE   ::  ddist(:)
      REAL   ,ALLOCATABLE   ::  basm1(:,:,:,:)
      REAL   ,ALLOCATABLE   ::  basm2(:,:,:,:)
      COMPLEX,ALLOCATABLE   ::  d_wgn2(:,:,:,:)
      LOGICAL               ::  l_subvxc
      LOGICAL               ::  l_calhf
      LOGICAL,ALLOCATABLE   ::  l_exxc(:,:)
     END TYPE

     TYPE t_dimension
        INTEGER :: jspd
        INTEGER :: nspd
        INTEGER :: nvd
        INTEGER :: nv2d
        INTEGER :: neigd
        INTEGER :: neigd2
        INTEGER :: ncvd
        INTEGER :: nn2d
        INTEGER :: nn3d
        INTEGER :: nstd
        INTEGER :: msh
        INTEGER :: lmd
        INTEGER :: lmplmd
        INTEGER :: nbasfcn
     END TYPE

     TYPE t_Jij
         LOGICAL :: l_J
         INTEGER :: nqpt
         INTEGER :: nqptd
         INTEGER ::phnd
         INTEGER ::nsh
         INTEGER ::mtypes
507
         INTEGER :: nmopq(3)
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
         REAL    :: thetaJ
         REAL    :: qn
         INTEGER :: nmagn
         INTEGER :: nkpt_l
         LOGICAL :: l_disp
         LOGICAL :: l_wr
         LOGICAL :: l_jenerg
         REAL, ALLOCATABLE :: qj(:,:)
         LOGICAL, ALLOCATABLE:: l_magn(:)
         REAL, ALLOCATABLE   :: M(:)
         INTEGER, ALLOCATABLE:: magtype(:)
         INTEGER, ALLOCATABLE::nmagtype(:)
         REAL, ALLOCATABLE :: eig_l(:,:)
          REAL, ALLOCATABLE :: alph1(:)
     END TYPE

     TYPE t_noco
        LOGICAL:: l_noco
        LOGICAL:: l_ss
        LOGICAL:: l_mperp
        LOGICAL:: l_constr
        REAL:: qss(3)
        REAL:: mix_b
531
        LOGICAL, ALLOCATABLE :: l_relax(:)
532
        REAL, ALLOCATABLE :: alphInit(:)
533
534
535
        REAL, ALLOCATABLE :: alph(:)
        REAL, ALLOCATABLE :: beta(:)
        REAL, ALLOCATABLE :: b_con(:,:)
536
537
538
        LOGICAL              :: l_soc
        LOGICAL, ALLOCATABLE :: soc_opt(:)
        REAL                 :: theta
539
        REAL                 :: phi
540
541
542
543
544
545
546
     END TYPE

     TYPE t_xcpot
        INTEGER :: icorr
        INTEGER :: igrd
        REAL    :: gmaxxc
     END TYPE
547

548
549
550
551
552
553
554
555
556

     TYPE t_input
        LOGICAL :: strho
        LOGICAL :: cdinf
        LOGICAL :: vchk
        LOGICAL :: l_f
        LOGICAL :: eonly
        LOGICAL :: film
        LOGICAL :: ctail
557
        INTEGER :: coretail_lmax
558
559
560
561
562
        INTEGER :: itmax
        INTEGER :: maxiter
        INTEGER :: imix
        INTEGER :: gw
        INTEGER :: gw_neigd
563
        INTEGER :: qfix
564
565
566
567
568
569
570
571
572
573
574
575
576
577
        REAL    :: xa !< mixing parameter for geometry optimzer
        REAL    :: thetad !< Debey temperature for first step of geometry optimzer
        REAL    :: epsdisp !< minimal displacement. If all displacements are < epsdisp stop
        REAL    :: epsforce !< minimal force. If all forces <epsforce stop
        INTEGER :: isec1
        INTEGER :: krla
        REAL    :: delgau
        REAL    :: alpha
        REAL    :: spinf
        REAL    :: tkb
        LOGICAL :: gauss
        LOGICAL :: l_bmt
        !INTEGER:: scale
        INTEGER:: jspins
578
        INTEGER:: kcrel
579
580
581
582
583
584
585
586
587
588
589
590
591
        LOGICAL:: frcor
        LOGICAL:: lflip
        LOGICAL:: score
        LOGICAL:: swsp
        LOGICAL:: tria
        LOGICAL:: integ
        LOGICAL:: pallst
        LOGICAL:: l_wann
        LOGICAL:: secvar
        LOGICAL:: evonly(2)
        LOGICAL:: eigvar(3)
        LOGICAL:: sso_opt(2)
        LOGICAL:: total
592
        LOGICAL:: l_inpXML
593
594
595
596
        REAL :: ellow
        REAL :: elup
        REAL :: rkmax
        REAL :: zelec
597
        CHARACTER(LEN=8) :: comment(10)
598
        TYPE(t_efield)::efield
599
        LOGICAL :: l_core_confpot
600
        LOGICAL :: l_useapw
601
     END TYPE
602

603
604
605
606
607
     type t_sliceplot
        logical :: iplot
        logical :: slice
        logical :: plpot
        integer :: kk
608
        integer :: nnne
609
        real    :: e1s
610
        real    :: e2s
611
612
613
     end type
     TYPE t_banddos
       LOGICAL :: dos
614
       LOGICAL :: band
615
616
       LOGICAL :: l_mcd
       LOGICAL :: l_orb
617
618
619
620
621
622
623
624
       LOGICAL :: vacdos
       INTEGER :: ndir
       REAL    :: e1_dos
       real    :: e2_dos
       real    :: sig_dos
     END TYPE

     TYPE t_obsolete
625
        INTEGER:: lepr !floating energy parameters...
626
627
628
629
630
631
632
633
634
        LOGICAL:: disp
        INTEGER:: ndvgrd
        REAL   :: chng
        LOGICAL :: lwb
        LOGICAL:: l_u2f
        LOGICAL:: l_f2u
        LOGICAL :: pot8
     END TYPE

635

636
637
638
639
     TYPE t_enpara
      REAL, ALLOCATABLE :: el0(:,:,:)
      REAL, ALLOCATABLE :: evac0(:,:)
      REAL, ALLOCATABLE :: ello0(:,:,:)
640
      REAL, ALLOCATABLE :: enmix(:)
641
      INTEGER, ALLOCATABLE :: skiplo(:,:)
642
      LOGICAL, ALLOCATABLE :: lchange(:,:,:)
643
      LOGICAL, ALLOCATABLE :: lchg_v(:,:)
644
645
      LOGICAL, ALLOCATABLE :: llochg(:,:,:)
      REAL                 :: epara_min
646
647
648
649
650
651
652
653
654
655
     end type

     TYPE t_vacuum
        !Stuff for the vacuum
        INTEGER ::nmz
        INTEGER ::nmzd
        INTEGER ::nmzxy
        INTEGER ::nmzxyd
        INTEGER :: layerd
        INTEGER :: layers
656
        INTEGER :: nvac
657
658
659
660
661
662
663
664
665
666
        INTEGER :: nvacd
        REAL :: delz
        REAL :: dvac
        INTEGER::nstars
        INTEGER:: nstm
        REAL :: tworkf
        REAL :: locx(2)
        REAL :: locy(2)
        LOGICAL ::starcoeff
        INTEGER, ALLOCATABLE :: izlay(:,:)
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
      END TYPE


                          !Data for the spherical harmonics
      TYPE t_sphhar
        !No of symmetry types (must
        !equal maxval(atoms%ntypsy)
        INTEGER ::ntypsd
        !Max no of members of sphhar
        INTEGER ::memd
        !max of nlh
        INTEGER ::nlhd
        !No of sphhar (ntypsd)
        INTEGER,ALLOCATABLE ::nlh(:)
        !l's of sphhar (0:nlhd,ntypsd)
        INTEGER,ALLOCATABLE ::llh(:,:)
683
        !No of members in sphhar (0:nlh
684
        INTEGER,ALLOCATABLE ::nmem(:,:)
685
        !lm's of of members (max(nmem),
686
        INTEGER,ALLOCATABLE ::mlh(:,:,:)
687
        !phasefactors (max(nmem),0:nlhd
688
689
690
691
692
693
        COMPLEX,ALLOCATABLE ::clnu(:,:,:)
      END TYPE

      !symmetry information
      TYPE t_sym
       !Symophic group
694
695
696
       LOGICAL ::symor
       INTEGER ::nsymt
       INTEGER               ::  nsym
697

698
       COMPLEX,ALLOCATABLE:: d_wgn(:,:,:,:)
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
       !2D-inv-sym
       LOGICAL ::invs2
       !Inversion-sym
       LOGICAL ::invs
       !Z-refls. sym
       LOGICAL ::zrfs
       !No of sym ops
       INTEGER ::nop
       !No of 2D-sym ops
       INTEGER ::nop2
       !Rot-matrices (3,3,nop)
       INTEGER,ALLOCATABLE::mrot(:,:,:)
       !inverse operation (nop)
       INTEGER,ALLOCATABLE::invtab(:)
       !translation vectors (3,nop)
       REAL,ALLOCATABLE::tau(:,:)
       !Name of lattice type
       CHARACTER*3   :: latnam
       !Name of sym
       CHARACTER*4   :: namgrp
719
720
721
722
723
      INTEGER, ALLOCATABLE :: multab(:,:)
      INTEGER, ALLOCATABLE :: invsatnr(:)
      INTEGER, ALLOCATABLE :: invarop(:,:)
      INTEGER, ALLOCATABLE :: invarind(:)

724
      END TYPE
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749

      TYPE t_results
        REAL, ALLOCATABLE :: force(:,:,:)   !< Forces calculated on all atoms (for each spin)
        REAL, ALLOCATABLE :: force_old(:,:) !< Forces on all atoms from last iteration
        REAL              :: ef        !<Fermie energy
        REAL              :: seigc     !<sum of the core eigenvalues
        REAL              :: seigsc    !<weighted sum of the semi-core eigenvalues
        REAL              :: seigv     !<weighted sum of the occupied valence eigenvalues
        REAL              :: seigscv   !<sum of seigv and seigsc
        REAL              :: ts        !<entropy contribution to the free energy
        REAL              :: te_vcoul  !<charge density-coulomb potential integral
        REAL              :: te_veff   !<charge density-effective potential integral
        REAL              :: te_exc    !<charge density-ex-corr.energy density integral
        REAL              :: e_ldau    !<total energy contribution of LDA+U
        REAL              :: tote
        TYPE(t_energy_hf) ::  te_hfex
        REAL              ::  te_hfex_loc(2)
        REAL, ALLOCATABLE :: w_iks(:,:,:)
      END TYPE


      TYPE t_mpi
       INTEGER :: mpi_comm !< replaces MPI_COMM_WORLD
       INTEGER :: irank    !< rank of task in mpi_comm
       INTEGER :: isize    !< no of tasks in mpi_comm
Daniel Wortmann's avatar
Daniel Wortmann committed
750
751
752
753
754
755
       INTEGER :: n_start  !< no of first k-point to calculate on this PE
       INTEGER :: n_stride !< stride for k-loops
       INTEGER :: n_size   !< PE per kpoint, i.e. "isize" for eigenvalue parallelization
       INTEGER :: n_groups !< No of k-loops per PE
       INTEGER :: sub_comm !< Sub-Communicator for eigenvalue parallelization (all PE working on same k-point)
       INTEGER :: n_rank   !< rank in sub_comm
756
      END TYPE
757

758
759
760
761
      TYPE t_zMat
        LOGICAL              :: l_real
        INTEGER              :: nbasfcn
        INTEGER              :: nbands
762
763
        REAL,    POINTER :: z_r(:,:) ! z_r(nbasfcn,nbands)
        COMPLEX, POINTER :: z_c(:,:) ! z_c(nbasfcn,nbands)
764
      END TYPE
765

766
767
768
769
770
771
      TYPE t_hamOvlp
        LOGICAL              :: l_real
        INTEGER              :: matsize
        REAL,    ALLOCATABLE :: a_r(:), b_r(:)
        COMPLEX, ALLOCATABLE :: a_c(:), b_c(:)
      END TYPE
772

773
      END