ABINIT/m_ddb_hdr [ Modules ]

This module contains the declaration of data types and methods
to handle the header of the DDB files.

COPYRIGHT

Copyright (C) 2011-2018 ABINIT group (MJV, XG, MT, MM, MVeithen, MG, PB, JCC, GA)
This file is distributed under the terms of the
GNU General Public License, see ~abinit/COPYING
or http://www.gnu.org/copyleft/gpl.txt .

m_ddb_hdr/compare_ddb_variables [ Functions ]

Compare the temporary DDB and input DDB preliminary information,
as well as psp information.

COPYRIGHT

Copyright (C) 1999-2018 ABINIT group (XG,MT,GA)
This file is distributed under the terms of the
GNU General Public Licence, see ~abinit/COPYING
or http://www.gnu.org/copyleft/gpl.txt .
For the initials of contributors, see ~abinit/doc/developers/contributors.txt .

NOTES

1. All the variables have their usual meaning.
2. Note that fullinit==0 means that the input DDB has been
initialized by a ground state input file. Some comparison are
then not required.
3. All variables with 8 appended are from the new input DDB

m_ddb_hdr/ddb_getdims [ Functions ]

Open Derivative DataBase, then reads the variables that
must be known in order to dimension the arrays before complete reading

INPUTS

character(len=*) filnam: name of input or output file
unddb=unit number for input or output
vrsddb=6 digit integer giving date, in form yymmdd for month=mm(1-12),
day=dd(1-31), and year=yy(90-99 for 1990 to 1999,00-89 for 2000 to 2089),
of current DDB version.

OUTPUT

dimekb=dimension of ekb (only used for norm-conserving psps)
lmnmax=if useylm=1, max number of (l,m,n) comp. over all type of psps
=if useylm=0, max number of (l,n) comp. over all type of psps
mband=maximum number of bands
mblktyp=largest block type
msym=maximum number of symmetries
natom=number of atoms
nblok=number of bloks in the DDB
nkpt=number of k points
ntypat=number of atom types
usepaw= 0 for non paw calculation; =1 for paw calculation
comm=MPI communicator.

386 subroutine ddb_hdr_free(ddb_hdr)
387 388 389 !This section has been created automatically by the script Abilint (TD).
390 !Do not modify the following lines by hand.
391 #undef ABI_FUNC
392 #define ABI_FUNC 'ddb_hdr_free'
393 !End of the abilint section
394 395 implicit none
396 397 !Arguments ------------------------------------
398 type(ddb_hdr_type),intent(inout) :: ddb_hdr
399 400 ! ************************************************************************
401 402 ! integer
403 if (allocated(ddb_hdr%nband)) then
404 ABI_FREE(ddb_hdr%nband)
405 end if
406 if (allocated(ddb_hdr%symafm)) then
407 ABI_FREE(ddb_hdr%symafm)
408 end if
409 if (allocated(ddb_hdr%symrel)) then
410 ABI_FREE(ddb_hdr%symrel)
411 end if
412 if (allocated(ddb_hdr%typat)) then
413 ABI_FREE(ddb_hdr%typat)
414 end if
415 416 ! real
417 if (allocated(ddb_hdr%amu)) then
418 ABI_FREE(ddb_hdr%amu)
419 end if
420 if (allocated(ddb_hdr%kpt)) then
421 ABI_FREE(ddb_hdr%kpt)
422 end if
423 if (allocated(ddb_hdr%occ)) then
424 ABI_FREE(ddb_hdr%occ)
425 end if
426 if (allocated(ddb_hdr%spinat)) then
427 ABI_FREE(ddb_hdr%spinat)
428 end if
429 if (allocated(ddb_hdr%tnons)) then
430 ABI_FREE(ddb_hdr%tnons)
431 end if
432 if (allocated(ddb_hdr%wtk)) then
433 ABI_FREE(ddb_hdr%wtk)
434 end if
435 if (allocated(ddb_hdr%xred)) then
436 ABI_FREE(ddb_hdr%xred)
437 end if
438 if (allocated(ddb_hdr%zion)) then
439 ABI_FREE(ddb_hdr%zion)
440 end if
441 if (allocated(ddb_hdr%znucl)) then
442 ABI_FREE(ddb_hdr%znucl)
443 end if
444 445 ! types
446 call psps_free(ddb_hdr%psps)
447 448 if (allocated(ddb_hdr%pawtab)) then
449 call pawtab_free(ddb_hdr%pawtab)
450 ABI_DATATYPE_DEALLOCATE(ddb_hdr%pawtab)
451 end if
452 453 end subroutine ddb_hdr_free

m_ddb_hdr/ddb_io_out [ Functions ]

Open Derivative DataBase, then
write Derivative DataBase preliminary information.
Note: only one processor writes the DDB.

INPUTS

acell(3)=length scales of primitive translations (bohr)
amu(mtypat)=mass of the atoms (atomic mass unit)
dilatmx=the maximal dilatation factor
character(len=fnlen) dscrpt:string that describe the output database
ecut=kinetic energy planewave cutoff (hartree)
ecutsm=smearing energy for plane wave kinetic energy (Ha)
character(len=fnlen) filnam: name of output file
intxc=control xc quadrature
iscf=parameter controlling scf or non-scf choice
ixc=exchange-correlation choice parameter
kpt(3,mkpt)=k point set (reduced coordinates)
kptnrm=normalisation of k points
matom=maximum number of atoms
mband=maximum number of bands
mkpt=maximum number of special points
msym=maximum number of symetries
mtypat=maximum number of atom types
natom=number of atoms in the unit cell
nband(mkpt)=number of bands at each k point, for each polarization
ngfft(18)=contain all needed information about 3D FFT,
see ~abinit/doc/variables/vargs.htm#ngfft
nkpt=number of k points
nspden=number of spin-density components
nspinor=number of spinorial components of the wavefunctions
nsppol=1 for unpolarized, 2 for spin-polarized
nsym=number of symmetry elements in space group
ntypat=number of atom types
occ(mband*mkpt)=occupation number for each band and k
occopt=option for occupancies
pawecutdg=cut-off for fine "double grid" used in PAW calculations (unused for NCPP)
rprim(3,3)=dimensionless primitive translations in real space
dfpt_sciss=scissor shift (Ha)
spinat(3,matom)=initial spin of each atom, in unit of hbar/2
symafm(msym)=(anti)ferromagnetic part of symmetry operations
symrel(3,3,msym)=symmetry operations in real space
tnons(3,msym)=nonsymmorphic translations for symmetry operations
tolwfr=tolerance on largest wf residual
tphysel="physical" electronic temperature with FD occupations
tsmear=smearing width (or temperature) in Hartree
typat(matom)=type of each atom
unddb=unit number for output
usepaw=flag for PAW
vrsddb=6 digit integer giving date, in form yymmdd for month=mm(1-12),
day=dd(1-31), and year=yy(90-99 for 1990 to 1999,00-89 for 2000 to 2089),
of current DDB version.
wtk(mkpt)=weight assigned to each k point
xred(3,matom)=reduced atomic coordinates
zion(mtypat)=valence charge of each type of atom
znucl(mtypat)=atomic number of atom type

m_ddb_hdr/inprep8 [ Functions ]

Open Derivative DataBase, then reads the variables that
must be known in order to dimension the arrays before complete reading
Note: only one processor read or write the DDB.

INPUTS

character(len=*) filnam: name of input or output file
unddb=unit number for input or output
vrsddb=6 digit integer giving date, in form yymmdd for month=mm(1-12),
day=dd(1-31), and year=yy(90-99 for 1990 to 1999,00-89 for 2000 to 2089), of current DDB version.

OUTPUT

dimekb=dimension of ekb (only used for norm-conserving psps)
lmnmax=if useylm=1, max number of (l,m,n) comp. over all type of psps
=if useylm=0, max number of (l,n) comp. over all type of psps
mband=maximum number of bands
mblktyp=largest block type
msym=maximum number of symmetries
natom=number of atoms
nblok=number of bloks in the DDB
nkpt=number of k points
ntypat=number of atom types
usepaw= 0 for non paw calculation; =1 for paw calculation

m_ddb_hdr/ioddb8_in [ Functions ]

