TABLE OF CONTENTS


ABINIT/defs_datatypes [ Modules ]

[ Top ] [ Modules ]

NAME

 defs_datatypes

FUNCTION

 This module contains definitions of all structured datatypes for the
 ABINIT package.
 If you want to add one new datatype, please, examine first whether
 another datatype might meet your need (e.g. adding some records to it).
 Then, if you are sure your new structured datatype is needed,
 write it here, and DOCUMENT it properly (not all datastructure here are
 well documented, it is a shame ...).
 Do not forget : you will likely be the major winner if you document
 properly.
 Proper documentation of a structured datatype means :
  (1) Mention it in the list just below
  (2) Describe it in the NOTES section
  (3) Put it in alphabetical order in the the main section of this module
  (4) Document each of its records, except if they are described elsewhere
      (this exception is typically the case of the dataset associated with
      input variables, for which there is a help file)

 List of datatypes :
 * ebands_t : different information about the band structure
 * datafil_type : the data (units,filenames) related to files
 * pseudopotential_type : for norm-conserving pseudopotential, all the
   information
 * pspheader_type : for norm-conserving pseudopotentials, the header of the file

COPYRIGHT

 Copyright (C) 2001-2018 ABINIT group (XG)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

SOURCE

39 #if defined HAVE_CONFIG_H
40 #include "config.h"
41 #endif
42 
43 #include "abi_common.h"
44 
45 module defs_datatypes
46 
47  use defs_basis
48 
49  implicit none

