The Elk Code
modmain.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2002-2009 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 module modmain
7 
8 !----------------------------!
9 ! lattice parameters !
10 !----------------------------!
11 ! lattice vectors stored column-wise
12 real(8) avec(3,3),avec0(3,3),davec(3,3)
13 ! inverse of lattice vector matrix
14 real(8) ainv(3,3)
15 ! reciprocal lattice vectors
16 real(8) bvec(3,3),bvec0(3,3)
17 ! inverse of reciprocal lattice vector matrix
18 real(8) binv(3,3),binv0(3,3)
19 ! unit cell volume
20 real(8) omega,omega0
21 ! Brillouin zone volume
22 real(8) omegabz
23 ! any vector with length less than epslat is considered zero
24 real(8) epslat
25 
26 !--------------------------!
27 ! atomic variables !
28 !--------------------------!
29 ! maximum allowed species
30 integer, parameter :: maxspecies=8
31 ! maximum allowed atoms per species
32 integer, parameter :: maxatoms=200
33 ! number of species
34 integer nspecies
35 ! number of atoms for each species
37 ! maximum number of atoms over all the species
38 integer natmmax
39 ! total number of atoms
41 ! index to atoms and species
43 ! inverse atoms and species indices
46 ! molecule is .true. is the system is an isolated molecule
47 logical molecule
48 ! primcell is .true. if primitive unit cell is to be found automatically
50 ! atomic positions in lattice coordinates
53 ! atomic positions in Cartesian coordinates
55 ! magnitude of random displacements added to the atomic positions
56 real(8) rndatposc
57 ! tatdisp is .true. if small amplitude atomic displacements are to be included
58 ! when calculating the Coulomb potential
59 logical :: tatdisp=.false.
60 ! trdatdv is .true. if the atomic displacements and velocities are to be read
61 ! from file
62 logical trdatdv
63 ! atomic displacements and velocities in Cartesian coordinates
64 real(8) atdvc(3,0:1,maxatoms,maxspecies)
65 ! atomic damping force coefficient
66 real(8) atdfc
67 
68 !----------------------------------!
69 ! atomic species variables !
70 !----------------------------------!
71 ! species files path
72 character(256) sppath
73 ! species filenames
74 character(256) spfname(maxspecies)
75 ! species name
76 character(64) spname(maxspecies)
77 ! species symbol
78 character(64) spsymb(maxspecies)
79 ! species nuclear charge
80 real(8) spzn(maxspecies)
81 ! ptnucl is .true. if the nuclei are to be treated as point charges, if .false.
82 ! the nuclei have a finite spherical distribution
83 logical ptnucl
84 ! nuclear radius
85 real(8) rnucl(maxspecies)
86 ! nuclear volume
88 ! number of radial mesh points to nuclear radius
90 ! Thomson radius
91 real(8) rtmsn(maxspecies)
92 ! Thomson volume
94 ! number of radial mesh points to Thomson radius
96 ! nuclear Coulomb potential
97 real(8), allocatable :: vcln(:,:)
98 ! species electronic charge
99 real(8) spze(maxspecies)
100 ! species mass
102 ! smallest radial point for each species
104 ! effective infinity for species
106 ! number of radial points to effective infinity for each species
107 integer nrsp(maxspecies)
108 ! maximum nrsp over all the species
109 integer nrspmax
110 ! maximum allowed states for each species
111 integer, parameter :: maxstsp=40
112 ! number of states for each species
114 ! maximum nstsp over all the species
115 integer nstspmax
116 ! core-valence cut-off energy for species file generation
117 real(8) ecvcut
118 ! semi-core-valence cut-off energy for species file generation
119 real(8) esccut
120 ! state principle quantum number for each species
122 ! state l value for each species
124 ! state k value for each species
126 ! spcore is .true. if species state is core
128 ! total number of core states
129 integer nstcr
130 ! state eigenvalue for each species
132 ! state occupancy for each species
134 ! species radial mesh to effective infinity
135 real(8), allocatable :: rsp(:,:)
136 ! species charge density
137 real(8), allocatable :: rhosp(:,:)
138 ! species self-consistent potential
139 real(8), allocatable :: vrsp(:,:)
140 ! exchange-correlation type for atomic species (the converged ground-state of
141 ! the crystal does not depend on this choice)
142 integer xctsp(3)
143 
144 !---------------------------------------------------------------!
145 ! muffin-tin radial mesh and angular momentum variables !
146 !---------------------------------------------------------------!
147 ! scale factor for number of muffin-tin points
149 ! number of muffin-tin radial points for each species
150 integer nrmt(maxspecies)
151 ! maximum nrmt over all the species
152 integer nrmtmax
153 ! muffin-tin radius scale factor
154 real(8) rmtscf
155 ! order of averaging applied to the muffin-tin radii
156 integer mrmtav
157 ! optional default smallest radial point for all species
158 real(8) rminall
159 ! optional default muffin-tin radius for all atoms
160 real(8) rmtall
161 ! minimum allowed distance between muffin-tin surfaces
162 real(8) rmtdelta
163 ! muffin-tin radii
165 ! trmt0 is .true. if the original muffin-tin radii rmt0 are to be retained
166 ! between tasks
167 logical trmt0
168 ! (Rₘₜ)ˡ for l up to lmaxo+3
169 real(8), allocatable :: rmtl(:,:)
170 ! total muffin-tin volume
171 real(8) omegamt
172 ! radial step length for coarse mesh
173 integer lradstp
174 ! number of coarse radial mesh points
176 ! maximum nrcmt over all the species
177 integer nrcmtmax
178 ! coarse muffin-tin radial mesh
179 real(8), allocatable :: rcmt(:,:)
180 ! r^l on fine radial mesh
181 real(8), allocatable :: rlmt(:,:,:)
182 ! r^l on coarse radial mesh
183 real(8), allocatable :: rlcmt(:,:,:)
184 ! weights for spline integration on fine radial mesh multiplied by r²
185 real(8), allocatable :: wr2mt(:,:)
186 ! weights for spline partial integration on fine radial mesh
187 real(8), allocatable :: wprmt(:,:,:)
188 ! weights for spline coefficients on fine radial mesh
189 real(8), allocatable :: wcrmt(:,:,:)
190 ! weights for spline integration on coarse radial mesh multiplied by r²
191 real(8), allocatable :: wr2cmt(:,:)
192 ! weights for spline partial integration on coarse radial mesh
193 real(8), allocatable :: wprcmt(:,:,:)
194 ! weights for spline coefficients on coarse radial mesh
195 real(8), allocatable :: wcrcmt(:,:,:)
196 ! maximum allowable angular momentum for augmented plane waves
197 integer, parameter :: maxlapw=30
198 ! maximum angular momentum for augmented plane waves
200 ! (lmaxapw+1)²
201 integer lmmaxapw
202 ! maximum angular momentum on the outer part of the muffin-tin
203 integer lmaxo,dlmaxo
204 ! (lmaxo+1)²
205 integer lmmaxo
206 ! maximum angular momentum on the inner part of the muffin-tin
207 integer lmaxi,lmaxi0
208 ! (lmaxi+1)²
209 integer lmmaxi
210 ! fraction of muffin-tin radius which constitutes the inner part
211 real(8) fracinr
212 ! number of fine/coarse radial points on the inner part of the muffin-tin
214 ! number of fine/coarse points in packed muffin-tins
217 ! maximum number of points over all packed muffin-tins
219 ! total number of muffin-tin points for all atoms
220 integer npcmttot
221 ! index to first muffin-tin point in packed array for all atoms
222 integer, allocatable :: ipcmt(:)
223 ! smoothing order used when calculating gradients in the muffin-tin
224 integer msmgmt
225 
226 !--------------------------------!
227 ! spin related variables !
228 !--------------------------------!
229 ! spinpol is .true. for spin-polarised calculations
231 ! spinorb is .true. for spin-orbit coupling
233 ! scale factor of spin-orbit coupling term in Hamiltonian
234 real(8) socscf
235 ! bforb is .true. for external B-field-orbit coupling
236 logical bforb
237 ! bfdmag is .true. for external B-field diamagnetic coupling
238 logical bfdmag
239 ! dimension of magnetisation and magnetic vector fields (1 or 3)
240 integer ndmag
241 ! ncmag is .true. if the magnetisation is non-collinear, i.e. when ndmag = 3
242 logical ncmag
243 ! if cmagz is .true. then collinear magnetism along the z-axis is enforced
244 logical cmagz
245 ! fixed spin moment type
246 ! 0 : none
247 ! 1 (-1) : total moment (direction)
248 ! 2 (-2) : individual muffin-tin moments (direction)
249 ! 3 (-3) : total and muffin-tin moments (direction)
250 ! 4 : total moment magnitude
251 ! 5 : individual muffin-tin moment magnitudes
252 ! 6 : total and muffin-tin moment magnitudes
254 ! fixed total spin magnetic moment
255 real(8) momfix(3),momfix0(3),dmomfix(3)
256 ! fixed total spin magnetic moment magnitude
257 real(8) momfixm
258 ! fixed spin moment global effective field in Cartesian coordinates
259 real(8) bfsmc(3)
260 ! muffin-tin fixed spin moments
262 ! muffin-tin fixed spin moment magnitudes
264 ! muffin-tin fixed spin moment effective fields in Cartesian coordinates
265 real(8), allocatable :: bfsmcmt(:,:)
266 ! fixed spin moment field step size
267 real(8) taufsm
268 ! second-variational spinor dimension (1 or 2)
269 integer nspinor
270 ! global external magnetic field in Cartesian coordinates
271 real(8) bfieldc(3)
272 ! initial field
273 real(8) bfieldc0(3),bfieldc00(3),dbfieldc0(3)
274 ! external magnetic field in each muffin-tin in Cartesian coordinates
276 ! initial field as read in from input file
278 ! magnitude of random vectors added to muffin-tin fields
279 real(8) rndbfcmt
280 ! external magnetic fields are multiplied by reducebf after each s.c. loop
282 ! small change in magnetic field used for calculating the magnetoelectric tensor
283 real(8) deltabf
284 ! spinsprl is .true. if a spin-spiral is to be calculated
286 ! ssdph is .true. if the muffin-tin spin-spiral magnetisation is de-phased
287 logical ssdph
288 ! spin-spiral phase factor for each atom
289 complex(8), allocatable :: zqss(:)
290 ! number of spin-dependent first-variational functions per state
291 integer nspnfv
292 ! map from second- to first-variational spin index
293 integer jspnfv(2)
294 ! spin-spiral q-vector in lattice coordinates
295 real(8) vqlss(3),dvqlss(3)
296 ! spin-spiral q-vector in Cartesian coordinates
297 real(8) vqcss(3)
298 ! current q-point in spin-spiral supercell calculation
299 integer iqss
300 ! number of primitive unit cells in spin-spiral supercell
301 integer nscss
302 ! number of fixed spin direction points on the sphere for finding the magnetic
303 ! anisotropy energy (MAE)
304 integer npmae0,npmae
305 ! (theta,phi) coordinates for each MAE direction
306 real(8), allocatable :: tpmae(:,:)
307 
308 !----------------------------------------------------!
309 ! static electric field and vector potential !
310 !----------------------------------------------------!
311 ! tefield is .true. if a polarising constant electric field is applied
312 logical tefield
313 ! electric field vector in Cartesian coordinates
314 real(8) efieldc(3)
315 ! electric field vector in lattice coordinates
316 real(8) efieldl(3)
317 ! average electric field in Cartesian coordinates in each muffin-tin
318 real(8), allocatable :: efcmt(:,:)
319 ! maximum distance over which the electric field is applied
320 real(8) dmaxefc
321 ! maximum allowed absolute value of the potential generated by efieldc
322 real(8) vmaxefc
323 ! tafield is .true. if a constant vector potential is applied
324 logical tafield
325 ! vector potential A-field in Cartesian coordinates which couples to the
326 ! paramagnetic current
327 real(8) afieldc(3),afieldc0(3),dafieldc(3)
328 ! A-field in lattice coordinates
329 real(8) afieldl(3)
330 ! tafsp is .true. if a constant spin-dependent vector potential is applied
331 logical tafsp
332 ! spin-dependent vector potential (3 x 3 tensor) in Cartesian coordinates
333 real(8) afspc(3,3),dafspc(3,3)
334 
335 !----------------------------!
336 ! symmetry variables !
337 !----------------------------!
338 ! type of symmetry allowed for the crystal
339 ! 0 : only the identity element is used
340 ! 1 : full symmetry group is used
341 ! 2 : only symmorphic symmetries are allowed
342 ! 3 : full symmetry group and time-reversal symmetry
343 integer symtype
344 ! number of Bravais lattice point group symmetries
345 integer nsymlat
346 ! Bravais lattice point group symmetries
347 integer symlat(3,3,48)
348 ! determinants of lattice symmetry matrices (1 or -1)
349 integer symlatd(48)
350 ! index to inverses of the lattice symmetries
351 integer isymlat(48)
352 ! lattice point group symmetries in Cartesian coordinates
353 real(8) symlatc(3,3,48)
354 ! tshift is .true. if atomic basis is allowed to be shifted
356 ! tsyminv is .true. if the crystal has inversion symmetry
357 logical tsyminv
358 ! maximum of symmetries allowed
359 integer, parameter :: maxsymcrys=192
360 ! number of crystal symmetries
361 integer nsymcrys
362 ! crystal symmetry translation vector in lattice and Cartesian coordinates
364 ! tv0symc is .true. if the translation vector is zero
366 ! spatial rotation element in lattice point group for each crystal symmetry
368 ! global spin rotation element in lattice point group for each crystal symmetry
370 ! equivalent atom index for each crystal symmetry
371 integer, allocatable :: ieqatom(:,:,:)
372 ! eqatoms(ia,ja,is) is .true. if atoms ia and ja are equivalent
373 logical, allocatable :: eqatoms(:,:,:)
374 ! tfeqat is .true. if this is the first atom in a subset of equivalent atoms
375 logical, allocatable :: tfeqat(:,:)
376 ! number of site symmetries
377 integer, allocatable :: nsymsite(:)
378 ! site symmetry spatial rotation element in lattice point group
379 integer, allocatable :: lsplsyms(:,:)
380 ! site symmetry global spin rotation element in lattice point group
381 integer, allocatable :: lspnsyms(:,:)
382 
383 !----------------------------!
384 ! G-vector variables !
385 !----------------------------!
386 ! G-vector cut-off for interstitial potential and density
388 ! G-vector grid sizes
389 integer ngridg(3),ngridg0(3)
390 ! G-vector grid sizes for coarse grid with |G| < 2 gkmax
391 integer ngdgc(3)
392 ! total number of G-vectors
393 integer ngtot,ngtot0
394 ! total number of G-vectors for coarse grid
395 integer ngtc
396 ! integer grid intervals for each direction
397 integer intgv(2,3)
398 ! number of G-vectors with |G| < gmaxvr
399 integer ngvec
400 ! number of G-vectors for coarse grid with |G| < 2 gkmax
401 integer ngvc
402 ! G-vector integer coordinates (i1,i2,i3)
403 integer, allocatable :: ivg(:,:),ivg0(:,:)
404 ! map from (i1,i2,i3) to G-vector index
405 integer, allocatable :: ivgig(:,:,:)
406 ! number of prime factors for the G-vector FFT
407 integer npfftg
408 ! map from G-vector index to FFT array
409 integer, allocatable :: igfft(:),igfft0(:)
410 ! number of prime factors for the coarse G-vector FFT
411 integer npfftgc
412 ! map from G-vector index to FFT array for coarse grid
413 integer, allocatable :: igfc(:)
414 ! number of complex FFT elements for real-complex transforms
415 integer nfgrz
416 ! number of elements on the coarse grid
417 integer nfgrzc
418 ! map from real-complex FFT index to G-point index
419 integer, allocatable :: igrzf(:)
420 ! map on the coarse grid
421 integer, allocatable :: igrzfc(:)
422 ! G-vectors in Cartesian coordinates
423 real(8), allocatable :: vgc(:,:)
424 ! length of G-vectors
425 real(8), allocatable :: gc(:)
426 ! Coulomb Green's function in G-space = 4π / G²
427 real(8), allocatable :: gclg(:)
428 ! spherical Bessel functions jₗ(|G|Rₘₜ)
429 real(8), allocatable :: jlgrmt(:,:,:)
430 ! spherical harmonics of the G-vectors
431 complex(8), allocatable :: ylmg(:,:)
432 ! structure factors for the G-vectors
433 complex(8), allocatable :: sfacg(:,:)
434 ! smooth step function form factors for all species and G-vectors
435 real(8), allocatable :: ffacg(:,:)
436 ! characteristic function in G-space: 0 inside the muffin-tins and 1 outside
437 complex(8), allocatable :: cfunig(:)
438 ! characteristic function in real-space: 0 inside the muffin-tins and 1 outside
439 real(8), allocatable :: cfunir(:)
440 ! characteristic function in real-space for coarse grid
441 real(8), allocatable :: cfrc(:)
442 
443 !---------------------------!
444 ! k-point variables !
445 !---------------------------!
446 ! autokpt is .true. if the k-point set is determined automatically
448 ! radius of sphere used to determine k-point density when autokpt is .true.
449 real(8) radkpt
450 ! k-point grid sizes
451 integer ngridk(3),ngridk0(3),dngridk(3)
452 ! k-point offset
453 real(8) vkloff(3),vkloff0(3)
454 ! type of reduction to perform on k-point set
455 ! 0 : no reduction
456 ! 1 : reduce with full crystal symmetry group
457 ! 2 : reduce with symmorphic symmetries only
459 ! number of point group symmetries used for k-point reduction
460 integer nsymkpt
461 ! point group symmetry matrices used for k-point reduction
462 integer symkpt(3,3,48)
463 ! total number of reduced k-points
464 integer nkpt
465 ! total number of non-reduced k-points
466 integer nkptnr
467 ! locations of k-points on integer grid
468 integer, allocatable :: ivk(:,:)
469 ! map from integer grid to reduced k-point index
470 integer, allocatable :: ivkik(:,:,:)
471 ! map from integer grid to non-reduced k-point index
472 integer, allocatable :: ivkiknr(:,:,:)
473 ! k-points in lattice coordinates
474 real(8), allocatable :: vkl(:,:)
475 ! k-points in Cartesian coordinates
476 real(8), allocatable :: vkc(:,:)
477 ! reduced k-point weights
478 real(8), allocatable :: wkpt(:)
479 ! weight of each non-reduced k-point
480 real(8) wkptnr
481 ! k-point at which to determine effective mass tensor
482 real(8) vklem(3)
483 ! displacement size for computing the effective mass tensor
484 real(8) deltaem
485 ! number of displacements in each direction
486 integer ndspem
487 ! number of k-points subdivision used for calculating the polarisation phase
488 integer nkspolar
489 
490 !------------------------------!
491 ! G+k-vector variables !
492 !------------------------------!
493 ! species for which the muffin-tin radius will be used for calculating gkmax
494 integer isgkmax
495 ! smallest muffin-tin radius times gkmax
497 ! maximum |G+k| cut-off for APW functions
498 real(8) gkmax
499 ! number of G+k-vectors for augmented plane waves
500 integer, allocatable :: ngk(:,:)
501 ! maximum number of G+k-vectors over all k-points
502 integer ngkmax
503 ! index from G+k-vectors to G-vectors
504 integer, allocatable :: igkig(:,:,:)
505 ! G+k-vectors in lattice coordinates
506 real(8), allocatable :: vgkl(:,:,:,:)
507 ! G+k-vectors in Cartesian coordinates
508 real(8), allocatable :: vgkc(:,:,:,:)
509 ! length of G+k-vectors
510 real(8), allocatable :: gkc(:,:,:)
511 ! structure factors for the G+k-vectors
512 complex(8), allocatable :: sfacgk(:,:,:,:)
513 
514 !---------------------------!
515 ! q-point variables !
516 !---------------------------!
517 ! q-point grid sizes
518 integer ngridq(3)
519 ! integer grid intervals for the q-points
520 integer intq(2,3)
521 ! type of reduction to perform on q-point set (see reducek)
522 integer reduceq
523 ! number of point group symmetries used for q-point reduction
524 integer nsymqpt
525 ! point group symmetry matrices used for q-point reduction
526 integer symqpt(3,3,48)
527 ! total number of reduced q-points
528 integer nqpt
529 ! total number of non-reduced q-points
530 integer nqptnr
531 ! locations of q-points on integer grid
532 integer, allocatable :: ivq(:,:)
533 ! map from integer grid to reduced index
534 integer, allocatable :: ivqiq(:,:,:)
535 ! map from integer grid to non-reduced index
536 integer, allocatable :: ivqiqnr(:,:,:)
537 ! number of prime factors for the q-vector FFT
538 integer npfftq
539 ! map from q-vector index to complex-complex FFT array
540 integer, allocatable :: iqfft(:)
541 ! number of complex FFT elements for real-complex transforms
542 integer nfqrz
543 ! map from q-point index to real-complex FFT index
544 integer, allocatable :: ifqrz(:)
545 ! map from real-complex FFT index to q-point index
546 integer, allocatable :: iqrzf(:)
547 ! q-points in lattice coordinates
548 real(8), allocatable :: vql(:,:)
549 ! q-points in Cartesian coordinates
550 real(8), allocatable :: vqc(:,:)
551 ! q-point length
552 real(8), allocatable :: qc(:)
553 ! q-point weights
554 real(8), allocatable :: wqpt(:)
555 ! weight for each non-reduced q-point
556 real(8) wqptnr
557 ! regularised Coulomb Green's function in q-space
558 real(8), allocatable :: gclq(:)
559 
560 !-----------------------------------------------------!
561 ! spherical harmonic transform (SHT) matrices !
562 !-----------------------------------------------------!
563 ! trotsht is .true. if the spherical cover used for the SHT is to be rotated
564 logical :: trotsht=.false.
565 ! spherical cover rotation matrix
566 real(8) rotsht(3,3)
567 ! real backward SHT matrix for lmaxi
568 real(8), allocatable :: rbshti(:,:)
569 ! real forward SHT matrix for lmaxi
570 real(8), allocatable :: rfshti(:,:)
571 ! real backward SHT matrix for lmaxo
572 real(8), allocatable :: rbshto(:,:)
573 ! real forward SHT matrix for lmaxo
574 real(8), allocatable :: rfshto(:,:)
575 ! complex backward SHT matrix for lmaxi
576 complex(8), allocatable :: zbshti(:,:)
577 ! complex forward SHT matrix for lmaxi
578 complex(8), allocatable :: zfshti(:,:)
579 ! complex backward SHT matrix for lmaxo
580 complex(8), allocatable :: zbshto(:,:)
581 ! complex forward SHT matrix for lmaxo
582 complex(8), allocatable :: zfshto(:,:)
583 ! single-precision copies of the complex SHT matrices
584 complex(4), allocatable :: cbshti(:,:),cfshti(:,:)
585 complex(4), allocatable :: cbshto(:,:),cfshto(:,:)
586 
587 !---------------------------------------------------------------!
588 ! density, potential and exchange-correlation variables !
589 !---------------------------------------------------------------!
590 ! exchange-correlation functional type
591 integer xctype(3)
592 ! exchange-correlation functional description
593 character(264) xcdescr
594 ! exchange-correlation functional spin requirement
595 integer xcspin
596 ! exchange-correlation functional density gradient requirement
597 ! 0 : no gradients
598 ! 1 : gradients required for GGA with no post-processing: |∇ρ|, ∇²ρ,
599 ! (∇ρ)⋅(∇|∇ρ|)
600 ! 2 : gradients required for GGA with post-processing: |∇ρ|²
601 ! 3 : as 2 but with the laplacian, ∇²ρ
602 ! 4 : as 2 but with the kinetic energy density, τ
603 ! 5 : as 4 but with the laplacian, ∇²ρ
604 ! 6 : as 4 but for potential-only meta-GGA functionals
605 integer xcgrad
606 ! small constant used to stabilise non-collinear GGA
607 real(8) dncgga
608 ! kinetic energy density functional type
609 integer ktype(3)
610 ! kinetic energy density functional description
611 character(264) kdescr
612 ! kinetic energy density gradient requirement (see xcgrad)
613 integer kgrad
614 ! combined target array for rhomt, rhoir, magmt and magir
615 real(8), allocatable, target :: rhmg(:)
616 ! muffin-tin and interstitial charge density
617 real(8), pointer, contiguous :: rhomt(:,:),rhoir(:)
618 ! muffin-tin and interstitial magnetisation vector field
619 real(8), pointer, contiguous :: magmt(:,:,:),magir(:,:)
620 ! trhonorm is .true. if the density is to be normalised after every iteration
621 logical trhonorm
622 ! tjr is .true. if the current density j(r) is to be calculated
623 logical tjr,tjr0
624 ! muffin-tin and interstitial gauge-invariant current density vector field
625 real(8), allocatable :: jrmt(:,:,:),jrir(:,:)
626 ! muffin-tin and interstitial Coulomb potential
627 real(8), allocatable :: vclmt(:,:),vclir(:)
628 ! Poisson solver pseudocharge density constant
629 integer npsd
630 ! lmaxo+npsd+1
631 integer lnpsd
632 ! muffin-tin and interstitial exchange energy density
633 real(8), allocatable :: exmt(:,:),exir(:)
634 ! muffin-tin and interstitial correlation energy density
635 real(8), allocatable :: ecmt(:,:),ecir(:)
636 ! muffin-tin and interstitial exchange-correlation potential
637 real(8), allocatable :: vxcmt(:,:),vxcir(:)
638 ! muffin-tin and interstitial exchange-correlation magnetic field
639 real(8), allocatable :: bxcmt(:,:,:),bxcir(:,:)
640 ! muffin-tin and interstitial magnetic dipole field
641 real(8), allocatable :: bdmt(:,:,:),bdir(:,:)
642 ! average dipole field in each muffin-tin
643 real(8), allocatable :: bdmta(:,:)
644 ! tbdip is .true. if the spin and current dipole fields are to be added to the
645 ! Kohn-Sham magnetic field
646 logical tbdip
647 ! dipole magnetic field scaling factor (default 1)
649 ! combined target array for vsmt, vsir, bsmt and bsir
650 real(8), allocatable, target :: vsbs(:)
651 ! muffin-tin Kohn-Sham effective potential
652 real(8), pointer, contiguous :: vsmt(:,:)
653 ! interstitial Kohn-Sham effective potential
654 real(8), allocatable :: vsir(:)
655 ! vsir multiplied by the characteristic function and stored on a coarse grid
656 real(8), pointer, contiguous :: vsirc(:)
657 ! muffin-tin Kohn-Sham effective magnetic field in spherical coordinates and on
658 ! a coarse radial mesh
659 real(8), pointer, contiguous :: bsmt(:,:,:)
660 ! interstitial Kohn-Sham effective magnetic field
661 real(8), allocatable :: bsir(:,:)
662 ! bsir multiplied by the characteristic function and stored on a coarse grid
663 real(8), pointer, contiguous :: bsirc(:,:)
664 ! G-space interstitial Kohn-Sham effective potential
665 complex(8), allocatable :: vsig(:)
666 ! nosource is .true. if the field is to be made source-free
667 logical nosource
668 ! tssxc is .true. if scaled spin exchange-correlation is to be used
669 logical tssxc
670 ! spin exchange-correlation scaling factor
672 ! spin-orbit coupling radial function
673 real(8), allocatable :: socfr(:,:)
674 ! kinetic energy density
675 real(8), allocatable :: taumt(:,:,:),tauir(:,:)
676 ! core kinetic energy density
677 real(8), allocatable :: taucr(:,:,:)
678 ! meta-GGA exchange-correlation potential
679 real(8), allocatable :: wxcmt(:,:),wxcir(:)
680 ! Tran-Blaha '09 constant c [Phys. Rev. Lett. 102, 226401 (2009)]
681 real(8) c_tb09
682 ! tc_tb09 is .true. if the Tran-Blaha constant has been read in
683 logical tc_tb09
684 ! if trdstate is .true. the density and potential can be read from STATE.OUT
685 logical :: trdstate=.false.
686 ! temperature in degrees Kelvin
687 real(8) tempk
688 ! if mixrho is .true. then the (density, magnetisation) is mixed, otherwise the
689 ! (potential, magnetic field)
690 logical mixrho
691 ! mixing vector: either (density, magnetisation) or (potential, magnetic field)
692 real(8), pointer, contiguous :: vmixer(:)
693 
694 !--------------------------!
695 ! mixing variables !
696 !--------------------------!
697 ! type of mixing to use for the potential
698 integer mixtype
699 ! mixing type description
700 character(64) mixdescr
701 ! if mixsave is .true. then the mixer work array is saved after each self-
702 ! consistent loop and will be read in at the beginning of a restart
703 logical mixsave
704 ! adaptive mixing parameters (formerly beta0 and betamax)
705 real(8) amixpm(2)
706 ! subspace dimension for Broyden mixing
707 integer mixsdb
708 ! Broyden mixing parameters α and w₀
709 real(8) broydpm(2)
710 
711 !----------------------------------------------!
712 ! charge, moment and current variables !
713 !----------------------------------------------!
714 ! tolerance for error in total charge
715 real(8) epschg
716 ! total nuclear charge
717 real(8) chgzn
718 ! core charges
720 ! total core charge
721 real(8) chgcrtot
722 ! core leakage charge
723 real(8), allocatable :: chgcrlk(:)
724 ! total valence charge
725 real(8) chgval
726 ! excess charge
728 ! total charge
729 real(8) chgtot
730 ! calculated total charge
731 real(8) chgcalc
732 ! interstitial region charge
733 real(8) chgir
734 ! muffin-tin charges
735 real(8), allocatable :: chgmt(:)
736 ! total muffin-tin charge
737 real(8) chgmttot
738 ! effective Wigner radius
739 real(8) rwigner
740 ! total moment
741 real(8) momtot(3)
742 ! total moment magnitude
743 real(8) momtotm
744 ! interstitial region moment
745 real(8) momir(3)
746 ! muffin-tin moments
747 real(8), allocatable :: mommt(:,:)
748 ! total muffin-tin moment
749 real(8) mommttot(3)
750 ! total gauge-invariant current and its magnitude
751 real(8) jtot(3),jtotm
752 
753 !-----------------------------------------!
754 ! APW and local-orbital variables !
755 !-----------------------------------------!
756 ! maximum allowable APW order
757 integer, parameter :: maxapword=3
758 ! polynomial order used for APW radial derivatives
759 integer, parameter :: npapw=8
760 ! APW order
762 ! maximum of apword over all angular momenta and species
763 integer apwordmax
764 ! total number of APW coefficients (l, m and order) for each species
766 ! energy step size used for APW numerical derivatives
767 real(8) deapw
768 ! APW initial linearisation energies
770 ! APW linearisation energies
771 real(8), allocatable :: apwe(:,:,:)
772 ! APW derivative order
774 ! apwve is .true. if the linearisation energies are allowed to vary
776 ! APW radial functions
777 real(8), allocatable :: apwfr(:,:,:,:,:)
778 ! single-precision APW radial functions
779 real(4), allocatable :: apwfr_sp(:,:,:,:)
780 ! derivative of radial functions at the muffin-tin surface multiplied by Rₘₜ²/2
781 real(8), allocatable :: apwdfr(:,:,:)
782 ! maximum number of local-orbitals
783 integer, parameter :: maxlorb=200
784 ! maximum allowable local-orbital order
785 integer, parameter :: maxlorbord=4
786 ! polynomial order used for local-orbital radial derivatives
787 integer, parameter :: nplorb=8
788 ! number of local-orbitals
790 ! maximum nlorb over all species
791 integer nlomax
792 ! total number of local-orbitals
793 integer nlotot
794 ! local-orbital order
796 ! maximum lorbord over all species
797 integer lorbordmax
798 ! local-orbital angular momentum
800 ! maximum lorbl over all species
801 integer lolmax
802 ! (lolmax+1)²
803 integer lolmmax
804 ! energy step size used for local-orbital numerical derivatives
805 real(8) delorb
806 ! local-orbital initial energies
808 ! index which arranges the local-orbitals in ascending order of energy
810 ! local-orbital energies
811 real(8), allocatable :: lorbe(:,:,:)
812 ! local-orbital derivative order
814 ! lorbve is .true. if the linearisation energies are allowed to vary
816 ! local-orbital radial functions
817 real(8), allocatable :: lofr(:,:,:,:)
818 ! single-precision local-orbital radial functions
819 real(4), allocatable :: lofr_sp(:,:,:)
820 ! tfr_sp is .true. if the single-precision radial functions are to be stored
821 logical tfr_sp
822 ! band energy search tolerance
823 real(8) epsband
824 ! maximum allowed change in energy during band energy search; enforced only if
825 ! default energy is less than zero
826 real(8) demaxbnd
827 ! minimum default linearisation energy over all APWs and local-orbitals
828 real(8) e0min
829 ! if autolinengy is .true. then the fixed linearisation energy is set to the
830 ! Fermi energy minus dlefe
831 logical autolinengy
832 ! difference between the fixed linearisation energy and Fermi energy
833 real(8) dlefe
834 ! if autodlefe is .true. then dlefe is determined automatically from the energy
835 ! eigenvalues moment below the Fermi energy
836 logical autodlefe
837 ! lorbcnd is .true. if conduction state local-orbitals should be added
838 logical lorbcnd
839 ! conduction state local-orbital order
840 integer lorbordc
841 ! excess order of the APW and local-orbital functions
842 integer nxoapwlo
843 ! excess local orbitals
844 integer nxlo
845 ! number of (l,m) components used for generating the muffin-tin wavefunctions
847 
848 !-------------------------------------------!
849 ! overlap and Hamiltonian variables !
850 !-------------------------------------------!
851 ! overlap and Hamiltonian matrices sizes at each k-point
852 integer, allocatable :: nmat(:,:)
853 ! maximum nmat over all k-points
854 integer nmatmax
855 ! index to the position of the local-orbitals in the H and O matrices
856 integer, allocatable :: idxlo(:,:,:)
857 ! APW-local-orbital overlap integrals
858 real(8), allocatable :: oalo(:,:,:)
859 ! local-orbital-local-orbital overlap integrals
860 real(8), allocatable :: ololo(:,:,:)
861 ! APW-APW Hamiltonian integrals
862 real(8), allocatable :: haa(:,:,:,:,:,:)
863 ! local-orbital-APW Hamiltonian integrals
864 real(8), allocatable :: hloa(:,:,:,:,:)
865 ! local-orbital-local-orbital Hamiltonian integrals
866 real(8), allocatable :: hlolo(:,:,:,:)
867 ! complex Gaunt coefficient array
868 complex(8), allocatable :: gntyry(:,:,:)
869 ! tefvr is .true. if the first-variational eigenvalue equation is to be solved
870 ! as a real symmetric problem
871 logical tefvr
872 ! number of subspace eigenvectors used to solve the first-variational problem
873 integer mefvs
874 
875 !--------------------------------------------!
876 ! eigenvalue and occupancy variables !
877 !--------------------------------------------!
878 ! number of empty states per atom and spin
880 ! number of empty states
881 integer nempty
882 ! number of first-variational states
883 integer nstfv
884 ! number of second-variational states
885 integer nstsv
886 ! smearing type
887 integer stype
888 ! smearing function description
889 character(64) sdescr
890 ! smearing width
892 ! autoswidth is .true. if the smearing width is to be determined automatically
893 logical autoswidth
894 ! effective mass used in smearing width formula
895 real(8) mstar
896 ! maximum allowed occupancy (1 or 2)
897 real(8) occmax
898 ! convergence tolerance for occupation numbers
899 real(8) epsocc
900 ! second-variational occupation numbers
901 real(8), allocatable :: occsv(:,:)
902 ! Fermi energy for second-variational states
903 real(8) efermi
904 ! tscissor is .true. if the scissor correction is non-zero
905 logical tscissor
906 ! scissor correction applied to eigenvalues and momentum matrix elements
907 real(8) scissor
908 ! density of states at the Fermi energy
909 real(8) fermidos
910 ! estimated indirect and direct band gaps
911 real(8) bandgap(2)
912 ! k-points of indirect and direct gaps
913 integer ikgap(3)
914 ! second-variational eigenvalues
915 real(8), allocatable :: evalsv(:,:)
916 ! tevecsv is .true. if second-variational eigenvectors are calculated
917 logical tevecsv
918 ! maximum number of k-point and states indices in user-defined list
919 integer, parameter :: maxkst=20
920 ! number of k-point and states indices in user-defined list
921 integer nkstlist
922 ! user-defined list of k-point and state indices
923 integer kstlist(2,maxkst)
924 
925 !------------------------------!
926 ! core state variables !
927 !------------------------------!
928 ! occupation numbers for core states
929 real(8), allocatable :: occcr(:,:)
930 ! eigenvalues for core states
931 real(8), allocatable :: evalcr(:,:)
932 ! radial wavefunctions for core states
933 real(8), allocatable :: rwfcr(:,:,:,:)
934 ! radial charge density for core states
935 real(8), allocatable :: rhocr(:,:,:)
936 ! spincore is .true. if the core is to be treated as spin-polarised
937 logical spincore
938 ! frzncore is .true. if the core is frozen to the atomic state
939 logical frzncore
940 ! number of core spin-channels
941 integer nspncr
942 
943 !--------------------------!
944 ! energy variables !
945 !--------------------------!
946 ! sum of core electron eigenvalues
947 real(8) evalsmc
948 ! sum of occupied valence eigenvalues
949 real(8) evalsmv
950 ! core Kohn-Sham potential energy
951 real(8) engyvsc
952 ! valence Kohn-Sham potential energy
953 real(8) engyvsv
954 ! core electron kinetic energy
955 real(8) engyknc
956 ! electron kinetic energy
957 real(8) engykn
958 ! nuclear-nuclear energy
959 real(8) engynn
960 ! electron-nuclear energy
961 real(8) engyen
962 ! Hartree energy
963 real(8) engyhar
964 ! Coulomb energy (E_nn + E_en + E_H)
965 real(8) engycl
966 ! electronic Coulomb potential energy
967 real(8) engyvcl
968 ! Madelung term
969 real(8) engymad
970 ! exchange-correlation potential energy
971 real(8) engyvxc
972 ! exchange-correlation effective field energy
973 real(8) engybxc
974 ! energy of external global magnetic field
975 real(8) engybext
976 ! exchange energy
977 real(8) engyx
978 ! correlation energy
979 real(8) engyc
980 ! electronic entropy
981 real(8) entrpy
982 ! entropic contribution to free energy
983 real(8) engyts
984 ! total energy
985 real(8) engytot
986 
987 !--------------------------------------------!
988 ! force, stress and strain variables !
989 !--------------------------------------------!
990 ! tforce is .true. if force should be calculated
992 ! Hellmann-Feynman force on each atom
993 real(8), allocatable :: forcehf(:,:)
994 ! total force on each atom
995 real(8), allocatable :: forcetot(:,:)
996 ! previous total force on each atom
997 real(8), allocatable :: forcetotp(:,:)
998 ! maximum force magnitude over all atoms
999 real(8) forcemax
1000 ! maximum allowed force magnitude; if this force is reached for any atom then
1001 ! all forces are rescaled so that the maximum force magnitude is this value
1002 real(8) maxforce
1003 ! tfav0 is .true. if the average force should be zero in order to prevent
1004 ! translation of the atomic basis
1005 logical tfav0,tfav00
1006 ! atomic position optimisation type
1007 ! 0 : no optimisation
1008 ! 1 : unconstrained optimisation
1009 integer atpopt
1010 ! maximum number of atomic position optimisation steps
1011 integer maxatpstp
1012 ! default step size parameter for atomic position optimisation
1013 real(8) tau0atp
1014 ! step size parameters for each atom
1015 real(8), allocatable :: tauatp(:)
1016 ! number of strain tensors
1017 integer nstrain
1018 ! current strain tensor
1019 integer :: istrain=0
1020 ! strain tensors
1021 real(8) strain(3,3,9)
1022 ! small displacement parameter multiplied by the strain tensor for computing the
1023 ! stress tensor; also used for calculating the piezoelectric tensor
1024 real(8) deltast
1025 ! symmetry reduced stress tensor components
1026 real(8) stress(9)
1027 ! previous stress tensor
1028 real(8) stressp(9)
1029 ! stress tensor component magnitude maximum
1030 real(8) stressmax
1031 ! reference lattice vectors for generating the G-vectors and derived quantities
1032 real(8) avecref(3,3)
1033 ! tavref is .true. if avecref is non-zero
1034 logical tavref
1035 ! lattice vector optimisation type
1036 ! 0 : no optimisation
1037 ! 1 : unconstrained optimisation
1038 ! 2 : iso-volumetric optimisation
1039 integer latvopt
1040 ! maximum number of lattice vector optimisation steps
1041 integer maxlatvstp
1042 ! default step size parameter for lattice vector optimisation
1043 real(8) tau0latv
1044 ! step size for each stress tensor component acting on the lattice vectors
1045 real(8) taulatv(9)
1046 
1047 !--------------------------------------------------------!
1048 ! self-consistent loop and convergence variables !
1049 !--------------------------------------------------------!
1050 ! maximum number of self-consistent loops
1052 ! current self-consistent loop number
1053 integer iscl
1054 ! tlast is .true. if the calculation is on the last self-consistent loop
1055 logical tlast
1056 ! tstop is .true. if the STOP file exists
1057 logical tstop
1058 ! trestart is .true. if the code should be completely restarted
1059 logical trestart
1060 ! number of self-consistent loops after which STATE.OUT is written
1061 integer nwrite
1062 ! Kohn-Sham potential convergence tolerance
1063 real(8) epspot
1064 ! energy convergence tolerance
1065 real(8) epsengy
1066 ! force convergence tolerance
1067 real(8) epsforce
1068 ! stress tensor convergence tolerance
1069 real(8) epsstress
1070 
1071 !--------------------------------------------------------------------------!
1072 ! density of states, band structure, optics and response variables !
1073 !--------------------------------------------------------------------------!
1074 ! number of energy intervals in the DOS/optics function plot
1075 integer nwplot
1076 ! fine k-point grid size for integration of functions in the Brillouin zone
1077 integer ngrkf
1078 ! smoothing level for DOS/optics function plot
1079 integer nswplot
1080 ! energy interval for DOS/optics function plot
1081 real(8) wplot(2)
1082 ! maximum angular momentum for the partial DOS plot and band structure
1084 ! dosocc is .true. if the DOS is to be weighted by the occupancy
1085 logical dosocc
1086 ! tpdos is .true. if the partial DOS should be calculated
1087 logical tpdos
1088 ! dosmsum is .true. if the partial DOS is to be summed over m
1089 logical dosmsum
1090 ! dosssum is .true. if the partial DOS is to be summed over spin
1091 logical dosssum
1092 ! number of optical matrix components required
1093 integer noptcomp
1094 ! required optical matrix components
1095 integer optcomp(3,27)
1096 ! intraband is .true. if the intraband term is to be added to the optical matrix
1097 logical intraband
1098 ! lmirep is .true. if the (l,m) band characters should correspond to the
1099 ! irreducible representations of the site symmetries
1100 logical lmirep
1101 ! spin-quantisation axis in Cartesian coordinates used when plotting the
1102 ! spin-resolved DOS and band structure (z-axis by default)
1103 real(8) sqaxis(3)
1104 ! q-vector in lattice and Cartesian coordinates for calculating the matrix
1105 ! elements ⟨i,k+q| exp(iq⋅r) |j,k⟩
1106 real(8) vecql(3),vecqc(3)
1107 ! maximum initial-state energy allowed in ELNES transitions
1108 real(8) emaxelnes
1109 ! structure factor energy window
1110 real(8) wsfac(2)
1111 
1112 !-------------------------------------!
1113 ! 1D/2D/3D plotting variables !
1114 !-------------------------------------!
1115 ! number of vertices in 1D plot
1116 integer nvp1d
1117 ! total number of points in 1D plot
1118 integer npp1d
1119 ! vertices in lattice coordinates for 1D plot
1120 real(8), allocatable :: vvlp1d(:,:)
1121 ! distance to vertices in 1D plot
1122 real(8), allocatable :: dvp1d(:)
1123 ! plot vectors in lattice coordinates for 1D plot
1124 real(8), allocatable :: vplp1d(:,:)
1125 ! distance to points in 1D plot
1126 real(8), allocatable :: dpp1d(:)
1127 ! corner vectors of 2D plot in lattice coordinates
1128 real(8) vclp2d(3,0:2)
1129 ! grid sizes of 2D plot
1130 integer np2d(2)
1131 ! corner vectors of 3D plot in lattice coordinates
1132 real(8) vclp3d(3,0:3)
1133 ! grid sizes of 3D plot
1134 integer np3d(3)
1135 
1136 !-------------------------------------------------------------!
1137 ! OEP, Hartree-Fock and Kohn-Sham inversion variables !
1138 !-------------------------------------------------------------!
1139 ! maximum number of core states over all species
1140 integer ncrmax
1141 ! maximum number of OEP iterations
1142 integer maxitoep
1143 ! OEP initial and subsequent step sizes
1145 ! exchange potential and magnetic field
1146 real(8), allocatable :: vxmt(:,:),vxir(:),bxmt(:,:,:),bxir(:,:)
1147 ! OEP residual functions
1148 real(8), allocatable :: dvxmt(:,:),dvxir(:),dbxmt(:,:,:),dbxir(:,:)
1149 ! magnitude of the OEP residual
1150 real(8) resoep
1151 ! hybrid is .true. if a hybrid functional is to be used
1153 ! hybrid functional mixing coefficient
1154 real(8) hybridc
1155 
1156 !-------------------------------------------------------------!
1157 ! response function and perturbation theory variables !
1158 !-------------------------------------------------------------!
1159 ! |G| cut-off for response functions
1160 real(8) gmaxrf
1161 ! energy cut-off for response functions
1162 real(8) emaxrf
1163 ! number of G-vectors for response functions
1164 integer ngrf
1165 ! matrix bandwidth of response functions in the G-vector basis
1166 integer mbwgrf
1167 ! number of response function frequencies
1168 integer nwrf
1169 ! complex response function frequencies
1170 complex(8), allocatable :: wrf(:)
1171 ! maximum number of spherical Bessel functions on the coarse radial mesh over
1172 ! all species
1173 integer njcmax
1174 
1175 !-------------------------------------------------!
1176 ! Bethe-Salpeter equation (BSE) variables !
1177 !-------------------------------------------------!
1178 ! number of valence and conduction states for transitions
1179 integer nvbse,ncbse
1180 ! default number of valence and conduction states
1182 ! maximum number of extra valence and conduction states
1183 integer, parameter :: maxxbse=20
1184 ! number of extra valence and conduction states
1186 ! extra valence and conduction states
1188 ! total number of transitions
1189 integer nvcbse
1190 ! size of blocks in BSE Hamiltonian matrix
1191 integer nbbse
1192 ! size of BSE matrix (= 2*nbbse)
1193 integer nmbse
1194 ! index from BSE valence states to second-variational states
1195 integer, allocatable :: istbse(:,:)
1196 ! index from BSE conduction states to second-variational states
1197 integer, allocatable :: jstbse(:,:)
1198 ! index from BSE valence-conduction pair and k-point to location in BSE matrix
1199 integer, allocatable :: ijkbse(:,:,:)
1200 ! BSE Hamiltonian
1201 complex(8), allocatable :: hmlbse(:,:)
1202 ! BSE Hamiltonian eigenvalues
1203 real(8), allocatable :: evalbse(:)
1204 ! if bsefull is .true. then the full BSE Hamiltonian is calculated, otherwise
1205 ! only the Hermitian block
1206 logical bsefull
1207 ! if hxbse/hdbse is .true. then the exchange/direct term is included in the BSE
1208 ! Hamiltonian
1209 logical hxbse,hdbse
1210 
1211 !--------------------------!
1212 ! timing variables !
1213 !--------------------------!
1214 ! initialisation
1215 real(8) timeinit
1216 ! Hamiltonian and overlap matrix set up
1217 real(8) timemat
1218 ! first-variational calculation
1219 real(8) timefv
1220 ! second-variational calculation
1221 real(8) timesv
1222 ! charge density calculation
1223 real(8) timerho
1224 ! potential calculation
1225 real(8) timepot
1226 ! force calculation
1227 real(8) timefor
1228 
1229 !-----------------------------!
1230 ! numerical constants !
1231 !-----------------------------!
1232 real(8), parameter :: pi=3.1415926535897932385d0
1233 real(8), parameter :: twopi=6.2831853071795864769d0
1234 real(8), parameter :: fourpi=12.566370614359172954d0
1235 ! spherical harmonic Y₀₀ = 1/√4π and its inverse
1236 real(8), parameter :: y00=0.28209479177387814347d0
1237 real(8), parameter :: y00i=3.54490770181103205460d0
1238 ! complex constants
1239 complex(4), parameter :: czero=(0.e0,0.e0), cone=(1.e0,0.e0)
1240 complex(8), parameter :: zzero=(0.d0,0.d0), zone=(1.d0,0.d0), zi=(0.d0,1.d0)
1241 ! Pauli spin matrices:
1242 ! σ_x = ⎛0 1⎞ σ_y = ⎛0 -i⎞ σ_z = ⎛1 0⎞
1243 ! ⎝1 0⎠ ⎝i 0⎠ ⎝0 -1⎠
1244 ! Planck constant in SI units (exact, CODATA 2018)
1245 real(8), parameter :: h_si=6.62607015d-34
1246 ! reduced Planck constant ℏ in SI units
1247 real(8), parameter :: hbar_si=h_si/twopi
1248 ! speed of light in SI units (exact, CODATA 2018)
1249 real(8), parameter :: sol_si=299792458d0
1250 ! speed of light in atomic units (1/α) (CODATA 2018)
1251 real(8), parameter :: sol=137.035999084d0
1252 ! scaled speed of light
1253 real(8) solsc
1254 ! Hartree in SI units (CODATA 2018)
1255 real(8), parameter :: ha_si=4.3597447222071d-18
1256 ! Hartree in eV (CODATA 2018)
1257 real(8), parameter :: ha_ev=27.211386245988d0
1258 ! Hartree in inverse meters
1259 real(8), parameter :: ha_im=ha_si/(h_si*sol_si)
1260 ! Boltzmann constant in SI units (exact, CODATA 2018)
1261 real(8), parameter :: kb_si=1.380649d-23
1262 ! Boltzmann constant in Hartree/kelvin
1263 real(8), parameter :: kboltz=kb_si/ha_si
1264 ! electron charge in SI units (exact, CODATA 2018)
1265 real(8), parameter :: e_si=1.602176634d-19
1266 ! Bohr radius in SI units (CODATA 2018)
1267 real(8), parameter :: br_si=0.529177210903d-10
1268 ! Bohr radius in Angstroms
1269 real(8), parameter :: br_ang=br_si*1.d10
1270 ! atomic unit of magnetic flux density in SI
1271 real(8), parameter :: b_si=hbar_si/(e_si*br_si**2)
1272 ! atomic unit of electric field in SI
1273 real(8), parameter :: ef_si=ha_si/(e_si*br_si)
1274 ! atomic unit of time in SI
1275 real(8), parameter :: t_si=hbar_si/ha_si
1276 ! electron g-factor (CODATA 2018)
1277 real(8), parameter :: gfacte=2.00231930436256d0
1278 ! electron mass in SI (CODATA 2018)
1279 real(8), parameter :: em_si=9.1093837015d-31
1280 ! atomic mass unit in SI (CODATA 2018)
1281 real(8), parameter :: amu_si=1.66053906660d-27
1282 ! atomic mass unit in electron masses
1283 real(8), parameter :: amu=amu_si/em_si
1284 
1285 !---------------------------------!
1286 ! miscellaneous variables !
1287 !---------------------------------!
1288 ! code version
1289 integer, parameter :: version(3)=[11,2,3]
1290 ! maximum number of tasks
1291 integer, parameter :: maxtasks=40
1292 ! number of tasks
1293 integer ntasks
1294 ! task index
1295 integer itask
1296 ! task array
1297 integer tasks(maxtasks)
1298 ! current task
1299 integer task
1300 ! filename extension for files generated by gndstate
1301 character(256) :: filext='.OUT'
1302 ! scratch space path
1303 character(256) scrpath
1304 ! number of note lines
1305 integer notelns
1306 ! notes to include in INFO.OUT
1307 character(256), allocatable :: notes(:)
1308 ! maximum time in idle mode
1309 integer tidle
1310 
1311 end module
1312 
real(8) socscf
Definition: modmain.f90:234
integer nmatmax
Definition: modmain.f90:854
real(8), dimension(maxspecies) rnucl
Definition: modmain.f90:85
integer ngrkf
Definition: modmain.f90:1077
real(8) ecvcut
Definition: modmain.f90:117
integer maxlatvstp
Definition: modmain.f90:1041
integer nstrain
Definition: modmain.f90:1017
real(8), dimension(3, 3) dafspc
Definition: modmain.f90:333
real(8) epsband
Definition: modmain.f90:823
character(256) scrpath
Definition: modmain.f90:1303
integer ncrmax
Definition: modmain.f90:1140
real(8), dimension(:,:), allocatable rcmt
Definition: modmain.f90:179
real(8) dchgexs
Definition: modmain.f90:727
real(8) rminall
Definition: modmain.f90:158
complex(8), dimension(:,:), allocatable sfacg
Definition: modmain.f90:433
real(8), dimension(3, maxatoms, maxspecies) bfcmt0
Definition: modmain.f90:277
real(8), dimension(:,:), allocatable tpmae
Definition: modmain.f90:306
real(8), dimension(:), allocatable wxcir
Definition: modmain.f90:679
integer, parameter maxspecies
Definition: modmain.f90:30
real(8) efermi
Definition: modmain.f90:903
integer natmtot0
Definition: modmain.f90:40
real(8), dimension(maxstsp, maxspecies) occsp
Definition: modmain.f90:133
integer npcmttot
Definition: modmain.f90:220
real(8), dimension(:,:), allocatable rhosp
Definition: modmain.f90:137
integer ncxbse
Definition: modmain.f90:1185
real(8) scissor
Definition: modmain.f90:907
real(8), dimension(3, 3) afspc
Definition: modmain.f90:333
integer, dimension(maxsymcrys) lspnsymc
Definition: modmain.f90:369
integer, dimension(maxstsp, maxspecies) ksp
Definition: modmain.f90:125
real(8) dmaxefc
Definition: modmain.f90:320
real(8), dimension(:,:), allocatable mommt
Definition: modmain.f90:747
integer, dimension(maxspecies) npcmt
Definition: modmain.f90:216
real(8) epsforce
Definition: modmain.f90:1067
logical tjr
Definition: modmain.f90:623
integer, dimension(maxxbse) jstxbse
Definition: modmain.f90:1187
real(8), dimension(3) efieldl
Definition: modmain.f90:316
integer lorbordc
Definition: modmain.f90:840
logical tscissor
Definition: modmain.f90:905
integer mixtype
Definition: modmain.f90:698
real(8), dimension(:), allocatable qc
Definition: modmain.f90:552
integer, dimension(3) ktype
Definition: modmain.f90:609
real(8), dimension(3) momtot
Definition: modmain.f90:741
integer natmmax
Definition: modmain.f90:38
real(8), parameter twopi
Definition: modmain.f90:1233
integer nwrf
Definition: modmain.f90:1168
integer, parameter maxapword
Definition: modmain.f90:757
integer npcmtmax
Definition: modmain.f90:218
integer, dimension(3) ikgap
Definition: modmain.f90:913
character(256) filext
Definition: modmain.f90:1301
integer, dimension(3) ngridg
Definition: modmain.f90:389
integer, dimension(maxspecies) nlorb
Definition: modmain.f90:789
logical spinsprl0
Definition: modmain.f90:285
real(8), dimension(3, maxatoms, maxspecies) atposl0
Definition: modmain.f90:51
integer, dimension(maxstsp, maxspecies) lsp
Definition: modmain.f90:123
integer, dimension(:,:,:), allocatable idxlo
Definition: modmain.f90:856
real(8) evalsmc
Definition: modmain.f90:947
logical tatdisp
Definition: modmain.f90:59
real(8) engyx
Definition: modmain.f90:977
integer nfgrzc
Definition: modmain.f90:417
real(8), dimension(:,:), allocatable evalsv
Definition: modmain.f90:915
real(8), dimension(3, 3) davec
Definition: modmain.f90:12
integer istrain
Definition: modmain.f90:1019
real(8), dimension(:), allocatable, target rhmg
Definition: modmain.f90:615
integer task
Definition: modmain.f90:1299
real(8), dimension(3, maxatoms, maxspecies) datposl
Definition: modmain.f90:52
integer ngtot
Definition: modmain.f90:393
real(8), dimension(:), pointer, contiguous vmixer
Definition: modmain.f90:692
real(8), dimension(:,:,:,:), allocatable lofr
Definition: modmain.f90:817
real(8), parameter ha_si
Definition: modmain.f90:1255
integer lmmaxo
Definition: modmain.f90:205
logical tshift0
Definition: modmain.f90:355
integer nvcbse
Definition: modmain.f90:1189
real(8), dimension(:,:), allocatable vxcmt
Definition: modmain.f90:637
integer, dimension(3) xctype
Definition: modmain.f90:591
logical, dimension(:,:), allocatable tfeqat
Definition: modmain.f90:375
integer ngtc
Definition: modmain.f90:395
real(8) rwigner
Definition: modmain.f90:739
integer fsmtype0
Definition: modmain.f90:253
real(8), dimension(:,:), allocatable occcr
Definition: modmain.f90:929
logical tjr0
Definition: modmain.f90:623
real(8), dimension(3) jtot
Definition: modmain.f90:751
real(8) resoep
Definition: modmain.f90:1150
real(8), dimension(:), allocatable ecir
Definition: modmain.f90:635
logical spinpol
Definition: modmain.f90:230
real(8), dimension(:,:,:), allocatable oalo
Definition: modmain.f90:858
integer, parameter maxlapw
Definition: modmain.f90:197
real(8), dimension(:), pointer, contiguous rhoir
Definition: modmain.f90:617
real(8), dimension(maxspecies) rmaxsp
Definition: modmain.f90:105
integer lmmaxapw
Definition: modmain.f90:201
integer nqpt
Definition: modmain.f90:528
logical hybrid
Definition: modmain.f90:1152
integer nkpt
Definition: modmain.f90:464
integer npfftg
Definition: modmain.f90:407
integer mbwgrf
Definition: modmain.f90:1166
integer, dimension(maxatoms, maxspecies) idxas
Definition: modmain.f90:42
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), dimension(:,:), allocatable vcln
Definition: modmain.f90:97
real(8) reducebf
Definition: modmain.f90:281
logical autokpt
Definition: modmain.f90:447
integer ndmag
Definition: modmain.f90:240
real(8) engykn
Definition: modmain.f90:957
real(8), dimension(:,:,:), allocatable rlmt
Definition: modmain.f90:181
complex(4), parameter czero
Definition: modmain.f90:1239
integer reducek0
Definition: modmain.f90:458
integer msmgmt
Definition: modmain.f90:224
logical tfav0
Definition: modmain.f90:1005
real(8) forcemax
Definition: modmain.f90:999
integer, dimension(maxspecies) npmt
Definition: modmain.f90:215
real(8) momtotm
Definition: modmain.f90:743
logical tforce0
Definition: modmain.f90:991
real(8), dimension(3) mommttot
Definition: modmain.f90:749
integer nlotot
Definition: modmain.f90:793
real(8) dnrmtscf
Definition: modmain.f90:148
real(8) sxcscf
Definition: modmain.f90:671
integer, dimension(:,:), allocatable ivq
Definition: modmain.f90:532
real(8), dimension(:,:), allocatable vclmt
Definition: modmain.f90:627
integer ngkmax
Definition: modmain.f90:502
real(8), parameter amu_si
Definition: modmain.f90:1281
integer, dimension(:,:,:), allocatable ivgig
Definition: modmain.f90:405
real(8) wqptnr
Definition: modmain.f90:556
real(8), dimension(3, 3) ainv
Definition: modmain.f90:14
complex(4), dimension(:,:), allocatable cfshti
Definition: modmain.f90:584
logical tevecsv
Definition: modmain.f90:917
real(8) omega
Definition: modmain.f90:20
real(8), dimension(maxlorbord, maxlorb, maxspecies) lorbe0
Definition: modmain.f90:807
real(8), dimension(2) amixpm
Definition: modmain.f90:705
real(8), dimension(:), allocatable dpp1d
Definition: modmain.f90:1126
logical lorbcnd
Definition: modmain.f90:838
real(8) tauoep
Definition: modmain.f90:1144
integer nsymcrys
Definition: modmain.f90:361
integer, dimension(48) isymlat
Definition: modmain.f90:351
real(8), dimension(3, 0:1, maxatoms, maxspecies) atdvc
Definition: modmain.f90:64
real(4), dimension(:,:,:), allocatable lofr_sp
Definition: modmain.f90:819
real(8), dimension(:,:), allocatable rbshto
Definition: modmain.f90:572
integer, dimension(:,:,:), allocatable ijkbse
Definition: modmain.f90:1199
integer iscl
Definition: modmain.f90:1053
integer, dimension(:), allocatable ipcmt
Definition: modmain.f90:222
real(8) rmtscf
Definition: modmain.f90:154
integer nstcr
Definition: modmain.f90:129
real(8), dimension(:,:,:), allocatable bdmt
Definition: modmain.f90:641
logical spinsprl
Definition: modmain.f90:285
real(8), parameter kboltz
Definition: modmain.f90:1263
real(8) swidth
Definition: modmain.f90:891
real(8), dimension(:,:), allocatable evalcr
Definition: modmain.f90:931
real(8), dimension(:,:), pointer, contiguous rhomt
Definition: modmain.f90:617
logical hybrid0
Definition: modmain.f90:1152
real(8) epsocc
Definition: modmain.f90:899
complex(8), dimension(:), allocatable wrf
Definition: modmain.f90:1170
real(8) dncgga
Definition: modmain.f90:607
real(8), dimension(3) vkloff0
Definition: modmain.f90:453
character(256), dimension(maxspecies) spfname
Definition: modmain.f90:74
logical tstop
Definition: modmain.f90:1057
real(8), parameter amu
Definition: modmain.f90:1283
real(8), dimension(:,:), allocatable bdmta
Definition: modmain.f90:643
integer nbbse
Definition: modmain.f90:1191
real(8) dnempty0
Definition: modmain.f90:879
real(8), dimension(:,:,:), allocatable rhocr
Definition: modmain.f90:935
real(8) fermidos
Definition: modmain.f90:909
real(8), dimension(3, 0:3) vclp3d
Definition: modmain.f90:1132
integer iqss
Definition: modmain.f90:299
integer, dimension(3, 3, 48) symlat
Definition: modmain.f90:347
complex(4), parameter cone
Definition: modmain.f90:1239
integer, dimension(maxxbse) istxbse
Definition: modmain.f90:1187
integer ngrf
Definition: modmain.f90:1164
logical tssxc
Definition: modmain.f90:669
integer, dimension(:,:,:), allocatable ivkik
Definition: modmain.f90:470
real(8), dimension(:), allocatable chgmt
Definition: modmain.f90:735
character(264) kdescr
Definition: modmain.f90:611
integer nfgrz
Definition: modmain.f90:415
integer nvxbse
Definition: modmain.f90:1185
integer notelns
Definition: modmain.f90:1305
integer lorbordmax
Definition: modmain.f90:797
real(8), dimension(3, maxsymcrys) vtlsymc
Definition: modmain.f90:363
integer, parameter maxxbse
Definition: modmain.f90:1183
real(8), dimension(:,:,:), allocatable ololo
Definition: modmain.f90:860
complex(8), parameter zone
Definition: modmain.f90:1240
real(8) timemat
Definition: modmain.f90:1217
logical mixrho
Definition: modmain.f90:690
character(264) xcdescr
Definition: modmain.f90:593
real(8), dimension(:,:), allocatable ecmt
Definition: modmain.f90:635
integer, dimension(maxspecies) lmoapw
Definition: modmain.f90:765
real(8), dimension(:,:), allocatable rbshti
Definition: modmain.f90:568
logical nosource
Definition: modmain.f90:667
integer, dimension(:), allocatable iqrzf
Definition: modmain.f90:546
real(8), dimension(:,:,:), allocatable bxmt
Definition: modmain.f90:1146
real(8), dimension(:,:), allocatable forcetot
Definition: modmain.f90:995
real(8), dimension(3) vkloff
Definition: modmain.f90:453
integer lmaxo
Definition: modmain.f90:203
real(8), dimension(:), allocatable vxir
Definition: modmain.f90:1146
real(8), dimension(3) vqlss
Definition: modmain.f90:295
integer lmaxi0
Definition: modmain.f90:207
logical trhonorm
Definition: modmain.f90:621
integer, parameter maxkst
Definition: modmain.f90:919
integer, dimension(:,:), allocatable lspnsyms
Definition: modmain.f90:381
integer nkptnr
Definition: modmain.f90:466
real(8) c_tb09
Definition: modmain.f90:681
real(8), parameter pi
Definition: modmain.f90:1232
integer, dimension(3, 3, 48) symqpt
Definition: modmain.f90:526
logical, dimension(:,:,:), allocatable eqatoms
Definition: modmain.f90:373
real(8), dimension(3) vecql
Definition: modmain.f90:1106
integer nrspmax
Definition: modmain.f90:109
real(8) nempty0
Definition: modmain.f90:879
integer, parameter maxsymcrys
Definition: modmain.f90:359
integer, dimension(:), allocatable igrzfc
Definition: modmain.f90:421
real(8), dimension(:), allocatable dvxir
Definition: modmain.f90:1148
real(8), dimension(:,:), allocatable bxir
Definition: modmain.f90:1146
integer, dimension(maxapword, 0:maxlapw, maxspecies) apwdm
Definition: modmain.f90:773
real(8) stressmax
Definition: modmain.f90:1030
integer nkstlist
Definition: modmain.f90:921
integer, dimension(:,:,:), allocatable ieqatom
Definition: modmain.f90:371
real(8), dimension(3) bfsmc
Definition: modmain.f90:259
integer ngvc
Definition: modmain.f90:401
logical dosmsum
Definition: modmain.f90:1089
integer maxscl0
Definition: modmain.f90:1051
integer nxlo
Definition: modmain.f90:844
real(8) omega0
Definition: modmain.f90:20
real(8) timefor
Definition: modmain.f90:1227
logical tc_tb09
Definition: modmain.f90:683
real(8) vmaxefc
Definition: modmain.f90:322
integer dlmaxo
Definition: modmain.f90:203
real(8), dimension(:), allocatable vsir
Definition: modmain.f90:654
integer xcspin
Definition: modmain.f90:595
integer ntasks
Definition: modmain.f90:1293
logical, dimension(maxsymcrys) tv0symc
Definition: modmain.f90:365
integer lmaxapw
Definition: modmain.f90:199
real(8), dimension(3, 3) bvec0
Definition: modmain.f90:16
integer, dimension(maxspecies) nrtmsn
Definition: modmain.f90:95
integer, parameter npapw
Definition: modmain.f90:759
integer, dimension(:,:), allocatable jstbse
Definition: modmain.f90:1197
real(8) engyvxc
Definition: modmain.f90:971
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
real(8), dimension(:,:), allocatable exmt
Definition: modmain.f90:633
integer kgrad
Definition: modmain.f90:613
real(8), parameter t_si
Definition: modmain.f90:1275
real(8) timerho
Definition: modmain.f90:1223
complex(8), dimension(:,:,:,:), allocatable sfacgk
Definition: modmain.f90:512
logical tefvr
Definition: modmain.f90:871
integer, dimension(:), allocatable iqfft
Definition: modmain.f90:540
real(8), dimension(3) momfix
Definition: modmain.f90:255
real(8), dimension(9) stress
Definition: modmain.f90:1026
real(8), dimension(:), allocatable vxcir
Definition: modmain.f90:637
integer mixsdb
Definition: modmain.f90:707
real(8), dimension(:,:), allocatable vkc
Definition: modmain.f90:476
real(8) engynn
Definition: modmain.f90:959
integer, dimension(3, 3, 48) symkpt
Definition: modmain.f90:462
logical bforb
Definition: modmain.f90:236
integer nlomax
Definition: modmain.f90:791
real(8) chgcrtot
Definition: modmain.f90:721
integer lmmaxdb
Definition: modmain.f90:1083
real(8), dimension(:,:), allocatable vgc
Definition: modmain.f90:423
logical tforce
Definition: modmain.f90:991
integer, dimension(3) ngridk0
Definition: modmain.f90:451
real(8) rmtdelta
Definition: modmain.f90:162
real(8) e0min
Definition: modmain.f90:828
real(8), dimension(3, 3) avecref
Definition: modmain.f90:1032
logical, dimension(maxstsp, maxspecies) spcore
Definition: modmain.f90:127
real(8) timeinit
Definition: modmain.f90:1215
real(8) swidth0
Definition: modmain.f90:891
integer, dimension(:,:), allocatable nmat
Definition: modmain.f90:852
integer nrcmtmax
Definition: modmain.f90:177
real(8), dimension(:,:), allocatable wxcmt
Definition: modmain.f90:679
complex(8), dimension(:,:), allocatable ylmg
Definition: modmain.f90:431
real(8) timepot
Definition: modmain.f90:1225
logical tefield
Definition: modmain.f90:312
real(8), dimension(:,:), allocatable rmtl
Definition: modmain.f90:169
integer ncbse0
Definition: modmain.f90:1181
real(8) reducebf0
Definition: modmain.f90:281
integer itask
Definition: modmain.f90:1295
integer nstsv
Definition: modmain.f90:885
real(8), dimension(:,:,:), allocatable taucr
Definition: modmain.f90:677
real(8), dimension(2) wplot
Definition: modmain.f90:1081
logical tsyminv
Definition: modmain.f90:357
complex(8), dimension(:), allocatable zqss
Definition: modmain.f90:289
integer, dimension(:,:), allocatable ngk
Definition: modmain.f90:500
real(8), dimension(3, 3) rotsht
Definition: modmain.f90:566
real(8), dimension(:,:,:,:,:,:), allocatable haa
Definition: modmain.f90:862
real(8), dimension(3, maxatoms, maxspecies) atposl
Definition: modmain.f90:51
real(8), dimension(:,:), allocatable vqc
Definition: modmain.f90:550
real(8) emaxrf
Definition: modmain.f90:1162
logical tlast
Definition: modmain.f90:1055
real(8), dimension(:), allocatable dvp1d
Definition: modmain.f90:1122
real(8), dimension(:), allocatable wkpt
Definition: modmain.f90:478
integer nspncr
Definition: modmain.f90:941
real(8), dimension(9) taulatv
Definition: modmain.f90:1045
real(8), dimension(9) stressp
Definition: modmain.f90:1028
real(8), parameter h_si
Definition: modmain.f90:1245
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
real(8), dimension(3) sqaxis
Definition: modmain.f90:1103
logical intraband
Definition: modmain.f90:1097
real(8) rndatposc
Definition: modmain.f90:56
integer, dimension(:), allocatable igrzf
Definition: modmain.f90:419
real(8) jtotm
Definition: modmain.f90:751
integer, dimension(:), allocatable igfft
Definition: modmain.f90:409
real(8) radkpt
Definition: modmain.f90:449
real(8) chgir
Definition: modmain.f90:733
integer, dimension(maxsymcrys) lsplsymc
Definition: modmain.f90:367
real(8), dimension(:,:,:), allocatable bxcmt
Definition: modmain.f90:639
real(8), dimension(:,:), allocatable bsir
Definition: modmain.f90:661
integer, parameter maxlorbord
Definition: modmain.f90:785
logical, dimension(maxlorbord, maxlorb, maxspecies) lorbve
Definition: modmain.f90:815
real(8), dimension(:,:,:), pointer, contiguous magmt
Definition: modmain.f90:619
real(8) omegamt
Definition: modmain.f90:171
real(8), dimension(maxapword, 0:maxlapw, maxspecies) apwe0
Definition: modmain.f90:769
real(8) occmax
Definition: modmain.f90:897
integer nvbse0
Definition: modmain.f90:1181
real(8), dimension(maxspecies) chgcr
Definition: modmain.f90:719
real(8) deltaem
Definition: modmain.f90:484
real(8), dimension(:,:,:), allocatable lorbe
Definition: modmain.f90:811
real(8) engytot
Definition: modmain.f90:985
integer nsymlat
Definition: modmain.f90:345
integer lmaxdb
Definition: modmain.f90:1083
real(8), dimension(maxstsp, maxspecies) evalsp
Definition: modmain.f90:131
real(8), dimension(:,:,:,:), allocatable vgkl
Definition: modmain.f90:506
real(8), dimension(:), allocatable chgcrlk
Definition: modmain.f90:723
real(8), dimension(3) dbfieldc0
Definition: modmain.f90:273
integer, parameter nplorb
Definition: modmain.f90:787
integer, dimension(:), allocatable igfc
Definition: modmain.f90:413
real(8), dimension(3, 3) avec
Definition: modmain.f90:12
real(8) rndbfcmt
Definition: modmain.f90:279
real(8), dimension(maxspecies) rtmsn
Definition: modmain.f90:91
real(8), dimension(2) wsfac
Definition: modmain.f90:1110
complex(8), dimension(:,:), allocatable zfshti
Definition: modmain.f90:578
real(8), dimension(:,:,:), allocatable rlcmt
Definition: modmain.f90:183
real(8) tempk
Definition: modmain.f90:687
real(8), dimension(maxspecies) spmass
Definition: modmain.f90:101
integer, dimension(3, 27) optcomp
Definition: modmain.f90:1095
integer, dimension(2, maxkst) kstlist
Definition: modmain.f90:923
real(8), dimension(:,:), allocatable bdir
Definition: modmain.f90:641
real(8) rgkmax
Definition: modmain.f90:496
real(8), dimension(:), allocatable tauatp
Definition: modmain.f90:1015
integer, dimension(3) ngridk
Definition: modmain.f90:451
real(8), dimension(:,:,:), allocatable apwe
Definition: modmain.f90:771
real(8), dimension(:,:), allocatable ffacg
Definition: modmain.f90:435
real(8) maxforce
Definition: modmain.f90:1002
logical cmagz
Definition: modmain.f90:244
real(8) engybext
Definition: modmain.f90:975
integer ngvec
Definition: modmain.f90:399
logical spinorb0
Definition: modmain.f90:232
real(8) chgzn
Definition: modmain.f90:717
real(8), dimension(:), allocatable cfunir
Definition: modmain.f90:439
integer lradstp
Definition: modmain.f90:173
integer, parameter maxatoms
Definition: modmain.f90:32
real(8), dimension(:,:), allocatable occsv
Definition: modmain.f90:901
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:548
real(8), dimension(:,:,:), allocatable wprcmt
Definition: modmain.f90:193
real(8), dimension(3) dafieldc
Definition: modmain.f90:327
real(8) engyvcl
Definition: modmain.f90:967
real(8), parameter hbar_si
Definition: modmain.f90:1247
integer, parameter maxtasks
Definition: modmain.f90:1291
integer, dimension(0:maxlapw, maxspecies) apword
Definition: modmain.f90:761
complex(8), dimension(:,:,:), allocatable gntyry
Definition: modmain.f90:868
real(8), dimension(:,:), allocatable forcehf
Definition: modmain.f90:993
real(8), dimension(:), allocatable vclir
Definition: modmain.f90:627
real(8), dimension(3, maxatoms, maxspecies) mommtfix0
Definition: modmain.f90:261
real(8), parameter sol
Definition: modmain.f90:1251
logical tpdos
Definition: modmain.f90:1087
logical tfr_sp
Definition: modmain.f90:821
integer nspinor
Definition: modmain.f90:269
real(8), dimension(3) dvqlss
Definition: modmain.f90:295
real(8), parameter gfacte
Definition: modmain.f90:1277
real(8), dimension(3) momir
Definition: modmain.f90:745
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, 3, 48) symlatc
Definition: modmain.f90:353
logical spinpol0
Definition: modmain.f90:230
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
real(8), dimension(maxspecies) rmt
Definition: modmain.f90:164
logical mixsave
Definition: modmain.f90:703
integer, dimension(:,:,:), allocatable ivqiq
Definition: modmain.f90:534
real(8), dimension(maxspecies) voltmsn
Definition: modmain.f90:93
logical tavref
Definition: modmain.f90:1034
real(8), dimension(:,:), allocatable bxcir
Definition: modmain.f90:639
real(8), dimension(3, 3) avec0
Definition: modmain.f90:12
real(8), dimension(3, 3) bvec
Definition: modmain.f90:16
integer npfftq
Definition: modmain.f90:538
real(8), dimension(maxspecies) spze
Definition: modmain.f90:99
integer nqptnr
Definition: modmain.f90:530
real(8), parameter sol_si
Definition: modmain.f90:1249
integer nmbse
Definition: modmain.f90:1193
real(8), dimension(:,:), allocatable dvxmt
Definition: modmain.f90:1148
real(8), dimension(:,:,:,:), allocatable vgkc
Definition: modmain.f90:508
integer, dimension(48) symlatd
Definition: modmain.f90:349
real(8), dimension(:), allocatable, target vsbs
Definition: modmain.f90:650
integer, dimension(:,:), allocatable ivg
Definition: modmain.f90:403
real(8) engyc
Definition: modmain.f90:979
real(8) solsc
Definition: modmain.f90:1253
real(8) engymad
Definition: modmain.f90:969
real(8), dimension(:,:,:,:,:), allocatable hloa
Definition: modmain.f90:864
real(8) tau0atp
Definition: modmain.f90:1013
complex(8), parameter zzero
Definition: modmain.f90:1240
real(8), dimension(3, maxatoms, maxspecies) bfcmt
Definition: modmain.f90:275
integer nsymkpt
Definition: modmain.f90:460
real(8), dimension(:), pointer, contiguous vsirc
Definition: modmain.f90:656
integer, dimension(:,:,:), allocatable ivqiqnr
Definition: modmain.f90:536
integer, dimension(3) ngridq
Definition: modmain.f90:518
real(8) momfixm
Definition: modmain.f90:257
real(8), dimension(:,:), allocatable vkl
Definition: modmain.f90:474
character(64) mixdescr
Definition: modmain.f90:700
real(8), dimension(3) vqcss
Definition: modmain.f90:297
real(8) drgkmax
Definition: modmain.f90:496
integer, dimension(maxspecies) nrsp
Definition: modmain.f90:107
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer apwordmax
Definition: modmain.f90:763
real(8) chgcalc
Definition: modmain.f90:731
integer nwrite
Definition: modmain.f90:1061
real(8) engyen
Definition: modmain.f90:961
real(8), dimension(maxspecies) rmt0
Definition: modmain.f90:164
real(8), dimension(:,:,:), allocatable dbxmt
Definition: modmain.f90:1148
real(8) chgmttot
Definition: modmain.f90:737
real(8), dimension(:,:), allocatable forcetotp
Definition: modmain.f90:997
integer, dimension(2, 3) intgv
Definition: modmain.f90:397
logical ssdph
Definition: modmain.f90:287
integer noptcomp
Definition: modmain.f90:1093
real(8), dimension(:,:), allocatable wr2cmt
Definition: modmain.f90:191
integer, dimension(maxspecies) npcmti
Definition: modmain.f90:216
integer, dimension(maxatoms *maxspecies) idxis
Definition: modmain.f90:44
integer nscss
Definition: modmain.f90:301
integer lmmaxi
Definition: modmain.f90:209
real(8), parameter br_ang
Definition: modmain.f90:1269
real(8), dimension(3, 3) binv
Definition: modmain.f90:18
integer nfqrz
Definition: modmain.f90:542
integer, dimension(2, 3) intq
Definition: modmain.f90:520
real(8) epslat
Definition: modmain.f90:24
real(8), dimension(:,:,:), allocatable wcrcmt
Definition: modmain.f90:195
integer npsd
Definition: modmain.f90:629
integer lolmax
Definition: modmain.f90:801
real(8), parameter y00i
Definition: modmain.f90:1237
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
real(8), dimension(:,:), allocatable rfshti
Definition: modmain.f90:570
logical hxbse
Definition: modmain.f90:1209
integer, dimension(maxstsp, maxspecies) nsp
Definition: modmain.f90:121
real(8) dswidth
Definition: modmain.f90:891
logical, dimension(maxapword, 0:maxlapw, maxspecies) apwve
Definition: modmain.f90:775
real(8), dimension(:,:,:), allocatable jlgrmt
Definition: modmain.f90:429
character(64), dimension(maxspecies) spname
Definition: modmain.f90:76
integer ngtot0
Definition: modmain.f90:393
real(8), dimension(:), allocatable gclg
Definition: modmain.f90:427
logical dosssum
Definition: modmain.f90:1091
integer, dimension(:,:), allocatable ivg0
Definition: modmain.f90:403
logical tfav00
Definition: modmain.f90:1005
real(8), dimension(:,:), allocatable bfsmcmt
Definition: modmain.f90:265
logical trotsht
Definition: modmain.f90:564
real(4), dimension(:,:,:,:), allocatable apwfr_sp
Definition: modmain.f90:779
character(64) sdescr
Definition: modmain.f90:889
real(8) mstar
Definition: modmain.f90:895
real(8) chgval
Definition: modmain.f90:725
real(8) epspot
Definition: modmain.f90:1063
integer, dimension(maxlorb, maxspecies) lorbord
Definition: modmain.f90:795
real(8) dsxcscf
Definition: modmain.f90:671
integer, dimension(3) ngridg0
Definition: modmain.f90:389
integer, dimension(maxspecies) nrnucl
Definition: modmain.f90:89
real(8), dimension(:,:,:), allocatable gkc
Definition: modmain.f90:510
logical ptnucl
Definition: modmain.f90:83
complex(8), dimension(:,:), allocatable zfshto
Definition: modmain.f90:582
integer, dimension(3) ngdgc
Definition: modmain.f90:391
real(8), parameter b_si
Definition: modmain.f90:1271
logical trestart
Definition: modmain.f90:1059
real(8) timefv
Definition: modmain.f90:1219
real(8), dimension(:,:), allocatable rfshto
Definition: modmain.f90:574
real(8) engyts
Definition: modmain.f90:983
real(8), dimension(:,:), allocatable vvlp1d
Definition: modmain.f90:1120
real(8) dlefe
Definition: modmain.f90:833
real(8), dimension(:,:), allocatable dbxir
Definition: modmain.f90:1148
logical autolinengy
Definition: modmain.f90:831
real(8), dimension(:), allocatable gc
Definition: modmain.f90:425
integer nswplot
Definition: modmain.f90:1079
real(8) entrpy
Definition: modmain.f90:981
real(8), parameter ha_im
Definition: modmain.f90:1259
real(8), dimension(3, 3) binv0
Definition: modmain.f90:18
real(8) engyknc
Definition: modmain.f90:955
logical tbdip
Definition: modmain.f90:646
real(8) deapw
Definition: modmain.f90:767
logical spinorb
Definition: modmain.f90:232
real(8), dimension(:), allocatable gclq
Definition: modmain.f90:558
real(8), dimension(maxspecies) rminsp
Definition: modmain.f90:103
complex(4), dimension(:,:), allocatable cfshto
Definition: modmain.f90:585
integer, dimension(:), allocatable ifqrz
Definition: modmain.f90:544
integer, dimension(3), parameter version
Definition: modmain.f90:1289
real(8), parameter ef_si
Definition: modmain.f90:1273
complex(4), dimension(:,:), allocatable cbshti
Definition: modmain.f90:584
real(8), dimension(:,:), allocatable tauir
Definition: modmain.f90:675
integer maxatpstp
Definition: modmain.f90:1011
real(8), dimension(3) bfieldc0
Definition: modmain.f90:273
real(8), parameter e_si
Definition: modmain.f90:1265
real(8) tau0oep
Definition: modmain.f90:1144
integer lnpsd
Definition: modmain.f90:631
real(8) engyvsc
Definition: modmain.f90:951
integer, dimension(3) dngridk
Definition: modmain.f90:451
integer lolmmax
Definition: modmain.f90:803
real(8), dimension(3) bfieldc00
Definition: modmain.f90:273
integer nspecies
Definition: modmain.f90:34
complex(8), dimension(:,:), allocatable zbshto
Definition: modmain.f90:580
integer, dimension(2) np2d
Definition: modmain.f90:1130
integer, dimension(maxatoms *maxspecies) idxia
Definition: modmain.f90:45
real(8), dimension(:,:), allocatable efcmt
Definition: modmain.f90:318
integer njcmax
Definition: modmain.f90:1173
complex(8), dimension(:,:), allocatable hmlbse
Definition: modmain.f90:1201
real(8) chgtot
Definition: modmain.f90:729
real(8) engyhar
Definition: modmain.f90:963
logical bsefull
Definition: modmain.f90:1206
real(8) timesv
Definition: modmain.f90:1221
integer, dimension(maxspecies) nstsp
Definition: modmain.f90:113
real(8) gkmax
Definition: modmain.f90:498
complex(8), parameter zi
Definition: modmain.f90:1240
real(8), dimension(:,:,:,:), allocatable rwfcr
Definition: modmain.f90:933
real(8) engybxc
Definition: modmain.f90:973
real(8), parameter br_si
Definition: modmain.f90:1267
real(8), dimension(3, maxatoms, maxspecies) bfcmt00
Definition: modmain.f90:277
real(8), dimension(3) dmomfix
Definition: modmain.f90:255
logical tafsp
Definition: modmain.f90:331
logical autodlefe
Definition: modmain.f90:836
real(8), dimension(3) momfix0
Definition: modmain.f90:255
logical trdstate
Definition: modmain.f90:685
integer, dimension(3) np3d
Definition: modmain.f90:1134
real(8) wkptnr
Definition: modmain.f90:480
real(8), dimension(maxspecies) spzn
Definition: modmain.f90:80
integer reducek
Definition: modmain.f90:458
real(8) emaxelnes
Definition: modmain.f90:1108
real(8) tau0latv
Definition: modmain.f90:1043
real(8) engycl
Definition: modmain.f90:965
integer, dimension(:), allocatable igfft0
Definition: modmain.f90:409
real(8) bdipscf
Definition: modmain.f90:648
integer npmtmax
Definition: modmain.f90:218
complex(4), dimension(:,:), allocatable cbshto
Definition: modmain.f90:585
real(8), parameter em_si
Definition: modmain.f90:1279
real(8), dimension(:,:), pointer, contiguous magir
Definition: modmain.f90:619
real(8), dimension(:,:,:), allocatable jrmt
Definition: modmain.f90:625
logical autoswidth
Definition: modmain.f90:893
real(8), parameter fourpi
Definition: modmain.f90:1234
integer nkspolar
Definition: modmain.f90:488
real(8), dimension(:,:), allocatable rsp
Definition: modmain.f90:135
integer, parameter maxlorb
Definition: modmain.f90:783
integer reduceq
Definition: modmain.f90:522
logical primcell0
Definition: modmain.f90:49
integer natmtot
Definition: modmain.f90:40
real(8), dimension(:,:,:), allocatable wprmt
Definition: modmain.f90:187
real(8), dimension(:), allocatable evalbse
Definition: modmain.f90:1203
real(8), dimension(:), allocatable cfrc
Definition: modmain.f90:441
real(8), dimension(:,:,:,:,:), allocatable apwfr
Definition: modmain.f90:777
real(8), dimension(:,:), allocatable vrsp
Definition: modmain.f90:139
real(8) omegabz
Definition: modmain.f90:22
integer, dimension(maxspecies) nrcmt
Definition: modmain.f90:175
character(256), dimension(:), allocatable notes
Definition: modmain.f90:1307
integer, dimension(maxspecies) nlmwf
Definition: modmain.f90:846
complex(8), dimension(:), allocatable cfunig
Definition: modmain.f90:437
integer, dimension(maxspecies) nrcmti
Definition: modmain.f90:213
integer, dimension(maxlorb, maxspecies) idxelo
Definition: modmain.f90:809
integer, dimension(maxspecies) npmti
Definition: modmain.f90:215
integer, dimension(:), allocatable nsymsite
Definition: modmain.f90:377
real(8), dimension(:), allocatable wqpt
Definition: modmain.f90:554
integer, dimension(maxlorb, maxspecies) lorbl
Definition: modmain.f90:799
integer, parameter maxstsp
Definition: modmain.f90:111
real(8), dimension(:,:,:), allocatable wcrmt
Definition: modmain.f90:189
integer nrmtmax
Definition: modmain.f90:152
real(8), parameter kb_si
Definition: modmain.f90:1261
integer nwplot
Definition: modmain.f90:1075
real(8), dimension(:,:,:,:), allocatable hlolo
Definition: modmain.f90:866
real(8) deltabf
Definition: modmain.f90:283
logical ncmag
Definition: modmain.f90:242
integer mrmtav
Definition: modmain.f90:156
real(8) epsstress
Definition: modmain.f90:1069
real(8) chgexs
Definition: modmain.f90:727
real(8), dimension(maxspecies) volnucl
Definition: modmain.f90:87
real(8), dimension(:,:), allocatable vxmt
Definition: modmain.f90:1146
real(8) demaxbnd
Definition: modmain.f90:826
complex(8), dimension(:), allocatable vsig
Definition: modmain.f90:665
integer tidle
Definition: modmain.f90:1309
logical tafield
Definition: modmain.f90:324
real(8), dimension(:,:), pointer, contiguous bsirc
Definition: modmain.f90:663
real(8), dimension(3) afieldc0
Definition: modmain.f90:327
integer nsymqpt
Definition: modmain.f90:524
integer nvp1d
Definition: modmain.f90:1116
real(8), dimension(3, maxatoms, maxspecies) atposc
Definition: modmain.f90:54
integer, dimension(:,:,:), allocatable igkig
Definition: modmain.f90:504
integer nstspmax
Definition: modmain.f90:115
real(8), dimension(:,:), pointer, contiguous vsmt
Definition: modmain.f90:652
integer, dimension(maxspecies) nrmti
Definition: modmain.f90:213
logical hdbse
Definition: modmain.f90:1209
integer nvbse
Definition: modmain.f90:1179
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(2) bandgap
Definition: modmain.f90:911
real(8), dimension(3) efieldc
Definition: modmain.f90:314
integer dlmaxapw
Definition: modmain.f90:199
real(8), dimension(3) afieldl
Definition: modmain.f90:329
real(8), dimension(:,:,:), allocatable taumt
Definition: modmain.f90:675
integer npfftgc
Definition: modmain.f90:411
integer nstfv
Definition: modmain.f90:883
complex(8), dimension(:,:), allocatable zbshti
Definition: modmain.f90:576
real(8) dbdipscf
Definition: modmain.f90:648
integer nxoapwlo
Definition: modmain.f90:842
real(8), dimension(:,:), allocatable jrir
Definition: modmain.f90:625
real(8), dimension(3) vklem
Definition: modmain.f90:482
real(8) hybridc
Definition: modmain.f90:1154
real(8), parameter y00
Definition: modmain.f90:1236
logical dosocc
Definition: modmain.f90:1085
integer xcgrad
Definition: modmain.f90:605
logical trmt0
Definition: modmain.f90:167
integer maxscl
Definition: modmain.f90:1051
integer ncbse
Definition: modmain.f90:1179
integer, dimension(:,:), allocatable lsplsyms
Definition: modmain.f90:379
real(8), dimension(3, maxatoms, maxspecies) atposc0
Definition: modmain.f90:54
real(8), dimension(:,:), allocatable vplp1d
Definition: modmain.f90:1124
integer, dimension(2) jspnfv
Definition: modmain.f90:293
real(8) dgmaxvr
Definition: modmain.f90:387
logical spincore
Definition: modmain.f90:937
integer, dimension(:,:), allocatable ivk
Definition: modmain.f90:468
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78
integer, dimension(maxspecies) natoms0
Definition: modmain.f90:36
real(8), dimension(:), allocatable exir
Definition: modmain.f90:633
integer npmae0
Definition: modmain.f90:304
real(8), dimension(3) vecqc
Definition: modmain.f90:1106
integer isgkmax
Definition: modmain.f90:494
integer nspnfv
Definition: modmain.f90:291
real(8), dimension(:,:,:), allocatable apwdfr
Definition: modmain.f90:781
real(8) atdfc
Definition: modmain.f90:66
logical primcell
Definition: modmain.f90:49
real(8), dimension(3, 3, 9) strain
Definition: modmain.f90:1021
real(8), parameter ha_ev
Definition: modmain.f90:1257
integer atpopt
Definition: modmain.f90:1009
real(8) fracinr
Definition: modmain.f90:211
real(8) deltast
Definition: modmain.f90:1024
real(8) evalsmv
Definition: modmain.f90:949
real(8), dimension(3) bfieldc
Definition: modmain.f90:271
integer, dimension(maxlorbord, maxlorb, maxspecies) lorbdm
Definition: modmain.f90:813
real(8) engyvsv
Definition: modmain.f90:953
real(8), dimension(:,:,:), pointer, contiguous bsmt
Definition: modmain.f90:659
integer fsmtype
Definition: modmain.f90:253
logical trdatdv
Definition: modmain.f90:62
integer npmae
Definition: modmain.f90:304
real(8), dimension(:,:), allocatable wr2mt
Definition: modmain.f90:185
integer, dimension(maxatoms *maxspecies) idxis0
Definition: modmain.f90:44
integer nempty
Definition: modmain.f90:881
real(8), dimension(:,:), allocatable socfr
Definition: modmain.f90:673
logical autokpt0
Definition: modmain.f90:447
integer, dimension(maxspecies) nrmt
Definition: modmain.f90:150
integer, dimension(:,:), allocatable istbse
Definition: modmain.f90:1195
integer, dimension(:,:,:), allocatable ivkiknr
Definition: modmain.f90:472
real(8) gmaxvr
Definition: modmain.f90:387
real(8), dimension(3, maxsymcrys) vtcsymc
Definition: modmain.f90:363
integer lmaxi
Definition: modmain.f90:207
logical bfdmag
Definition: modmain.f90:238