Open Derivative DataBase, and read preliminary information.
Note: only one processor reads the DDB.

INPUTS

character(len=*)= name of input file
matom=maximum number of atoms
mband=maximum number of bands
mkpt=maximum number of special points
msym=maximum number of symetries
mtypat=maximum number of atom types
unddb=unit number for input
vrsddb=6 digit integer giving date, in form yymmdd for month=mm(1-12),
day=dd(1-31), and year=yy(90-99 for 1990 to 1999,00-89 for 2000 to 2089),
of current DDB version.

OUTPUT

acell(3)=length scales of primitive translations (bohr)
amu(mtypat)=mass of the atoms (atomic mass unit)
dilatmx=the maximal dilatation factor
ecut=kinetic energy planewave cutoff (hartree)
ecutsm=smearing energy for plane wave kinetic energy (Ha)
intxc=control xc quadrature
iscf=parameter controlling scf or non-scf choice
ixc=exchange-correlation choice parameter
kpt(3,mkpt)=k point set (reduced coordinates)
kptnrm=normalisation of k points
natom=number of atoms in the unit cell
nband(mkpt)=number of bands at each k point, for each polarization
ngfft(18)=contain all needed information about 3D FFT, see ~abinit/doc/variables/vargs.htm#ngfft
nkpt=number of k points
nspden=number of spin-density components
nspinor=number of spinorial components of the wavefunctions
nsppol=1 for unpolarized, 2 for spin-polarized
nsym=number of symmetry elements in space group
ntypat=number of atom types
occ(mband*mkpt)=occupation number for each band and k
occopt=option for occupancies
pawecutdg=cut-off for fine "double grid" used in PAW calculations (unused for NCPP)
rprim(3,3)=dimensionless primitive translations in real space
dfpt_sciss=scissor shift (Ha)
spinat(3,matom)=initial spin of each atom, in unit of hbar/2
symafm(msym)=(anti)ferromagnetic part of symmetry operations
symrel(3,3,msym)=symmetry operations in real space
tnons(3,msym)=nonsymmorphic translations for symmetry operations
tolwfr=tolerance on largest wf residual
tphysel="physical" electronic temperature with FD occupations
tsmear=smearing width (or temperature) in Hartree
typat(matom)=type of each atom
usepaw=flag for PAW
wtk(mkpt)=weight assigned to each k point
xred(3,matom)=reduced atomic coordinates
zion(mtypat)=valence charge of each type of atom
znucl(mtypat)=atomic number of atom type

m_ddb_hdr/psddb8 [ Functions ]

Take care of the i/o of pseudopotentials for the
Derivative DataBase, and also the number of data blocks.

INPUTS

choice=(1 => read), (2=> write)
dimekb=dimension of ekb (contains Kleimann-Bylander energies)
used only for norm-conserving pseudopotentials
lmnmax=if useylm=1, max number of (l,m,n) comp. over all type of psps
=if useylm=0, max number of (l,n) comp. over all type of psps
nunit=unit number for the Derivative DataBase.
ntypat=number of atom types
pspso(ntypat)=For each type of psp, 1 if no spin-orbit component is taken
into account, 2 if a spin-orbit component is used
usepaw= 0 for non paw calculation; =1 for paw calculation
useylm=governs the way the nonlocal operator is to be applied:
1=using Ylm, 0=using Legendre polynomials
vrsddb=Derivative Database version, for check of compatibility.

OUTPUT

(see side effects)

SIDE EFFECTS

indlmn(6,i,ntypat)= array giving l,m,n,lm,ln,s for i=ln (if useylm=0)
or i=lmn (if useylm=1)
ekb(dimekb,ntypat)= (norm-conserving psps only) (Real) Kleinman-Bylander energies (hartree)
Presently the only characteristics of the psp
fullinit=0 if the ekb are not available, at input as well as at output
pawtab(ntypat*usepaw)= (PAW only) PAW datasets characteristics
Presently only pawtab%basis_size,pawtab%lmn_size,pawtab%shape_type
pawtab%rpaw,pawtab%rshp,pawtab%dij0 are used
nblok=number of blocks