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