defs_datatypes/ebands_t [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 ebands_t

FUNCTION

 It contains different information about the band structure: eigenenergies, residuals, derivative of occupation
 numbers vs energy in case of metallic occupations and Brillouin zone according to the context: k points,
 occupation numbers, storage mode of wavefunctions, weights ...
 For example, the initial Brillouin zone, set up in the dataset, will be treated in the response function part of
 the code, to give a reduced Brillouin zone different from the original one, due to the breaking of the symmetries
 related to the existence of a wavevector, or the lack of time-reversal invariance.

SOURCE

 68  type ebands_t
 69 
 70 ! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines,
 71 ! declared in another part of ABINIT, that might need to take into account your modification.
 72 
 73   integer :: bantot                ! total number of bands (sum(nband(:))
 74   integer :: mband                 ! Max number of bands i.e MAXVAL(nband) (to dimension arrays)
 75   integer :: nkpt                  ! number of k points
 76   integer :: nspinor               ! 1 for collinear, 2 for noncollinear.
 77   integer :: nsppol                ! number of spin-polarizations
 78   integer :: occopt                ! Occupation option, see input variable.
 79 
 80   real(dp) :: entropy              ! Entropy associated with the smearing (adimensional)
 81   real(dp) :: fermie               ! Fermi energy
 82   real(dp) :: nelect               ! Number of electrons.
 83   real(dp) :: tphysel              ! Physical temperature of electrons.
 84   real(dp) :: tsmear               ! Temperature of smearing.
 85 
 86   integer,allocatable :: istwfk(:)
 87   ! istwfk(nkpt)
 88   ! Storage mode at each k point.
 89 
 90   integer,allocatable :: nband(:)
 91   ! nband(nkpt*nsppol)
 92   ! Number of bands at each k point and spin-polarisation.
 93 
 94   integer,allocatable :: npwarr(:)
 95   ! npwarr(nkpt)
 96   ! Number of plane waves at each k point.
 97 
 98   real(dp),allocatable :: kptns(:,:)
 99   ! kptns(3,nkpt)
100   ! k-point vectors.
101 
102   real(dp),allocatable :: eig(:,:,:)
103   ! eig(mband,nkpt,nsppol)
104   ! Eigenvalues of each band.
105 
106   real(dp),allocatable :: lifetime(:,:,:)
107   ! lifetime(mband,nkpt,nsppol)
108   ! Lifetime of each band
109 
110   real(dp),allocatable :: occ(:,:,:)
111   ! occ(mband,nkpt,nsppol)
112   ! occupation of each band.
113 
114   real(dp),allocatable :: doccde(:,:,:)
115   ! doccde(mband,nkpt,nsppol)
116   ! derivative of the occupation of each band wrt energy (needed for RF).
117 
118   real(dp),allocatable :: wtk(:)
119   ! wtk(nkpt)
120   ! weight of each k point, normalized to one.
121 
122 !EBANDS_NEW
123   integer :: kptopt
124   ! Option used for k-point generation.
125 
126   integer :: nshiftk_orig, nshiftk
127   ! original number of shifts given in input and the actual value (changed in inkpts)
128 
129   real(dp) :: charge
130   ! nelect = zion - charge
131 
132   integer :: kptrlatt_orig(3,3), kptrlatt(3,3)
133   ! Original value of kptrlatt and value after the call to inkpts
134 
135   real(dp),allocatable :: shiftk_orig(:,:)
136   ! shiftk_orig(3,nshiftk_orig)
137   ! original shifts given in input (changed in inkpts).
138 
139   real(dp),allocatable :: shiftk(:,:)
140   ! shiftk(3,nshiftk)
141 
142  end type ebands_t

defs_datatypes/nctab_t [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 nctab_type

FUNCTION

  This object contains TABulated data for NC pseudopotentials
  It follows the conventions used in pawtab so that we can reuse
  the PAW routines for the treatment of model core change as well
  as the code in the atm2fft routines used to build approximated densities
  from atomic quantities. Methods are defined in m_psps.

SOURCE

208  type,public :: nctab_t
209 
210    integer :: mqgrid_vl=0
211    ! Number of points in the reciprocal space grid on which
212    ! the radial functions are specified (same grid as the one used for the local part).
213 
214    logical :: has_tvale=.False.
215     ! True if the norm-conserving pseudopotential provides the atomic pseudized valence density.
216     ! If alchemy, has_tvale is True only if all the mixed pseudos
217     ! have the valence charge in the pseudopotential file.
218 
219    logical :: has_tcore=.False.
220     ! True if the norm-conserving pseudopotential has the model core-charge for NLCC.
221     ! If alchemy, has_tcore is True if at least one of the mixed pseudos has NLCC.
222     ! See also tcorespl
223 
224    real(dp) :: dncdq0=zero
225     ! Gives 1/q d(tNcore(q))/dq for q=0
226     ! (tNcore(q) = FT of pseudo core density)
227 
228    real(dp) :: d2ncdq0=zero
229     ! Gives contribution of d2(tNcore(q))/d2q for q=0
230     ! \int{(16/15)*pi^5*n(r)*r^6* dr}
231     ! (tNcore(q) = FT of pseudo core density)
232 
233    real(dp) :: dnvdq0=zero
234     ! Gives 1/q d(tNvale(q))/dq for q=0
235     ! (tNvale(q) = FT of pseudo valence density)
236 
237    real(dp), allocatable :: tvalespl(:,:)
238     ! tvalespl(mqgrid_vl,2)
239     ! Gives the pseudo valence density in reciprocal space on a regular grid
240     ! Initialized only if has_nctvale(itypat)
241 
242    real(dp), allocatable :: tcorespl(:,:)
243     ! tcorespl(mqgrid_vl,2)
244     ! Gives the pseudo core density in reciprocal space on a regular grid.
245     ! tcorespl is **always** allocated and initialized with zeros if not has_tcore
246     ! A similar approach is used in PAW.
247 
248  end type nctab_t

defs_datatypes/pseudopotential_gth_type [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 pseudopotential_gth_type

FUNCTION

 This structure is a sub-structure of pseudopotential_type used to
 store parameters from the GTH pseudo-potentials. All arrays have
 indices running on 1:npsp for each read pseudo-file. The 'set' array
 is a check array, since several different pseudo can be used in a simulation
 it set a flag for each npsp if params have been set or not. This is
 redundant with psps%pspcod in the way that when psps%pspcod(i) is 2,
 then gth_params%set(i) is .true.. GTH pseudo previous to wavelets introduction
 doesn't have geometric information. These have been added on the last line.
 It is three radius information, the %hasGeometry flag is there to know
 which kind of pseudo has been read.

SOURCE

165  type pseudopotential_gth_type
166 
167 ! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines,
168 ! declared in another part of ABINIT, that might need to take into account your modification.
169 
170   real(dp), allocatable :: psppar(:, :, :)
171    ! These are {rloc, C(1...4)} coefficients for psppar(0, :, :) indices,
172    ! Followed by the h coefficients for psppar(1:2, :, :) indices.
173    !  size (0:2, 0:4, npsp)
174 
175   real(dp), allocatable :: radii_cf(:, :)
176    ! Cut-off radii for core part and long-range part.
177    ! radii_cf(:, 1) is for the long-range cut-off and
178    ! radii_cf(:, 2) is for the core cut-off. size (npsp, 2)
179 
180   real(dp), allocatable :: psp_k_par(:, :, :)
181    ! Spin orbit coefficients in HGH/GTH formats: k11p etc... see psp3ini.F90
182    !   dimension = num l channels, 3 coeffs, num psp = (1:lmax+1,1:3,npsp)
183 
184   logical, allocatable :: hasGeometry(:)
185    ! Flag for geometric information in the pseudo. size (npsp)
186 
187   logical, allocatable :: set(:)
188    ! Consistency array, used for checking size (npsp)
189 
190  end type pseudopotential_gth_type

defs_datatypes/pseudopotential_type [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 pseudopotential_type

FUNCTION

 This structured datatype contains all the information about one
 norm-conserving pseudopotential, including the description of the local
 and non-local parts, the different projectors, the non-linear core
 correction ...

SOURCE

265  type pseudopotential_type
266 
267 ! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines,
268 ! declared in another part of ABINIT, that might need to take into account your modification.
269 
270 
271 ! Integer scalars
272   integer :: dimekb
273    ! Dimension of Ekb
274    ! ->Norm conserving : Max. number of Kleinman-Bylander energies
275    !                     for each atom type
276    !                     dimekb=lnmax (lnmax: see this file)
277    ! ->PAW : Max. number of Dij coefficients connecting projectors
278    !                     for each atom type
279    !                     dimekb=lmnmax*(lmnmax+1)/2 (lmnmax: see this file)
280 
281   integer :: lmnmax
282    !  If useylm=0, max number of (l,n)   comp. over all type of psps (lnproj)
283    !  If useylm=1, max number of (l,m,n) comp. over all type of psps (lmnproj)
284    !  If mpspso is 2, lmnmax takes into account the spin-orbit projectors,
285    !  so, it is equal to the max of lmnprojso or lnprojso, see pspheader_type
286 
287   integer :: lnmax
288    !  Max. number of (l,n) components over all type of psps
289    !  If mpspso is 2, lmnmax takes into account the spin-orbit projectors,
290    !  so, it is equal to the max of lnprojso, see pspheader_type
291 
292   integer :: mproj
293    ! Maximum number of non-local projectors over all angular momenta and type of psps
294    ! 0 only if all psps are local
295 
296   integer :: mpsang
297    ! Highest angular momentum of non-local projectors over all type of psps.
298    ! shifted by 1 : for all local psps, mpsang=0; for largest s, mpsang=1,
299    ! for largest p, mpsang=2; for largest d, mpsang=3; for largest f, mpsang=4
300    ! This gives also the number of non-local "channels"
301 
302   integer :: mpspso
303    ! mpspso is set to 1 if none of the psps is used with a spin-orbit part (that
304    !  is, if the user input variable so_psp is not equal
305    !  to 1 in at least one case
306    ! otherwise, it is set to 2
307 
308   integer :: mpssoang
309    ! Maximum number of channels, including those for treating the spin-orbit coupling
310    ! when mpspso=1, mpssoang=mpsang
311    ! when mpspso=2, mpssoang=2*mpsang-1
312 
313   integer :: mqgrid_ff
314    ! Number of points in the reciprocal space grid on which
315    ! the radial functions ffspl are specified
316 
317   integer :: mqgrid_vl
318    ! Number of points in the reciprocal space grid on which
319    ! the radial functions vlspl are specified
320 
321   integer :: mtypalch
322    ! Maximum number of alchemical pseudo atoms. If non-zero,
323    ! the mechanism to generate mixing of pseudopotentials is activated
324 
325   integer :: npsp
326    ! Number of types of pseudopotentials
327 
328   integer :: npspalch
329    ! Number of types of pseudopotentials used for alchemical purposes
330 
331   integer :: ntypat
332    ! Number of types of atoms (might be alchemy wrt pseudopotentials)
333 
334   integer :: ntypalch
335    ! Number of types of alchemical pseudoatoms
336 
337   integer :: ntyppure
338    ! Number of types of pure pseudoatoms
339 
340   integer :: n1xccc
341    ! Number of radial points for the description of the pseudo-core charge
342    ! (in the framework of the non-linear XC core correction)
343 
344   integer :: optnlxccc
345    ! Option for the choice of non-linear XC core correction treatment (see the input variable)
346    ! Used only for FHI pseudos.
347 
348   integer :: positron
349    ! Option for the choice of type of GS calculation (electron or positron)
350 
351   integer :: usepaw
352    ! if usepaw=0 , use norm-conserving psps part of the code
353    ! is usepaw=1 , use paw part of the code
354 
355   integer :: usewvl
356    ! if usewvl=0 ,  plane waves
357    ! is usewvl=1 ,  wavelets
358 
359   integer :: useylm
360    ! governs the way the nonlocal operator is to be applied:
361    !   1=using Ylm, 0=using Legendre polynomials
362 
363 ! Logical scalars
364   logical :: vlspl_recipSpace
365    ! governs if vlspl is compute in reciprocal space or in real
366    ! space (when available).
367 
368 ! Integer arrays
369   integer, allocatable :: algalch(:)
370    ! algalch(ntypalch)
371    ! For each type of pseudo atom, the algorithm to mix the pseudopotentials
372 
373   integer, allocatable :: indlmn(:,:,:)
374    ! indlmn(6,lmnmax,ntypat)
375    ! For each type of psp,
376    ! array giving l,m,n,lm,ln,spin for i=ln  (if useylm=0)
377    !                                or i=lmn (if useylm=1)
378    ! NB: spin is used for NC pseudos with SOC term: 1 if scalar term (spin diagonal), 2 if SOC term.
379 
380   integer, allocatable :: pspdat(:)
381    ! pspdat(ntypat)
382    ! For each type of psp, the date of psp generation, as given by the psp file
383 
384   integer, allocatable :: pspcod(:)
385    ! pspcod(npsp)
386    ! For each type of psp, the format -or code- of psp generation,
387    !  as given by the psp file
388 
389   integer, allocatable :: pspso(:)
390    ! pspso(npsps)
391    ! For each type of psp,
392    ! 1 if no spin-orbit component is taken into account
393    ! 2 if a spin-orbit component is used
394 
395   integer, allocatable :: pspxc(:)
396    ! pspxc(npsps)
397    ! For each type of psp, the XC functional that was used to generate it,
398    ! as given by the psp file
399 
400 ! Real (real(dp)) arrays
401 
402   real(dp), allocatable :: ekb(:,:)
403    ! ekb(dimekb,ntypat*(1-usepaw))
404    !  ->NORM-CONSERVING PSPS ONLY:
405    !    (Real) Kleinman-Bylander energies (hartree)
406    !           for number of basis functions (l,n) (lnmax)
407    !           and number of atom types (ntypat)
408    ! NOTE (MT) : ekb (norm-conserving) is now diagonal (one dimension
409    !             lnmax); it would be easy to give it a second
410    !             (symmetric) dimension by putting
411    !             dimekb=lnmax*(lnmax+1)/2
412    !             in the place of dimekb=lmnmax.
413 
414   real(dp), allocatable :: ffspl(:,:,:,:)
415    ! ffspl(mqgrid_ff,2,lnmax,ntypat)
416    ! Gives, on the radial grid, the different non-local projectors,
417    ! in both the norm-conserving case, and the PAW case
418 
419   real(dp), allocatable :: mixalch(:,:)
420    ! mixalch(npspalch,ntypalch)
421    ! Mixing coefficients to generate alchemical pseudo atoms
422 
423   real(dp), allocatable :: qgrid_ff(:)
424    ! qgrid_ff(mqgrid_ff)
425    ! The coordinates of all the points of the radial grid for the nl form factors
426 
427   real(dp), allocatable :: qgrid_vl(:)
428    ! qgrid_vl(mqgrid_vl)
429    ! The coordinates of all the points of the radial grid for the local part of psp
430 
431   real(dp), allocatable :: vlspl(:,:,:)
432    ! vlspl(mqgrid_vl,2,ntypat)
433    ! Gives, on the radial grid, the local part of each type of psp.
434 
435   real(dp), allocatable :: dvlspl(:,:,:)
436    ! dvlspl(mqgrid_vl,2,ntypat)
437    ! Gives, on the radial grid, the first derivative of the local
438    ! part of each type of psp (computed when the flag 'vlspl_recipSpace' is true).
439 
440   real(dp), allocatable :: xcccrc(:)
441    ! xcccrc(ntypat)
442    ! Gives the maximum radius of the pseudo-core charge, for each type of psp.
443 
444   real(dp), allocatable :: xccc1d(:,:,:)
445    ! xccc1d(n1xccc*(1-usepaw),6,ntypat)
446    ! Norm-conserving psps only
447    ! The component xccc1d(n1xccc,1,ntypat) is the pseudo-core charge
448    ! for each type of atom, on the radial grid. The components
449    ! xccc1d(n1xccc,ideriv,ntypat) give the ideriv-th derivative of the
450    ! pseudo-core charge with respect to the radial distance.
451 
452   real(dp), allocatable :: zionpsp(:)
453    ! zionpsp(npsp)
454    ! For each pseudopotential, the ionic pseudo-charge
455    ! (giving raise to a long-range coulomb potential)
456 
457   real(dp), allocatable :: ziontypat(:)
458    ! ziontypat(ntypat)
459    !  For each type of atom (might be alchemy wrt psps), the ionic pseudo-charge
460    ! (giving raise to a long-range coulomb potential)
461 
462   real(dp), allocatable :: znuclpsp(:)
463    ! znuclpsp(npsp)
464    ! The atomic number of each pseudopotential
465 
466   real(dp), allocatable :: znucltypat(:)
467    ! znucltypat(ntypat)
468    ! The atomic number of each type of atom (might be alchemy wrt psps)
469 
470 ! Character arrays
471   character(len=fnlen), allocatable :: filpsp(:)
472    ! filpsp(npsps)
473    ! The filename of the pseudopotential
474 
475   character(len=fnlen), allocatable :: title(:)
476    ! title(npsp)
477    ! The content of first line read from the psp file
478 
479   character(len=md5_slen), allocatable :: md5_pseudos(:)
480   ! md5pseudos(npsp)
481   ! md5 checksums associated to pseudos (read from file)
482 
483   type(pseudopotential_gth_type) :: gth_params
484    ! Types for pseudo-potentials that are based on parameters. Currently, only
485    ! GTH are supported (see pseudopotential_gth_type). To add one, one should
486    ! create an initialisation method and a destruction method in 02psp (see
487    ! psp2params.F90). These methods are called in driver().
488 
489    type(nctab_t),allocatable :: nctab(:)
490    ! nctab(ntypat)
491    ! Tables storing data for NC pseudopotentials.
492 
493    integer :: nc_xccc_gspace=0
494    ! NC pseudos only. Set to 1 if the non-linear core correction should
495    ! be treated in G-space similarly to the approach used for PAW.
496 
497  end type pseudopotential_type

defs_datatypes/pspheader_paw_type [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 pspheader_paw_type

FUNCTION

 The pspheader_paw_type structured datatype gather additional information
 about a PAW pseudopotential file, from its header.

SOURCE

512  type pspheader_paw_type
513 
514 ! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines,
515 ! declared in another part of ABINIT, that might need to take into account your modification.
516 
517 ! WARNING : Also pay attention to subroutine pspheads_comm, which broadcasts this datatype.
518 
519   integer :: basis_size    ! Number of elements of the wf basis ((l,n) quantum numbers)
520   integer :: l_size        ! Maximum value of l+1 leading to a non zero Gaunt coefficient
521   integer :: lmn_size      ! Number of elements of the paw basis
522   integer :: mesh_size     ! Dimension of (main) radial mesh
523   integer :: pawver        ! Version number of paw psp format
524   integer :: shape_type    ! Type of shape function
525   real(dp) :: rpaw         ! Radius for paw spheres
526   real(dp) :: rshp         ! Cut-off radius of shape function
527 
528  end type pspheader_paw_type

defs_datatypes/pspheader_type [ Types ]

[ Top ] [ defs_datatypes ] [ Types ]

NAME

 pspheader_type

FUNCTION

 The pspheader_type structured datatype gather different information
 about a pseudopotential file, from its header.

SOURCE

543  type pspheader_type
544 
545 ! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines,
546 ! declared in another part of ABINIT, that might need to take into account your modification.
547 ! WARNING : Also pay attention to subroutine pspheads_comm, which broadcasts this datatype.
548 
549   integer :: nproj(0:3) ! number of scalar projectors for each angular momentum
550 
551   integer :: nprojso(3) ! number of spin-orbit projectors for each angular momentum
552 
553   integer :: lmax       ! maximum l quantum number (-1 if only local)
554                         ! Example : s only       -> lmax=0
555                         !           s and p      -> lmax=1
556                         !           s,p,d        -> lmax=2
557 
558   integer :: pspcod
559     ! code number of the pseudopotential
560 
561   integer :: pspdat
562     ! date of generation of the pseudopotential
563 
564   integer :: pspxc
565     ! exchange-correlation functional
566 
567   integer :: pspso
568     ! spin-orbit characteristics
569     ! 0 if pseudo does not support SOC, 1 or 2 if SOC terms are available in the pp file.
570     ! Note that one could have a pseudo with SOC terms but ignore the SOC contribution
571     ! For example, it's possible to use nspinor=2 and set so_psp to 0 in the input file
572     ! or perform a run with nspinor=1 with pseudos containing SOC terms.
573 
574   integer :: usewvl
575    ! if usewvl=0 ,  plane waves
576    ! is usewvl=1 ,  wavelets
577 
578   integer :: xccc
579     ! =0 if no XC core correction, non-zero if XC core correction
580 
581   real(dp) :: zionpsp
582     ! charge of the ion made of core electrons only
583 
584   real(dp) :: znuclpsp
585     ! atomic number of the nuclei
586 
587   real(dp) :: GTHradii(0:4)
588     ! Radii values for GTH (and HGH) family potentials
589 
590   character(len=fnlen) :: filpsp
591     ! name of the psp file
592 
593   character(len=fnlen) :: title
594     ! content of first line read from the psp file
595 
596   character(len=md5_slen) :: md5_checksum = md5_none
597     ! md5 checksum read from file.
598 
599   type(pspheader_paw_type) :: pawheader
600     ! only for PAW psps ; see m_pawpsp.
601 
602  end type pspheader_type