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ₘₜ)ˡ 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 
555 !-----------------------------------------------------!
556 ! spherical harmonic transform (SHT) matrices !
557 !-----------------------------------------------------!
558 ! trotsht is .true. if the spherical cover used for the SHT is to be rotated
559 logical :: trotsht=.false.
560 ! spherical cover rotation matrix
561 real(8) rotsht(3,3)
562 ! real backward SHT matrix for lmaxi
563 real(8), allocatable :: rbshti(:,:)
564 ! real forward SHT matrix for lmaxi
565 real(8), allocatable :: rfshti(:,:)
566 ! real backward SHT matrix for lmaxo
567 real(8), allocatable :: rbshto(:,:)
568 ! real forward SHT matrix for lmaxo
569 real(8), allocatable :: rfshto(:,:)
570 ! complex backward SHT matrix for lmaxi
571 complex(8), allocatable :: zbshti(:,:)
572 ! complex forward SHT matrix for lmaxi
573 complex(8), allocatable :: zfshti(:,:)
574 ! complex backward SHT matrix for lmaxo
575 complex(8), allocatable :: zbshto(:,:)
576 ! complex forward SHT matrix for lmaxo
577 complex(8), allocatable :: zfshto(:,:)
578 ! single-precision copies of the complex SHT matrices
579 complex(4), allocatable :: cbshti(:,:),cfshti(:,:)
580 complex(4), allocatable :: cbshto(:,:),cfshto(:,:)
581 
582 !---------------------------------------------------------------!
583 ! density, potential and exchange-correlation variables !
584 !---------------------------------------------------------------!
585 ! exchange-correlation functional type
586 integer xctype(3)
587 ! exchange-correlation functional description
588 character(264) xcdescr
589 ! exchange-correlation functional spin requirement
590 integer xcspin
591 ! exchange-correlation functional density gradient requirement
592 ! 0 : no gradients
593 ! 1 : gradients required for GGA with no post-processing: |∇ρ|, ∇²ρ,
594 ! (∇ρ)⋅(∇|∇ρ|)
595 ! 2 : gradients required for GGA with post-processing: |∇ρ|²
596 ! 3 : as 2 but with the laplacian, ∇²ρ
597 ! 4 : as 2 but with the kinetic energy density, τ
598 ! 5 : as 4 but with the laplacian, ∇²ρ
599 ! 6 : as 4 but for potential-only meta-GGA functionals
600 integer xcgrad
601 ! small constant used to stabilise non-collinear GGA
602 real(8) dncgga
603 ! kinetic energy density functional type
604 integer ktype(3)
605 ! kinetic energy density functional description
606 character(264) kdescr
607 ! kinetic energy density gradient requirement (see xcgrad)
608 integer kgrad
609 ! combined target array for rhomt, rhoir, magmt and magir
610 real(8), allocatable, target :: rhmg(:)
611 ! muffin-tin and interstitial charge density
612 real(8), pointer, contiguous :: rhomt(:,:),rhoir(:)
613 ! muffin-tin and interstitial magnetisation vector field
614 real(8), pointer, contiguous :: magmt(:,:,:),magir(:,:)
615 ! trhonorm is .true. if the density is to be normalised after every iteration
616 logical trhonorm
617 ! tjr is .true. if the current density j(r) is to be calculated
618 logical tjr,tjr0
619 ! muffin-tin and interstitial gauge-invariant current density vector field
620 real(8), allocatable :: jrmt(:,:,:),jrir(:,:)
621 ! muffin-tin and interstitial Coulomb potential
622 real(8), allocatable :: vclmt(:,:),vclir(:)
623 ! Poisson solver pseudocharge density constant
624 integer npsd
625 ! lmaxo+npsd+1
626 integer lnpsd
627 ! muffin-tin and interstitial exchange energy density
628 real(8), allocatable :: exmt(:,:),exir(:)
629 ! muffin-tin and interstitial correlation energy density
630 real(8), allocatable :: ecmt(:,:),ecir(:)
631 ! muffin-tin and interstitial exchange-correlation potential
632 real(8), allocatable :: vxcmt(:,:),vxcir(:)
633 ! muffin-tin and interstitial exchange-correlation magnetic field
634 real(8), allocatable :: bxcmt(:,:,:),bxcir(:,:)
635 ! muffin-tin and interstitial magnetic dipole field
636 real(8), allocatable :: bdmt(:,:,:),bdir(:,:)
637 ! average dipole field in each muffin-tin
638 real(8), allocatable :: bdmta(:,:)
639 ! tbdip is .true. if the spin and current dipole fields are to be added to the
640 ! Kohn-Sham magnetic field
641 logical tbdip
642 ! dipole magnetic field scaling factor (default 1)
643 real(8) bdipscf
644 ! combined target array for vsmt, vsir, bsmt and bsir
645 real(8), allocatable, target :: vsbs(:)
646 ! muffin-tin Kohn-Sham effective potential
647 real(8), pointer, contiguous :: vsmt(:,:)
648 ! interstitial Kohn-Sham effective potential
649 real(8), allocatable :: vsir(:)
650 ! vsir multiplied by the characteristic function and stored on a coarse grid
651 real(8), pointer, contiguous :: vsirc(:)
652 ! muffin-tin Kohn-Sham effective magnetic field in spherical coordinates and on
653 ! a coarse radial mesh
654 real(8), pointer, contiguous :: bsmt(:,:,:)
655 ! interstitial Kohn-Sham effective magnetic field
656 real(8), allocatable :: bsir(:,:)
657 ! bsir multiplied by the characteristic function and stored on a coarse grid
658 real(8), pointer, contiguous :: bsirc(:,:)
659 ! G-space interstitial Kohn-Sham effective potential
660 complex(8), allocatable :: vsig(:)
661 ! nosource is .true. if the field is to be made source-free
662 logical nosource
663 ! tssxc is .true. if scaled spin exchange-correlation is to be used
664 logical tssxc
665 ! spin exchange-correlation scaling factor
667 ! spin-orbit coupling radial function
668 real(8), allocatable :: socfr(:,:)
669 ! kinetic energy density
670 real(8), allocatable :: taumt(:,:,:),tauir(:,:)
671 ! core kinetic energy density
672 real(8), allocatable :: taucr(:,:,:)
673 ! meta-GGA exchange-correlation potential
674 real(8), allocatable :: wxcmt(:,:),wxcir(:)
675 ! Tran-Blaha '09 constant c [Phys. Rev. Lett. 102, 226401 (2009)]
676 real(8) c_tb09
677 ! tc_tb09 is .true. if the Tran-Blaha constant has been read in
678 logical tc_tb09
679 ! if trdstate is .true. the density and potential can be read from STATE.OUT
680 logical :: trdstate=.false.
681 ! temperature in degrees Kelvin
682 real(8) tempk
683 ! if mixrho is .true. then the (density, magnetisation) is mixed, otherwise the
684 ! (potential, magnetic field)
685 logical mixrho
686 ! mixing vector: either (density, magnetisation) or (potential, magnetic field)
687 real(8), pointer, contiguous :: vmixer(:)
688 
689 !--------------------------!
690 ! mixing variables !
691 !--------------------------!
692 ! type of mixing to use for the potential
693 integer mixtype
694 ! mixing type description
695 character(64) mixdescr
696 ! if mixsave is .true. then the mixer work array is saved after each self-
697 ! consistent loop and will be read in at the beginning of a restart
698 logical mixsave
699 ! adaptive mixing parameters (formerly beta0 and betamax)
700 real(8) amixpm(2)
701 ! subspace dimension for Broyden mixing
702 integer mixsdb
703 ! Broyden mixing parameters alpha and w0
704 real(8) broydpm(2)
705 
706 !----------------------------------------------!
707 ! charge, moment and current variables !
708 !----------------------------------------------!
709 ! tolerance for error in total charge
710 real(8) epschg
711 ! total nuclear charge
712 real(8) chgzn
713 ! core charges
715 ! total core charge
716 real(8) chgcrtot
717 ! core leakage charge
718 real(8), allocatable :: chgcrlk(:)
719 ! total valence charge
720 real(8) chgval
721 ! excess charge
723 ! total charge
724 real(8) chgtot
725 ! calculated total charge
726 real(8) chgcalc
727 ! interstitial region charge
728 real(8) chgir
729 ! muffin-tin charges
730 real(8), allocatable :: chgmt(:)
731 ! total muffin-tin charge
732 real(8) chgmttot
733 ! effective Wigner radius
734 real(8) rwigner
735 ! total moment
736 real(8) momtot(3)
737 ! total moment magnitude
738 real(8) momtotm
739 ! interstitial region moment
740 real(8) momir(3)
741 ! muffin-tin moments
742 real(8), allocatable :: mommt(:,:)
743 ! total muffin-tin moment
744 real(8) mommttot(3)
745 ! total gauge-invariant current and its magnitude
746 real(8) jtot(3),jtotm
747 
748 !-----------------------------------------!
749 ! APW and local-orbital variables !
750 !-----------------------------------------!
751 ! maximum allowable APW order
752 integer, parameter :: maxapword=3
753 ! polynomial order used for APW radial derivatives
754 integer, parameter :: npapw=8
755 ! APW order
757 ! maximum of apword over all angular momenta and species
758 integer apwordmax
759 ! total number of APW coefficients (l, m and order) for each species
761 ! energy step size used for APW numerical derivatives
762 real(8) deapw
763 ! APW initial linearisation energies
765 ! APW linearisation energies
766 real(8), allocatable :: apwe(:,:,:)
767 ! APW derivative order
769 ! apwve is .true. if the linearisation energies are allowed to vary
771 ! APW radial functions
772 real(8), allocatable :: apwfr(:,:,:,:,:)
773 ! single-precision APW radial functions
774 real(4), allocatable :: apwfr_sp(:,:,:,:)
775 ! derivative of radial functions at the muffin-tin surface multiplied by Rₘₜ²/2
776 real(8), allocatable :: apwdfr(:,:,:)
777 ! maximum number of local-orbitals
778 integer, parameter :: maxlorb=200
779 ! maximum allowable local-orbital order
780 integer, parameter :: maxlorbord=4
781 ! polynomial order used for local-orbital radial derivatives
782 integer, parameter :: nplorb=8
783 ! number of local-orbitals
785 ! maximum nlorb over all species
786 integer nlomax
787 ! total number of local-orbitals
788 integer nlotot
789 ! local-orbital order
791 ! maximum lorbord over all species
792 integer lorbordmax
793 ! local-orbital angular momentum
795 ! maximum lorbl over all species
796 integer lolmax
797 ! (lolmax+1)²
798 integer lolmmax
799 ! energy step size used for local-orbital numerical derivatives
800 real(8) delorb
801 ! local-orbital initial energies
803 ! index which arranges the local-orbitals in ascending order of energy
805 ! local-orbital energies
806 real(8), allocatable :: lorbe(:,:,:)
807 ! local-orbital derivative order
809 ! lorbve is .true. if the linearisation energies are allowed to vary
811 ! local-orbital radial functions
812 real(8), allocatable :: lofr(:,:,:,:)
813 ! single-precision local-orbital radial functions
814 real(4), allocatable :: lofr_sp(:,:,:)
815 ! tfr_sp is .true. if the single-precision radial functions are to be stored
816 logical tfr_sp
817 ! band energy search tolerance
818 real(8) epsband
819 ! maximum allowed change in energy during band energy search; enforced only if
820 ! default energy is less than zero
821 real(8) demaxbnd
822 ! minimum default linearisation energy over all APWs and local-orbitals
823 real(8) e0min
824 ! if autolinengy is .true. then the fixed linearisation energy is set to the
825 ! Fermi energy minus dlefe
826 logical autolinengy
827 ! difference between the fixed linearisation energy and Fermi energy
828 real(8) dlefe
829 ! if autodlefe is .true. then dlefe is determined automatically from the energy
830 ! eigenvalues moment below the Fermi energy
831 logical autodlefe
832 ! lorbcnd is .true. if conduction state local-orbitals should be added
833 logical lorbcnd
834 ! conduction state local-orbital order
835 integer lorbordc
836 ! excess order of the APW and local-orbital functions
837 integer nxoapwlo
838 ! excess local orbitals
839 integer nxlo
840 ! number of (l,m) components used for generating the muffin-tin wavefunctions
842 
843 !-------------------------------------------!
844 ! overlap and Hamiltonian variables !
845 !-------------------------------------------!
846 ! overlap and Hamiltonian matrices sizes at each k-point
847 integer, allocatable :: nmat(:,:)
848 ! maximum nmat over all k-points
849 integer nmatmax
850 ! index to the position of the local-orbitals in the H and O matrices
851 integer, allocatable :: idxlo(:,:,:)
852 ! APW-local-orbital overlap integrals
853 real(8), allocatable :: oalo(:,:,:)
854 ! local-orbital-local-orbital overlap integrals
855 real(8), allocatable :: ololo(:,:,:)
856 ! APW-APW Hamiltonian integrals
857 real(8), allocatable :: haa(:,:,:,:,:,:)
858 ! local-orbital-APW Hamiltonian integrals
859 real(8), allocatable :: hloa(:,:,:,:,:)
860 ! local-orbital-local-orbital Hamiltonian integrals
861 real(8), allocatable :: hlolo(:,:,:,:)
862 ! complex Gaunt coefficient array
863 complex(8), allocatable :: gntyry(:,:,:)
864 ! tefvr is .true. if the first-variational eigenvalue equation is to be solved
865 ! as a real symmetric problem
866 logical tefvr
867 ! tefvs is .true. if the first-variational eigenvalue equation is to be solved
868 ! in the subspace of nstfvs eigenvectors
869 logical tefvs
870 ! number of subspace eigenvectors used to solve the first-variational problem
871 integer mefvs
872 
873 !--------------------------------------------!
874 ! eigenvalue and occupancy variables !
875 !--------------------------------------------!
876 ! number of empty states per atom and spin
878 ! number of empty states
879 integer nempty
880 ! number of first-variational states
881 integer nstfv
882 ! number of second-variational states
883 integer nstsv
884 ! smearing type
885 integer stype
886 ! smearing function description
887 character(64) sdescr
888 ! smearing width
890 ! autoswidth is .true. if the smearing width is to be determined automatically
891 logical autoswidth
892 ! effective mass used in smearing width formula
893 real(8) mstar
894 ! maximum allowed occupancy (1 or 2)
895 real(8) occmax
896 ! convergence tolerance for occupation numbers
897 real(8) epsocc
898 ! second-variational occupation numbers
899 real(8), allocatable :: occsv(:,:)
900 ! Fermi energy for second-variational states
901 real(8) efermi
902 ! tscissor is .true. if the scissor correction is non-zero
903 logical tscissor
904 ! scissor correction applied to eigenvalues and momentum matrix elements
905 real(8) scissor
906 ! density of states at the Fermi energy
907 real(8) fermidos
908 ! estimated indirect and direct band gaps
909 real(8) bandgap(2)
910 ! k-points of indirect and direct gaps
911 integer ikgap(3)
912 ! second-variational eigenvalues
913 real(8), allocatable :: evalsv(:,:)
914 ! tevecsv is .true. if second-variational eigenvectors are calculated
915 logical tevecsv
916 ! maximum number of k-point and states indices in user-defined list
917 integer, parameter :: maxkst=20
918 ! number of k-point and states indices in user-defined list
919 integer nkstlist
920 ! user-defined list of k-point and state indices
921 integer kstlist(2,maxkst)
922 
923 !------------------------------!
924 ! core state variables !
925 !------------------------------!
926 ! occupation numbers for core states
927 real(8), allocatable :: occcr(:,:)
928 ! eigenvalues for core states
929 real(8), allocatable :: evalcr(:,:)
930 ! radial wavefunctions for core states
931 real(8), allocatable :: rwfcr(:,:,:,:)
932 ! radial charge density for core states
933 real(8), allocatable :: rhocr(:,:,:)
934 ! spincore is .true. if the core is to be treated as spin-polarised
935 logical spincore
936 ! number of core spin-channels
937 integer nspncr
938 
939 !--------------------------!
940 ! energy variables !
941 !--------------------------!
942 ! core, valence and total occupied eigenvalue sum
943 real(8) evalsum
944 ! electron kinetic energy
945 real(8) engykn
946 ! core electron kinetic energy
947 real(8) engykncr
948 ! nuclear-nuclear energy
949 real(8) engynn
950 ! electron-nuclear energy
951 real(8) engyen
952 ! Hartree energy
953 real(8) engyhar
954 ! Coulomb energy (E_nn + E_en + E_H)
955 real(8) engycl
956 ! electronic Coulomb potential energy
957 real(8) engyvcl
958 ! Madelung term
959 real(8) engymad
960 ! exchange-correlation potential energy
961 real(8) engyvxc
962 ! exchange-correlation effective field energy
963 real(8) engybxc
964 ! energy of external global magnetic field
965 real(8) engybext
966 ! exchange energy
967 real(8) engyx
968 ! correlation energy
969 real(8) engyc
970 ! electronic entropy
971 real(8) entrpy
972 ! entropic contribution to free energy
973 real(8) engyts
974 ! total energy
975 real(8) engytot
976 
977 !--------------------------------------------!
978 ! force, stress and strain variables !
979 !--------------------------------------------!
980 ! tforce is .true. if force should be calculated
982 ! Hellmann-Feynman force on each atom
983 real(8), allocatable :: forcehf(:,:)
984 ! total force on each atom
985 real(8), allocatable :: forcetot(:,:)
986 ! previous total force on each atom
987 real(8), allocatable :: forcetotp(:,:)
988 ! maximum force magnitude over all atoms
989 real(8) forcemax
990 ! maximum allowed force magnitude; if this force is reached for any atom then
991 ! all forces are rescaled so that the maximum force magnitude is this value
992 real(8) maxforce
993 ! tfav0 is .true. if the average force should be zero in order to prevent
994 ! translation of the atomic basis
995 logical tfav0,tfav00
996 ! atomic position optimisation type
997 ! 0 : no optimisation
998 ! 1 : unconstrained optimisation
999 integer atpopt
1000 ! maximum number of atomic position optimisation steps
1001 integer maxatpstp
1002 ! default step size parameter for atomic position optimisation
1003 real(8) tau0atp
1004 ! step size parameters for each atom
1005 real(8), allocatable :: tauatp(:)
1006 ! number of strain tensors
1007 integer nstrain
1008 ! current strain tensor
1009 integer :: istrain=0
1010 ! strain tensors
1011 real(8) strain(3,3,9)
1012 ! small displacement parameter multiplied by the strain tensor for computing the
1013 ! stress tensor; also used for calculating the piezoelectric tensor
1014 real(8) deltast
1015 ! symmetry reduced stress tensor components
1016 real(8) stress(9)
1017 ! previous stress tensor
1018 real(8) stressp(9)
1019 ! stress tensor component magnitude maximum
1020 real(8) stressmax
1021 ! reference lattice vectors for generating the G-vectors and derived quantities
1022 real(8) avecref(3,3)
1023 ! tavref is .true. if avecref is non-zero
1024 logical tavref
1025 ! lattice vector optimisation type
1026 ! 0 : no optimisation
1027 ! 1 : unconstrained optimisation
1028 ! 2 : iso-volumetric optimisation
1029 integer latvopt
1030 ! maximum number of lattice vector optimisation steps
1031 integer maxlatvstp
1032 ! default step size parameter for lattice vector optimisation
1033 real(8) tau0latv
1034 ! step size for each stress tensor component acting on the lattice vectors
1035 real(8) taulatv(9)
1036 
1037 !--------------------------------------------------------!
1038 ! self-consistent loop and convergence variables !
1039 !--------------------------------------------------------!
1040 ! maximum number of self-consistent loops
1042 ! current self-consistent loop number
1043 integer iscl
1044 ! tlast is .true. if the calculation is on the last self-consistent loop
1045 logical tlast
1046 ! tstop is .true. if the STOP file exists
1047 logical tstop
1048 ! trestart is .true. if the code should be completely restarted
1049 logical trestart
1050 ! number of self-consistent loops after which STATE.OUT is written
1051 integer nwrite
1052 ! Kohn-Sham potential convergence tolerance
1053 real(8) epspot
1054 ! energy convergence tolerance
1055 real(8) epsengy
1056 ! force convergence tolerance
1057 real(8) epsforce
1058 ! stress tensor convergence tolerance
1059 real(8) epsstress
1060 
1061 !--------------------------------------------------------------------------!
1062 ! density of states, band structure, optics and response variables !
1063 !--------------------------------------------------------------------------!
1064 ! number of energy intervals in the DOS/optics function plot
1065 integer nwplot
1066 ! fine k-point grid size for integration of functions in the Brillouin zone
1067 integer ngrkf
1068 ! smoothing level for DOS/optics function plot
1069 integer nswplot
1070 ! energy interval for DOS/optics function plot
1071 real(8) wplot(2)
1072 ! maximum angular momentum for the partial DOS plot and band structure
1074 ! dosocc is .true. if the DOS is to be weighted by the occupancy
1075 logical dosocc
1076 ! tpdos is .true. if the partial DOS should be calculated
1077 logical tpdos
1078 ! dosmsum is .true. if the partial DOS is to be summed over m
1079 logical dosmsum
1080 ! dosssum is .true. if the partial DOS is to be summed over spin
1081 logical dosssum
1082 ! number of optical matrix components required
1083 integer noptcomp
1084 ! required optical matrix components
1085 integer optcomp(3,27)
1086 ! intraband is .true. if the intraband term is to be added to the optical matrix
1087 logical intraband
1088 ! lmirep is .true. if the (l,m) band characters should correspond to the
1089 ! irreducible representations of the site symmetries
1090 logical lmirep
1091 ! spin-quantisation axis in Cartesian coordinates used when plotting the
1092 ! spin-resolved DOS and band structure (z-axis by default)
1093 real(8) sqaxis(3)
1094 ! q-vector in lattice and Cartesian coordinates for calculating the matrix
1095 ! elements ⟨i,k+q| exp(iq⋅r) |j,k⟩
1096 real(8) vecql(3),vecqc(3)
1097 ! maximum initial-state energy allowed in ELNES transitions
1098 real(8) emaxelnes
1099 ! structure factor energy window
1100 real(8) wsfac(2)
1101 
1102 !-------------------------------------!
1103 ! 1D/2D/3D plotting variables !
1104 !-------------------------------------!
1105 ! number of vertices in 1D plot
1106 integer nvp1d
1107 ! total number of points in 1D plot
1108 integer npp1d
1109 ! starting point for 1D plot
1110 integer ip01d
1111 ! vertices in lattice coordinates for 1D plot
1112 real(8), allocatable :: vvlp1d(:,:)
1113 ! distance to vertices in 1D plot
1114 real(8), allocatable :: dvp1d(:)
1115 ! plot vectors in lattice coordinates for 1D plot
1116 real(8), allocatable :: vplp1d(:,:)
1117 ! distance to points in 1D plot
1118 real(8), allocatable :: dpp1d(:)
1119 ! corner vectors of 2D plot in lattice coordinates
1120 real(8) vclp2d(3,0:2)
1121 ! grid sizes of 2D plot
1122 integer np2d(2)
1123 ! corner vectors of 3D plot in lattice coordinates
1124 real(8) vclp3d(3,0:3)
1125 ! grid sizes of 3D plot
1126 integer np3d(3)
1127 
1128 !-------------------------------------------------------------!
1129 ! OEP, Hartree-Fock and Kohn-Sham inversion variables !
1130 !-------------------------------------------------------------!
1131 ! maximum number of core states over all species
1132 integer ncrmax
1133 ! maximum number of OEP iterations
1134 integer maxitoep
1135 ! OEP initial and subsequent step sizes
1137 ! exchange potential and magnetic field
1138 real(8), allocatable :: vxmt(:,:),vxir(:),bxmt(:,:,:),bxir(:,:)
1139 ! OEP residual functions
1140 real(8), allocatable :: dvxmt(:,:),dvxir(:),dbxmt(:,:,:),dbxir(:,:)
1141 ! magnitude of the OEP residual
1142 real(8) resoep
1143 ! hybrid is .true. if a hybrid functional is to be used
1145 ! hybrid functional mixing coefficient
1146 real(8) hybridc
1147 
1148 !-------------------------------------------------------------!
1149 ! response function and perturbation theory variables !
1150 !-------------------------------------------------------------!
1151 ! |G| cut-off for response functions
1152 real(8) gmaxrf
1153 ! energy cut-off for response functions
1154 real(8) emaxrf
1155 ! number of G-vectors for response functions
1156 integer ngrf
1157 ! matrix bandwidth of response functions in the G-vector basis
1158 integer mbwgrf
1159 ! number of response function frequencies
1160 integer nwrf
1161 ! complex response function frequencies
1162 complex(8), allocatable :: wrf(:)
1163 ! maximum number of spherical Bessel functions on the coarse radial mesh over
1164 ! all species
1165 integer njcmax
1166 
1167 !-------------------------------------------------!
1168 ! Bethe-Salpeter equation (BSE) variables !
1169 !-------------------------------------------------!
1170 ! number of valence and conduction states for transitions
1171 integer nvbse,ncbse
1172 ! default number of valence and conduction states
1174 ! maximum number of extra valence and conduction states
1175 integer, parameter :: maxxbse=20
1176 ! number of extra valence and conduction states
1178 ! extra valence and conduction states
1180 ! total number of transitions
1181 integer nvcbse
1182 ! size of blocks in BSE Hamiltonian matrix
1183 integer nbbse
1184 ! size of BSE matrix (= 2*nbbse)
1185 integer nmbse
1186 ! index from BSE valence states to second-variational states
1187 integer, allocatable :: istbse(:,:)
1188 ! index from BSE conduction states to second-variational states
1189 integer, allocatable :: jstbse(:,:)
1190 ! index from BSE valence-conduction pair and k-point to location in BSE matrix
1191 integer, allocatable :: ijkbse(:,:,:)
1192 ! BSE Hamiltonian
1193 complex(8), allocatable :: hmlbse(:,:)
1194 ! BSE Hamiltonian eigenvalues
1195 real(8), allocatable :: evalbse(:)
1196 ! if bsefull is .true. then the full BSE Hamiltonian is calculated, otherwise
1197 ! only the Hermitian block
1198 logical bsefull
1199 ! if hxbse/hdbse is .true. then the exchange/direct term is included in the BSE
1200 ! Hamiltonian
1201 logical hxbse,hdbse
1202 
1203 !--------------------------!
1204 ! timing variables !
1205 !--------------------------!
1206 ! initialisation
1207 real(8) timeinit
1208 ! Hamiltonian and overlap matrix set up
1209 real(8) timemat
1210 ! first-variational calculation
1211 real(8) timefv
1212 ! second-variational calculation
1213 real(8) timesv
1214 ! charge density calculation
1215 real(8) timerho
1216 ! potential calculation
1217 real(8) timepot
1218 ! force calculation
1219 real(8) timefor
1220 
1221 !-----------------------------!
1222 ! numerical constants !
1223 !-----------------------------!
1224 real(8), parameter :: pi=3.1415926535897932385d0
1225 real(8), parameter :: twopi=6.2831853071795864769d0
1226 real(8), parameter :: fourpi=12.566370614359172954d0
1227 ! spherical harmonic Y₀₀ = 1/√4π and its inverse
1228 real(8), parameter :: y00=0.28209479177387814347d0
1229 real(8), parameter :: y00i=3.54490770181103205460d0
1230 ! complex constants
1231 complex(4), parameter :: czero=(0.e0,0.e0), cone=(1.e0,0.e0)
1232 complex(8), parameter :: zzero=(0.d0,0.d0), zone=(1.d0,0.d0), zi=(0.d0,1.d0)
1233 ! Pauli spin matrices:
1234 ! σ_x = ⎛0 1⎞ σ_y = ⎛0 -i⎞ σ_z = ⎛1 0⎞
1235 ! ⎝1 0⎠ ⎝i 0⎠ ⎝0 -1⎠
1236 ! Planck constant in SI units (exact, CODATA 2018)
1237 real(8), parameter :: h_si=6.62607015d-34
1238 ! reduced Planck constant ℏ in SI units
1239 real(8), parameter :: hbar_si=h_si/twopi
1240 ! speed of light in SI units (exact, CODATA 2018)
1241 real(8), parameter :: sol_si=299792458d0
1242 ! speed of light in atomic units (1/α) (CODATA 2018)
1243 real(8), parameter :: sol=137.035999084d0
1244 ! scaled speed of light
1245 real(8) solsc
1246 ! Hartree in SI units (CODATA 2018)
1247 real(8), parameter :: ha_si=4.3597447222071d-18
1248 ! Hartree in eV (CODATA 2018)
1249 real(8), parameter :: ha_ev=27.211386245988d0
1250 ! Hartree in inverse meters
1251 real(8), parameter :: ha_im=ha_si/(h_si*sol_si)
1252 ! Boltzmann constant in SI units (exact, CODATA 2018)
1253 real(8), parameter :: kb_si=1.380649d-23
1254 ! Boltzmann constant in Hartree/kelvin
1255 real(8), parameter :: kboltz=kb_si/ha_si
1256 ! electron charge in SI units (exact, CODATA 2018)
1257 real(8), parameter :: e_si=1.602176634d-19
1258 ! Bohr radius in SI units (CODATA 2018)
1259 real(8), parameter :: br_si=0.529177210903d-10
1260 ! Bohr radius in Angstroms
1261 real(8), parameter :: br_ang=br_si*1.d10
1262 ! atomic unit of magnetic flux density in SI
1263 real(8), parameter :: b_si=hbar_si/(e_si*br_si**2)
1264 ! atomic unit of electric field in SI
1265 real(8), parameter :: ef_si=ha_si/(e_si*br_si)
1266 ! atomic unit of time in SI
1267 real(8), parameter :: t_si=hbar_si/ha_si
1268 ! electron g-factor (CODATA 2018)
1269 real(8), parameter :: gfacte=2.00231930436256d0
1270 ! electron mass in SI (CODATA 2018)
1271 real(8), parameter :: em_si=9.1093837015d-31
1272 ! atomic mass unit in SI (CODATA 2018)
1273 real(8), parameter :: amu_si=1.66053906660d-27
1274 ! atomic mass unit in electron masses
1275 real(8), parameter :: amu=amu_si/em_si
1276 
1277 !---------------------------------!
1278 ! miscellaneous variables !
1279 !---------------------------------!
1280 ! code version
1281 integer, parameter :: version(3)=[10,9,5]
1282 ! maximum number of tasks
1283 integer, parameter :: maxtasks=40
1284 ! number of tasks
1285 integer ntasks
1286 ! task index
1287 integer itask
1288 ! task array
1289 integer tasks(maxtasks)
1290 ! current task
1291 integer task
1292 ! filename extension for files generated by gndstate
1293 character(256) :: filext='.OUT'
1294 ! scratch space path
1295 character(256) scrpath
1296 ! number of note lines
1297 integer notelns
1298 ! notes to include in INFO.OUT
1299 character(256), allocatable :: notes(:)
1300 
1301 end module
1302 
real(8) socscf
Definition: modmain.f90:232
integer nmatmax
Definition: modmain.f90:849
real(8), dimension(maxspecies) rnucl
Definition: modmain.f90:85
integer ngrkf
Definition: modmain.f90:1067
real(8) ecvcut
Definition: modmain.f90:117
integer maxlatvstp
Definition: modmain.f90:1031
integer nstrain
Definition: modmain.f90:1007
real(8), dimension(3, 3) dafspc
Definition: modmain.f90:331
real(8) epsband
Definition: modmain.f90:818
character(256) scrpath
Definition: modmain.f90:1295
integer ncrmax
Definition: modmain.f90:1132
real(8), dimension(:,:), allocatable rcmt
Definition: modmain.f90:177
real(8) dchgexs
Definition: modmain.f90:722
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:674
integer, parameter maxspecies
Definition: modmain.f90:30
real(8) efermi
Definition: modmain.f90:901
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:1177
real(8) scissor
Definition: modmain.f90:905
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:742
integer, dimension(maxspecies) npcmt
Definition: modmain.f90:214
real(8) epsforce
Definition: modmain.f90:1057
logical tjr
Definition: modmain.f90:618
integer, dimension(maxxbse) jstxbse
Definition: modmain.f90:1179
real(8), dimension(3) efieldl
Definition: modmain.f90:314
integer lorbordc
Definition: modmain.f90:835
logical tscissor
Definition: modmain.f90:903
integer mixtype
Definition: modmain.f90:693
integer, dimension(3) ktype
Definition: modmain.f90:604
real(8), dimension(3) momtot
Definition: modmain.f90:736
integer natmmax
Definition: modmain.f90:38
real(8), parameter twopi
Definition: modmain.f90:1225
integer nwrf
Definition: modmain.f90:1160
integer, parameter maxapword
Definition: modmain.f90:752
integer npcmtmax
Definition: modmain.f90:216
integer, dimension(3) ikgap
Definition: modmain.f90:911
character(256) filext
Definition: modmain.f90:1293
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer, dimension(maxspecies) nlorb
Definition: modmain.f90:784
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:851
logical tatdisp
Definition: modmain.f90:59
real(8) engyx
Definition: modmain.f90:967
integer nfgrzc
Definition: modmain.f90:414
real(8), dimension(:,:), allocatable evalsv
Definition: modmain.f90:913
real(8), dimension(3, 3) davec
Definition: modmain.f90:12
integer istrain
Definition: modmain.f90:1009
real(8), dimension(:), allocatable, target rhmg
Definition: modmain.f90:610
integer task
Definition: modmain.f90:1291
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:687
real(8), dimension(:,:,:,:), allocatable lofr
Definition: modmain.f90:812
real(8), parameter ha_si
Definition: modmain.f90:1247
integer lmmaxo
Definition: modmain.f90:203
logical tshift0
Definition: modmain.f90:352
integer nvcbse
Definition: modmain.f90:1181
real(8), dimension(:,:), allocatable vxcmt
Definition: modmain.f90:632
integer, dimension(3) xctype
Definition: modmain.f90:586
logical, dimension(:,:), allocatable tfeqat
Definition: modmain.f90:372
integer ngtc
Definition: modmain.f90:392
real(8) rwigner
Definition: modmain.f90:734
integer fsmtype0
Definition: modmain.f90:251
real(8), dimension(:,:), allocatable occcr
Definition: modmain.f90:927
logical tjr0
Definition: modmain.f90:618
real(8), dimension(3) jtot
Definition: modmain.f90:746
real(8) resoep
Definition: modmain.f90:1142
real(8), dimension(:), allocatable ecir
Definition: modmain.f90:630
logical spinpol
Definition: modmain.f90:228
real(8), dimension(:,:,:), allocatable oalo
Definition: modmain.f90:853
integer, parameter maxlapw
Definition: modmain.f90:195
real(8), dimension(:), pointer, contiguous rhoir
Definition: modmain.f90:612
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:1144
integer nkpt
Definition: modmain.f90:461
integer npfftg
Definition: modmain.f90:404
integer mbwgrf
Definition: modmain.f90:1158
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
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:945
real(8), dimension(:,:,:), allocatable rlmt
Definition: modmain.f90:179
complex(4), parameter czero
Definition: modmain.f90:1231
integer reducek0
Definition: modmain.f90:455
integer msmgmt
Definition: modmain.f90:222
logical tfav0
Definition: modmain.f90:995
real(8) forcemax
Definition: modmain.f90:989
integer, dimension(maxspecies) npmt
Definition: modmain.f90:213
real(8) momtotm
Definition: modmain.f90:738
logical tforce0
Definition: modmain.f90:981
real(8), dimension(3) mommttot
Definition: modmain.f90:744
integer nlotot
Definition: modmain.f90:788
real(8) dnrmtscf
Definition: modmain.f90:148
real(8) sxcscf
Definition: modmain.f90:666
integer, dimension(:,:), allocatable ivq
Definition: modmain.f90:529
real(8), dimension(:,:), allocatable vclmt
Definition: modmain.f90:622
integer ngkmax
Definition: modmain.f90:499
real(8), parameter amu_si
Definition: modmain.f90:1273
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:579
logical tevecsv
Definition: modmain.f90:915
real(8) omega
Definition: modmain.f90:20
real(8), dimension(maxlorbord, maxlorb, maxspecies) lorbe0
Definition: modmain.f90:802
real(8), dimension(2) amixpm
Definition: modmain.f90:700
real(8), dimension(:), allocatable dpp1d
Definition: modmain.f90:1118
logical lorbcnd
Definition: modmain.f90:833
real(8) tauoep
Definition: modmain.f90:1136
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:814
real(8), dimension(:,:), allocatable rbshto
Definition: modmain.f90:567
integer, dimension(:,:,:), allocatable ijkbse
Definition: modmain.f90:1191
integer iscl
Definition: modmain.f90:1043
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:636
logical spinsprl
Definition: modmain.f90:283
real(8), parameter kboltz
Definition: modmain.f90:1255
real(8) swidth
Definition: modmain.f90:889
real(8), dimension(:,:), allocatable evalcr
Definition: modmain.f90:929
real(8), dimension(:,:), pointer, contiguous rhomt
Definition: modmain.f90:612
logical hybrid0
Definition: modmain.f90:1144
real(8) epsocc
Definition: modmain.f90:897
complex(8), dimension(:), allocatable wrf
Definition: modmain.f90:1162
real(8) dncgga
Definition: modmain.f90:602
real(8), dimension(3) vkloff0
Definition: modmain.f90:450
character(256), dimension(maxspecies) spfname
Definition: modmain.f90:74
logical tstop
Definition: modmain.f90:1047
real(8), parameter amu
Definition: modmain.f90:1275
real(8), dimension(:,:), allocatable bdmta
Definition: modmain.f90:638
integer nbbse
Definition: modmain.f90:1183
real(8) dnempty0
Definition: modmain.f90:877
real(8), dimension(:,:,:), allocatable rhocr
Definition: modmain.f90:933
real(8) fermidos
Definition: modmain.f90:907
real(8), dimension(3, 0:3) vclp3d
Definition: modmain.f90:1124
integer iqss
Definition: modmain.f90:297
integer, dimension(3, 3, 48) symlat
Definition: modmain.f90:344
complex(4), parameter cone
Definition: modmain.f90:1231
integer, dimension(maxxbse) istxbse
Definition: modmain.f90:1179
integer ngrf
Definition: modmain.f90:1156
logical tssxc
Definition: modmain.f90:664
integer, dimension(:,:,:), allocatable ivkik
Definition: modmain.f90:467
real(8), dimension(:), allocatable chgmt
Definition: modmain.f90:730
character(264) kdescr
Definition: modmain.f90:606
integer nfgrz
Definition: modmain.f90:412
integer nvxbse
Definition: modmain.f90:1177
integer notelns
Definition: modmain.f90:1297
integer lorbordmax
Definition: modmain.f90:792
real(8), dimension(3, maxsymcrys) vtlsymc
Definition: modmain.f90:360
integer, parameter maxxbse
Definition: modmain.f90:1175
real(8), dimension(:,:,:), allocatable ololo
Definition: modmain.f90:855
complex(8), parameter zone
Definition: modmain.f90:1232
real(8) timemat
Definition: modmain.f90:1209
logical mixrho
Definition: modmain.f90:685
character(264) xcdescr
Definition: modmain.f90:588
real(8), dimension(:,:), allocatable ecmt
Definition: modmain.f90:630
integer, dimension(maxspecies) lmoapw
Definition: modmain.f90:760
real(8), dimension(:,:), allocatable rbshti
Definition: modmain.f90:563
logical nosource
Definition: modmain.f90:662
integer, dimension(:), allocatable iqrzf
Definition: modmain.f90:543
real(8), dimension(:,:,:), allocatable bxmt
Definition: modmain.f90:1138
real(8), dimension(:,:), allocatable forcetot
Definition: modmain.f90:985
real(8), dimension(3) vkloff
Definition: modmain.f90:450
integer lmaxo
Definition: modmain.f90:201
real(8), dimension(:), allocatable vxir
Definition: modmain.f90:1138
real(8), dimension(3) vqlss
Definition: modmain.f90:293
integer lmaxi0
Definition: modmain.f90:205
logical trhonorm
Definition: modmain.f90:616
integer, parameter maxkst
Definition: modmain.f90:917
integer, dimension(:,:), allocatable lspnsyms
Definition: modmain.f90:378
integer nkptnr
Definition: modmain.f90:463
real(8) c_tb09
Definition: modmain.f90:676
real(8), parameter pi
Definition: modmain.f90:1224
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:1096
integer nrspmax
Definition: modmain.f90:109
real(8) nempty0
Definition: modmain.f90:877
integer, parameter maxsymcrys
Definition: modmain.f90:356
integer, dimension(:), allocatable igrzfc
Definition: modmain.f90:418
real(8), dimension(:), allocatable dvxir
Definition: modmain.f90:1140
real(8), dimension(:,:), allocatable bxir
Definition: modmain.f90:1138
integer, dimension(maxapword, 0:maxlapw, maxspecies) apwdm
Definition: modmain.f90:768
real(8) stressmax
Definition: modmain.f90:1020
integer nkstlist
Definition: modmain.f90:919
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:1079
integer maxscl0
Definition: modmain.f90:1041
integer nxlo
Definition: modmain.f90:839
real(8) omega0
Definition: modmain.f90:20
real(8) timefor
Definition: modmain.f90:1219
logical tc_tb09
Definition: modmain.f90:678
real(8) vmaxefc
Definition: modmain.f90:320
integer dlmaxo
Definition: modmain.f90:201
real(8), dimension(:), allocatable vsir
Definition: modmain.f90:649
integer xcspin
Definition: modmain.f90:590
integer ntasks
Definition: modmain.f90:1285
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:754
integer, dimension(:,:), allocatable jstbse
Definition: modmain.f90:1189
real(8) engyvxc
Definition: modmain.f90:961
real(8) nrmtscf
Definition: modmain.f90:148
integer symtype
Definition: modmain.f90:340
real(8) epschg
Definition: modmain.f90:710
real(8), dimension(2) broydpm
Definition: modmain.f90:704
real(8), dimension(:,:), allocatable exmt
Definition: modmain.f90:628
integer kgrad
Definition: modmain.f90:608
real(8), parameter t_si
Definition: modmain.f90:1267
real(8) timerho
Definition: modmain.f90:1215
complex(8), dimension(:,:,:,:), allocatable sfacgk
Definition: modmain.f90:509
logical tefvr
Definition: modmain.f90:866
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:1016
real(8), dimension(:), allocatable vxcir
Definition: modmain.f90:632
integer mixsdb
Definition: modmain.f90:702
real(8), dimension(:,:), allocatable vkc
Definition: modmain.f90:473
real(8) engynn
Definition: modmain.f90:949
integer, dimension(3, 3, 48) symkpt
Definition: modmain.f90:459
logical bforb
Definition: modmain.f90:234
integer nlomax
Definition: modmain.f90:786
real(8) chgcrtot
Definition: modmain.f90:716
integer lmmaxdb
Definition: modmain.f90:1073
real(8), dimension(:,:), allocatable vgc
Definition: modmain.f90:420
logical tforce
Definition: modmain.f90:981
integer, dimension(3) ngridk0
Definition: modmain.f90:448
real(8) rmtdelta
Definition: modmain.f90:160
real(8) e0min
Definition: modmain.f90:823
real(8), dimension(3, 3) avecref
Definition: modmain.f90:1022
logical, dimension(maxstsp, maxspecies) spcore
Definition: modmain.f90:127
real(8) timeinit
Definition: modmain.f90:1207
real(8) swidth0
Definition: modmain.f90:889
integer, dimension(:,:), allocatable nmat
Definition: modmain.f90:847
integer nrcmtmax
Definition: modmain.f90:175
real(8), dimension(:,:), allocatable wxcmt
Definition: modmain.f90:674
complex(8), dimension(:,:), allocatable ylmg
Definition: modmain.f90:428
real(8) timepot
Definition: modmain.f90:1217
logical tefield
Definition: modmain.f90:310
real(8), dimension(:,:), allocatable rmtl
Definition: modmain.f90:167
integer ncbse0
Definition: modmain.f90:1173
real(8) reducebf0
Definition: modmain.f90:279
integer itask
Definition: modmain.f90:1287
integer nstsv
Definition: modmain.f90:883
real(8), dimension(:,:,:), allocatable taucr
Definition: modmain.f90:672
real(8), dimension(2) wplot
Definition: modmain.f90:1071
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:561
real(8), dimension(:,:,:,:,:,:), allocatable haa
Definition: modmain.f90:857
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:1154
logical tlast
Definition: modmain.f90:1045
real(8), dimension(:), allocatable dvp1d
Definition: modmain.f90:1114
real(8), dimension(:), allocatable wkpt
Definition: modmain.f90:475
integer nspncr
Definition: modmain.f90:937
real(8), dimension(9) taulatv
Definition: modmain.f90:1035
real(8), dimension(9) stressp
Definition: modmain.f90:1018
real(8), parameter h_si
Definition: modmain.f90:1237
real(8) gmaxrf
Definition: modmain.f90:1152
real(8) delorb
Definition: modmain.f90:800
logical lmirep
Definition: modmain.f90:1090
real(8) esccut
Definition: modmain.f90:119
real(8), dimension(3) sqaxis
Definition: modmain.f90:1093
logical intraband
Definition: modmain.f90:1087
real(8) rndatposc
Definition: modmain.f90:56
integer, dimension(:), allocatable igrzf
Definition: modmain.f90:416
real(8) jtotm
Definition: modmain.f90:746
integer, dimension(:), allocatable igfft
Definition: modmain.f90:406
real(8) radkpt
Definition: modmain.f90:446
real(8) chgir
Definition: modmain.f90:728
integer, dimension(maxsymcrys) lsplsymc
Definition: modmain.f90:364
real(8), dimension(:,:,:), allocatable bxcmt
Definition: modmain.f90:634
real(8), dimension(:,:), allocatable bsir
Definition: modmain.f90:656
integer, parameter maxlorbord
Definition: modmain.f90:780
logical tefvs
Definition: modmain.f90:869
logical, dimension(maxlorbord, maxlorb, maxspecies) lorbve
Definition: modmain.f90:810
real(8), dimension(:,:,:), pointer, contiguous magmt
Definition: modmain.f90:614
real(8) omegamt
Definition: modmain.f90:169
real(8), dimension(maxapword, 0:maxlapw, maxspecies) apwe0
Definition: modmain.f90:764
real(8) occmax
Definition: modmain.f90:895
integer nvbse0
Definition: modmain.f90:1173
real(8), dimension(maxspecies) chgcr
Definition: modmain.f90:714
real(8) deltaem
Definition: modmain.f90:481
real(8), dimension(:,:,:), allocatable lorbe
Definition: modmain.f90:806
real(8) engytot
Definition: modmain.f90:975
integer nsymlat
Definition: modmain.f90:342
integer lmaxdb
Definition: modmain.f90:1073
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:718
real(8), dimension(3) dbfieldc0
Definition: modmain.f90:271
integer, parameter nplorb
Definition: modmain.f90:782
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:1100
complex(8), dimension(:,:), allocatable zfshti
Definition: modmain.f90:573
real(8), dimension(:,:,:), allocatable rlcmt
Definition: modmain.f90:181
real(8) tempk
Definition: modmain.f90:682
real(8), dimension(maxspecies) spmass
Definition: modmain.f90:101
integer, dimension(3, 27) optcomp
Definition: modmain.f90:1085
integer, dimension(2, maxkst) kstlist
Definition: modmain.f90:921
real(8), dimension(:,:), allocatable bdir
Definition: modmain.f90:636
real(8) rgkmax
Definition: modmain.f90:493
real(8), dimension(:), allocatable tauatp
Definition: modmain.f90:1005
integer, dimension(3) ngridk
Definition: modmain.f90:448
real(8), dimension(:,:,:), allocatable apwe
Definition: modmain.f90:766
real(8), dimension(:,:), allocatable ffacg
Definition: modmain.f90:432
real(8) maxforce
Definition: modmain.f90:992
logical cmagz
Definition: modmain.f90:242
real(8) engybext
Definition: modmain.f90:965
integer ngvec
Definition: modmain.f90:396
logical spinorb0
Definition: modmain.f90:230
real(8) chgzn
Definition: modmain.f90:712
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:899
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:943
real(8) engyvcl
Definition: modmain.f90:957
real(8), parameter hbar_si
Definition: modmain.f90:1239
integer, parameter maxtasks
Definition: modmain.f90:1283
integer, dimension(0:maxlapw, maxspecies) apword
Definition: modmain.f90:756
complex(8), dimension(:,:,:), allocatable gntyry
Definition: modmain.f90:863
real(8), dimension(:,:), allocatable forcehf
Definition: modmain.f90:983
real(8), dimension(:), allocatable vclir
Definition: modmain.f90:622
real(8), dimension(3, maxatoms, maxspecies) mommtfix0
Definition: modmain.f90:259
real(8), parameter sol
Definition: modmain.f90:1243
logical tpdos
Definition: modmain.f90:1077
logical tfr_sp
Definition: modmain.f90:816
integer nspinor
Definition: modmain.f90:267
real(8), dimension(3) dvqlss
Definition: modmain.f90:293
real(8), parameter gfacte
Definition: modmain.f90:1269
real(8), dimension(3) momir
Definition: modmain.f90:740
real(8), dimension(3) afieldc
Definition: modmain.f90:325
integer mefvs
Definition: modmain.f90:871
integer latvopt
Definition: modmain.f90:1029
real(8) engykncr
Definition: modmain.f90:947
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:1120
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:698
integer ip01d
Definition: modmain.f90:1110
integer, dimension(:,:,:), allocatable ivqiq
Definition: modmain.f90:531
real(8), dimension(maxspecies) voltmsn
Definition: modmain.f90:93
logical tavref
Definition: modmain.f90:1024
real(8), dimension(:,:), allocatable bxcir
Definition: modmain.f90:634
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:1241
integer nmbse
Definition: modmain.f90:1185
real(8), dimension(:,:), allocatable dvxmt
Definition: modmain.f90:1140
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:645
integer, dimension(:,:), allocatable ivg
Definition: modmain.f90:400
real(8) engyc
Definition: modmain.f90:969
real(8) solsc
Definition: modmain.f90:1245
real(8) engymad
Definition: modmain.f90:959
real(8), dimension(:,:,:,:,:), allocatable hloa
Definition: modmain.f90:859
real(8) tau0atp
Definition: modmain.f90:1003
complex(8), parameter zzero
Definition: modmain.f90:1232
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:651
integer, dimension(:,:,:), allocatable ivqiqnr
Definition: modmain.f90:533
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:695
real(8), dimension(3) vqcss
Definition: modmain.f90:295
real(8) drgkmax
Definition: modmain.f90:493
integer, dimension(maxspecies) nrsp
Definition: modmain.f90:107
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer apwordmax
Definition: modmain.f90:758
real(8) chgcalc
Definition: modmain.f90:726
integer nwrite
Definition: modmain.f90:1051
real(8) engyen
Definition: modmain.f90:951
real(8), dimension(maxspecies) rmt0
Definition: modmain.f90:162
real(8), dimension(:,:,:), allocatable dbxmt
Definition: modmain.f90:1140
real(8) chgmttot
Definition: modmain.f90:732
real(8), dimension(:,:), allocatable forcetotp
Definition: modmain.f90:987
integer, dimension(2, 3) intgv
Definition: modmain.f90:394
logical ssdph
Definition: modmain.f90:285
integer noptcomp
Definition: modmain.f90:1083
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:1261
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:624
integer lolmax
Definition: modmain.f90:796
real(8), parameter y00i
Definition: modmain.f90:1229
integer maxitoep
Definition: modmain.f90:1134
real(8), dimension(maxatoms, maxspecies) mommtfixm
Definition: modmain.f90:261
integer ndspem
Definition: modmain.f90:483
integer stype
Definition: modmain.f90:885
real(8), dimension(:,:), allocatable rfshti
Definition: modmain.f90:565
logical hxbse
Definition: modmain.f90:1201
integer, dimension(maxstsp, maxspecies) nsp
Definition: modmain.f90:121
logical, dimension(maxapword, 0:maxlapw, maxspecies) apwve
Definition: modmain.f90:770
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:1081
integer, dimension(:,:), allocatable ivg0
Definition: modmain.f90:400
logical tfav00
Definition: modmain.f90:995
real(8), dimension(:,:), allocatable bfsmcmt
Definition: modmain.f90:263
logical trotsht
Definition: modmain.f90:559
real(4), dimension(:,:,:,:), allocatable apwfr_sp
Definition: modmain.f90:774
character(64) sdescr
Definition: modmain.f90:887
real(8) mstar
Definition: modmain.f90:893
real(8) chgval
Definition: modmain.f90:720
real(8) epspot
Definition: modmain.f90:1053
integer, dimension(maxlorb, maxspecies) lorbord
Definition: modmain.f90:790
real(8) dsxcscf
Definition: modmain.f90:666
integer, dimension(3) ngridg0
Definition: modmain.f90:386
integer, dimension(maxspecies) nrnucl
Definition: modmain.f90:89
real(8), dimension(:,:,:), allocatable gkc
Definition: modmain.f90:507
logical ptnucl
Definition: modmain.f90:83
complex(8), dimension(:,:), allocatable zfshto
Definition: modmain.f90:577
integer, dimension(3) ngdgc
Definition: modmain.f90:388
real(8), parameter b_si
Definition: modmain.f90:1263
logical trestart
Definition: modmain.f90:1049
real(8) timefv
Definition: modmain.f90:1211
real(8), dimension(:,:), allocatable rfshto
Definition: modmain.f90:569
real(8) engyts
Definition: modmain.f90:973
logical cmagz0
Definition: modmain.f90:242
real(8), dimension(:,:), allocatable vvlp1d
Definition: modmain.f90:1112
real(8) dlefe
Definition: modmain.f90:828
real(8), dimension(:,:), allocatable dbxir
Definition: modmain.f90:1140
logical autolinengy
Definition: modmain.f90:826
real(8), dimension(:), allocatable gc
Definition: modmain.f90:422
integer nswplot
Definition: modmain.f90:1069
real(8) entrpy
Definition: modmain.f90:971
real(8), parameter ha_im
Definition: modmain.f90:1251
real(8), dimension(3, 3) binv0
Definition: modmain.f90:18
logical tbdip
Definition: modmain.f90:641
real(8) deapw
Definition: modmain.f90:762
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:580
integer, dimension(:), allocatable ifqrz
Definition: modmain.f90:541
integer, dimension(3), parameter version
Definition: modmain.f90:1281
real(8), parameter ef_si
Definition: modmain.f90:1265
complex(4), dimension(:,:), allocatable cbshti
Definition: modmain.f90:579
real(8), dimension(:,:), allocatable tauir
Definition: modmain.f90:670
integer maxatpstp
Definition: modmain.f90:1001
real(8), dimension(3) bfieldc0
Definition: modmain.f90:271
real(8), parameter e_si
Definition: modmain.f90:1257
real(8) tau0oep
Definition: modmain.f90:1136
integer lnpsd
Definition: modmain.f90:626
integer, dimension(3) dngridk
Definition: modmain.f90:448
integer lolmmax
Definition: modmain.f90:798
real(8), dimension(3) bfieldc00
Definition: modmain.f90:271
integer nspecies
Definition: modmain.f90:34
complex(8), dimension(:,:), allocatable zbshto
Definition: modmain.f90:575
integer, dimension(2) np2d
Definition: modmain.f90:1122
integer, dimension(maxatoms *maxspecies) idxia
Definition: modmain.f90:45
real(8), dimension(:,:), allocatable efcmt
Definition: modmain.f90:316
integer njcmax
Definition: modmain.f90:1165
complex(8), dimension(:,:), allocatable hmlbse
Definition: modmain.f90:1193
real(8) chgtot
Definition: modmain.f90:724
real(8) engyhar
Definition: modmain.f90:953
logical bsefull
Definition: modmain.f90:1198
real(8) timesv
Definition: modmain.f90:1213
integer, dimension(maxspecies) nstsp
Definition: modmain.f90:113
real(8) gkmax
Definition: modmain.f90:495
complex(8), parameter zi
Definition: modmain.f90:1232
real(8), dimension(:,:,:,:), allocatable rwfcr
Definition: modmain.f90:931
real(8) engybxc
Definition: modmain.f90:963
real(8), parameter br_si
Definition: modmain.f90:1259
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:831
real(8), dimension(3) momfix0
Definition: modmain.f90:253
logical trdstate
Definition: modmain.f90:680
integer, dimension(3) np3d
Definition: modmain.f90:1126
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:1098
real(8) tau0latv
Definition: modmain.f90:1033
real(8) engycl
Definition: modmain.f90:955
integer, dimension(:), allocatable igfft0
Definition: modmain.f90:406
real(8) bdipscf
Definition: modmain.f90:643
integer npmtmax
Definition: modmain.f90:216
complex(4), dimension(:,:), allocatable cbshto
Definition: modmain.f90:580
real(8), parameter em_si
Definition: modmain.f90:1271
real(8), dimension(:,:), pointer, contiguous magir
Definition: modmain.f90:614
real(8), dimension(:,:,:), allocatable jrmt
Definition: modmain.f90:620
logical autoswidth
Definition: modmain.f90:891
real(8), parameter fourpi
Definition: modmain.f90:1226
integer nkspolar
Definition: modmain.f90:485
real(8), dimension(:,:), allocatable rsp
Definition: modmain.f90:135
integer, parameter maxlorb
Definition: modmain.f90:778
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:1195
real(8), dimension(:), allocatable cfrc
Definition: modmain.f90:438
real(8), dimension(:,:,:,:,:), allocatable apwfr
Definition: modmain.f90:772
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:1299
integer, dimension(maxspecies) nlmwf
Definition: modmain.f90:841
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:804
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:794
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:1253
integer nwplot
Definition: modmain.f90:1065
real(8), dimension(:,:,:,:), allocatable hlolo
Definition: modmain.f90:861
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:1059
real(8) chgexs
Definition: modmain.f90:722
real(8), dimension(maxspecies) volnucl
Definition: modmain.f90:87
real(8), dimension(:,:), allocatable vxmt
Definition: modmain.f90:1138
real(8) demaxbnd
Definition: modmain.f90:821
complex(8), dimension(:), allocatable vsig
Definition: modmain.f90:660
logical tafield
Definition: modmain.f90:322
real(8), dimension(:,:), pointer, contiguous bsirc
Definition: modmain.f90:658
real(8), dimension(3) afieldc0
Definition: modmain.f90:325
integer nsymqpt
Definition: modmain.f90:521
integer nvp1d
Definition: modmain.f90:1106
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:647
integer, dimension(maxspecies) nrmti
Definition: modmain.f90:211
logical hdbse
Definition: modmain.f90:1201
integer nvbse
Definition: modmain.f90:1171
integer, dimension(maxtasks) tasks
Definition: modmain.f90:1289
integer npp1d
Definition: modmain.f90:1108
logical molecule
Definition: modmain.f90:47
real(8) epsengy
Definition: modmain.f90:1055
real(8), dimension(2) bandgap
Definition: modmain.f90:909
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:670
integer npfftgc
Definition: modmain.f90:408
integer nstfv
Definition: modmain.f90:881
complex(8), dimension(:,:), allocatable zbshti
Definition: modmain.f90:571
integer nxoapwlo
Definition: modmain.f90:837
real(8), dimension(:,:), allocatable jrir
Definition: modmain.f90:620
real(8), dimension(3) vklem
Definition: modmain.f90:479
real(8) hybridc
Definition: modmain.f90:1146
real(8), parameter y00
Definition: modmain.f90:1228
logical dosocc
Definition: modmain.f90:1075
integer xcgrad
Definition: modmain.f90:600
logical trmt0
Definition: modmain.f90:165
integer maxscl
Definition: modmain.f90:1041
integer ncbse
Definition: modmain.f90:1171
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:1116
integer, dimension(2) jspnfv
Definition: modmain.f90:291
real(8) dgmaxvr
Definition: modmain.f90:384
logical spincore
Definition: modmain.f90:935
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:628
integer npmae0
Definition: modmain.f90:302
real(8), dimension(3) vecqc
Definition: modmain.f90:1096
integer isgkmax
Definition: modmain.f90:491
integer nspnfv
Definition: modmain.f90:289
real(8), dimension(:,:,:), allocatable apwdfr
Definition: modmain.f90:776
real(8) atdfc
Definition: modmain.f90:66
logical primcell
Definition: modmain.f90:49
real(8), dimension(3, 3, 9) strain
Definition: modmain.f90:1011
real(8), parameter ha_ev
Definition: modmain.f90:1249
integer atpopt
Definition: modmain.f90:999
real(8) fracinr
Definition: modmain.f90:209
real(8) deltast
Definition: modmain.f90:1014
real(8), dimension(3) bfieldc
Definition: modmain.f90:269
integer, dimension(maxlorbord, maxlorb, maxspecies) lorbdm
Definition: modmain.f90:808
real(8), dimension(:,:,:), pointer, contiguous bsmt
Definition: modmain.f90:654
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:879
real(8), dimension(:,:), allocatable socfr
Definition: modmain.f90:668
logical autokpt0
Definition: modmain.f90:444
integer, dimension(maxspecies) nrmt
Definition: modmain.f90:150
integer, dimension(:,:), allocatable istbse
Definition: modmain.f90:1187
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