1! 2! Copyright (C) 1996-2016 The SIESTA group 3! This file is distributed under the terms of the 4! GNU General Public License: see COPYING in the top directory 5! or http://www.gnu.org/copyleft/gpl.txt. 6! See Docs/Contributors.txt for a list of contributors. 7! 8 module atm_types 9 10 use precision, only: dp 11 use radial, only: rad_func 12! 13! Derived types for orbitals, KB projectors, and DFT+U projectors 14! 15 implicit none 16! 17! Storage of orbital and projector real-space tables and other 18! characteristics 19! 20! These parameters are over-dimensioned, but there is no storage 21! penalty, as the real information is packed and indexed. 22! 23 integer, parameter, public :: maxnorbs = 100 24! Maximum number of nlm orbitals 25! 26 integer, parameter, public :: maxn_pjnl = 10 27! Maximum number of projectors (not counting different "m" copies) 28 integer, parameter, public :: maxn_orbnl = 200 29! Maximum number of nl orbitals (not counting different "m" copies) 30! Now very large to accommodate filteret basis sets 31 integer, parameter, public :: maxnprojs = 50 32! Maximum number of nlm projectors 33! 34 35! 36! Species_info: Consolidate all the pieces of information in one place 37! 38 type, public :: species_info 39 character(len=2) :: symbol 40 character(len=20) :: label 41 integer :: z ! Atomic number 42 real(dp) :: mass 43 real(dp) :: zval ! Valence charge 44 real(dp) :: self_energy !Electrostatic 45 !self-energy 46! 47! Orbitals 48! We keep track of just one orbital for each 49! "nl" family 50! 51 integer :: n_orbnl ! num of nl orbs 52 integer :: lmax_basis ! basis l cutoff 53 integer, dimension(maxn_orbnl) :: orbnl_l ! l of each nl orb 54 integer, dimension(maxn_orbnl) :: orbnl_n ! n of each nl orb 55 integer, dimension(maxn_orbnl) :: orbnl_z ! z of each nl orb 56 logical, dimension(maxn_orbnl) :: orbnl_ispol! is it a pol. orb? 57 58 real(dp), 59 $ dimension(maxn_orbnl) :: orbnl_pop ! pop. of nl orb 60 ! (total of 2l+1 61 ! components) 62! 63! KB Projectors 64! For each l, there can be several projectors. Formally, we 65! can can use the "nl" terminology for them. n will run from 66! 1 to the total number of projectors at that l. 67! 68! 69 integer :: n_pjnl ! num of "nl" projs 70 integer :: lmax_projs ! l cutoff for projs 71 integer, dimension(maxn_pjnl) :: pjnl_l ! l of each nl proj 72 integer, dimension(maxn_pjnl) :: pjnl_n ! n of each nl proj 73 real(dp), dimension(maxn_pjnl) 74 $ :: pjnl_ekb ! energy of 75 76! 77! Aggregate numbers of orbitals and projectors (including 2l+1 78! copies for each "nl"), and index arrays keeping track of 79! which "nl" family they belong to, and their n, l, and m (to avoid 80! a further dereference) 81! 82 integer :: norbs 83 integer, dimension(maxnorbs) :: orb_index 84 integer, dimension(maxnorbs) :: orb_n 85 integer, dimension(maxnorbs) :: orb_l 86 integer, dimension(maxnorbs) :: orb_m 87 integer, dimension(maxnorbs) :: orb_gindex 88 real(dp), 89 $ dimension(maxnorbs) :: orb_pop ! pop. of nl orb 90 91 integer :: nprojs 92 integer, dimension(maxnprojs) :: pj_index 93 integer, dimension(maxnprojs) :: pj_n 94 integer, dimension(maxnprojs) :: pj_l 95 integer, dimension(maxnprojs) :: pj_m 96 integer, dimension(maxnprojs) :: pj_gindex 97! 98! DFT+U Projectors 99! Here we follow the scheme used for the KB projectors 100! 101 integer :: n_pjdftunl = 0 102 ! num of "nl" projs 103 ! not counting the "m copies" 104 integer :: lmax_dftu_projs = 0 105 ! l cutoff for DFT+U proj 106 integer, dimension(maxn_pjnl) :: pjdftunl_l ! l of each nl proj 107 integer, dimension(maxn_pjnl) :: pjdftunl_n ! n of each nl proj 108 ! Here, n is not the principal 109 ! quantum number, but a sequential 110 ! index from 1 to the total 111 ! number of projectors for that l. 112 ! In the case of DFT+U projectors, 113 ! It is always equal to 1. 114 real(dp), dimension(maxn_pjnl) :: pjdftunl_U ! U of each nl projector 115 real(dp), dimension(maxn_pjnl) :: pjdftunl_J ! J of each nl projector 116 117 integer :: nprojsdftu = 0 118 ! Total number of DFT+U proj. 119 ! counting the "m copies" 120 ! (including the (2l + 1) factor)) 121 integer, dimension(maxnprojs) :: pjdftu_index 122 integer, dimension(maxnprojs) :: pjdftu_n 123 integer, dimension(maxnprojs) :: pjdftu_l 124 integer, dimension(maxnprojs) :: pjdftu_m 125 integer, dimension(maxnprojs) :: pjdftu_gindex 126! 127 type(rad_func), dimension(:), pointer :: orbnl 128 type(rad_func), dimension(:), pointer :: pjnl 129 type(rad_func), dimension(:), pointer :: pjdftu 130 type(rad_func) :: vna 131 integer :: vna_gindex 132 type(rad_func) :: chlocal 133 type(rad_func) :: reduced_vlocal 134 logical :: there_is_core 135 type(rad_func) :: core 136 137 logical :: read_from_file 138 end type species_info 139 140! 141 integer, save, public :: nspecies 142 integer, save, public :: npairs 143 144 type(species_info), target, allocatable, 145 $ save, public :: species(:) 146 type(rad_func), allocatable, target, 147 $ save, public :: elec_corr(:) 148 149 150 private 151 152 end module atm_types 153