25 use,
intrinsic :: iso_fortran_env
44 interface operator(==)
46 end interface operator(==)
49 integer,
public,
parameter :: LABEL_LEN=15
56 character(len=LABEL_LEN) :: label
61 real(real64) :: vdw_radius
63 logical,
public :: has_density
65 character(len=MAX_PATH_LEN) :: filename
68 integer,
public :: niwfs
69 integer,
allocatable,
public :: iwf_l(:, :), iwf_m(:, :), iwf_i(:, :), iwf_n(:, :)
70 real(real64),
allocatable,
public :: iwf_j(:)
73 real(real64) :: hubbard_U
74 real(real64) :: hubbard_j
75 real(real64) :: hubbard_alpha
78 procedure(species_is_local),
deferred :: is_local
79 procedure(species_get_iwf_radius),
deferred :: get_iwf_radius
80 procedure(species_iwf_fix_qn),
deferred :: iwf_fix_qn
81 procedure(species_init_potential),
deferred :: init_potential
82 procedure(species_build),
deferred :: build
85 procedure(species_debug),
deferred :: debug
120 class(species_t),
pointer :: s
127 class(species_t),
intent(in) :: spec
131 real(real64) function species_get_iwf_radius(spec, ii, is, threshold) result(radius)
134 class(species_t),
intent(in) :: spec
135 integer,
intent(in) :: ii
136 integer,
intent(in) :: is
137 real(real64),
optional,
intent(in) :: threshold
146 integer,
intent(in) :: nspin
147 integer,
intent(in) :: dim
157 real(real64),
intent(in) :: grid_cutoff
158 integer,
intent(in) :: filter
162 subroutine species_build(spec, namespace, ispin, dim, print_info)
167 integer,
intent(in) :: ispin
168 integer,
intent(in) :: dim
169 logical,
optional,
intent(in) :: print_info
178 character(len=*),
intent(in) :: dir
180 real(real64),
intent(in) :: gmax
197 character(len=*),
intent(in) :: label
198 integer,
intent(in) :: index
202 this%label = trim(label)
208 this%vdw_radius = -m_one
209 this%has_density = .false.
212 this%hubbard_U = m_zero
213 this%hubbard_j = m_zero
214 this%hubbard_alpha = m_zero
223 integer,
intent(in) :: min_niwfs
229 if (
size >= min_niwfs)
exit
236 character(len=LABEL_LEN) pure function species_label(species)
242 character(len=2) pure function species_label_short(species)
248 integer pure function species_index(species)
254 real(real64)
pure function species_zval(species)
261 class(
species_t),
intent(inout) :: species
262 real(real64),
intent(in) :: zval
267 real(real64)
pure function species_z(species)
274 class(
species_t),
intent(inout) :: species
275 real(real64),
intent(in) :: z
287 class(
species_t),
intent(inout) :: species
288 real(real64),
intent(in) :: mass
300 class(
species_t),
intent(inout) :: species
301 real(real64),
intent(in) :: radius
302 species%vdw_radius = radius
338 integer,
intent(in) :: hubbard_l
339 species%hubbard_l = hubbard_l
344 class(
species_t),
intent(inout) :: species
345 real(real64),
intent(in) :: hubbard_u
346 species%hubbard_u = hubbard_u
351 class(
species_t),
intent(inout) :: species
352 real(real64),
intent(in) :: hubbard_j
353 species%hubbard_j = hubbard_j
358 class(
species_t),
intent(inout) :: species
359 real(real64),
intent(in) :: hubbard_alpha
360 species%hubbard_alpha = hubbard_alpha
371 class(
species_t),
intent(inout) :: species
372 character(len=*),
intent(in) :: filename
373 species%filename = trim(filename)
379 integer,
intent(in) :: j, is
380 integer,
intent(out) :: i, l, m
382 i = species%iwf_i(j, is)
383 l = species%iwf_l(j, is)
384 m = species%iwf_m(j, is)
390 integer,
intent(in) :: j, is
391 integer,
intent(out) :: n
393 n = species%iwf_n(j, is)
399 integer,
intent(in) :: iorb
400 real(real64),
intent(out) :: j
402 j = species%iwf_j(iorb)
411 safe_deallocate_a(species%iwf_n)
412 safe_deallocate_a(species%iwf_l)
413 safe_deallocate_a(species%iwf_m)
414 safe_deallocate_a(species%iwf_i)
415 safe_deallocate_a(species%iwf_j)
427 character(len=*),
intent(in) :: label
428 character(kind=c_char) :: c_symbol(
label_len+1)
430 character(len=LABEL_LEN) :: symbol
435 do ilend = 1, len(label)
436 if (iachar(label(ilend:ilend)) >= iachar(
'a') .and. iachar(label(ilend:ilend)) <= iachar(
'z')) cycle
437 if (iachar(label(ilend:ilend)) >= iachar(
'A') .and. iachar(label(ilend:ilend)) <= iachar(
'Z')) cycle
442 symbol = label(1:ilend)
444 c_symbol = c_null_char
445 c_symbol(1:c_str_len(symbol)) = string_f_to_c(symbol)
450 class(
species_t),
intent(in) :: spec1, spec2
454 same = same_type_as(spec1, spec2)
455 if(abs(spec1%z - spec2%z) > m_epsilon) same = .false.
456 if(abs(spec1%z_val - spec2%z_val) > m_epsilon) same = .false.
457 if(abs(spec1%mass - spec2%mass) > m_epsilon) same = .false.
real(real64) pure function species_zval(species)
integer, parameter, private libxc_c_index
pure subroutine species_set_hubbard_l(species, hubbard_l)
pure subroutine species_set_z(species, z)
logical pure function species_user_defined(spec)
Is the species user-defined or not.
real(real64) pure function species_hubbard_u(species)
character(len=2) pure function, public species_label_short(species)
pure subroutine species_set_hubbard_j(species, hubbard_j)
integer pure function species_niwfs(species)
pure subroutine species_set_filename(species, filename)
pure subroutine species_set_zval(species, zval)
subroutine, public species_end(species)
subroutine, public species_init(this, label, index)
Initializes a species object. This should be the first routine to be called (before species_read and ...
logical pure function species_represents_real_atom(spec)
Is the species representing an atomic species or not.
logical pure function species_is_ps_with_nlcc(this)
Is the species a pseudopotential derived class or not with nlcc.
pure subroutine species_set_hubbard_alpha(species, hubbard_alpha)
character(len=200) pure function species_filename(species)
pure subroutine species_iwf_ilm(species, j, is, i, l, m)
logical function species_is_same_species(spec1, spec2)
integer pure function species_index(species)
integer, parameter, public label_len
logical pure function species_is_ps(this)
Is the species a pseudopotential derived class or not.
real(real64) pure function species_vdw_radius(species)
pure subroutine species_iwf_n(species, j, is, n)
pure subroutine species_set_hubbard_u(species, hubbard_u)
real(real64) pure function species_hubbard_alpha(species)
real(real64) pure function species_z(species)
pure subroutine species_iwf_j(species, iorb, j)
character(len=label_len) pure function species_label(species)
character(kind=c_char) function, dimension(label_len+1), public get_symbol(label)
logical pure function species_is_full(this)
Is the species an all-electron derived class or not.
pure subroutine species_set_vdw_radius(species, radius)
integer pure function species_hubbard_l(species)
pure subroutine species_set_mass(species, mass)
real(real64) pure function species_hubbard_j(species)
integer pure function, public species_closed_shell_size(min_niwfs)
find size of closed shell for hydrogenic atom with size at least min_niwfs
real(real64) pure function species_mass(species)
An abstract class for species. Derived classes include jellium, all electron, and pseudopotential spe...
Needed for having an array of pointers See for instance https: